In the meantime, i might as well explain that the typical reason something like this occurs is that the Struts' ActionServlet has not been loaded on startup. The web.xml for the struts example specifies <load-on-startup>2</load-on-startup> for the Struts ActionServlet. I'm not sure why that didn't actually happen, but it appears that it didn't. If you are building the example yourself, you might try setting that value to 1 or 0, but really, it should be loaded on startup either way. It's odd, and my instinct is to suspect a problem with Websphere.
On Jan 23, 2008 11:31 AM, Nathan Bubna <[EMAIL PROTECTED]> wrote: > A few questions to help narrow things down: > > What version of VelocityTools are you using? > Are you just deploying the struts.war file that came with the > distribution or are you building the example yourself? > > > On Jan 22, 2008 9:47 PM, Ahmed Hamad <[EMAIL PROTECTED]> wrote: > > Dears > > I'm trying to run the *Velocity Struts Example* on WebSphere application > > server 6.0 I'm getting the following exception: > > > > [1/23/08 8:42:31:015 AST] 0000002c ViewToolInfo E Exception when calling > > init(Object) on [EMAIL PROTECTED] > > [1/23/08 8:42:31:030 AST] 0000002c ViewToolInfo E TRAS0014I: The > > following exception was logged java.lang.reflect.InvocationTargetException > > Caused by: java.lang.NullPointerException > > at org.apache.velocity.tools.struts.StrutsUtils.getMessageResources( > > StrutsUtils.java:79) > > at org.apache.velocity.tools.struts.MessageResourcesTool.init( > > MessageResourcesTool.java:64) > > at org.apache.velocity.tools.struts.ActionMessagesTool.init( > > ActionMessagesTool.java:83) > > at org.apache.velocity.tools.struts.ErrorsTool.init(ErrorsTool.java:62) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke( > > NativeMethodAccessorImpl.java:85) > > at sun.reflect.NativeMethodAccessorImpl.invoke( > > NativeMethodAccessorImpl.java:58) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:60) > > at java.lang.reflect.Method.invoke(Method.java:391) > > at org.apache.velocity.tools.view.ViewToolInfo.getInstance( > > ViewToolInfo.java:229) > > at org.apache.velocity.tools.view.servlet.ServletToolboxManager.getToolbox( > > ServletToolboxManager.java:416) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.createContext > > (VelocityViewServlet.java:614) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest( > > VelocityViewServlet.java:537) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet( > > VelocityViewServlet.java:509) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( > > ServletWrapper.java:1212) > > at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( > > ServletWrapper.java:629) > > at > > com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest( > > DefaultExtensionProcessor.java:394) > > at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) > > at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) > > at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) > > at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java > > :1681) > > at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java > > :77) > > at > > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination( > > HttpInboundLink.java:421) > > at > > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( > > HttpInboundLink.java:367) > > at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready( > > HttpInboundLink.java:276) > > at > > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters > > (NewConnectionInitialReadCallback.java:201) > > at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete( > > NewConnectionInitialReadCallback.java:103) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete( > > WorkQueueManager.java:548) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO( > > WorkQueueManager.java:601) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun( > > WorkQueueManager.java:934) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run( > > WorkQueueManager.java:1021) > > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332) > > . > > java.lang.reflect.InvocationTargetException > > Caused by: java.lang.NullPointerException > > at org.apache.velocity.tools.struts.StrutsUtils.getMessageResources( > > StrutsUtils.java:79) > > at org.apache.velocity.tools.struts.MessageResourcesTool.init( > > MessageResourcesTool.java:64) > > at org.apache.velocity.tools.struts.ActionMessagesTool.init( > > ActionMessagesTool.java:83) > > at org.apache.velocity.tools.struts.ErrorsTool.init(ErrorsTool.java:62) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke( > > NativeMethodAccessorImpl.java:85) > > at sun.reflect.NativeMethodAccessorImpl.invoke( > > NativeMethodAccessorImpl.java:58) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:60) > > at java.lang.reflect.Method.invoke(Method.java:391) > > at org.apache.velocity.tools.view.ViewToolInfo.getInstance( > > ViewToolInfo.java:229) > > at org.apache.velocity.tools.view.servlet.ServletToolboxManager.getToolbox( > > ServletToolboxManager.java:416) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.createContext > > (VelocityViewServlet.java:614) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest( > > VelocityViewServlet.java:537) > > at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet( > > VelocityViewServlet.java:509) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( > > ServletWrapper.java:1212) > > at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( > > ServletWrapper.java:629) > > at > > com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest( > > DefaultExtensionProcessor.java:394) > > at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) > > at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) > > at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) > > at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java > > :1681) > > at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java > > :77) > > at > > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination( > > HttpInboundLink.java:421) > > at > > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( > > HttpInboundLink.java:367) > > at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready( > > HttpInboundLink.java:276) > > at > > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters > > (NewConnectionInitialReadCallback.java:201) > > at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete( > > NewConnectionInitialReadCallback.java:103) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete( > > WorkQueueManager.java:548) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO( > > WorkQueueManager.java:601) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun( > > WorkQueueManager.java:934) > > at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run( > > WorkQueueManager.java:1021) > > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332) > > > > > > Can you please advice about how to resolve this exception. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
