Issue | Sequence Generator | 2 JBoss Instances Single Machin
nirvanas1979 Aug 2, 2005 2:57 AMHi all,
I am facing a strange issue. I have 2 instances of jboss on the same machine and we have a number of stateless session beans used in our application. Now, I have written a Stateless session bean for sequence generator. I am able to run it on one instance but it is failing on another instance (even if I am only this running this one instance).
It gives the following error:
com.proximities.common.utils.SequenceIdGeneratorUtil: Method: getSequence(): Message: TableKey : VENUE
2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: utils.SequenceIdGeneratorUtil: Method: getSequence(): Message: Fetching from sequence proxy factory: VENUE
2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI initial context: org.jnp.interfaces.NamingContextFactory
2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI URL: jnp://localhost:11099
2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI initial context prefix: org.jboss.naming:org.jnp.interfaces
2005-08-02 11:19:58,421 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getSequenceFacade: Message: SequenceStoreFacadeHome - Sequence store facade home returned from ejbHomeFactory isnull
2005-08-02 11:19:58,421 FATAL [com.proximities] Class: ejb.EJBLookupUtil: Method: getSequenceFacade: Message: Exception during the invoking the remote interface
2005-08-02 11:19:58,421 INFO [STDOUT] java.lang.NullPointerException
2005-08-02 11:19:58,421 INFO [STDOUT] ejb.EJBLookupUtil.getSequenceFacade(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.getSequenceStore(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.reserveBlock(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.getSequence(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at common.utils.SequenceIdGeneratorUtil.getSequence(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.VenueDAO.add(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.VenueDAO.update(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.common.GenericDataAccessManager.executeModify(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at business.mediator.ManageVenueMediator.insertIntoVenues(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at business.sessionfacade.VenueManagementFacadeEJBean.insertIntoVenues(Unknown Source)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2005-08-02 11:19:58,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.CleanShutdownInterceptor.invoke(CleanShutdownInterceptor.java:264)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2005-08-02 11:19:58,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
2005-08-02 11:19:58,421 INFO [STDOUT] at $Proxy92.insertIntoVenues(Unknown Source)
Now within the server logs, I can see that it has loaded and cached the home interface of that bean, but dont know why its not picking it up.
Here are the logs for the same:
[org.jboss.ejb.EjbModule] startService, starting container: SequenceStoreFacade
[org.jboss.system.ServiceController] starting service jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
[org.jboss.ejb.StatelessSessionContainer] Starting jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
[org.jboss.ejb.StatelessSessionContainer] Begin java:comp/env for EJB: SequenceStoreFacade
[org.jboss.ejb.StatelessSessionContainer] TCL: org.jboss.util.loading.DelegatingClassLoader@188d92e
[org.jboss.ejb.StatelessSessionContainer] Bound java:comp/ORB for EJB: SequenceStoreFacade
[org.jboss.ejb.StatelessSessionContainer] Bound java:comp:/HandleDelegate for EJB: SequenceStoreFacade
[org.jboss.ejb.StatelessSessionContainer] End java:comp/env for EJB: SequenceStoreFacade
[org.jboss.ejb.plugins.local.BaseLocalProxyFactory] SequenceStoreFacade cannot be Bound, doesn't have local and local home interfaces
[org.jboss.proxy.ejb.ProxyFactory] (re-)Binding Home ejb.SequenceStoreFacadeHome
[org.jboss.proxy.ejb.ProxyFactory] Bound SequenceStoreFacade to ejb.SequenceStoreFacadeHome
[org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
[org.jboss.ejb.plugins.StatelessSessionInstancePool] Starting jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
[org.jboss.ejb.plugins.StatelessSessionInstancePool] Started jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
[org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome dependent components: []
[org.jboss.resource.connectionmanager.CachedConnectionInterceptor] start called in CachedConnectionInterceptor
[org.jboss.ejb.StatelessSessionContainer] Started jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
[org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB dependent components: []
BTW, I am using JCS for caching and JBoss 4.0. Any pointers will be most appreciated?
Thanks,
Vikrant Verma