[JBoss jBPM] - Connection was lost
by gutierrez.ge
Hi, im lossing the connections when i use the datasources, another thing is that when i get more than 20 connections from the datasource it says that it doesn't have more.
this is the xml that is i have for the datasources config.
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>JbpmDS</jndi-name>
<connection-url>jdbc:sqlserver://srvdm2;DatabaseName=JbpmDBDesarrollo;</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
sa
<min-pool-size>15</min-pool-size>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>BPMPavecaDS</jndi-name>
<connection-url>jdbc:sqlserver://srvdm2;DatabaseName=BPMPavecaDesarrollo;</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
sa
<min-pool-size>15</min-pool-size>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>BPCSDS</jndi-name>
<connection-url>jdbc:as400://APPN.S103882C/V82BPCSF</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>CONEXION</user-name>
CONEXION01
<min-pool-size>15</min-pool-size>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>MTDS</jndi-name>
<connection-url>jdbc:as400://APPN.S103882C/VEAM900F</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>CONEXION</user-name>
CONEXION01
<min-pool-size>15</min-pool-size>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>InterfaseDS</jndi-name>
<connection-url>jdbc:as400://APPN.S103882C/V82BPCSUSF</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>CONEXION</user-name>
CONEXION01
<min-pool-size>15</min-pool-size>
</local-tx-datasource>
any ideas?? thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112597#4112597
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112597
18 years, 4 months
[JNDI/Naming/Network] - Re: Standalone client getting errors while attempting to acc
by jaikiran
"goja" wrote :
| It looks like a JBoss standalone client cannot browse the JNDI binding because of a dependency of the client jars on a sar and jboss-server.jar, which in turns throws an exception complaining about "No 'jboss' MBeanServer found!".
|
| Any other ideas?
|
|
|
| | public class ListJNDIBindings {
| |
| | public static void main(String[] args) {
| |
| | Properties props = new Properties();
| | props.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory.class.getName());
| | props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
| | props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| |
| | try {
| | Context context = new InitialContext(props);
| | NamingEnumeration<Binding> ne = context.listBindings("");
| | while (ne.hasMore()) {
| | System.out.println(ne.nextElement());
| | }
| | } catch (NamingException e) {
| | // TODO Auto-generated catch block
| | e.printStackTrace();
| | }
| | }
| | }
| |
Well, if you look at the code that you posted, you are using the listBindings API on the Context, which as per the javadoc:
anonymous wrote : Enumerates the names bound in the named context, along with the objects bound to them.
Any application can bind any object to the JNDI tree and if you use the listBindings API on the client side then effectively you will have to have the class/jar files of those objects on the client side.
If you want to browse the JNDI tree then you can use the list() API available on the Context as follows:
|
| package org.myapp;
|
| import java.util.Properties;
|
| import javax.naming.Binding;
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.naming.NamingEnumeration;
| import javax.naming.NamingException;
|
| public class ListJNDIBindings {
|
| public static void main(String[] args) {
|
| Properties props = new Properties();
| props.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory.class.getName());
| props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
|
| try {
| Context context = new InitialContext(props);
| NamingEnumeration ne = context.list("");
|
| while (ne.hasMore()) {
| System.out.println(ne.nextElement());
| }
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
| }
The javadoc of the list API mentions:
anonymous wrote : Enumerates the names bound in the named context, along with the class names of objects bound to them
In this case you need not have the jar/class files of the all the objects bound to the JNDI tree. I was able to get this code working by including the jbossall-client.jar file in the client's classpath.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112596#4112596
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112596
18 years, 4 months
[Installation, Configuration & DEPLOYMENT] - JBOSS Stop error
by harish73
Hi,
I have installed jboss-4.2.2.GA with jdk1.5.0_13 on Redhat linux server.
When i start jboss from bin directory, it run perfectly fine ,
./run.sh -c all
10:16:56,225 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 46s:509ms
But when i stop jboss using shutdown script i get error -
./shutdown.sh -S
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 5 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.(Socket.java:367)
at java.net.Socket.(Socket.java:267)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
Can anyone help me to resolve this error.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112595#4112595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112595
18 years, 4 months
[Messaging, JMS & JBossMQ] - Unable to browse messages in queue LRUCache error
by tnine
Hi all,
I'm attempting to browse the DLQ in Jboss MQ in order to log the messages for inspection and review by our developers. I'm getting a very strange error when I try to get an enumeration. I'm connecting to remote queue via JNDI
Enumeration queueContents = browser.getEnumeration();
Causes the following error below. I'm assuming this is a duplicate hashcode issue, but how can I change the implementation so that collisions don't occur?
| org.jboss.mq.SpyJMSException: Cannot browse the Queue; - nested throwable: (java.lang.RuntimeException: Can't add object '2 msg=232 STORED PERSISTENT queue=QUEUE.DLQ priority=4 lateClone=false hashCode=22159791' to LRUCache that is already in cache.)
| at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
| at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:51)
| at org.jboss.mq.Connection.browse(Connection.java:861)
| at org.jboss.mq.SpyQueueBrowser.getEnumeration(SpyQueueBrowser.java:83)
| at com.purdueefcu.statements.writer.jms.QueueInspectorImpl.getQueueContents(QueueInspectorImpl.java:81)
| at com.purdueefcu.statements.writer.jms.QueueInspectorImpl.getFailedProcessMessages(QueueInspectorImpl.java:41)
| at com.purdueefcu.statements.QueueInspectorTest.testGetFailedProcessMessages(QueueInspectorTest.java:16)
| 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 junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.lang.RuntimeException: Can't add object '2 msg=232 STORED PERSISTENT queue=QUEUE.DLQ priority=4 lateClone=false hashCode=22159791' to LRUCache that is already in cache.
| at org.jboss.mq.server.MessageCache$LRUCache.addMostRecent(MessageCache.java:791)
| at org.jboss.mq.server.MessageCache.messageReferenceUsedEvent(MessageCache.java:401)
| at org.jboss.mq.server.MessageReference.getMessage(MessageReference.java:168)
| at org.jboss.mq.server.MessageReference.getMessageForDelivery(MessageReference.java:147)
| at org.jboss.mq.server.BasicQueue.browse(BasicQueue.java:509)
| at org.jboss.mq.server.JMSQueue.browse(JMSQueue.java:161)
| at org.jboss.mq.server.JMSDestinationManager.browse(JMSDestinationManager.java:597)
| at org.jboss.mq.server.JMSServerInterceptorSupport.browse(JMSServerInterceptorSupport.java:136)
| at org.jboss.mq.security.ServerSecurityInterceptor.browse(ServerSecurityInterceptor.java:99)
| at org.jboss.mq.server.TracingInterceptor.browse(TracingInterceptor.java:418)
| at org.jboss.mq.server.JMSServerInvoker.browse(JMSServerInvoker.java:142)
| at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:116)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
| at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:595)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112591#4112591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112591
18 years, 4 months
[Tomcat, HTTPD, Servlets & JSP] - Re: Unwaring web app - leaves some files in the war
by lovelyliatroim
Hi Folks,
Im using the latest JBoss AS 5.0 beta2 and experiencing something similar to the above.
I have a war file that looks like this
myapp/conf/config.properties
myapp/WEB-INF/ etc etc
Ok now im a bit confused about what the "tmp" directory and the "work" directory do and their relationship if any, i havent see any docs on it and would appreciate any links if possible.(I do need to read up on this but ill ask anyways )
Now the problem Im having is this, the war is exploded fine under the tmp directory but in "work" directory the .properties file is not there.
i have a third party library which looks for the properties file under conf/config.properties, but if doesnt find it because there the class loader which loads the libs is loading the classes out of the "work" directory and not the tmp directory.
So Im confused, which one is the correct exploded directory?? tmp or work and if its "work" which it seems to be because the classloader url is coming from the work directory, why isnt the .properties file exploded in there also??
Cheers,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112590#4112590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112590
18 years, 4 months