This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wildfly EAR application deploy on startup problem  RSS feed

 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.

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

What can be the problem?
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There's the root of your problem. Is this EntityBase your own class? Does it have a void _persistence_set(String, Object) method?
 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Another hint:
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?
 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Removing all dependencies to webservices-rt-2.3.jar, the problem persist.

So, does the problem may be in eclipselink weaving?
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly.

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!