Announcement Announcement Module
Collapse
No announcement yet.
OC4J and Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OC4J and Spring

    Hi there,

    I'm in the process of "back-porting" some existing J2EE code to utilise the Spring Framework and trying to deploy the EAR to OC4J version 10.1.3.
    Every time we deploy any code that accesses any Spring classes in any of the Spring .jar files, we recieve ClassNotFound exceptions (or the wrapped OC4J equivalents).

    For example:
    06/03/20 12:41:45 Caused by: java.lang.NoClassDefFoundError: org/springframework/core/io/Resource
    06/03/20 12:41:45 at java.lang.Class.forName0(Native Method)
    06/03/20 12:41:45 at java.lang.Class.forName(Class.java:219)
    06/03/20 12:41:45 at com.evermind.server.ejb.deployment.BeanDescriptor. initialize(BeanDescriptor.java:252)
    06/03/20 12:41:45 ... 15 more

    Now, I've spent hours and hours ensuring that the correct .jar files are installed in the right places inside the ejb-jar, updated the manifest file to pick up the .jar and anything remotely likely to cause the problem. I've even tried copying the Spring .jar files to the OC4J installation lib directories, all with the same result. The Spring libraries are installed within the app exactly like other third-party libraries that don't have the problem.

    So, on the off-chance that someone with some OC4J experience might have seen the same issue - can anyone shed any light?

  • #2
    Originally posted by damomurf
    Now, I've spent hours and hours ensuring that the correct .jar files are installed in the right places inside the ejb-jar
    Do you mean inside the ear-file, or did you really place the jars inside the ejb.jar? Nesting jars inside of other jars usually does not work.

    Regards,
    Andreas

    Comment


    • #3
      Originally posted by Andreas Senft
      Do you mean inside the ear-file, or did you really place the jars inside the ejb.jar? Nesting jars inside of other jars usually does not work.
      Thanks Andreas - as it turns out - that was exactly the problem. As discussed further here: http://forums.oracle.com/forums/thre...213756&#213756

      The end result is that, as you point out, especially when using an .ear, the jar dependencies for the ejb-jar code should live in the ear.

      Comment

      Working...
      X