2013-07-03 60 views
0

我只是想添加一個servlet在web.xml中,像這樣指定的工廠的InitialContext:我有此錯誤:無法創建使用哈希表

<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> 

一切的一切都很好,當我開始我的程序,我得到這個:

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) 

有人可以告訴我發生了什麼事嗎?

+0

向我們展示Servlet的代碼。這似乎有一些JNDI錯誤。 – NINCOMPOOP

回答