3 Replies Latest reply on Feb 15, 2007 7:57 PM by Shane Bryzak

    Getting the helloworld example working in Tomcat

    Richard Hoffman Newbie

      Has anyone been able to successfully get the remoting/helloworld example working in Tomcat? I deploy it via "ant clean deploy.tomcat" and the helloworld app comes up, but I get this in my popup window when I type in my name:

      Thu Feb 15 2007 14:34:03 GMT-0600 (Central Standard Time): Request packet:
      <envelope><header><context></context></header><body><call component="helloAction" method="sayHello" id="0">
      <params><param><str>apushadow</str></param></params><refs></refs></call></body></envelope>
      
      
      Thu Feb 15 2007 14:34:04 GMT-0600 (Central Standard Time): Response packet:
      



      The stacktrace in the Tomcat log says:

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: helloAction
       at org.jboss.seam.Component.newInstance(Component.java:1766)
       at org.jboss.seam.Component.getInstance(Component.java:1669)
       at org.jboss.seam.Component.getInstance(Component.java:1636)
       at org.jboss.seam.remoting.Call.execute(Call.java:115)
       at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:87)
       at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:78)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Unknown Source)
      Caused by: javax.naming.NamingException: Local server is not initialized
       at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
       at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
       at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
       at javax.naming.InitialContext.init(Unknown Source)
       at javax.naming.InitialContext.<init>(Unknown Source)
       at org.jboss.seam.util.Naming.getInitialContext(Naming.java:35)
       at org.jboss.seam.util.Naming.getInitialContext(Naming.java:47)
       at org.jboss.seam.Component.instantiateSessionBean(Component.java:1071)
       at org.jboss.seam.Component.instantiate(Component.java:1057)
       at org.jboss.seam.Component.newInstance(Component.java:1762)
       ... 21 more
      



      I looked in my [tomcat root]/webapps/seam-helloworld/WEB-INF/lib directory and verified that jboss-ejb3-all.jar is there. I haven't touched the components.xml or any other config file from what comes with the downloaded Seam 1.1.6 example code, and I went through Chapter 18 on Remoting in the Seam reference guide, and it seems like the helloworld example should work. I've also cleared any other webapps out of both the Tomcat/webapps and Tomcat/work directories, and I always make sure I do an "ant clean deploy.tomcat".

      Any direction would be greatly appreciated. Thanks in advance!