[JNDI/Naming/Network] - Re: Exception javax.naming.NameNotFoundException
by ganesh.pol
I am using example on roseindia.net to sart the learning
___________________________________________________
i put my ear file in
C:\devTools\jboss-4.0.1\jboss-4.0.1\server\default\deploy
with name mfsc.ear
___________________________________________________
following is o/p of console
==============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\devTools\jboss-4.0.1\jboss-4.0.1\bin\\..
JAVA: C:\devTools\jdk-1_5_0_11\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
CLASSPATH: C:\devTools\jdk-1_5_0_11\lib\tools.jar;C:\devTools\jboss-4.0.1\jboss-4.0.1\bin\\run.jar
==============================================================================
1:09:05,978 INFO [Server] Starting JBoss (MX MicroKernel)...
1:09:05,978 INFO [Server] Release ID: JBoss [Zion] 4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)
1:09:05,978 INFO [Server] Home Dir: C:\devTools\jboss-4.0.1\jboss-4.0.1
1:09:05,978 INFO [Server] Home URL: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/
1:09:05,978 INFO [Server] Library URL: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/lib/
1:09:05,978 INFO [Server] Patch URL: null
1:09:05,978 INFO [Server] Server Name: default
1:09:05,978 INFO [Server] Server Home Dir: C:\devTools\jboss-4.0.1\jboss-4.0.1\server\default
1:09:05,978 INFO [Server] Server Home URL: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/
1:09:05,994 INFO [Server] Server Data Dir: C:\devTools\jboss-4.0.1\jboss-4.0.1\server\default\data
1:09:05,994 INFO [Server] Server Temp Dir: C:\devTools\jboss-4.0.1\jboss-4.0.1\server\default\tmp
1:09:05,994 INFO [Server] Server Config URL: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/conf/
1:09:05,994 INFO [Server] Server Library URL: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/lib/
1:09:05,994 INFO [Server] Root Deployment Filename: jboss-service.xml
1:09:05,994 INFO [Server] Starting General Purpose Architecture (GPA)...
1:09:06,260 INFO [ServerInfo] Java version: 1.5.0_11,Sun Microsystems Inc.
1:09:06,260 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_11-b03,Sun Microsystems Inc.
1:09:06,260 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
1:09:06,605 INFO [Server] Core system initialized
1:09:07,733 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
1:09:07,795 INFO [WebService] Using RMI server codebase: http://ps4701:8083/
1:09:08,046 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null
Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
1:09:13,950 INFO [Embedded] Catalina naming disabled
1:09:14,342 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
1:09:14,467 INFO [Catalina] Initialization processed in 454 ms
1:09:14,467 INFO [StandardService] Starting service jboss.web
1:09:14,483 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.28
1:09:14,499 INFO [StandardHost] XML validation disabled
1:09:14,514 INFO [Catalina] Server startup in 47 ms
1:09:14,624 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/http-invoker
sar/invoker.war/
1:09:15,203 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/tmp/deploy/tmp987jbos
-ws4ee-exp.war/
1:09:15,313 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/jbossweb-tomcat50.s
r/ROOT.war/
1:09:15,485 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/jms/j
ossmq-httpil.sar/jbossmq-httpil.war/
1:09:17,365 INFO [MailService] Mail Service bound to java:/Mail
1:09:17,756 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/defaul
/deploy/jboss-local-jdbc.rar
1:09:17,882 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/defaul
/deploy/jboss-xa-jdbc.rar
1:09:18,069 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/defaul
/deploy/jms/jms-ra.rar
1:09:18,179 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/defaul
/deploy/mail-ra.rar
1:09:18,931 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBi
ding,name=DefaultDS to JNDI name 'java:DefaultDS'
1:09:18,947 WARN [ConfiguredIdentityLoginModule] Creating LoginModule with no configured password!
1:09:19,166 INFO [A] Bound to JNDI name: queue/A
1:09:19,166 INFO [B] Bound to JNDI name: queue/B
1:09:19,166 INFO [C] Bound to JNDI name: queue/C
1:09:19,166 INFO [D] Bound to JNDI name: queue/D
1:09:19,166 INFO [ex] Bound to JNDI name: queue/ex
1:09:19,181 INFO [testTopic] Bound to JNDI name: topic/testTopic
1:09:19,181 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
1:09:19,181 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
1:09:19,181 INFO [testQueue] Bound to JNDI name: queue/testQueue
1:09:19,228 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
1:09:19,260 INFO [DLQ] Bound to JNDI name: queue/DLQ
1:09:19,401 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=Conne
tionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA'
1:09:19,432 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/jmx-cons
le.war/
1:09:19,604 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/manageme
t/web-console.war/
1:09:20,106 INFO [EARDeployer] Init J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/example.ear
1:09:20,513 INFO [EjbModule] Deploying test/MyTestSession
1:09:20,560 INFO [EjbModule] Deploying ejb/CalculatorSessionBean
1:09:20,622 INFO [EJBDeployer] Deployed: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/tmp/deploy/tmp1038example.ear-contents/exampl
.jar
1:09:20,920 INFO [TomcatDeployer] deploy, ctxPath=/example, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/tmp/deploy/tmp1038e
ample.ear-contents/example-exp.war/
1:09:21,014 INFO [EARDeployer] Started J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/example.ear
1:09:21,045 INFO [EARDeployer] Init J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/example2.ear
1:09:21,077 INFO [TomcatDeployer] deploy, ctxPath=/example2, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/tmp/deploy/tmp1039
xample2.ear-contents/example2-exp.war/
1:09:21,186 INFO [EARDeployer] Started J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/example2.ear
1:09:21,202 INFO [EARDeployer] Init J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/mfsc.ear
1:09:21,358 INFO [TomcatDeployer] deploy, ctxPath=/mfsc, warUrl=file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/tmp/deploy/tmp1040mfsc
ear-contents/mfsc-exp.war/
1:09:21,452 INFO [EARDeployer] Started J2EE application: file:/C:/devTools/jboss-4.0.1/jboss-4.0.1/server/default/deploy/mfsc.ear
1:09:21,593 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
1:09:21,656 INFO [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8009
1:09:21,656 INFO [JkMain] Jk running ID=0 time=0/16 config=null
1:09:21,672 INFO [Server] JBoss (MX MicroKernel) [4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)] Started in 15s:568ms
1:29:46,763 INFO [STDOUT] mode isnull
1:29:59,399 INFO [STDOUT] mode isprocess
1:29:59,399 INFO [STDOUT] looking for JNDI nameejb/UserSession
1:29:59,415 INFO [STDOUT] naming Exception occured
1:29:59,415 INFO [STDOUT] javax.naming.NameNotFoundException: UserSession not bound
1:29:59,415 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
1:29:59,415 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
1:29:59,415 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
1:29:59,415 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
1:29:59,415 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:252)
1:29:59,415 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
1:29:59,415 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
1:29:59,415 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:351)
1:29:59,415 INFO [STDOUT] at com.pspl.common.delegate.CommonDelegate.getUserRemoteObject(CommonDelegate.java:32)
1:29:59,415 INFO [STDOUT] at com.pspl.common.delegate.CommonDelegate.authenticateUser(CommonDelegate.java:54)
1:29:59,415 INFO [STDOUT] at com.pspl.common.admin.user.web.LoginServlet.isValidUser(LoginServlet.java:66)
1:29:59,415 INFO [STDOUT] at com.pspl.common.admin.user.web.LoginServlet.processRequest(LoginServlet.java:48)
1:29:59,415 INFO [STDOUT] at com.pspl.common.admin.user.web.LoginServlet.doPost(LoginServlet.java:39)
1:29:59,415 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
1:29:59,415 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
1:29:59,415 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
1:29:59,415 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
1:29:59,415 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
1:29:59,415 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
1:29:59,415 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
1:29:59,415 INFO [STDOUT] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
1:29:59,415 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
1:29:59,415 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
1:29:59,415 INFO [STDOUT] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
1:29:59,415 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
1:29:59,415 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
1:29:59,415 ERROR [Engine] StandardWrapperValve[LoginServlet]: Servlet.service() for servlet LoginServlet threw exception
ava.lang.NullPointerException
at com.pspl.common.delegate.CommonDelegate.getUserRemoteObject(CommonDelegate.java:40)
at com.pspl.common.delegate.CommonDelegate.authenticateUser(CommonDelegate.java:54)
at com.pspl.common.admin.user.web.LoginServlet.isValidUser(LoginServlet.java:66)
at com.pspl.common.admin.user.web.LoginServlet.processRequest(LoginServlet.java:48)
at com.pspl.common.admin.user.web.LoginServlet.doPost(LoginServlet.java:39)
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:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047298#4047298
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047298
18 years, 11 months
[Beginners Corner] - Could not instantiate Seam component
by jhimmel
I wanted to practice creating a Seam web application that uses a stateful session bean (using the EJB 3.0 standard). So I created a simple application with 2 pages, a session bean, and its local interface. The idea was for the user to type in his name and click on the submit button. The application is supposed to go to the second page and display the name that was typed in. The goal here is to maintain field state across web pages.
However, when I ran the application, I received the following error: "Could not instantiate Seam component". I noticed that in the stack trace, there was a point where it said "stateful not bound". What am I missing?
Here is the code for the first xhtml page:
| <?xml version="1.0" encoding="ISO-8859-1" ?>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html" template="layout/template.xhtml">
| <ui:define name="body">
| <h:form>
| Enter Your Name: <h:inputText id="YourNameInputText"
| value="#{personName.name}" />
| <h:commandButton id="CommandBtnSubmit" type="submit"
| value="Submit Your Name" action="#{personName.sayHello}" />
| </h:form>
| </ui:define>
| </ui:composition>
|
Here is the code for the second xhtml page:
| <?xml version="1.0" encoding="ISO-8859-1" ?>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html" template="layout/template.xhtml">
| <ui:define name="body">
| <h:form>
| Welcome <h:outputText value="#{personName.name}" id="testStateful2OutputText"/>
| </h:form>
| </ui:define>
| </ui:composition>
|
|
Here is the local interface:
| package com.pmacui;
|
| import javax.ejb.*;
| import java.util.*;
|
| @Local
| public interface IYourNameLocal
| {
| public String sayHello ();
| public void destroy ();
| }
|
|
Here is the session bean:
| package com.pmacui;
|
| import javax.ejb.*;
| import org.jboss.seam.annotations.*;
| import org.jboss.seam.ejb.*;
|
| import static org.jboss.seam.ScopeType.SESSION;
|
| @Stateful
| @Name("personName")
| @Scope (SESSION)
| public class YourNameAction implements IYourNameLocal
| {
| @In @Out
| private String name;
|
| public String GetName() { return this.name; }
| public void SetName(String name) { this.name = name; }
|
| public String sayHello ()
| {
| return "/testStateful2.xhtml";
| }
|
| @Remove @Destroy
| public void destroy ()
| { }
| } // end of class YourNameAction
|
|
Here is the part of the stack trace that displayed on the error page:
org.jboss.seam.InstantiationException: Could not instantiate Seam component: personName
at org.jboss.seam.Component.newInstance(Component.java:1740)
at org.jboss.seam.Component.getInstance(Component.java:1643)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
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.NameNotFoundException: stateful not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
at org.jboss.seam.Component.instantiate(Component.java:1093)
at org.jboss.seam.Component.newInstance(Component.java:1736)
... 51 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047293#4047293
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047293
18 years, 11 months
[JNDI/Naming/Network] - my jndi name is not present in it
by ganesh.pol
i follow the steps as you told me but my jndi name is not present on the page even ejb module is not shown
__________________________________________________________
following is part of view which is showing JNDI names
Ejb Module: example.jar
java:comp namespace of the test/MyTestSession bean:
+- env (class: org.jnp.interfaces.NamingContext)
java:comp namespace of the ejb/CalculatorSessionBean bean:
+- env (class: org.jnp.interfaces.NamingContext)
java: Namespace
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- DefaultDS (class: javax.sql.DataSource)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- jaas (class: javax.naming.Context)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
+- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- Mail (class: javax.mail.Session)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- TransactionManager (class: org.jboss.tm.TxManager)
Global JNDI Namespace
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory,interface org.jboss.proxy.IClientContainer)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy36 implements interface org.jboss.console.manager.PluginManagerMBean)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- queue (class: org.jnp.interfaces.NamingContext)
| +- A (class: org.jboss.mq.SpyQueue)
| +- testQueue (class: org.jboss.mq.SpyQueue)
| +- ex (class: org.jboss.mq.SpyQueue)
| +- DLQ (class: org.jboss.mq.SpyQueue)
| +- D (class: org.jboss.mq.SpyQueue)
| +- C (class: org.jboss.mq.SpyQueue)
| +- B (class: org.jboss.mq.SpyQueue)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- ejb (class: org.jnp.interfaces.NamingContext)
| +- CalculatorSessionBean (proxy: $Proxy53 implements interface org.jboss.proxy.IClientContainer,interface calculator.session.calculatorHome,interface javax.ejb.Handle)
| +- test (class: org.jnp.interfaces.NamingContext)
| | +- MyTestSessionBean (proxy: $Proxy51 implements interface org.jboss.proxy.IClientContainer,interface test.session.MyTestSessionHome,interface javax.ejb.Handle)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy35 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt,interface org.jboss.proxy.IClientContainer)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.nami
___________________________________________________________
this time i will post you the actual whole code
my Servlet class
/**
*
*/
package com.pspl.common.admin.user.web;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.pspl.common.delegate.CommonDelegate;
import com.pspl.common.delegate.ICommonDelegate;
import com.pspl.common.models.UserModel;
/**
* @author ganesh_pol
*
*/
public class LoginServlet extends HttpServlet {
/* (non-Javadoc)
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
processRequest(req,resp);
}
/* (non-Javadoc)
* @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
processRequest(req,resp);
}
private void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String mode=req.getParameter("mode");
System.out.println("mode is"+mode);
if(mode==null || "".equals(mode)){
dispatchRequest(req,resp,"/login.jsp");
}else if("process".equalsIgnoreCase(mode)){
if(isValidUser(req)){
System.out.println("valid user");
dispatchRequest(req,resp,"/home.jsp");
}else{
dispatchRequest(req,resp,"/login.jsp");
}
}
}
private void dispatchRequest(HttpServletRequest req, HttpServletResponse resp,String view) throws ServletException, IOException {
RequestDispatcher rd=req.getRequestDispatcher(view);
rd.forward(req, resp);
}
private boolean isValidUser(HttpServletRequest request){
boolean isValid=false;
String userName=request.getParameter("userName");
String password=request.getParameter("password");
UserModel user=CommonDelegate.getInstance().authenticateUser(userName, password);
if(user!=null){
isValid=true;
}
return isValid;
}
}
__________________________________________________________
my delegator code
package com.pspl.common.delegate;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
import com.pspl.common.admin.user.components.IUserSessionEJBHome;
import com.pspl.common.admin.user.components.IUserSessionEJBObject;
import com.pspl.common.admin.user.components.UserSessionBean;
import com.pspl.common.models.UserModel;
public class CommonDelegate implements ICommonDelegate {
public static final CommonDelegate COMMON_DELEGATE=new CommonDelegate();
public static final CommonDelegate getInstance(){
return COMMON_DELEGATE;
}
public IUserSessionEJBObject getUserRemoteObject(String jndiName){
System.out.println("looking for JNDI name"+jndiName);
InitialContext context=null;
Object obj=null;
IUserSessionEJBObject userRemoteObject=null;
IUserSessionEJBHome userSessionEJBHome=null;
try{
context= new InitialContext();
obj=context.lookup(jndiName);
userSessionEJBHome=(IUserSessionEJBHome)PortableRemoteObject.narrow(obj,IUserSessionEJBHome.class);
System.out.println("USer EJB HOME Object"+userSessionEJBHome);
}catch(NamingException namingEx){
System.err.println("naming Exception occured");
namingEx.printStackTrace();
}
try{
userRemoteObject=userSessionEJBHome.create();
}catch(CreateException creEx){
System.err.println("create Exception occured");
creEx.printStackTrace();
}catch(RemoteException reEx){
System.err.println("Remote Ex occured");
reEx.printStackTrace();
}
System.out.println("USer EJB HOME Object"+userSessionEJBHome);
return userRemoteObject;
}
public UserModel authenticateUser(String userName, String password) {
IUserSessionEJBObject userService=getUserRemoteObject("ejb/UserSession");
UserModel user=null;
try{
user=userService.authenticateUser(userName, password);
}catch(RemoteException reEx){
System.err.println("Remote Exception occured");
reEx.printStackTrace();
}
return user;
}
}
___________________________________________________
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047286#4047286
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047286
18 years, 11 months