Posts Tagged ‘weblogic’

<BEA-000000> <java.lang.NegativeArraySizeException

17 December 2015 Leave a comment

If you get this error with WebLogic’s admin server

####<2015-12-17 14:30:14 EET> <Critical> <EmbeddedLDAP> <> <AdminSOA> <VDE Replication Thread> <<anonymous>> <> <9f23d04b03212987:b0dda39:151a2d3b538:-8000-0000000000004207> <1450355414644> <BEA-000000> <java.lang.NegativeArraySizeException
	at com.octetstring.vde.EntryChanges.readBytes(
	at com.octetstring.vde.EntryChanges.<init>(
	at com.octetstring.vde.replication.BackendChangeLog.getChange(
> )

chances are that there are corrupted LDAP files in the <domain home>/servers/<server name>/data/ldap/ldapfiles folder. One possible solution is to delete the and changelog.index files (take a backup first of these two files) and restart the admin server.

Categories: Java, ldap, Oracle, WebLogic Tags: , , ,

java.lang.OutOfMemoryError: getNewTla

19 March 2012 1 comment

This is an error I was getting while trying to load a huge excel file with WebLogic. It seems that the TLA (Thread Local Area) was running out of memory. The TLA is the space reserved on the heap for use exclusively by a thread. Running out of memory means that there is no more space to use in the heap. Having said this, the solution is to increase the available heap space (with Xmx) and not just to fiddle around with the XXtlaSize switch.

Categories: WebLogic Tags: , ,

javax.naming.OperationNotSupportedException: bind not allowed in a ReadOnlyContext; remaining name

1 March 2011 Leave a comment

I got this exception when i tried to define a mail session in WebLogic’s console. I defined the JNDI name to be java:/Mail but it seems that WebLogic does not like the java:/ prefix, so I had to remove it (both from the console and the calling code), and it worked.

Categories: WebLogic Tags: , ,

java.lang.ClassCastException: YOUR_REPORT_NAME_1290416522329_455758 cannot be cast to net.sf.jasperreports.engine.fill.JREvaluator

3 December 2010 9 comments

Another classloading issue. While jasper reports work fine on JBoss, on WebLogic they fail with the exception

net.sf.jasperreports.engine.JRException: Error loading expression class : MYREPORT_1290416522329_455758
Caused by: java.lang.ClassCastException: MYREPORT_1290416522329_455758 cannot be cast to net.sf.jasperreports.engine.fill.JREvaluator

This is easily resolved. In my configuration it was just a matter of moving my jasper jar file from the root of ear to the WEB-INF/lib folder of my web app, in order to be picked up by a different classloader. If this does not work try moving the jasper jar file around in different locations, one of them will work.

Categories: Jasper, Java, JBoss, WebLogic Tags: , , ,

ClassNotFoundException: org.hibernate.hql.ast.HqlToken

2 December 2010 15 comments

Another exception under WebLogic server. This exception occurs because the default query factory class in persistence.xml is the org.hibernate.hql.ast.ASTQueryTranslatorFactory. As the name suggests this is a classpath issue. You might be wondering why you get it since you have the hibernate jar file (the file that contains the HqlToken class) in your classpath. The reason is that the weblogic.jar contains a version of antlr.jar which is loaded by a classloader, while the hibernate stuff are loaded by another classloader. So when the server runs it’s using the version of antlr bundled with weblogic which cannot see the hibernate classes. There are two solutions to this problem

1) Use a

<property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>

instead of a

<property name="hibernate.query.factory_class" value="org.hibernate.hql.ast.ASTQueryTranslatorFactory"/>

in your persistence.xml. This will solve the problem but you will have additional issues if you use Enums as parameters to queries (like I do) since I found out the the ClassicQueryTranslatorFactory has problems translating Enum data types to parameters (instead it translates them as bytes, unless you pass the actual value itself and not the Enum object).


Add Hibernate’s antlr jar file as first entry in the classpath (in your startWeblogic script of your domain’s bin folder) and force weblogic to use this instead. I copied it into the common/lib folder and used

set CLASSPATH=%WL_HOME%\common\lib\antlr-2.7.6.jar;%SAVE_CLASSPATH%

There is another solution suggested, to add the following


in your weblogic-application.xml, but for some reason this did not work for me.

No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)

1 December 2010 Leave a comment

Caused by java.lang.IllegalStateException with message: "No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)

Another JBoss to WebLogic migration issue. This error is caused by having the jboss-seam.jar file twice in the classpath or by loading it more than once. This link explains the problem for JBoss in more details, but the same solution can be applied to WebLogic. Move the loading of the jboss-seam.jar first in the application.xml and remove any reference of it in all the MANIFEST.MF files in the rest of the modules declared in application.xml.


<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="" xmlns="" xmlns:application="" xsi:schemaLocation="" version="5">

MANIFEST.MF in store-ejb.jar, before jboss-seam.jar removal

Manifest-Version: 1.0
Class-Path: storeCommon-ejb.jar

MANIFEST.MF in store-ejb.jar, after jboss-seam.jar removal

Manifest-Version: 1.0
Class-Path: storeCommon-ejb.jar
Categories: Java, JBoss, Seam, WebLogic Tags: , , ,

Error loading element EntityTransaction with component name null and component class null

30 November 2010 8 comments

The exception java.lang.RuntimeException: Error loading element EntityTransaction with component name null and component class null is caused by this line

<transaction:entity-transaction entity-manager="#{entityManager}"/>

in the components.xml file. In order to fix the error you have to replace the

   <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/myManagerFactory"/>


   <persistence:entity-manager-factory name="entityManagerFactory" persistence-unit-name="myPersistenceUnit"/>
   <persistence:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}" />

and remove the

<transaction:entity-transaction entity-manager="#{entityManager}"/>


The myPersistenceUnit is the name of the persistence unit in persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="" 
   <persistence-unit name="myPersistenceUnit" transaction-type="RESOURCE_LOCAL">


         <property name="hibernate.connection.provider_class" value="org.hibernate.connection.DatasourceConnectionProvider"/>
	   <property name="hibernate.connection.datasource" value="myDatasource"/>
	   <property name="transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/>
	   <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
	   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
         <property name="hibernate.dialect" value=""/>
         <property name="" value="validate"/>
         <property name="hibernate.show_sql" value="true"/>
         <property name="hibernate.format_sql" value="true"/>
         <property name="hibernate.default_schema" value="MYSCHEMA"/>