[JNDI/Naming/Network] - javax.naming.CommunicationException with 1.5 but not with 1.
by haribo
Hello everbody,
when we run
C:\Programme\java\jre1.5.0_04\bin\java.exe -classpath .;J:\jar\j2ee\HabaClient.jar;J:\jar\j2ee\jbossall-client.jar de/haba/harald/ejb/LookupTester jnp://138.33.5.51:1099
we get a javax.naming.CommunicationException: Could not obtain connection to any of these urls: 138.33.5.51:1099 and discovery failed with error: javax.naming.CommunicationException: Failed to connect to server 138.33.5.51:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 138.33.5.51:1100 [Root exception is java.net.ConnectException: Connect attempt timed out]] [Root exception is javax.naming.CommunicationException: Failed to connect to server 138.33.5.51:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 138.33.5.51:1099 [Root exception is java.net.ConnectException: Connect attempt timed out]]]
with
C:\Programme\java\jre1.6.0_01\bin\java.exe -classpath .;J:\jar\j2ee\HabaClient.jar;J:\jar\j2ee\jbossall-client.jar de/haba/harald/ejb/LookupTester jnp://138.33.5.51:1099
there aren't any problems.
The lookupTester calls the lookupTesterEJB in a for-next-loop and get back the System.getProperties() especially lookup.getHost().getProperty("bind.address")
Just for testing we set jnp.partitionName from TestPartition to ProductivePartition then the jre1.5.0_14 doesn't get a Exception, but the first 10 calls go to our productive cluster and then the last ones to the test cluster.
any clues?
Kind Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174198#4174198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174198
17 years, 7 months
[JBoss jBPM] - jbpm3.2+ springmodules3.1 session closed , why?anyone can hel
by yuyanshan
| org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1258)
| at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
| at com.logansoft.firstFlow.service.impl.JbpmServiceImpl.initJbpm(JbpmServiceImpl.java:128)
| 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:597)
| at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
| at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
| at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
| at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
|
|
here the problem
| if (isCurrentSessionEnabled) {
| session = getSessionFactory().getCurrentSession();
| log.debug("using current hibernate session " + session);
| mustSessionBeClosed = false;
| mustSessionBeFlushed = false;
| mustConnectionBeClosed = false;
| } else if (connection!=null) {
| log.debug("creating hibernate session with connection "+connection);
| session = getSessionFactory().openSession(connection);
| mustSessionBeClosed = true;
| mustSessionBeFlushed = true;
| mustConnectionBeClosed = false;
| } else {
| log.debug("creating hibernate session");
| session = getSessionFactory().openSession();
| mustSessionBeClosed = true;
| mustSessionBeFlushed = true;
| mustConnectionBeClosed = false;
| }
| if (isTransactionEnabled) {
| beginTransaction();
| }
|
if i change above code to this , the problem solved
| if (isCurrentSessionEnabled) {
| og.debug("creating hibernate session");
|
| session = getSessionFactory().openSession();
| mustSessionBeClosed = true;
| mustSessionBeFlushed = true;
| mustConnectionBeClosed = false;
| }
| if (isTransactionEnabled) {
| beginTransaction();
|
who can answer my question?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174191#4174191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174191
17 years, 7 months