[JNDI/Naming/Network] - New EJB causes JNDI failure on existing EJB?
by hmccartney
Hi,
We have an existing JEE application with components on 2 JBoss servers (machine 1 and machine 2). The application on machine 1 uses JNDI to access the application on machine 2. This has been working with no problems for about a year now.
Recently we tried to add a second application to the same 2 JBoss servers. This time machine 2 uses JNDI to access machine 1.
When we tried to deploy the second application, it worked fine, but it caused JNDI in the first application to stop working with javax.naming.NameNotFoundException (stack trace below). However the session bean in question was logged as bound on startup and appeared in the list in the JMX console.
The names of the ears in the second application come before those in the first application alphabetically, so I guess the classes in the second application are loaded first and this might be confusing the first application somehow? We are using org.jboss.deployment.scanner.PrefixDeploymentSorter and have not yet attempted to isolate the ears from each other in any way.
The problem went away when we removed the second application on machine 2. However I don't understand why there was a problem in the first place, because the 2 applications on machine 2 do not share any of the same classes. Application 2 on machine 2 does have a jndi.properties referencing machine 1. Is there any way that this could be interfering with the code that makes the first application available to JNDI?
We are using jboss-4.0.4.GA on Red Hat.
The code in application 1 on machine 1 to do the JNDI lookup is:
Hashtable<String,String> env=new Hashtable<String,String>();
| env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| env.put(InitialContext.PROVIDER_URL,"jnp://machine2.mycompany.com:1099");
| env.put(InitialContext.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
|
| InitialContext context = new InitialContext(env);
| MyWorker myWorker = (MyWorker) context.lookup("MyWorkerBean/remote");
Stack trace is:
javax.naming.NameNotFoundException: MyWorkerBean not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| 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)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
| at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at com.mycompany.client.MyWorkerBeanDelegate.<init>(MyWorkerBeanDelegate.java:43)
| at com.mycompany.client.Controller.doMyWorkerAction(Controller.java:289)
| at com.mycompany.client.Controller.doWorkPackage(Controller.java:167)
| 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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.mdb.ConsumerContainer.dynamicInvoke(ConsumerContainer.java:885)
| at org.jboss.ejb3.mdb.ConsumerContainer$MessageListenerImpl.onMessage(ConsumerContainer.java:1091)
| at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
| at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:902)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
| at org.jboss.mq.SpySession.run(SpySession.java:323)
| at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
Many thanks in advance for your help.
Heather
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111685#4111685
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111685
18 years, 4 months
[JBossCache] - JDBCCacheLoader and MySQL problems
by boniek
java.lang.IllegalStateException: Failed to load node for fqn
| /viewCache/MostRecentRegularTopics/view: Unable to load to deserialize
| result: java.io.OptionalDataException
| at org.jboss.cache.loader.JDBCCacheLoader.loadNode(Unknown Source)
| at org.jboss.cache.loader.JDBCCacheLoader.get(Unknown Source)
| at org.jboss.cache.loader.AsyncCacheLoader.get(Unknown Source)
| at
| org.jboss.cache.interceptors.CacheLoaderInterceptor.loadData(Unknown Source)
| at
| org.jboss.cache.interceptors.CacheLoaderInterceptor.loadNode(Unknown Source)
| at
| org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(Unknown Source)
| at org.jboss.cache.interceptors.Interceptor.invoke(Unknown Source)
| at
| org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(Unknown Source)
| at org.jboss.cache.interceptors.Interceptor.invoke(Unknown Source)
| at
| org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(Unknown Source)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(Unknown Source)
| at org.jboss.cache.interceptors.Interceptor.invoke(Unknown Source)
| at
| org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(Unknown Source)
| at org.jboss.cache.TreeCache.invokeMethod(Unknown Source)
| at org.jboss.cache.TreeCache.get(Unknown Source)
| at org.jboss.cache.TreeCache.get(Unknown Source)
| at org.jboss.cache.TreeCache.get(Unknown Source)
| at sun.reflect.GeneratedMethodAccessor344.invoke(Unknown Source)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at
| org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at
| org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at
| org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy363.get(Unknown Source)
| at
I have this exception when JBC is trying to fetch objects from database that are larger than 4kB.
I have read the following:
http://jira.jboss.com/jira/browse/JBCACHE-320
Hany Mesha writes that it is working for him for objects with large sizes with minor tweaking. I wonder what he mean by that :)
Any sugestions are welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111678#4111678
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111678
18 years, 4 months
[JBoss Seam] - ConcurrentModificationException - On authenticate
by DiegoCoronel
Hi, im with ConcurrentModificationException while trying to authenticate at the same time with more than 1 machine, i dont know how to solve this problem, and its really serious, because my clients needs to authenticate at same time.
Any help ?
| SEVERE: Error Rendering View[/faces/home/home.xhtml]
|
| java.util.ConcurrentModificationException
|
| at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
|
| at java.util.AbstractList$Itr.next(AbstractList.java:420)
|
| at org.jboss.seam.navigation.Pages.getStringValuesFromModel(Pages.java:679)
|
| at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:51)
|
| at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
|
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
|
| at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
|
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
|
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
|
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
|
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
|
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
|
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
|
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
|
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
|
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
|
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
|
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
|
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
|
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
|
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
|
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
|
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
|
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
|
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
|
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
|
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
|
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
|
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
|
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
|
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
|
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
|
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
|
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
|
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
|
| at java.lang.Thread.run(Thread.java:595)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111676#4111676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111676
18 years, 4 months
[Tomcat, HTTPD, Servlets & JSP] - Problem with Jboss/Tomcat when using Apache Loadbalancer
by tufanocak
i have Jboss 4.0.5(Cluster) on Windows 2003.
My loadbalancer are Apache/2.2.4 (Win32) mod_jk/1.2.23 with this configuration:
workers.properties:
Here only one Node configuration for example.
# Define Node1
worker.node1.port=8009
worker.node1.host=127.0.0.1
worker.node1.type=ajp13
worker.node1.lbfactor=1
#worker.node1.local_worker=1 (1)
#worker.node1.cachesize=10 #deprecated for Apache/2.2.4 (Win32) mod_jk/1.2.23
#worker.node1.socket_timeout=10
#worker.node1.socket_keepalive=1
#The next three properties allow mod_jk to efficiently determine if a connection is in error or not responding fast enough due to whatever reason.
worker.node1.connect_timeout=10000
worker.node1.prepost_timeout=10000
#This value must equal server.xml's connectionTimeout of 10 minutes
worker.node1.connection_pool_timeout=600
worker.node1.connection_pool_size=250
worker.node1.connection_pool_minsize=126
On the Tomcat side:
server.xml
My AJP 1.3 Connector on port 8009
Connector port="8009" address="127.0.0.1"
emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" maxThreads="800" backlog="200"
connectionTimeout="600000" /
i have often this errors on the Apache side and often my Jboss are not respond anymore.My Jboss are not down.
--1--
[Mon Dec 10 13:32:54 2007][4916:6568] [error] jk_ajp_common.c (951): (node3) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8109) is down (errno=60)
[Mon Dec 10 13:32:54 2007][4916:6568] [error] jk_ajp_common.c (1618): (node3) Tomcat is down or network problems. Part of the response has already been sent to the client
[Mon Dec 10 13:32:54 2007][4916:6568] [info] jk_ajp_common.c (1902): (node3) receiving from tomcat failed, recoverable operation attempt=0
[Mon Dec 10 13:32:54 2007][4916:6568] [info] jk_ajp_common.c (1941): (node3) sending request to tomcat failed, recoverable operation attempt=1
[Mon Dec 10 13:32:54 2007]loadbalancer 10.10.9.115 0.015625
--2--
[Mon Dec 10 13:25:25 2007][4916:2796] [error] jk_ajp_common.c (951): (node4) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8209) is down (errno=60)
[Mon Dec 10 13:25:25 2007][4916:2796] [error] jk_ajp_common.c (1618): (node4) Tomcat is down or network problems. Part of the response has already been sent to the client
[Mon Dec 10 13:25:25 2007][4916:2796] [info] jk_ajp_common.c (1902): (node4) receiving from tomcat failed, recoverable operation attempt=1
[Mon Dec 10 13:25:25 2007][4916:2796] [info] jk_ajp_common.c (1941): (node4) sending request to tomcat failed, recoverable operation attempt=2
[Mon Dec 10 13:25:25 2007][4916:2796] [error] jk_ajp_common.c (1953): (node4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Mon Dec 10 13:25:26 2007]loadbalancer 10.10.9.115 0.000000
[Mon Dec 10 13:25:27 2007][4916:2796] [info] jk_lb_worker.c (1098): service failed, worker node4 is in error state
[Mon Dec 10 13:25:27 2007][4916:2796] [info] jk_lb_worker.c (1160): All tomcat instances are busy or in error state
--3--
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1215): (node3) error sending request. Will try another pooled connection
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1215): (node3) error sending request. Will try another pooled connection
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1215): (node3) error sending request. Will try another pooled connection
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1215): (node3) error sending request. Will try another pooled connection
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1215): (node3) error sending request. Will try another pooled connection
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1241): (node3) all endpoints are disconnected
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1244): (node3) increase the backend idle connection timeout or the connection_pool_minsize
[Mon Dec 10 12:46:41 2007][5468:3588] [info] jk_ajp_common.c (1941): (node3) sending request to tomcat failed, recoverable operation attempt=1
[Mon Dec 10 12:46:42 2007]loadbalancer 10.10.9.115 0.000000
What is going on on Tomcat side ?
Really out of ideas, any suggestions?
Tufan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111667#4111667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111667
18 years, 4 months