I'm getting something Odd happening when trying to use a stateful
session bean from tomcat.
On the servlet side it says:
sjb![LoginServlet][authenticateUser] Caught throwable after authentication try block!
java.rmi.ServerException: Could not get EJBObject; nested exception is:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an application
resource file: java.naming.factory.initial
javax.naming.NoInitialContextException: Need to specify class name in environment or
system property, or as an applet parameter, or in an application resource file:
java.naming.factory.initial
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at javax.naming.NamingException.<init>(NamingException.java:103)
at
javax.naming.NoInitialContextException.<init>(NoInitialContextException.java:55)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
org.jboss.ejb.plugins.jrmp.interfaces.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:65)
at
com.lisasoft.telstra.webfoot.servlet.WebFootClient.getWebFoot(WebFootClient.java:139)
at
com.lisasoft.telstra.webfoot.servlet.WebFootServlet.getWebFoot(WebFootServlet.java:131)
at
com.lisasoft.telstra.webfoot.servlet.login.LoginServlet.authenticateUser(LoginServlet.java:161)
at
com.lisasoft.telstra.webfoot.servlet.login.LoginServlet.doPost(LoginServlet.java:75)
at
com.lisasoft.telstra.webfoot.servlet.login.LoginServlet.doGet(LoginServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
at org.apache.tomcat.core.Handler.service(Handler.java:263)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:769)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:715)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:207)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:498)
On the serverside it says:
[Container factory] Deployed application: file:/usr/local/tcook/jboss/deploy/all.jar
[statefulWebfoot] WebFootBean: setSessionContext: null,
com.lisasoft.telstra.webfoot.ejb.webfoot.WebFootBean@3d6a5f
[statefulWebfoot] WebFootBean: EJB create: null,
com.lisasoft.telstra.webfoot.ejb.webfoot.WebFootBean@3d6a5f
Creating resources... [statefulWebfoot] Factory Class: com.sun.jndi.ldap.LdapCtxFactory
[statefulWebfoot] URL: ldap://192.168.83.149:389
[statefulWebfoot] User:
uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot
[statefulWebfoot] Password: admin
[statefulWebfoot] grabResources returning
[statefulWebfoot] TxCapsule.commit(): Entered, status=STATUS_ACTIVE
[statefulWebfoot] TxCapsule.commit(): Before completion done, status=STATUS_ACTIVE
[statefulWebfoot] TxCapsule.commit(): No resources.
[statefulWebfoot] TxCapsule.commit(): Committed OK.
[statefulWebfoot] TxCapsule.registerSynchronization(): Entered, status=STATUS_ACTIVE
[statefulWebfoot] WebFootBean: EJB remove: null,
com.lisasoft.telstra.webfoot.ejb.webfoot.WebFootBean@3d6a5f
[statefulWebfoot] TxCapsule.commit(): Entered, status=STATUS_ACTIVE
[statefulWebfoot] WebFootBean: beforeCompleteion(): null
[statefulWebfoot] TxCapsule.commit(): Before completion done, status=STATUS_ACTIVE
[statefulWebfoot] TxCapsule.commit(): No resources.
[statefulWebfoot] java.lang.IllegalArgumentException: argument type mismatch
[statefulWebfoot] at java.lang.reflect.Method.invoke(Native Method)
[statefulWebfoot] at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor$InstanceSynchronization.afterCompletion(StatefulSessionInstanceInterceptor.java:289)
[statefulWebfoot] at
org.jboss.tm.TxCapsule.doAfterCompletion(TxCapsule.java:1014)
[statefulWebfoot] at org.jboss.tm.TxCapsule.commit(TxCapsule.java:317)
[statefulWebfoot] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
[statefulWebfoot] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:318)
[statefulWebfoot] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[statefulWebfoot] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:185)
[statefulWebfoot] at
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:320)
[statefulWebfoot] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:222)
[statefulWebfoot] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:187)
[statefulWebfoot] at java.lang.reflect.Method.invoke(Native Method)
[statefulWebfoot] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[statefulWebfoot] at sun.rmi.transport.Transport$1.run(Transport.java:142)
[statefulWebfoot] at java.security.AccessController.doPrivileged(Native Method)
[statefulWebfoot] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[statefulWebfoot] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[statefulWebfoot] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[statefulWebfoot] at java.lang.Thread.run(Thread.java:484)
[statefulWebfoot] TxCapsule.commit(): Committed OK.
I think these are two unrelated problems, since the serverside stack
trace seems to occur while trying to commit a transaction.
As for the clientside problem, it is odd. The client already has an
InitialContext which is has obviously use to contact the server; it
causes the serverside stack trace. Even more oddly, the code which
causes the clientside problem is:
WebFoot wf = ...;
javax.ejb.Handle h = wf.getHandle();
...
WebFoot ft = (WebFoot)h.getEJBObject();
The exception is thrown on this last line. How does getEJBObject()
(which returns a serialized connector, I believe) fit in with a proxy
based system?
Tom
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]