You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antony Stubbs <an...@gmail.com> on 2007/04/05 04:23:15 UTC

[S2] Struts2 / Websphere not throwing/reporting exceptions properly

Code within one of my Struts 2 actions is throwing an exception, which
doesn't seem to be being reported correctly. Websphere just seems to come
back with error 404 page not found. 

After stepping through the Struts2 class code in eclipse I found that an
exception was being thrown by a library I use (iBatis) and being caught by
struts2, but not repotred ( I get the 404 requested page can't be found )
error.

Now I'm not sure if this is a struts issue or a websphere issue. However,
after just deploying to Tomcat - I get the expected behaviour - the correct
exception is reported back. How frustrating. Seems to be another ussue
related to this:
http://www.nabble.com/Re%3A--S2-----FIXED%21--Websphere-6.1-Showcase-application%2C-Response-already-committed-warning-in-logs-p9831268.html

If I setup an error page in web.xml, the browser get's redirected to it, but
just shows the details of the 404 exception.

I have tried to get Struts2 logging working by putting:
log4j.rootLogger = DEBUG

log4j.appender.A1 = org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

log4j.logger.org.apache.struts2=DEBUG, A1

into my log4j, but I'm not getting any Struts2 info coming out.

I've narrowed it down to a pretty simple test case, where if my action
simply if(true)throw new Exception("test exception") straight away, I get
back:
java.io.FileNotFoundException: /eventProfile!list.action
	at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:398)
	at
com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3163)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
	at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
	at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
	at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:290)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
	at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
	at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
	at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
	at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)


-- 
View this message in context: http://www.nabble.com/-S2--Struts2---Websphere-not-throwing-reporting-exceptions-properly-tf3529309.html#a9849078
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Struts2 / Websphere not throwing/reporting exceptions properly

Posted by Antony Stubbs <an...@gmail.com>.
I have submitted a PMR to IBM: 56311 999 616 and am awaiting a response...


Antony Stubbs wrote:
> 
> Code within one of my Struts 2 actions is throwing an exception, which
> doesn't seem to be being reported correctly. Websphere just seems to come
> back with error 404 page not found. 
> 
> After stepping through the Struts2 class code in eclipse I found that an
> exception was being thrown by a library I use (iBatis) and being caught by
> struts2, but not repotred ( I get the 404 requested page can't be found )
> error.
> 
> Now I'm not sure if this is a struts issue or a websphere issue. However,
> after just deploying to Tomcat - I get the expected behaviour - the
> correct exception is reported back. How frustrating. Seems to be another
> ussue related to this:
> http://www.nabble.com/Re%3A--S2-----FIXED%21--Websphere-6.1-Showcase-application%2C-Response-already-committed-warning-in-logs-p9831268.html
> 
> If I setup an error page in web.xml, the browser get's redirected to it,
> but just shows the details of the 404 exception.
> 
> I have tried to get Struts2 logging working by putting:
> log4j.rootLogger = DEBUG
> 
> log4j.appender.A1 = org.apache.log4j.ConsoleAppender
> log4j.appender.A1.layout = org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
> 
> log4j.logger.org.apache.struts2=DEBUG, A1
> 
> into my log4j, but I'm not getting any Struts2 info coming out.
> 
> I've narrowed it down to a pretty simple test case, where if my action
> simply if(true)throw new Exception("test exception") straight away, I get
> back:
> java.io.FileNotFoundException: /eventProfile!list.action
> 	at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:398)
> 	at
> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
> 	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3163)
> 	at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
> 	at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
> 	at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> 	at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
> 	at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> 	at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> 	at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:290)
> 	at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
> 	at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
> 	at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> 	at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> 	at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> 	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> 	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
> 	at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
> 	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Struts2---Websphere-not-throwing-reporting-exceptions-properly-tf3529309.html#a9849539
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org