[jboss-user] [JBoss Seam] - Re: Seam component instantiation problem

klsateesh do-not-reply at jboss.com
Mon Jul 31 14:08:01 EDT 2006


Hi,

  It seems the name should be MySeamTest/HelloAction/local instead of MySeamTest-war/HelloAction/local .

  I made the change and still getting the error..!!



"klsateesh" wrote : Hi,
  | 
  |   I am also having an issue with the Instantiation of the Seam Component..
  | 
  |   I am trying the HelloWorld App in examples/remoting..
  | 
  |   In the JBoss Server log i see the component..
  | 
  | 
  |   | 
  |   | 13:43:42,828 INFO  [Scanner] scanning: /D:/Projects/DPA/Jboss4.0.4/server/default/tmp/deploy/tmp43419MySeamTest.ear-cont
  |   | ents/MySeamTest-ejb.jar
  |   | 13:43:42,828 INFO  [Component] Component: helloAction, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: org.jboss.
  |   | seam.example.remoting.HelloAction, JNDI: MySeamTest-war/HelloAction/local
  |   | 13:43:42,984 INFO  [Initialization] done initializing Seam
  |   | 
  |   | 
  | 
  | Note: i have created an EAR App (MySeamtest) in NetBeans and hence the name MySeamTest.ear..
  | 
  | And when i run the App it is accepting the User Name and the  throwing the following Exception..
  | 
  | 
  | 
  | 
  |   | 13:43:58,429 ERROR [ExecutionHandler] Error during remote request
  |   | org.jboss.seam.InstantiationException: Could not instantiate Seam component: helloAction
  |   |         at org.jboss.seam.Component.newInstance(Component.java:735)
  |   |         at org.jboss.seam.Component.newInstance(Component.java:1308)
  |   |         at org.jboss.seam.Component.getInstance(Component.java:1263)
  |   |         at org.jboss.seam.Component.getInstance(Component.java:1246)
  |   |         at org.jboss.seam.remoting.Call.execute(Call.java:101)
  |   |         at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:92)
  |   |         at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:56)
  |   |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  |   |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |   |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |   |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |   |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |   |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |   |         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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |   |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |   |         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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |   |         at java.lang.Thread.run(Thread.java:595)
  |   | Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.LocalOnlyContextFactory
  |   | [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.LocalOnlyContextFactory]
  |   |         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
  |   |         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
  |   |         at javax.naming.InitialContext.init(InitialContext.java:223)
  |   |         at javax.naming.InitialContext.<init>(InitialContext.java:197)
  |   |         at org.jboss.seam.util.Naming.getInitialContext(Naming.java:28)
  |   |         at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
  |   |         at org.jboss.seam.Component.instantiate(Component.java:774)
  |   |         at org.jboss.seam.Component.newInstance(Component.java:731)
  |   |         ... 26 more
  |   | Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.LocalOnlyContextFactory
  |   |         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
  |   |         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
  |   |         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  |   |         at java.lang.Class.forName0(Native Method)
  |   |         at java.lang.Class.forName(Class.java:242)
  |   |         at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
  |   |         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
  |   |         ... 33 more
  |   | 
  | 
  | And in the Debug window i see this output
  | 
  |   | Mon Jul 31 2006 13:51:35 GMT-0400 (Eastern Daylight Time): Request packet:
  |   | <envelope><header><context></context></header><body><call component="helloAction" method="sayHello" id="1">
  |   | <params><param><str>sdsdf</str></param></params><refs></refs></call></body></envelope>
  |   | 
  |   | 
  |   | Mon Jul 31 2006 13:51:35 GMT-0400 (Eastern Daylight Time): Response packet:
  |   | 
  | 
  | I have added the following context parameter to web.xml
  | 
  | 
  |   |    <context-param>
  |   |         <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
  |   |         <param-value>MySeamTest-war/#{ejbName}/local </param-value>
  |   |     </context-param>
  |   | 
  | 
  | Thanks
  | Sateesh

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961968#3961968

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961968



More information about the jboss-user mailing list