Hibernate / JPA inheritance issue on weblogic

Im getting a weird error when starting my spring2.5.6, jpa (hibernate3.4) webapp in weblogic 10.3


[ERROR] Javassist Enhancement failed: com.xxx.domain.model.Scheme
java.lang.NoSuchMethodError: pcGetManagedFieldCount
        at com.xxx.domain.model.Fund.<clinit>(Fund.java)
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAc
cessorFactory.java:25)

The class com.xxx.domain.model.Scheme is the mapped subclass of the abstract fund object in the single_table inheritance hierarchy, and I get this error for all objects in the hierarchy. I use both annotated classes and XML metadata to define mappings for my persistence classes.

I get this error only when deploying the application to weblogic, so everything works fine using junit. I tried updating to the latest version on javaassit.jar.

Problem It seems like a problem with the boot order, but I can't figure it out.

PS. As bea suggested, I added the following to weblogic.xml

<container-descriptor>
  <prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

- - , , ?

+3
4

.

(@MappedSuperClass), jar. . .

- persistence.xml

+2

, WebLogic 10.0 , javassist JAR . , javassist 10.3 AOP.

, Javassist JAR WebLogic , . "prefer-web-inf-classes" web.xml , , WebLogic.

0

, , hbm?

, . weblogic-application.xml

<prefer-application-packages>
  <package-name>antlr.*</package-name>
  <package-name>org.antlr.*</package-name>
</prefer-application-packages>

, .

0

I just lost a couple of days on this myself. The problem for me was that I had 2 separate data modules in my application. I think 10.3 has some problems with this. I'm not sure about the solution, but the job for me was to combine both of my data services modules into one. It seems that the BEA is aware of this issue. Hope the below url helps. Reference CR370788. http://edocs.bea.com/wls/docs103/issues/known_resolved.html

-1
source

Source: https://habr.com/ru/post/1706767/


All Articles