Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004214 [Resin] minor always 09-16-10 06:43 11-15-10 09:13
Reporter olaf2010 View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.13 Product Version 4.0.10
  Product Build
Summary 0004214: Conflict between jersey and resin (and again, with example war)
Description Hello reza,

you are faster with closing bugs then me is able to attach some code sample. :-)

Its related to:

- http://bugs.caucho.com/view.php?id=4188 [^]

I have checked against resin4.0.10 and resin-4.0.s100819 as well, downloaded just a few secs ago. I put the "jerseytest.war" into webapps directory, start resin and call:

http://localhost:8080/jerseytest/ [^]

"Hello World" should be printed, but i get the NPE instead.

So far there are only 3 dependencies in the war and nothing else. Needless to say, with resin2.1.17 it works.

java.lang.NullPointerException
    at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:94)
    at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
    at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:554)
    at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:280)
    at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:586)
    at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213)
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:342)
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:516)
    at javax.servlet.GenericServlet.init(GenericServlet.java:70)
    at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1318)
    at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1168)
    at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:98)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
    at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:92)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:789)
    at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:662)
    at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:625)
    at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:576)
    at com.caucho.network.listen.TcpSocketLink$AcceptTask.doTask(TcpSocketLink.java:1159)
    at com.caucho.network.listen.TcpSocketLink$ConnectionReadTask.runThread(TcpSocketLink.java:1092)
    at com.caucho.network.listen.TcpSocketLink$AcceptTask.run(TcpSocketLink.java:1126)
    at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:170)
    at com.caucho.env.thread.ResinThread.run(ResinThread.java:126)


I hope you can reproduce it as well.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0004753)
olaf2010
09-16-10 06:50

Can someone please delete this issue?

The new one is:

- http://bugs.caucho.com/view.php?id=4215 [^]

here the upload of the war failed and i thought, the issue has not been added. Wrong, as i found out later. Thanks.
 
(0004841)
ferg
11-15-10 09:13

That definitely looks like a Jersey bug.

From the JNDI JavaDoc: rebind() "Binds a name to an object, overwriting any existing binding. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist."

The error is because Jersey never creates the "com.sun.jersey.config" component (and I can't really change Resin to use a non-conforming JNDI context.)

There is a workaround for Jersey, though. Set the following system-property in the resin.xml:

<resin ...>
...
<system-property
   com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager="true"/>
 

- Issue History
Date Modified Username Field Change
09-16-10 06:43 olaf2010 New Issue
09-16-10 06:50 olaf2010 Note Added: 0004753
11-15-10 09:13 ferg Note Added: 0004841
11-15-10 09:13 ferg Assigned To  => ferg
11-15-10 09:13 ferg Status new => closed
11-15-10 09:13 ferg Resolution open => fixed
11-15-10 09:13 ferg Fixed in Version  => 4.0.13


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker