I have got this error : Failed to create InitialContext using factory specified in hashtable

Posted by user85121 on Stack Overflow See other posts from Stack Overflow or by user85121
Published on 2013-07-03T05:02:17Z Indexed on 2013/07/03 5:05 UTC
Read the original article Hit count: 347

Filed under:
|

I just want to add a servlet in web.xml, like this :

<servlet>
        <display-name>AxisJMSServlet</display-name>
        <servlet-name>JMSListener</servlet-name>    
        <servlet-class>com.sinosoft.prpall.web.jms.JMSListenServlet</servlet-class>
        <load-on-startup>110</load-on-startup>
  </servlet>

Everything is just fine, and when i started my programs, I got this :

javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hashtable [Root exception is java.lang.NullPointerException]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:258)
        at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
        at javax.naming.InitialContext.internalInit(InitialContext.java:286)
        at javax.naming.InitialContext.<init>(InitialContext.java:211)
        at org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory(JNDIVendorAdapter.java:85)
        at org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFactory(JNDIVendorAdapter.java:55)
        at org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMSConnectorFactory.java:227)
        at org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnector(JMSConnectorFactory.java:156)
        at com.sinosoft.prpall.web.jms.JMSListenServlet.init(JMSListenServlet.java:60)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1981)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1955)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1874)

Can anybody tell me what is going on ?

© Stack Overflow or respective owner

Related posts about java

Related posts about servlets