• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

REST function error in create response

 
Ranch Hand
Posts: 82
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149) [resteasy-jaxrs-3.0.8.Final.jar:]
...
Caused by: java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters
at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:317) [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:297) [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:254) [wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:184) [jboss-ejb-client-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocation(EJBObjectInterceptor.java:58) [jboss-ejb-client-2.0.1.Final.jar:2.0.1.Final]
...
Caused by: java.io.NotSerializableException: org.jboss.resteasy.specimpl.BuiltResponse
at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:247) [jboss-marshalling-1.4.9.Final.jar:1.4.9.Final]
at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:125) [jboss-marshalling-1.4.9.Final.jar:1.4.9.Final]
at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:314) [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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic