users@jersey.java.net

[Jersey] 'single element array' problem in Glassfish3.1

From: Rimi <svetloe_at_gmail.com>
Date: Tue, 6 Sep 2011 01:50:05 -0700 (PDT)

Hi,

I am trying to solve a 'single element array' problem in OSGI environment,
Glassfish 3.1.
I saw 2 ways, none of them worked for me:
1) Define a Provider as described here:
http://blogs.oracle.com/japod/entry/missing_brackets_at_json_one
The provider wasn't invoked. I didn't see any errors/warnings in log. I saw
that the application recognized provider, it appeared in the following
message:

[#|2011-09-05T18:58:55.109+0300|INFO|glassfish3.1|com.sun.jersey.server.impl.application.DeferredResourceConfig|_ThreadID=26;_ThreadName=Thread-1;|Instantiated
the Application class com.test.MyApplication. The following root resource
and provider classes are registered:


2) Configure Jersey to use Jackson, I added in web.xml:
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>your.project.packages;org.codehaus.jackson.jaxrs</param-value>
</init-param>

And received an exception
"com.sun.jersey.core.spi.scanning.ScannerException: The URI scheme bundle of
the URI bundle: ... is not supported. Package scanning deployment is not
supported for such URIs. "

Is there another way to make OSGI war to work with jackson?


thank you

--
View this message in context: http://jersey.576304.n2.nabble.com/single-element-array-problem-in-Glassfish3-1-tp6763099p6763099.html
Sent from the Jersey mailing list archive at Nabble.com.