"darranl" wrote : What are the properties that you are putting into the InitialContext constructor? I know you say that the lookup of your session beans works but unless you have specified otherwise you are probably obtaining them from a different namespace. | | Also when posting errors can you post the stack trace as well, it makes it easier to see what is happening.
This is the stack trace of the exception that I get: | javax.naming.NamingException: Failed to find j2ee.clientName in jndi env | at org.jboss.naming.client.java.javaURLContextFactory.getObjectInstance(javaURLContextFactory.java:66) | at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:584) | at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533) | at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279) | at javax.naming.InitialContext.lookup(InitialContext.java:351) | at org.jemos.site.patterns.servicelocator.ServiceLocator.getDataSource(ServiceLocator.java:244) | at org.jemos.site.ejbs.sessions.SiteStatsBean.countHits(SiteStatsBean.java:105) | 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:585) | at org.jboss.invocation.Invocation.performCall(Invocation.java:345) | at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214) | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) | at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113) | at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51) | at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105) | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:283) | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149) | at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128) | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) | at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624) | at org.jboss.ejb.Container.invoke(Container.java:854) | 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:585) | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) | at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775) | at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382) | 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:585) | at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) | at sun.rmi.transport.Transport$1.run(Transport.java:153) | at java.security.AccessController.doPrivileged(Native Method) | at sun.rmi.transport.Transport.serviceCall(Transport.java:149) | at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) | at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) | at java.lang.Thread.run(Thread.java:595) | 2005-06-27 23:04:40,500 FATAL [org.jemos.site.ejbs.sessions.SiteStatsBean] ServiceLocator exception occurred while trying to load a datasource | org.jemos.site.common.exception.ServiceLocatorException: javax.naming.NamingException: Failed to find j2ee.clientName in jndi env | at org.jemos.site.patterns.servicelocator.ServiceLocator.getDataSource(ServiceLocator.java:254) | at org.jemos.site.ejbs.sessions.SiteStatsBean.countHits(SiteStatsBean.java:105) | 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:585) | at org.jboss.invocation.Invocation.performCall(Invocation.java:345) | at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214) | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) | at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113) | at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51) | at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105) | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:283) | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149) | at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128) | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) | at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624) | at org.jboss.ejb.Container.invoke(Container.java:854) | 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:585) | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) | at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775) | at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382) | 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:585) | at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) | at sun.rmi.transport.Transport$1.run(Transport.java:153) | at java.security.AccessController.doPrivileged(Native Method) | at sun.rmi.transport.Transport.serviceCall(Transport.java:149) | at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) | at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) | at java.lang.Thread.run(Thread.java:595) | Caused by: javax.naming.NamingException: Failed to find j2ee.clientName in jndi env | at org.jboss.naming.client.java.javaURLContextFactory.getObjectInstance(javaURLContextFactory.java:66) | at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:584) | at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533) | at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279) | at javax.naming.InitialContext.lookup(InitialContext.java:351) | at org.jemos.site.patterns.servicelocator.ServiceLocator.getDataSource(ServiceLocator.java:244) | ... 41 more | | | And those are the properties that I'm setting: | | | | # | | # Contains the properties to create a Jboss Initial Context | | # | | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | | java.naming.factory.url.pkgs=org.jboss.naming.client | | #-------------------------------------------------------------------- | | # J E M O S S I T E | | #-------------------------------------------------------------------- | | # | | #This property is set into the java.naming.provider.url property | | #at runtime, so that we have got a unique property file for all projects | | #and the ServiceLocator of each project reads its own property and | | #set the JBoss property | | org.jemos.site=jnp://localhost:1099 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882906#3882906 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882906 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
