Announcement Announcement Module
Collapse
No announcement yet.
Eclipselink Loadtime Weaving Not Working With Tomcat Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Eclipselink Loadtime Weaving Not Working With Tomcat

    I have all sorts of problems getting Eclipselink working with my Spring project.

    Here is what I have:

    Persistence Context

    Code:
    	<context:annotation-config />
    	<!--  tell spring where to find the beans -->
    	<context:component-scan base-package="com.presidioHealth.ppsUIServer" />
    	
    	<context:property-placeholder location="classpath*:META-INF/spring/profile.properties"/>
    	
    	<context:load-time-weaver aspectj-weaving="autodetect"/>
    	
    	<bean id="entityManagerFactory"
    		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    		<property name="dataSource" ref="presidioDataSource_MySQL" />
    		<property name="packagesToScan" value="com.presidioHealth" />
    		<property name="loadTimeWeaver" ref="loadTimeWeaver">
    		</property>
    		<property name="jpaVendorAdapter">
    			<bean
    				class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
    				<property name="showSql" value="false" />
    				<property name="generateDdl" value="false" />
    				<property name="databasePlatform" value="org.eclipse.persistence.platform.database.MySQLPlatform" />
    			</bean>
    		</property>
    	</bean>
    context.xml
    Code:
    <Context path="/ppsUIServer">
        <Loader
            loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
             useSystemClassLoaderAsParent="false"/>
    </Context>
    I get the following exception in tomcat:
    Code:
    WARNING: Unable to load class [org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext$SessionsXmlContextInput] to check against the @HandlesTypes annotation of one or more ServletContentInitializers. 
    java.lang.IllegalAccessError: class org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext$DynamicJAXBContextInput cannot access its superclass org.eclipse.persistence.jaxb.JAXBContext$JAXBContextInput
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    I've tried adding to the VM arguments (which is needed when I'm testing):

    -javaagent:/Work/org.springframework.instrument-3.1.2.RELEASE.jar

    I've tried changing the servlet version in tomcat's web.xml to 2.5 as some have suggested, but to no avail.

    Tomcat 7
    JRE 1.6
    Spring 3.1.2.RELEASE

    Any help in configuring my environment would be greatly appreciated.

    Tom
Working...
X