I have an EAR with a lot of modules and library in it.
I use wildfly 8.1.0 and eclipselink 2.5.2 as persistence provider.
Suppose i have wildfly started, then i open the console and deploy the EAR: ok!
I can access web pages, do login with JAAS , read data from DB with EJB+JPA.
Shutdown wildfly and restart it...
2015-09-16 12:40:22,913 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015899: WildFly 8.1.0.Final "Kenny" starting The server start to autodeploy my EAR
2015-09-16 12:40:25,134 INFO [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015876: Starting deployment of "BssWebCore_ear-1.0-SNAPSHOT.ear" (runtime-name: "BssWebCore_ear-1.0-SNAPSHOT.ear") then it deploies persistence unit, EJB and a soap web service... all ok
After that, it starts javax.ws.rs.core.Application for REST web service and I get the following error:
In my javax.ws.rs.core.Application i read the jndi to start as REST resource from a DB using an EJB.
If i disabled the EAR and re-enable it, all work fine!
Tested also on wildfly 8.2.0.Final with same results
Rob Spoor wrote:There's the root of your problem. Is this EntityBase your own class? Does it have a void _persistence_set(String, Object) method?
This method not exists.
EntityBase is a MappedSuperclass that it's used by other entity. The weaver add this method at runtime.
If i deploy the EAR in a running wildfly environment, the application works fine, no problem.
The problem occurs only if the application is deployed automatically at Wildfly's startup
during startup this message appear:
[org.jboss.as.server.deployment] JBAS015960: Class Path entry webservices-extra.jar in webservices-rt-2.3.jar does not point to a valid jar for a Class-Path reference.
If i remove from EAR the module BssStdODan_wss-1.0-SNAPSHOT.jar that contains web services and include webservices-rt-2.3.jar as dependencies, all work good.
Maybe the problem is in webservices-rt-2.3.jar? Or in eclipselink weaving?
Is there a reason you chose EclipseLink instead of Hibernate? The latter is the out-of-the-box JPA implementation of JBoss/WildFly, and can be included as a provided dependency in Maven because you can use the JBoss/WildFly version.