Javax.naming.NameNotFoundException - Can you advise ?

Hi,
I received the following error when I run my application on WebLogic
6.1 SP3. The error in particular "javax.naming.NameNotFoundException:
Unable to resolve..." puzzles me - I don't know how to go about
resolving it.
Can anyone help/advise how I should go about solving this? Many thanks
in advance...
mycompany.framework.exceptions.CannotAddException
Could not generate new internal order number
mycompany.framework.exceptions.CannotAddException: Could not generate
new internal order number
     at mycompany.myapp.beans.session.AddOrderEntryHeaderBean.preAdd(AddOrderEntryHeaderBean.java:38)
     at mycompany.framework.beans.session.AddEntityBean.add(AddEntityBean.java:37)
     at mycompany.myapp.beans.session.AddOrderEntryHeaderSession_497eum_EOImpl.add(AddOrderEntryHeaderSession_497eum_EOImpl.java:37)
     at mycompany.framework.actions.AddEntityAction.performAction(AddEntityAction.java:27)
     at mycompany.framework.actions.BaseAction.perform(BaseAction.java:44)
     at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
java.rmi.UnexpectedException: Unexpected exception in
mycompany.myapp.beans.session.CounterManagerSession.nextCounterValue():
javax.naming.NameNotFoundException: Unable to resolve 'myapp'
Resolved: '' Unresolved:'myapp' ; remaining name 'myapp'
     <>
; nested exception is:
     javax.naming.NameNotFoundException: Unable to resolve 'myapp'
Resolved: '' Unresolved:'myapp' ; remaining name 'myapp'
javax.naming.NameNotFoundException: Unable to resolve 'myapp'
Resolved: '' Unresolved:'myapp' ; remaining name 'myapp'
     <>
Cheers, Bob...

