-
1. Re: Warnings caused by jersey-client
nickarls Feb 25, 2013 3:27 AM (in response to hwellmann.de)Perhaps the problem is the inner class ($App)? Generally, you shouldn't bundle alternative JAX-RS implementations in the war (unless you disable the JBoss-provided one)
-
2. Re: Warnings caused by jersey-client
ritesh_nath Mar 28, 2013 11:06 AM (in response to hwellmann.de)I ran into a bunch of the exact same warnings when porting my war from JBoss 4.x to JBoss AS 7.x. I have disabled the JBoss provided implementation of JAX-RS.
17:23:27,018 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyWriter'
17:23:27,018 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyWriter'
I downloaded the JBoss as source code from github and found the issue is related to the point Nicklas mentioned. In the ServiceLoaderProcessor, the pattern defined does not like inner class names like $App, $General.
My app gets deployed successfully, at this point I am not sure if the warnings would cause any error down the line and if the implementations of MessageBodyWriter which had the warnings got loaded correctly.
-
3. Re: Warnings caused by jersey-client
nancymarido Apr 17, 2013 9:45 AM (in response to ritesh_nath)Comment out or remove the following from <<JBOSS_HOME>>\standalone\configuration\standalone.xml
<extension module="org.jboss.as.jaxrs"/>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
And in your web.xml,
Please check the below stuffs has been commented out...
<!--init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value><<your application package>></param-value>
</init-param-->
And if you are using pom.xml, add the below given entries,
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
</dependency>
and try deploying it now... It should work...
-
4. Re: Warnings caused by jersey-client
ritesh_nath Apr 25, 2013 2:39 PM (in response to nancymarido)I tried the steps you mentioned, still getting the same warnings
-
5. Re: Warnings caused by jersey-client
hwellmann.de Apr 27, 2013 6:32 AM (in response to ritesh_nath)@Nancy: I don't want to disable the JAX-RS subsystem of JBoss. I just happen to be using the Jersey Client in my application.
@Nicklas: I'm not bundling an alternative JAX-RS implementation, I'm only using the Jersey Client which depends on Jersey Core. Jersey Server is not part of my application.
Actually, looking at JBoss Sources, it seems the problem is very generic and not related to JAX-RS at all.
org.jboss.as.server.deployment.ServiceLoaderProcessor scans all META-INF/services resources and validates the class names.
The dollar character is valid in classnames (and occurs with some inner classes published as services by Jersey), but is not accepted by the validation pattern of ServiceLoaderProcessor.
-
6. Re: Warnings caused by jersey-client
nancymarido May 6, 2013 11:59 PM (in response to hwellmann.de)Ignore the changes which i mentioned to do in standalone.xml
Can u please follow the rest of the steps and let me know how it works???
web.xml:
Please check the below stuffs has been commented out...
<!--init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value><<your application package>></param-value>
</init-param-->
And if you are using pom.xml, add the below given entries,
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
</dependency>
-
7. Re: Warnings caused by jersey-client
farbklex Jul 22, 2013 9:49 AM (in response to hwellmann.de)Harald, did you solve this problem?
Edit: I am asking because I want to get rid of this log entry, too.
-
8. Re: Warnings caused by jersey-client
hwellmann.de Jul 22, 2013 10:13 AM (in response to farbklex)Not really: I raised an issue as https://issues.jboss.org/browse/WFLY-1289 which is marked as resolved in WildFly 8.0.0.Alpha2.
Which probably means that AS 7.x /EAP 6.x won't see a solution.
-
9. Re: Warnings caused by jersey-client
sammie88 Apr 11, 2014 1:56 PM (in response to hwellmann.de)Hi,
Any chance this issue got resolved in any of Jboss AS7.x Thanks!