Community
Participate
Working Groups
In JBOSS 5.0.0 GA EAP install, it has signed ejb3-persistence.jar under JBOSS_HOME/common/lib, but eclipselink.jar used in JPA testing is unsigned one, it caused the errors: 12:59:05,885 WARN [HDScanner] Failed to process changes org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:ear=eclipselink-advanced-field-access-model.ear,jar=eclipselink-ad vanced-field-access-model_ejb.jar,name=TestRunner,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:ear=eclipselink-advanced-field-access-model.ear,jar=eclipselink-adv anced-field-access-model_ejb.jar,name=TestRunner,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=eclipselink-advanced-field-access-model.ear/eclipse link-advanced-field-access-model_ejb.jar#fieldaccess' **") Deployment "jboss.j2ee:ear=eclipselink-advanced-field-access-model.ear,jar=eclipselink-ad vanced-field-access-model_ejb.jar,name=TestRunner,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:ear=eclipselink-advanced-field-access-model.ear,jar=eclipselink-ad vanced-field-access-model_ejb.jar,name=TestRunner,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:ear=eclipselink-advanced-field-access-model.ear,jar=eclipselink-adv anced-field-access-model_ejb.jar,name=TestRunner,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=eclipselink-advanced-field-access-model.ear/eclipse link-advanced-field-access-model_ejb.jar#fieldaccess' ** Deployment "persistence.unit:unitName=eclipselink-advanced-field-access-model.ear/eclipse link-advanced-field-access-model_ejb.jar#fieldaccess" is in error due to the following reason(s): java.lang.SecurityException: class "javax.persistence.spi.ProviderUtil"'s signer information does not match signer information of other classes in the same package at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImp l.java:994) at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImp l.java:940) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerIm pl.java:873) at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkCom plete(MainDeployerAdapter.java:128) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java :378) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java: 256) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$10 1(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriod ic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sched uledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java :886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908 ) at java.lang.Thread.run(Thread.java:619)
It should be well known that the signed JPA 1.0 JAR from Orbit cannot be used with the EclipseLink 2.0 JAR. See table on release notes page - http://wiki.eclipse.org/EclipseLink/Release/2.0.0
JBoss ships with the signed jar.
>Installing the EAP server and starting investigation
>Step 1: reproduction in standalone EAR (outside of test framework configuration) >Details: trunk examples JBoss EAR with commented JPA 2.0 calls and persistence.xml tags http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEJB/ejbModule/META-INF/persistence.xml - copy unsigned trunk eclipselink.jar to common/lib - create default JBoss 5 server in Eclipse IDE - deploy jboss.EnterpriseEAR (with default HSQL datasource) to JBoss 5.0 EAP >result: unsigned/signed conflict SecurityException - expected >logs 2010-03-11 11:10:08,988 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBPAPP_5_0_0_GA date=200910202128)] Started in 1m:3s:180ms 2010-03-11 11:10:47,698 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] (HDScanner) Encountered deployment AbstractVFSDeploymentContext@26267218{vfszip:/C:/opt/jboss-eap-5.0/jboss-as/server/default/deploy/org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEAR.ear/org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEJB.jar/} 2010-03-11 11:10:48,059 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (HDScanner) Starting persistence unit persistence.unit:unitName=org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEAR.ear/org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEJB.jar#example 2010-03-11 11:10:48,069 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (HDScanner) Unexpected error during load of:javax.persistence.spi.ProviderUtil java.lang.SecurityException: class "javax.persistence.spi.ProviderUtil"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:769) ... at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:285) >and resultant secondary exception CNFE because the signed JPA 1.0 specification class was not loaded 2010-03-11 11:10:48,069 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=persistence.unit:unitName=org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEAR.ear/org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEJB.jar#example state=Create java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: javax.persistence.spi.ProviderUtil, msg=class "javax.persistence.spi.ProviderUtil"'s signer information does not match signer information of other classes in the same package
>Step 2: verify that the signed ejb3-persistence.jar is the cause of the exception - yes - replace 5.0.0 (ejb3-persistence.jar) with version from 5.1.0 (community edition) - both JPA 1.0 versions - restart server, deploy EAR - JPA 1.0 application runs fine 12:01:41,308 INFO [STDOUT] [EL Finest]: 2010-03-11 12:01:41.308--UnitOfWork(11747982)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--Register the existing object org.eclipse.persistence.example.jpa.server.business.Cell@3324876( id: 2 state: null left: null right: null parent: HashSet@34627602 references: HashSet@34627602)
Created attachment 161810 [details] Base container managed HQSL JTA JPA 1.0 EAR for testing scenarios >Matches Trunk example >Launch URL http://127.0.0.1:8080/enterprise
>recommending Option 1 (replace ejb3-persistence.jar with one from community edition) until options 3,4 and 5 are validated shortly. http://wiki.eclipse.org/EclipseLink/Bugs/305331#Option_1:_Replace_signed_ejb3-persistence.jar_with_an_unsigned_version_from_JBoss_5.1.0_community_edition_-_valid
>See option 7: copy eclipselink and javax.persistence spec jars to server/default/lib to override signed ejb3-persistence.jar in common/lib >Server Configuration 7: * keep the signed ejb3-persistence.jar from common/lib on the server in place. * copy eclipselink.jar to server/default/lib * copy javax.persistence spec jar to server/default/lib >Client Configuration 7: * no changes >Results 7: * EntityManager and EntityManagerFactory injection on the remote stateless session bean is working fine. * The JPA war applications that start with the JBoss server deploy fine * Weaving is unaffected as currently only static weaving is avaible on JBoss
>5.0.0 EAP working EAR configuration Specifying @Remote @Stateless Session Bean using Defaults The following scenario specifies @Remote on the remote interface and @Stateless on the stateless session bean. This results in the following JNDI name emitted by the server on EAR deploy @Stateless(name="ApplicationService", mappedName="ApplicationService") @Remote(ApplicationServiceRemote.class) public class ApplicationService implements ApplicationServiceRemote { @PersistenceContext(unitName="example", type=PersistenceContextType.TRANSACTION) private EntityManager entityManager; ... } public class FrontController extends HttpServlet implements Servlet { public static final String APPLICATION_SERVICE_JNDI_NAME = "org.eclipse.persistence.example.jpa.server.jboss.EnterpriseEAR/ApplicationService/remote-org.eclipse.persistence.example.jpa.server.business.ApplicationServiceRemote"; /** * Get the SSB ApplicationService bean - using a JNDI context lookup (no EJB injection was used on this servlet) * @param viaJNDILookup * @return */ public ApplicationServiceRemote getApplicationService(boolean viaJNDILookup) { if(null == applicationService && viaJNDILookup) { try { Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); InitialContext ctx = new InitialContext(env); System.out.println("FrontController.getApplicationService() JNDI lookup of " + APPLICATION_SERVICE_JNDI_NAME); return (ApplicationServiceRemote) ctx.lookup(APPLICATION_SERVICE_JNDI_NAME); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("couldn't lookup Dao", e); } } else { return applicationService; } } ... }
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink