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?