Some more info on from where I am looking up.
It is a java class in the EAR and OC4J container same as the EJB (Home) class.
Just highlighting the exception.
Logfile extract: OracleAS/opmn/logs/OC4J~home~default_island~1
53 06/10/19 11:38:04 EL providerUrl: opmn:ormi://10.10.5.41:6003:home/xPression
54 06/10/19 11:38:04 EL namingFactory: com.evermind.server.rmi.RMIInitialContextFactory
56 06/10/19 11:38:04 EL Creating the Initial Context
57 06/10/19 11:38:04 EL jndi Name: com/dsc/uniarch/cr/ejb/CRContentSF
58 06/10/19 11:38:04 EL Inside Class.forName
59 06/10/19 11:38:04 EL Class.forName succeeded
60 06/10/19 11:38:04 PROVIDER_URL =opmn:ormi://10.10.5.41:6003:home/xPression
61 06/10/19 11:38:04 INITIAL_CONTEXT_FACTORY =com.evermind.server.rmi.RMIInitialContextFactory
62 06/10/19 11:38:04 SECURITY_PRINCIPAL =user
63 06/10/19 11:38:04 SECURITY_CREDENTIALS =password
64 06/10/19 11:38:04 JNDI NAME =com/dsc/uniarch/cr/ejb/CRContentSF
65 06/10/19 11:38:04 EL Exception Occurred while lookup
66 06/10/19 11:38:04 EL Exception occurred at PortableRemoteObject.narrow
67 06/10/19 11:38:04 javax.naming.NameNotFoundException: com/dsc/uniarch/cr/ejb/CRContentSF not found
68 06/10/19 11:38:04 at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
69 06/10/19 11:38:04 at javax.naming.InitialContext.lookup(InitialContext.java:347)
70 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge._processInitializeCommand(COM2EJBBridge.java:521)
71 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge.processInitializeCommand(COM2EJBBridge.java:656)
72 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetCompose(Native Method)
73 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetOutput2PDL(cmpcalwrapper.java:96)
74 06/10/19 11:38:04 at com.dsc.uniarch.op.OutputProfileController.processDocument(OutputProfileController.java:

Similar Messages

  • Can you guys help me with javax.naming.NameNotFoundException:

    Using Oracle App Server 10.1.2, OC4J managed by OPMN
    Which OC4J I am using
    oracle@SUSE-E:~/OracleAS/j2ee/home> java -jar oc4j.jar -version
    Oracle Application Server Containers for J2EE 10g (10.1.2.0.0) (build 041222.1873)
    oracle@SUSE-E:~/OracleAS/j2ee/home>
    /OracleAS/j2ee/home/config/server.xml
    <application name="xPression" path="../applications/xPression.ear" auto-start="true" />
    OracleAS/opmn/conf/opmn.xml
    <opmn xmlns="http://www.oracle.com/ias-instance">
    <notification-server>
    <port local="6100" remote="6200" request="6003"/>
    <log-file path="$ORACLE_HOME/opmn/logs/ons.log" level="4" rotation-size="1500000"/>
    <ssl enabled="true" wallet-file="$ORACLE_HOME/opmn/conf/ssl.wlt/default"/>
    </notification-server>
    <ias-component id="OC4J">
    <process-type id="home" module-id="OC4J" status="enabled">
    </ias-component>
    </opmn>
    Parameters that I used to construct the InitialContext in my Java Code.
    InitialContextFactory=com.evermind.server.rmi.RMIInitialContextFactory
    ProviderURL=opmn:ormi://10.10.5.41:6003:home/xPression
    SECURITY_PRINCIPAL=<user>
    SECURITY_CREDENTIALS=<password>
    Refered:
    http://radio.weblogs.com/0135826/2005/10/06.html
    Logfile extract: OracleAS/opmn/logs/OC4J~home~default_island~1
    53 06/10/19 11:38:04 EL providerUrl: opmn:ormi://10.10.5.41:6003:home/xPression
    54 06/10/19 11:38:04 EL namingFactory: com.evermind.server.rmi.RMIInitialContextFactory
    56 06/10/19 11:38:04 EL Creating the Initial Context
    57 06/10/19 11:38:04 EL jndi Name: com/dsc/uniarch/cr/ejb/CRContentSF
    58 06/10/19 11:38:04 EL Inside Class.forName
    59 06/10/19 11:38:04 EL Class.forName succeeded
    60 06/10/19 11:38:04 PROVIDER_URL =opmn:ormi://10.10.5.41:6003:home/xPression
    61 06/10/19 11:38:04 INITIAL_CONTEXT_FACTORY =com.evermind.server.rmi.RMIInitialContextFactory
    62 06/10/19 11:38:04 SECURITY_PRINCIPAL =user
    63 06/10/19 11:38:04 SECURITY_CREDENTIALS =password
    64 06/10/19 11:38:04 JNDI NAME =com/dsc/uniarch/cr/ejb/CRContentSF
    65 06/10/19 11:38:04 EL Exception Occurred while lookup
    66 06/10/19 11:38:04 EL Exception occurred at PortableRemoteObject.narrow
    67 06/10/19 11:38:04 javax.naming.NameNotFoundException: com/dsc/uniarch/cr/ejb/CRContentSF not found
    68 06/10/19 11:38:04 at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
    69 06/10/19 11:38:04 at javax.naming.InitialContext.lookup(InitialContext.java:347)
    70 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge._processInitializeCommand(COM2EJBBridge.java:521)
    71 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge.processInitializeCommand(COM2EJBBridge.java:656)
    72 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetCompose(Native Method)
    73 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetOutput2PDL(cmpcalwrapper.java:96)
    74 06/10/19 11:38:04 at com.dsc.uniarch.op.OutputProfileController.processDocument(OutputProfileController.java:
    orion-ejb-jar.xml
    <session-deployment name="CRContentSF"
    location="com/dsc/uniarch/cr/ejb/CRContentSF">
    </session-deployment>
    ejb-jar.xml
    <session id="CRContentSF">
    <ejb-name>CRContentSF</ejb-name>
    <home>com.dsc.uniarch.cr.ejb.CRContentSFHome</home>
    <remote>com.dsc.uniarch.cr.ejb.CRContentSF</remote>
    <ejb-class>com.dsc.uniarch.cr.ejb.CRContentSFBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    THANKS FOR YOUR TIME AND HELP

    Some more info on from where I am looking up.
    It is a java class in the EAR and OC4J container same as the EJB (Home) class.
    Just highlighting the exception.
    Logfile extract: OracleAS/opmn/logs/OC4J~home~default_island~1
    53 06/10/19 11:38:04 EL providerUrl: opmn:ormi://10.10.5.41:6003:home/xPression
    54 06/10/19 11:38:04 EL namingFactory: com.evermind.server.rmi.RMIInitialContextFactory
    56 06/10/19 11:38:04 EL Creating the Initial Context
    57 06/10/19 11:38:04 EL jndi Name: com/dsc/uniarch/cr/ejb/CRContentSF
    58 06/10/19 11:38:04 EL Inside Class.forName
    59 06/10/19 11:38:04 EL Class.forName succeeded
    60 06/10/19 11:38:04 PROVIDER_URL =opmn:ormi://10.10.5.41:6003:home/xPression
    61 06/10/19 11:38:04 INITIAL_CONTEXT_FACTORY =com.evermind.server.rmi.RMIInitialContextFactory
    62 06/10/19 11:38:04 SECURITY_PRINCIPAL =user
    63 06/10/19 11:38:04 SECURITY_CREDENTIALS =password
    64 06/10/19 11:38:04 JNDI NAME =com/dsc/uniarch/cr/ejb/CRContentSF
    65 06/10/19 11:38:04 EL Exception Occurred while lookup
    66 06/10/19 11:38:04 EL Exception occurred at PortableRemoteObject.narrow
    67 06/10/19 11:38:04 javax.naming.NameNotFoundException: com/dsc/uniarch/cr/ejb/CRContentSF not found
    68 06/10/19 11:38:04 at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
    69 06/10/19 11:38:04 at javax.naming.InitialContext.lookup(InitialContext.java:347)
    70 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge._processInitializeCommand(COM2EJBBridge.java:521)
    71 06/10/19 11:38:04 at com.dsc.uniarch.com2ejb.COM2EJBBridge.processInitializeCommand(COM2EJBBridge.java:656)
    72 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetCompose(Native Method)
    73 06/10/19 11:38:04 at com.dsc.uniarch.op.cmpcalwrapper.csetOutput2PDL(cmpcalwrapper.java:96)
    74 06/10/19 11:38:04 at com.dsc.uniarch.op.OutputProfileController.processDocument(OutputProfileController.java:

  • Javax.naming.NameNotFoundException: Name java:comp is not bound in this Con

    Hi
    I have developed a search servlet and deployed it in tomcat 4.0.3 and connected to mysql database through jdbc by specifying jndi.
    I have coded JNDI lokkup name as "java:comp/env/jdbc/KgoogleDB"
    I have added a context in server.xml file of tomcat for DBCP connection pooling .I have tested this in windows and it is running well in it.
    But when i hosted this in linux i got error like this
    INIT OF SEARCH SERVLET
    Error in file reading Connection refused
    File Not Found
    javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at DbConnect.getConnection(DbConnect.java:35)
    at QueryDetails.Query(QueryDetails.java:32)
    at Search.doPost(Search.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
    at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
    at java.lang.Thread.run(Thread.java:536)
    Connection ID null
    Entered FINALLY
    =================================
    What would be the cause of this error?.Please help me.
    My server.xml context is
    - <Host className="org.apache.catalina.connector.warp.WarpHost" name="www.keralagoogle.com" debug="0" appBase="/domains/www.yy.com/tomcat/webapps" unpackWARs="true">
    - <Context path="/yyjava" docBase="/domains/www.yy.com/tomcat/webapps/yyjava" debug="0" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_KgoogleDB." suffix=".txt" timestamp="true" />
    <Resource name="jdbc/KgoogleDB" auth="Container" type="javax.sql.DataSource" />
    - <ResourceParams name="jdbc/KgoogleDB">
    - <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    - <!--
    Maximum number of dB connections in pool. Make sure you
              configure your mysqld max_connections large enough to handle
              all of your db connections. Set to 0 for no limit.
    -->
    - <parameter>
    <name>maxActive</name>
    <value>500</value>
    </parameter>
    - <!--
    Maximum number of idle dB connections to retain in pool.
              Set to 0 for no limit.
    -->
    - <parameter>
    <name>maxIdle</name>
    <value>300</value>
    </parameter>
    - <!--
    Maximum time to wait for a dB connection to become available
              in ms, in this example 10 seconds. An Exception is thrown if
              this timeout is exceeded. Set to -1 to wait indefinitely.
    -->
    - <parameter>
    <name>maxWait</name>
    <value>12000</value>
    </parameter>
    - <!-- MySQL dB username and password for dB connections
    -->
    - <parameter>
    <name>username</name>
    <value>pratap</value>
    </parameter>
    - <parameter>
    <name>password</name>
    <value>ky67yumXg</value>
    </parameter>
    - <!-- Class name for mm.mysql JDBC driver
    -->
    - <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    - <!--
    The JDBC connection url for connecting to your MySQL dB.
              The autoReconnect=true argument to the url makes sure that the
              mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
              connection. mysqld by default closes idle connections after 8 hours.
    -->
    - <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/kgoogle?</value>
    </parameter>
    </ResourceParams>
    </Context>
    ==============================
    Please help me find if i have to change the syntax for linux in the above code.
    Thanks in Advance
    Prathap

    hi
    Thanks for your advise.
    But when i chenged my web.xml and jndi name in my servlet file i got error like this
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at DbConnect.getConnection(DbConnect.java:35)
    at QueryDetails.Query(QueryDetails.java:32)
    at Search.doPost(Search.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.jav
    a:216)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
    .java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
    468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1107)
    at java.lang.Thread.run(Thread.java:536)
    Connection ID null
    Entered FINALLY
    Please help me
    Thanks in Advance
    Prathap

  • Help: javax.naming.NameNotFoundException

    I am new to EJB and learning the examples in J2EE tutorial.
    I try to run my client from a different machine with my J2EE application server. The client runs fine in the same machine with the application server. I change the code as below and try to make the client work in remote machine:
    Original code:
    Context initial = new InitialContext();
    I changed to:
    Properties env = new Properties();
    env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
    env.setProperty("java.naming.provider.url", "iiop://192.168.1.55:3700");
    InitialContext initial = new InitialContext(env);
    but it can't work even in the local machine. The below exception is occured:
    javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    The problem must in these two line:
    env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
    env.setProperty("java.naming.provider.url", "iiop://192.168.1.55:3700");
    I am new to EJB and can't find any document that tell me how to set these two properties.
    Anybody can help me please? Any suggestion is welcome, thanks.....

    http://docs.sun.com/source/817-6087/dgjndi.html This will give you hopefully the info that you need

  • LDAP Newbie:    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT)

    Hi,
    I am getting the following error when I try to do a search on an ldap (AD LDS) database:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best match of:
    'DC=AppPartFE,DC=com'
    ]; remaining name 'cn=Users,dc=AppPartFE,dc=com'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at javax.naming.directory.InitialDirContext.search(Unknown Source)
    at Test.<init>(Test.java:70)
    at Test.main(Test.java:118)
    I can bind successfully using either the userPrincipalName (UPN) or the Distinguished Name (DN), however my search is failing.
    It is almost as if I am connected to the db tree at the wrong place.  Do I need a different search scope?
    I appreciate any assistance you can provide.
    Here is my code:
    import java.util.*; 
    import static java.lang.System.err;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    import javax.naming.ldap.InitialLdapContext;
    import javax.naming.ldap.LdapContext;
    public class Test 
    public Test() 
      Properties prop = new Properties(); 
      prop.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory"); 
      prop.put("java.naming.provider.url", "ldap://MyHost.Mydomain.labs.CompanyX.com:50004");
      String strProviderUrl = "ldap://MyHost.Mydomain.labs.CompanyX.com:50004";
      // Can successfully bind with the userPrincipalName in AD LDS
      //prop.put("java.naming.security.principal", "[email protected]");
      // Can successfully bind with Distinguished Name
      // Note: the string is case insensitive and embedded blank after a comma is not a problem
       prop.put("java.naming.security.principal", "cn=tst0001,cn=Users,dc=AppPartFE,dc=com"); 
      prop.put("java.naming.security.credentials", "password"); 
      try { 
        LdapContext ctx = new InitialLdapContext(prop, null); 
        System.out.println("Bind successful");
    //I am successful to this point....
       //now try doing a search on another user
         String strFilter = "(&(objectClass=userProxy)(sAMAccountName=tst0001))";
        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); //works with object class=* to find top partition node
        NamingEnumeration<SearchResult> results = ctx.search("cn=Users,dc=AppPartFE,dc=com", strFilter, searchControls);
        SearchResult searchResult = null;
        if(results.hasMoreElements()) {
             searchResult = (SearchResult) results.nextElement();
            //make sure there is not another item available, there should be only 1 match
            if(results.hasMoreElements()) {
                System.err.println("Matched multiple users for the accountName");
      catch (NamingException ex) { 
        ex.printStackTrace(); 
    public static void main(String[] args) 
      Test ldaptest = new Test(); 

    Because you are specifiying a base distinguished name in your ldap url, the ldap context will be rooted at that context and all subsequent objects will be relative to that base distinguished name.//connect to my domain controller
    String ldapURL = "ldaps://rhein:636/dc=bodensee,dc=de";andString userName = "CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de";results in an fully distinguished name of:CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de,dc=bodensee,dc=deEither specify your ldap url asString ldapURL = "ldaps://rhein:636";and leave your username as is, or specify the user object relative to the base distinguished name in the ldapurlString userName = "CN=verena bit,OU=Lehrer,OU=ASR";

  • Struts javax.naming.NameNotFoundException: name not found

    Hi.
    I'm developing a my first struts web application an I'm getting: javax.naming.NameNotFoundException: control_seguros not found
    This is my META -INF/context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/control_seguros">
    <Resource auth="Container" driverClassName="org.postgresql.Driver" name="jdbc/control_seguros" password="seguros" type="javax.sql.DataSource" url="jdbc:postgresql://localhost/control_seguros" username="seguros"/>
    </Context>
    web.xml
    <resource-ref>
    <description>Conexión Base de Datos</description>
    <res-ref-name>jdbc/control_seguros</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    action code
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    // Look up our data source
    DataSource ds = (DataSource) envCtx.lookup("jdbc/control_seguros");
    // Allocate and use a connection from the pool
    Connection conn = ds.getConnection();
    conn.close();
    How can i solve this? I'm using Glassfish v3 prelude. One more thing: i'm not sure if it's relevant, but i create meta-inf folder and content.xml manually. I'd like to know how the application determinates that the database connection settings are in this xml.

    1. To use local interfaces in Glassfish your client & bean must be in same EAR or EJB module.
    2. @Sateless(name=) it's only the name of bean and in fact the bean interface is stored under different name then processPayment, it can be something like
    packege.className.
    3. I assume that you can't use EJB annotation is servlet.
    4. If indeed you need to use lookup, you need perform following steps (only in Glassfish context).
    a) if you are in same EAR as servlet use in web.xml resource ref like in following eg.
        <ejb-local-ref>
            <ejb-ref-name>Custom name, this name you will use in WAR</ejb-ref-name> <!---->
            <ejb-ref-type>Session</ejb-ref-type>
            <local-home/> <!-- Beans are homeles ->
            <local>eu.softper.aleksandra.ewidencje.book.BookLocal</local> <!-- Your's bean local interface -->
            <ejb-link>Your bean name - here</ejb-link>
        </ejb-local-ref>b)if outside EAR you need to use server specific deployment, if server allows to pass local ref outside application. Glassfish does not.

  • Javax.naming.NameNotFoundException: Unable to resolve 'ATGProductionDS'   - in Weblogic on starting the server

    Hi,
    I am not able to resolve the JNDI name - ATGProductionDS
    I have used CIM to create this and i am using ATG10.2 with MYSQL as my database and weblogic.
    /atg/epub/file/ConfigFileSystem journaling file system started: vfs=file:/C:
    /Stixs/ATG/ATG10.2/home/PublishingAgent/deploymentconfig/live/config/ journalDirectory=C:\Stixs\ATG\ATG10.2\home\PublishingAgent\deploymentc
    onfig\data\config
    **** Error      Fri Dec 27 20:58:35 EST 2013    1388195915495   /atg/dynamo/service/jdbc/DirectJTDataSource     Failed to resolve ATGProduct
    ionDS   javax.naming.NameNotFoundException: Unable to resolve 'ATGProductionDS'. Resolved ''; remaining name 'ATGProductionDS'
    **** Error      Fri Dec 27 20:58:35 EST 2013    1388195915495   /atg/dynamo/service/jdbc/DirectJTDataSource             at weblogic.jndi.int
    ernal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
    **** Error      Fri Dec 27 20:58:35 EST 2013    1388195915495   /atg/dynamo/service/jdbc/DirectJTDataSource             at weblogic.jndi.int
    Entries from Weblogic console -datasources
    ATGBatchDS
    Generic
    ATGBatchDS
    ATGProductionDS
    Generic
    ATGProductionDS
    atg_production_lockserver, atg_publishing_lockserver
    ATGPublishingDS
    Generic
    ATGPublishingDS
    atg_publishing_lockserver
    Please provide assistance.

    Hi,
    if you click the "Control" tab for the ATGProductionDS datasource in the Weblogic console does it show the State as running?
    Does the "Monitoring" tab for the datasource show the State as running? If you click on the "Testing" tab can you test the datasource successfully?
    If you inspect the Server using the Weblogic console there is a link "View JNDI Tree" If you click the link do you see the datasource listed in the left pane?
    Do you see any errors for the ATGProductionDS in the Weblogic server log and out log files?

  • OC4J Configuration - javax.naming.NameNotFoundException

    Here is a description of the problem we are having:
    The Problem
         We have a remote client that wishes to invoke services
    that we are
    going to provide. These services will be accessible via a JNDI
    lookup from
    the client's JVM. The client, is operating in a JRE, version
    1.2.2, but is
    an in-house Java Server Engine (developed before the Servlet API
    specification) and not a command line client application. It is
    desirable to
    do a simple JNDI lookup from the RMIInitialContext and gain
    access to the
    services (Home Interface). Attached is a demonstration of a
    client
    application doing a lookup against the deployment shown below
    (orion-ejb-jar.xml ). Notice the name of the service in the
    lookup on the
    client application are exactly the same as the location
    declaration of the
    session deployment element of the orion-ejb-jar.xml. The service
    (EJB, not
    attached) was deployed without any errors. The exception we are
    getting is:
    Exception in thread "main" javax.naming.NameNotFoundException:
    DAServicesDemo not found
    at com.evermind.server.rmi.RMIContext.lookup
    (RMIContext.java:121)
    at javax.naming.InitialContext.lookup
    (InitialContext.java:350)
    at test.RemoteServiceClient.main
    (RemoteServiceClient.java:26)
         The RMI server has been configured with the default
    settings, and is
    listening on port 8474
    The Source
    package test;
    import ORG.oclc.da.beans.*;
    import javax.naming.*;
    import java.util.*;
    import java.rmi.*;
    import javax.ejb.*;
    public class RemoteServiceClient
         public static void main(String[] args)
         throws NamingException, CreateException,
    RemoteException,
    Exception{
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.evermind.server.rmi.RMIInitialContextFactory");
    h.put
    (Context.PROVIDER_URL, "ormi://risc14.dev.oclc.org:8474");
    InitialContext context = new InitialContext(h);
    DAServicesDemoHome remoteServiceHome =
    (DAServicesDemoHome) (new
    InitialContext(h)).lookup("DAServicesDemo");
    DAServicesDemo remoteService =
    (DAServicesDemo)remoteServiceHome.create();
    System.out.println("Here it is: " +
    remoteService.getContentGroup());
    C_DemoServices remoteService = new C_DemoServices();
    String result = remoteService.getContentGroup();
    System.out.println("This is the result form the remote
    service: " +
    result);
    EJB-jar.xml
    <ejb-jar>
    <description>
    Proof of concept application for the integration of DA to
    CORC
    </description>
    <display-name>Digital Archive Remote Services</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>DAServicesDemo</ejb-name>
    <home>ORG.oclc.da.beans.DAServicesDemoHome</home>
    <remote>ORG.oclc.da.beans.DAServicesDemo</remote>
    <ejb-class>ORG.oclc.da.beans.DAServicesDemoBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>DAServicesDemo</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Orion-ejb.jar
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-
    time="ea2215b915">
         <enterprise-beans>
              <session-deployment name="DAServicesDemo"
    location="DAServicesDemo"
    wrapper="DAServicesDemoHome_StatelessSessionHomeWrapper1"
    timeout="1800"
    persistence-filename="DAServicesDemo" />
         </enterprise-beans>
         <assembly-descriptor>
              <default-method-access>
                   <security-role-mapping
    name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
              </default-method-access>
         </assembly-descriptor>
    </orion-ejb-jar>
    Any help would be greatly appreciated, thanks in advanced...

    Hi Jonathan,
    If I understand you correctly, you are trying to access an EJB in
    OC4J from a separate, external JVM. If that is correct, then, in
    order to achieve that, the (EJB) home interface "stub" class must
    be located in the client's JVM. Unfortunately, I haven't figured
    out how to do that, and therefore, as far as I can see, the only
    two client options available are:
    1. Web-based client -- servlet or JSP
    2. Application client -- standalone java application.
    However, for both options, the client must also be deployed to
    OC4J. I don't know how to obtain "stub" classes generated by OC4J
    so that I can give external clients access to them.
    According to the J2EE spec, application clients need to be run
    within containers, too -- albeit thin containers. I presume that
    means you need 2 instances of OC4J running -- one for the server
    and one for the client. Seems a bit "heavy" to me, so for now I'm
    going with the web-based (servlet) client and having external
    java classes communicate with the servlet.
    Hope this has been of assistance to you,
    Avi.

  • JNDI - javax.naming.NameNotFoundException

    Hi,*
    I am new to JNDI. I am trying to execute the below mentioned code eg given in help topic in sun website.
    ** Included JAR files[fscontext.jar, provideutil.jar]*
    ** passing /classes as command line argument as mentioned in that example.[not sure its the right way]*
    ** I am using RAD to compile and execute the application.*
    *import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Hashtable;
    import com.sun.jndi.fscontext.RefFSContextFactory;
    public class Resolve {
    public static void main(String argv[]) {
    // The user should provide a file to lookup
    if (argv.length != 1) {
    System.+err+.println("Usage: java Resolve ");
    System.+exit+(-1);
    String name = argv[0];
    // Here we use the file system service provider
    Hashtable env = new Hashtable();
    env.put(Context.+INITIAL_CONTEXT_FACTORY+, "com.sun.jndi.fscontext.RefFSContextFactory");
    try {
    // Create the initial context
    Context ctx = new InitialContext(env);
    System.+out+.println("1");
    // Look up an object
    Object obj = ctx.lookup(name);
    System.+out+.println("2");
    // Print it out
    System.+out+.println(name + " is bound to: " + obj);
    // Close the context
    ctx.close();
    } catch (NamingException e) {
    System.+err+.println("Problem looking up " + name + ": " + e);
    Output:
    1
    Problem looking up /classes: javax.naming.NameNotFoundException:/classes
    Could you please help me resolving this issue.
    Thanks in advance.

    Hello:
    I display the full context of the connection factory in the application that publish the message:
    Full context is :
    Enviroment is : {java.naming.corba.orb=com.sun.enterprise.iiop.POAEJBORB@ec4a87}
    And in the web service when i create the initial context the full context is:
    Full context is : java:
    Enviroment is : {java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, java.naming.factory.url.pkgs=org.apache.naming}
    How can i see the connection factory in the Web Service, because the connection factory was created in other Application?

  • A difficult javax.naming.NameNotFoundException problem

    I have to move my application from IBM X455 PC Server to IBM X3850 (inter x86 64bit) PC Server . The application had been running on IBM X455 for about 3 years well . The OS is Red hat linux. The weblogic server on IBM X455 is 8.1.3. I tar the application from IBM X455 to IBM X3850 and install weblogic 8.1.4 on the x86 64bit OS. I redeploy the application on weblogic 8.1.4. When the client try to connect to the server, follow errors appear:
    <Jul 30, 2008 8:39:21 AM GMT+08:00> <Warning> <WLW> <000000> <Unable to load class ProcessControl>
    <Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Exception processing SessionService
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.RuntimeException: Unable to create adaptor
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_814_WLStub.confirmDeployment(Unknown Source)
    at com.bea.wlw.runtime.core.dispatcher.DispProjectJar.confirmDeployment(DispProjectJar.java:190)
    at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:752)
    at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:767)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:649)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at com.reformsoft.safe.manage.SessionFilter.doFilter(SessionFilter.java:64)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.RuntimeException: Unable to create adaptor
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:198)
    at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.confirmDeployment(SyncDispatcherBean.java:346)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.confirmDeployment(SyncDispatcher_k1mrl8_EOImpl.java:100)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
    ... 24 more
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'SafeWebService.GenericStateless.bean.StatelessContainer' didn
    't find subcontext 'GenericStateless' Resolved SafeWebService; remaining name 'GenericStateless/bean/StatelessContainer'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:225)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getHome(DispBean.java:132)
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:189)
    ... 28 more
    >
    <Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Returning HTTP 500 due to httpWriteCompileErrors <error> <description>An
    unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.rmi.RemoteExcep
    tion:EJB Exception: ; nested exception is: java.lang.RuntimeException: Unable to create adaptor</description> <source>[unknown sourc
    e]</source> <line>[unknown line]</line> <column>[unknown column]</column> <prescription>An unexpected error occurred. Please contact
    [email protected] for further assistance.</prescription> </error> >
    I check the weblogic console and find that there is something wrong with the JNDI tree. The state of GenericStateless is red. because of my poor english , please get the picture from http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=47583&messageID=282533 or http://www.itpub.net/viewthread.php?tid=1032379&extra=page%3D1&frombbs=1 , it will help.
    Since the application is an old one and runs well on IBM X455 machine , the configuration of JNDI and other components is ok. Since the weblogic version is different(8.1.3 to 8.1.4, 32 bit to 64 bit) , is there anything wrong with the weblogic or JDK enviroment? or OS configuration? I have tried weblogic 8.1.6 and many versions of JDK too, still failed . What is wrong? Please help me ASAP. Thanks a lot!

    Did you managed to get the solution to the above error. Can you please let me know the solution if you have get it right? You can post back to my id [email protected]
    Thanks,
    SK
    Edited by: shivaG on Nov 3, 2008 4:25 AM

  • Zenworks removal policy - javax.naming.NameNotFoundException

    Hello,
    We have Zenworks removal policy Setup to delete workstations that has not reported for the last 90 days. It is set to run every day at 10 PM. However everyday it goes trough some of the containers but then it get to this one and replies with this error and stops checking the rest of the tree. When I check our zenwsrem.log I can see that it has been like this since 2004 when we started to use removal policy.
    Jan 9, 2008 10:00:07 PM Checking for unused workstations in container: UNICON USER/GROUP MANAGER.OU.OU....................
    Jan 9, 2008 10:00:07 PM javax.naming.NameNotFoundException [Root exception is com.novell.service.jncp.NDSException: ccode = -601 (0xfffffda7)]
    Anyone has any Idea why it spits out this error and stops?
    We have NW6 SP7 on all our servers and zenworks is a clustered resource.

    On Thu, 10 Jan 2008 13:16:02 GMT, jonasbson wrote:
    > Anyone has any Idea why it spits out this error and stops?
    I would say it is the /
    Marcus Breiden
    If you are asked to email me information please remove the - in my e-mail
    address.
    The content of this mail is my private and personal opinion.
    http://www.didas.de

  • Distributed destination javax.naming.NameNotFoundException

    Hi, I have a JMS client (java application) that is trying to publish a message to a JMS queue. This queue is a distributed destination that resides on a cluster with 2 servers.
              When I try to lookup the queue name with
              Queue queue_final = (Queue) ctx.lookup(queueName);
              I get the following exception,
              'LAPPLoanStatusJMSExcep' Resolved [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'LAPPLoanStatusJMSExcep' Resolved ]; remaining name
              I can see this queue name under Distributed destinations and under the 2 servers.

    Did you manage to resolve this issue. I appear to be running into the same problem. It only occurs when i am trying to get hold of the queue. I have no problems when i am looking up the connection factory.
              regards
              kodjo

  • EJB Reference could not be resolved (javax.naming.NameNotFoundException)

    I am new to EJBs and am trying to get a simple Java client to run which I've generated from a EJB3.0 session bean.
    The code for the client (LoanAppFacadeClient.java) is
    package buslogic;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class LoanAppFacadeClient {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    LoanAppFacade loanAppFacade = (LoanAppFacade)context.lookup("java:comp/env/ejb/LoanAppFacade");
    // Call any of the Remote methods below to access the EJB
    // System.out.println( loanAppFacade.getLoans( ) );
    loanAppFacade.addLoan( "Galactic Loans", 30, "fixed", 6.25 );
    String ssn = "123-12-1234";
    System.out.println(loanAppFacade.getCreditRating( ssn ));
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Standalone OC4J connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "welcome1" );
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/LoanApp");
    return new InitialContext( env );
    When the trying to run the client I get a warning:
    "WARNING: EJB Reference "ejb/LoanAppFacade" could not be resolved."
    followed by the error
    "javax.naming.NameNotFoundException: java:comp/env/ejb/LoanAppFacade not found in Lab1_BusinessServices-app-client"
    When the client was created I right-clicked on the session bean (LoanAppFacadeBean which implements LoanAppFacade) and chose New Sample Java Client.
    This automatically creates the java client and also created the following xml file (application-client.xml)
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Lab1_BusinessServices-app-client</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb/LoanAppFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>buslogic.LoanAppFacade</remote>
    <ejb-link>LoanAppFacade</ejb-link>
    </ejb-ref>
    </application-client>
    Could someone please help me to fix these errors?
    Thanks,
    Andrew

    I used windows for years whereby I stored all photos in folders. As macs don't use this concept I am finding it hard to organize my photos.
    You can do this on your Mac too. Just don't use iPhoto. But iPhoto is a lot more flexible.
    For instance:
    I usually sort them by month so when I say move to an album I mean I create an album called for example '2013 March' so I can easily find specific photos/videos.
    Click on the Magnifying Glass lower left to reveal the search box. Then click on the magnifying glass in the search box, and select Date. Now you can instantly find all the photos from a particular month, or day.
    File -> New Smart Album will allow you to create an automatic album for any date or date range you choose.
    Select one of the affected videos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder Window should open with the file selected. Does it play?

  • Javax.naming.NameNotFoundException: No object bound to name java:comp/env/j

    Hi,
    I have developed this application and i rolled it out to the glassfish server. Once i have deployed the application i was able to use it without any problem. But when i restart the glassfish server and try the application, it chuck this exception. this exception only chuks at particular forms Not all form.
    Can some one tell me what causing this problem please
    Thank you
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@6fee93) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException java.sql.SQLException
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:470)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.RuntimeException: java.sql.SQLException
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:416)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:373)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:713)
            at com.sun.webui.jsf.component.TableRowGroupBase.getRowKeys(TableRowGroupBase.java:552)
            at com.sun.webui.jsf.component.TableRowGroupBase.getFilteredRowKeys(TableRowGroupBase.java:185)
            at com.sun.webui.jsf.component.TableRowGroupBase.getRowCount(TableRowGroupBase.java:495)
            at com.sun.webui.jsf.component.Table.getRowCount(Table.java:326)
            at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:416)
            at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:138)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1126)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            ... 39 more
    Caused by: java.sql.SQLException
            at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:381)
            at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:160)
            at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
            at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1351)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:402)
            ... 58 more
    Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/carltoninstitute_MySQL
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:834)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:366)
            ... 63 more

    Hi guys,
    I have tried everything I could, still I was unable to solve this problem.
    When i restart the glassfish server, some of the forms are not working. then when i restart again, the form that worked earlier doesn't work and the form that didn't work will work.
    If Anyone came across this error please let me know.
    Best Regards

  • Javax.naming.NameNotFoundException  plz guys help

    hi am try to create simple ejb prj and i got this exception iam beginner so can u plz help me to knwow hats wrong
    this is my entity bean
    working on netbean 6 glassfish v2
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.io.Serializable;
    import java.math.BigInteger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.EntityManager;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.transaction.UserTransaction;
    * @author kriem
    @Entity
    @Table(name = "DOCTOR")
    @NamedQueries({@NamedQuery(name = "Doctor.findByDocFname", query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"), @NamedQuery(name = "Doctor.findByDocId", query = "SELECT d FROM Doctor d WHERE d.docId = :docId"), @NamedQuery(name = "Doctor.findByDocLname", query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"), @NamedQuery(name = "Doctor.findByDocPhone", query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"), @NamedQuery(name = "Doctor.findByDocAddress", query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"), @NamedQuery(name = "Doctor.findByDocMobileNo", query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"), @NamedQuery(name = "Doctor.findByDocSpecialty", query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"), @NamedQuery(name = "Doctor.findByDocTitle", query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
    public class Doctor implements Serializable {
        private static final long serialVersionUID = 1L;
        @Column(name = "DOC_FNAME", nullable = false)
        private String docFname;
        @Id
        @Column(name = "DOC_ID", nullable = false)
        private String docId;
        @Column(name = "DOC_LNAME", nullable = false)
        private String docLname;
        @Column(name = "DOC_PHONE")
        private BigInteger docPhone;
        @Column(name = "DOC_ADDRESS", nullable = false)
        private String docAddress;
        @Column(name = "DOC_MOBILE_NO")
        private BigInteger docMobileNo;
        @Column(name = "DOC_SPECIALTY", nullable = false)
        private String docSpecialty;
        @Column(name = "DOC_TITLE", nullable = false)
        private String docTitle;
        public Doctor() {
        public Doctor(String docId) {
            this.docId = docId;
        public Doctor(String docId, String docFname, String docLname, String docAddress, String docSpecialty, String docTitle) {
            this.docId = docId;
            this.docFname = docFname;
            this.docLname = docLname;
            this.docAddress = docAddress;
            this.docSpecialty = docSpecialty;
            this.docTitle = docTitle;
        public String getDocFname() {
            return docFname;
        public void setDocFname(String docFname) {
            this.docFname = docFname;
        public String getDocId() {
            return docId;
        public void setDocId(String docId) {
            this.docId = docId;
        public String getDocLname() {
            return docLname;
        public void setDocLname(String docLname) {
            this.docLname = docLname;
        public BigInteger getDocPhone() {
            return docPhone;
        public void setDocPhone(BigInteger docPhone) {
            this.docPhone = docPhone;
        public String getDocAddress() {
            return docAddress;
        public void setDocAddress(String docAddress) {
            this.docAddress = docAddress;
        public BigInteger getDocMobileNo() {
            return docMobileNo;
        public void setDocMobileNo(BigInteger docMobileNo) {
            this.docMobileNo = docMobileNo;
        public String getDocSpecialty() {
            return docSpecialty;
        public void setDocSpecialty(String docSpecialty) {
            this.docSpecialty = docSpecialty;
        public String getDocTitle() {
            return docTitle;
        public void setDocTitle(String docTitle) {
            this.docTitle = docTitle;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (docId != null ? docId.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Doctor)) {
                return false;
            Doctor other = (Doctor) object;
            if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "doctor.Doctor[docId=" + docId + "]";
        public void persist(Object object) {
            /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
             * <persistence-context-ref>
             * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
             * <persistence-unit-name>simple-ejbPU</persistence-unit-name>
             * </persistence-context-ref>
             * <resource-ref>
             * <res-ref-name>UserTransaction</res-ref-name>
             * <res-type>javax.transaction.UserTransaction</res-type>
             * <res-auth>Container</res-auth>
             * </resource-ref> */
            try {
                Context ctx = new InitialContext();
                UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
                utx.begin();
                EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
                em.persist(object);
                utx.commit();
            } catch (Exception e) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
                throw new RuntimeException(e);
    }my session bean
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    * @author kriem
    @Stateless
    public class DoctorFacade implements DoctorFacadeRemote {
        @PersistenceContext
        (unitName="simple-ejbPU")
        private EntityManager em;
        public void create(Doctor doctor) {
            em.persist(doctor);
        public void edit(Doctor doctor) {
            em.merge(doctor);
        public void remove(Doctor doctor) {
            em.remove(em.merge(doctor));
        public Doctor find(Object id) {
            return em.find(doctor.Doctor.class, id);
        public List<Doctor> findAll() {
            return em.createQuery("select object(o) from Doctor as o").getResultList();
        public void persist(Object object) {
            em.persist(object);
    }myremote interface
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.List;
    import javax.ejb.Remote;
    * @author kriem
    @Remote
    public interface DoctorFacadeRemote {
        void create(Doctor doctor);
        void edit(Doctor doctor);
        void remove(Doctor doctor);
        Doctor find(Object id);
        List<Doctor> findAll();
    }and for the clinet side its simple java aplication
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.rmi.PortableRemoteObject;
    * @author kriem
    public class client extends test  {
        public static void main(String [] args) {
        try {
           // NewServiceLocator obj=new NewServiceLocator();
            test simple=new test();
            simple.getDataSource("doctor");
            simple.getSession("DoctorFaca");
                Context jndiContext = getInitialContext( );
                Object ref = jndiContext.lookup("DoctorFacade/remote");
                DoctorFacadeRemote dao = (DoctorFacadeRemote)
                  PortableRemoteObject.narrow(ref,DoctorFacadeRemote.class);
         Doctor doc=new Doctor();
         doc.setDocFname("test");
         doc.setDocAddress("bla bla");
         doc.setDocId("D1005");
         doc.setDocLname("mohamedd");
        // doc.setDocMobileNo(121112223);
         doc.setDocTitle("MD");
         //doc.getDocPhone(2);
                dao.create(doc);
                Doctor doc2 = dao.find("D1002");
                System.out.println(doc2.getDocSpecialty());
                System.out.println(doc2.getDocFname());
                System.out.println(doc2.getDocLname());
                System.out.println(doc2.getDocAddress());
                System.out.println(doc2.getDocMobileNo());
                System.out.println(doc2.getDocPhone());
                System.out.println(doc2.getDocSpecialty());
                System.out.println(doc2.getDocTitle());
        catch (javax.naming.NamingException ne)
        {ne.printStackTrace( );
        public static Context getInitialContext( )
            throws javax.naming.NamingException {
            Properties p = new Properties( );
            // ... Specify the JNDI properties specific to the vendor.
            return new javax.naming.InitialContext(p);
        }and i got this exception knowing that am using entity bean from existing database that i had created
    javax.naming.NameNotFoundException:
            at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
            at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
            at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    run-simple-app-client:guys anyhelp am really lost in this
    Edited by: marwacs on May 19, 2008 9:32 PM

    hey guys i made some updates on my sample and i figure out that as long as am creating enterprise application on netbeans 6 that contain both ejb module and client module i don`t need to write mapedName i only put the @ejb in the client side and it creates an instance of the remote interface
    here is what i have done in the client code /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package enterpriseapplication4;
    import ejb.Doctor;
    import ejb.DoctorFacadeRemote;
    import javax.ejb.EJB;
    import java.math.BigInteger;
    * @author kriem
    public class Main {
        @EJB
        private static DoctorFacadeRemote doctorFacade;
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
    //        Object id="D1002";
    //        Doctor find = doctorFacade.find(id);
    //        find.toString();
    //            System.out.println(find.getDocSpecialty());
    //            System.out.println(find.getDocFname());
    //            System.out.println(find.getDocLname());
    //            System.out.println(find.getDocAddress());
    //            System.out.println(find.getDocMobileNo());
    //            System.out.println(find.getDocPhone());
    //            System.out.println(find.getDocSpecialty());
    //            System.out.println(find.getDocTitle());
                    Doctor doc=new Doctor();
                    BigInteger bi = BigInteger.valueOf(123);
                    BigInteger bh = BigInteger.valueOf(111);
         doc.setDocFname("test");
         doc.setDocAddress("bla bla");
      System.err.print("doc Fname and address");
         doc.setDocId("D1005");
         doc.setDocLname("mohamedd");
    doc.setDocMobileNo(bh);
         doc.setDocTitle("MD");
    doc.setDocMobileNo (bi);
      doctorFacade.create(doc);
      System.err.print("doc was added");
    }but when i run i found this
    May 21, 2008 6:37:08 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
            at ejb.__DoctorFacadeRemote_Remote_DynamicStub.create(ejb/__DoctorFacadeRemote_Remote_DynamicStub.java)
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Caused by: java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1386)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
            at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
            at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
            at $Proxy82.create(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    Caused by: javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:440)
            at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
            at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
            at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
            ... 19 more
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:461)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            ... 2 more
    Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            ... 8 morethe thing is am connecting my sample with oracle db and i debuged my sample it breaks when i try to create(doc) last line in the client code ,i guess its about connecting with the database,i don`t know i also working on netbean 6
    so plaz me guys another question is it possible to create statfule web services and if its plz can u send me examples

Maybe you are looking for

  • Path in itune \settings\extended correct but titles not found ( ! symbol )

    Hi to everybody I made probably a mistake somewhere trying to find a place for my 10 GB "iTunes Music" directory. To make it short the situation is as follows: Finally I moved back the "itunes music" dir to its original place in \ownfiles\ownmusic an

  • SharePoint 2013 and SQL Server 2012

    Hi all,  I've looked around and not found a concrete answer to this question; or maybe I have and just haven't realised! Anyway. We've currently got a license for SharePoint 2013 Enterprise, and are working on introducing Business Intelligence capabi

  • HT204406 I am experiencing a very SLOW response on my iPhone when trying to make a play list.

    I am at home with a very fast internet access and still it hangs up for about 30 seconds per song when trying to add them to my playlist.  Why is that?

  • ICR - Importing File for process 003 + 001

    Hello sap colleagues, We have an issue with ICR and I hope someone can give me a hand with it. We have included process 001 into process 003. Now we are working in the definition of the file structure so that companies from outside the reconciliation

  • Dynamic approval hierachy process

    Hi, I've a scenarion where I need to develop a BPM process that goes through various approvals in the hierarchy. When a user creates a task, it goes to his/her manager queue. Once the manager approves, the task should go to manager's manager queue an