I've been (and still am) debugging RequestDispatcherProvider. So far I've discovered one weird bit: the ServletContoller.invoke method executes twice on Weblogic.
As a reminder, my app works on Glassfish 3 but not on Weblogic 10.3 or 10.3.3. I'm using cxf-bundle 2.2.11. When I debug on Glassfish, the ServletContoller.invoke method is called once and the value of 'address' is the proper restful request String (i.e. '/health/check'). When I debug on Weblogic, the first call to the ServletContoller.invoke method is made just as in Glassfish, however on the mysterious second call, the value of 'address' is the resourcePath that I've configured in my cxf-servlet.xml file (i.e '/WEB-INF/views/health.jsp'). I will continue to mess with this, but if anyone can provide some insight as to what's happening, I would be very grateful. On Sun, Nov 21, 2010 at 12:57 PM, Sergey Beryozkin <[email protected]>wrote: > Hi David > > Is there a chance that you can debug what is happening inside > RequestDispatcherProvider ? You can probably just download the source of > this single file only ? It seems RequestDispatcherProvider just failing to > work properly as part of the ear, may be WebLogic exposes some weak spot in > its code. > > is there WebLogic community edition available ? If yes then you can also > attach a sample ear to the JIRA and I can investigate - but if you can do a > bit of debugging then it would probably be faster. If it is not easy to set > up a debugging session then you may want to have a custom dispatcher > extending RequestDispatcherProvider or even reusing most of the original > code instead and have it printing the progress of the outbound execution so > that the problem can be narrowed... > > let me know please if you can make it work > > cheers, Sergey > > > On Fri, Nov 19, 2010 at 8:46 PM, David Miller <[email protected]> > wrote: > > > I forgot to include a bit from the log file: > > > > 2010-11-19 15:41:55,237 INFO [[ACTIVE] ExecuteThread: '3' for queue: > > 'weblogic.kernel.Default (self-tuning)'] LoggingInInterceptor: Inbound > > Message > > ---------------------------- > > ID: 3 > > Address: /service/health/check > > Content-Type: > > Headers: {Accept-Language=[en-us,en;q=0.5], connection=[keep-alive], > > ...snipped > > -------------------------------------- > > --> inside the 'check' method > > 2010-11-19 15:41:55,238 ERROR [[ACTIVE] ExecuteThread: '3' for queue: > > 'weblogic.kernel.Default (self-tuning)'] RequestDispatcherProvider: > > RESOURCE_PATH_NOT_FOUND > > 2010-11-19 15:41:55,238 WARN [[ACTIVE] ExecuteThread: '3' for queue: > > 'weblogic.kernel.Default (self-tuning)'] WebApplicationExceptionMapper: > > WebApplicationException has been caught : no cause is available > > 2010-11-19 15:41:55,238 INFO [[ACTIVE] ExecuteThread: '3' for queue: > > 'weblogic.kernel.Default (self-tuning)'] LoggingOutInterceptor: Outbound > > Message > > --------------------------- > > ID: 3 > > Response-Code: 500 > > Content-Type: text/html > > Headers: {} > > -------------------------------------- > > > > > > > > > > > > On Fri, Nov 19, 2010 at 3:40 PM, David Miller <[email protected]> > > wrote: > > > > > In Weblogic 10.3 and 10.3.3 I am not able to forward to a jsp with > > > CXFServlet. The very same app works as desired when deployed to > Glassfish > > 3. > > > > > > As far as this particular app is concerned, the only difference between > > > Weblogic and Glassfish is that an ear is deployed to Weblogic and a war > > is > > > deployed to Glassfish. Unfortunately I need it to work in Weblogic :( > > > > > > I've followed the documentation ( > > > http://cxf.apache.org/docs/jax-rs.html#JAX-RS-WithCXFServlet) and have > > > thoroughly read a thread where a similar question was asked ( > > > > > > http://cxf.547215.n5.nabble.com/another-question-on-RequestDispatcherProvider-td547815.html > > > ). > > > > > > Here is one example of my RequestDispatcherProvider: > > > > > > <bean id="dispatchProvider1" > > > class="org.apache.cxf.jaxrs.provider.RequestDispatcherProvider"> > > > <property name="dispatcherName" value="jsp"/> > > > <property name="resourcePath" > value="/WEB-INF/views/health.jsp"/> > > > <property name="scope" value="request"/> > > > </bean> > > > > > > I have tried every permutation of resourcePath and have placed the jsp > > both > > > inside and outside of WEB-INF. > > > > > > For example: > > > /WEB-INF/views/health.jsp > > > WEB-INF/views/health.jsp > > > /views/health.jsp > > > views/health.jsp > > > /health.jsp > > > health.jsp > > > > > > Is there anyone using Weblogic that has successfully done what I'm > trying > > > to do? > > > > > > > > > > > >
