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

  • Spring 3.1 and Weblogic 10.3.5

    Short Version:
    I am attempting to develop a webapp using Oracle's OEPE distribution, using Weblogic 10.3.5. Unfortunately, Weblogic is silently overriding the Spring 3.1.1.RELEASE versions specified in my Maven POM with 2.5.6.SEC01. I have attempted to override this in the weblogic.xml file.

    Detailed Version:

    I am using Oracle's OEPE 11gR(whatever) that uses a Weblogic 10.3.5 server, integrated with Eclipse already. I am using version 3.1.1.RELEASE of all Spring libraries, with the exception of Spring Security, which is at 3.1.0.RELEASE since it didn't update to 3.1.1 with all of the other Spring components. These libraries are specified in my Maven pom.xml file. Looking at the project /target directory, I can confirm that the only Spring versions in the relevant /lib directory at 3.1.1.RELEASE (except for Spring Security at 3.1.0.RELEASE).

    Unfortunately, on application deployment, the following error occurs:

    Code:
    08:07:18.344 [[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR o.s.s.core.SpringSecurityCoreVersion - *** Spring Major version '3' expected, but you are running with version: 2.5.6.SEC01. Please check your classpath for unwanted jar files.
    In my weblogic.xml file, I have attempted to override Weblogic's built-in libraries:

    HTML Code:
    	<wls:container-descriptor>
    <!-- 		<wls:prefer-application-packages>
    			<wls:package-name>com.oracle.ojdbc16.*</wls:package-name>
    			<wls:package-name>antlr.*</wls:package-name>
    			<wls:package-name>javax.persistence.*</wls:package-name>
    			<wls:package-name>org.apache.*</wls:package-name>
    			<wls:package-name>org.springframework.*</wls:package-name>
    			<wls:package-name>org.hibernate.*</wls:package-name>
    			<wls:package-name>org.apache.xerces.*</wls:package-name>
    		</wls:prefer-application-packages> -->
    		<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
    	</wls:container-descriptor>
    (Note that I've tried both methods: <prefer-application-packages> and <prefer-web-inf-classes>).

    I threw a quick Scriptlet call in my index.jsp file as a call to SpringVersion.getVersion() and can confirm that the application is running 2.5.6.SEC01, regardless of my POM or my weblogic.xml. This is wreaking havoc on certain other components of the application.

    Has anyone else run into a similar problem?

  • #2
    prefer-web-inf-classes usually works, but you have to be sure that you are including in your WEB-INF/lib folder at least all the Spring modules that are on Weblogic's lib folder. My guess is that you are packaging with the application only the modules you use, but on the weblogic lib folder there are more. Thus, if instructed to prefer-web-inf-classes, the classloader loads indeed all the classes from all the 3.1 jars you include, but then it also loads 2.5 jars for modules you don't include, thus wreaking havoc.
    Check the 2.5 jars that are shipped in Weblogic's lib folder, and be sure to include ALL the corresponding 3.1 packages in your webapp.
    If this doesn't work either, as a last resource, if the Weblogic instance is not used by other applications, you can still delete the 2.5 jars from the Weblogic lib folder.

    Comment

    Working...
    X