Hi Larry,
The REST admin service message body readers/writers declared in META-
INF/services files of the admin module are getting picked up by your
bundle. I do not know why it does that. We would need Jakub to help
investigate further.
FWIW for 3.1 the REST admin service no longer uses META-INF/services
files.
Paul.
On Sep 14, 2010, at 10:45 AM, Larry Touve wrote:
> Hi,
>
> I’m running Glassfish V3.0.1 Final, which has Jersey 1.1.5 included
> in it. I downloaded Jersey 1.4 and followed the upgrade
> instructions to upgrade my Glassfish install. Now I’m getting some
> errors when one of my bundles starts up. My bundle code that’s
> failing is in my Activator and is as follows:
>
> :
> ClientConfig cc = new DefaultClientConfig();
> cc.getClasses().add(StringReader.class);
> cc.getClasses().add(JsonObjectWriter.class);
> cc.getClasses().add(JsonObjectReader.class);
> cc.getClasses().add(JsonArrayReader.class);
> Client client = Client.create(cc);
> resource = client.resource(baseURL);
> :
>
> All I’m doing is adding my resource readers & writers. For a Jersey
> Client application. The Client.crate(cc) line is throwing the
> following (I get the same error if I use Client.create() ):
>
> [#|2010-09-14T13:28:56.398-0400|SEVERE|glassfish3.0.1|
> com.sun.jersey.spi.inject.Errors|_ThreadID=29;_ThreadName=Thread-1;|
> The following errors and warnings have been detected with resource
> and/or provider classes:
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.StringResultHtmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.OptionsResultJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.TreeNodeXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultHtmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.TreeNodeJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultListJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org
> .glassfish
> .admin.rest.provider.CommandResourceGetResultXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.OptionsResultXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.TreeNodeHtmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org
> .glassfish
> .admin.rest.provider.CommandResourceGetResultHtmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultListXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.FormWriter.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.StringResultXmlProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.StringResultJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org
> .glassfish
> .admin.rest.provider.CommandResourceGetResultJsonProvider.uriInfo
> SEVERE: Missing dependency for field: protected
> javax.ws.rs.core.UriInfo
> org.glassfish.admin.rest.provider.GetResultListHtmlProvider.uriInfo|#]
>
> [#|2010-09-14T13:28:56.398-0400|SEVERE|glassfish3.0.1|
> PersistenceImpl|_ThreadID=29;_ThreadName=Thread-1;|Exception during
> start()
> com.sun.jersey.spi.inject.Errors$ErrorMessagesException
> at
> com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
> at
> com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:137)
> at
> com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:203)
> at
> com.sun.jersey.api.client.Client.<init>(Client.java:185)
> at
> com.sun.jersey.api.client.Client.<init>(Client.java:157)
> at
> com.sun.jersey.api.client.Client.create(Client.java:628)
> at
> mil
> .jfcom
> .jcms
> .osgi
> .framework.persistence.PersistenceImpl.start(PersistenceImpl.java:100)
> at
> mil.jfcom.jcms.osgi.Activator.start(Activator.java:117)
> at
> org
> .apache
> .felix.framework.util.SecureAction.startActivator(SecureAction.java:
> 640)
> at
> org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
> at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> at org.apache.felix.framework.Felix
> $RefreshHelper.restart(Felix.java:4280)
> at
> org.apache.felix.framework.Felix.refreshPackages(Felix.java:3415)
> at
> org
> .apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:
> 329)
> at java.lang.Thread.run(Thread.java:619)
>
> I’ve set up my bundle with dependencies on jersey-client and jersey-
> code, and verified through the Felix Admin Console that it’s pulling
> in the correct stuff. What am I missing? This was working fine
> with Jersey 1.1.5.
>
> Thanks,
> Larry