Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

REST function error in create response  RSS feed

daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an EJB exposed as a REST web service. I'm using Wildfly 8.1.0.

If I deploy the ejb in the war, it work perfectly.
If i deploy it in a EAR, some method returns:

16:14:08,611 ERROR [io.undertow.request] (default task-9) UT005023: Exception handling request to /BssWebCore/webservice/esercizi/test: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException( [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ExceptionHandler.handleException( [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.writeException( [resteasy-jaxrs-3.0.8.Final.jar:]
Caused by: java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters
at [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest( [jboss-ejb-client-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocation( [jboss-ejb-client-2.0.1.Final.jar:2.0.1.Final]
Caused by: org.jboss.resteasy.specimpl.BuiltResponse
at org.jboss.marshalling.cloner.SerializingCloner.clone( [jboss-marshalling-1.4.9.Final.jar:1.4.9.Final]
at org.jboss.marshalling.cloner.SerializingCloner.clone( [jboss-marshalling-1.4.9.Final.jar:1.4.9.Final]
at [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
... 58 more

I have an abstract class

that implements an interface:

The ejbs extends the the abstract class.

If I extends this superclass in a WAR, the method return the correct answer for all methods.

If I extends this superclasses in a EAR, the method cerca and cercatutti return the correct answer: they search the records in the database and then they return the list of entity as a JSON array using the JAXB marshaling .
But if I use a more simple function like getEntityClass or test (they return a string or a list of mapped value) I receive the error.

I think that the entity are coded in json well becase i see them with the method cercatutti (findall), but also the string are coded well because they work in the other project.

What did I forget? Is there something that i can try or test?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!