Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Fix for 229634: JPA: JBoss container workaround for EJBTHREE-572 temp ClassLoader NPE - for review

Hi,
	The following fix for bug 229634 is available for review.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=229634

	Description:
		For JIRA EJBTHREE-572 http://jira.jboss.com/jira/browse/EJBTHREE-572
		EclipseLink will use the non-temporary classLoader instead of the normally used temporary classLoader from JBoss that causes a NPE on loadClass() or Class.forName().
		We require that JBoss implementers statically weave container managed entities and reference JBoss as the target-server in persistence.xml.

	Deployment Changes:
		1) If weaving is required then static weave the entities before EAR packaging using either the command-line weaver or the weaving ant task.		
		2) All persistence units deployed to the JBoss container must contain the following property in persistence.xml or container managed entities will predeploy but fail to be managed at runtime. 

	<property 
		name="eclipselink.target-server"
		value="org.eclipse.persistence.platform.server.jboss.JBossPlatform"/>

	Code Reviewed by:
		Tom

	thank you
	/michael

-----Original Message-----
From: MICHAEL.OBRIEN@xxxxxxxxxx 
Sent: Thursday, May 01, 2008 4:36 PM
To: eclipselink-dev@xxxxxxxxxxx
Subject: Info: JBoss platform deployment will require that
persistence.xml property [target-server] be set to JBossPlatform


JBoss users,
	Hi, we have a question for anyone deploying an EJB3 application on JBoss 4.2.x using EclipseLink as the JPA provider.

	As a workaround for a classLoader issue with the JBoss platform we would like to request that all deployments to a JBoss container platform specify a reference to the JBoss platform in their persistence.xml file. 

	<property name="eclipselink.target-server" value="org.eclipse.persistence.platform.server.jboss.JBossPlatform"/>

	Q) If this workaround causes an issue with any JBoss deployment using EclipseLink let us know and an alternative solution may be used. This will be documented on our Wiki and ELUG and updated on the JBoss.org JIRA.

	thank you
	/michael


	Details:
-----------------------
	There is currently an issue with the temporary classLoader [UniversalClassLoader3] within the JBoss 4.2.2 Application Server Container.  When either a Class.forName() or UCL3.loadClass() is attempted the temp UCL3 throws a NullPointerException instead of a ClassNotFoundException.

	This NPE as documented in JIRA EJBTHREE-572 http://jira.jboss.com/jira/browse/EJBTHREE-572 does not allow EclipseLink to dynamically weave classes during predeploy().  Our workaround is for the client to statically weave the classes and deploy these pre-weaved classes in the EAR with dynamic weaving disabled.  EclipseLink then uses the [real] UCL3 loader only when running as the JBossPlatform.

	Bug references:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=229634


Back to the top