[JCA/JBoss] - Re: How to configure JBoss with MS SQL Server
by jovi_iits
I used the configuration for MSSQL 2000 with msbase.jar, msutil.jar, mssqlserver.jar then my app worked fine in some cases but could not execute multiple statements with "Can't start a cloned connection while in manual transaction mode." exception.
When I try to use below configuration for MSSQL 2005 with sqljdbc.jar
<?xml version="1.0" encoding="UTF-8"?>
| <!-- The SQL Server 2005 Database JCA connection factory config -->
| <datasources>
| <local-tx-datasource>
| <jndi-name>MYDATASOURCE</jndi-name>
| <connection-url>jdbc:sqlserver://my-server;databaseName=MYDATABASE</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>user</user-name>
| <password>password</password>
| <!-- This will be run before a managed connection is removed from the pool for use by a client-->
| <check-valid-connection-sql>select 1</check-valid-connection-sql>
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>10</min-pool-size>
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>30</max-pool-size>
| </local-tx-datasource>
| </datasources>
then my app could not get connection from datasource.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964931#3964931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964931
19 years, 10 months
[Messaging, JMS & JBossMQ] - org.jboss.deployment.DeploymentException: - nested throwable
by mberneaud1
Hi,
I tried to follow the WIKI "UsingWebSphere MQ Series with JBoss Application Server - Part I" with the following environment:
Win 2000 Prof.
SUN JDK 1.5.0_07
JBoss 4.0.4
WebSphereMQ 6
ant 1.6.5
All the stuff running in a VMWare virtual machine.
I have customized all the settings as described. Running the ant mb-deploy command to deploy the custom MBeans into JBoss I receive the following error:
2006-08-14 04:46:33,514 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jmx.service.wsmq:service=WSMQRequestQueue with code: jmx.service.wsmq.WSMQDestination
2006-08-14 04:46:33,530 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2006-08-14 04:46:33,530 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2006-08-14 04:46:33,530 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2006-08-14 04:46:33,530 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/C:/wsmqdemo/jboss-4.0.4/server/wsmq/deploy/wsmqmb.sar
org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.GeneratedMethodAccessor11.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor12.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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.lang.reflect.UndeclaredThrowableException
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:236)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
... 33 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/disthub2/client/Topic
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:190)
at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:517)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.getConstructor(Class.java:1629)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1232)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
... 35 more
2006-08-14 04:46:33,530 DEBUG [org.jboss.deployment.SARDeployer] Unregistering service UCL=jmx.loading:UCL=14893da
2006-08-14 04:46:33,530 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader3@14893da{ url=file:/C:/wsmqdemo/jboss-4.0.4/server/wsmq/tmp/deploy/tmp34831wsmqmb.sar ,addedOrder=58}
2006-08-14 04:46:33
Does anybody have the same problem?
The creation of some other MBeans works fine i.e. :
2006-08-14 04:46:33,436 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jmx.service.wsmq:service=WSMQXAQueueConnectionFactory with code: jmx.service.wsmq.WSMQConnectionFactory
2006-08-14 04:46:33,514 DEBUG [org.jboss.system.ServiceCreator] Created bean: jmx.service.wsmq:service=WSMQXAQueueConnectionFactory
Thanks in advance
Marcel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964928#3964928
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964928
19 years, 10 months
[Javassist user questions] - CannotCompileException / IllegalAccessException with multipl
by roger_graham
Hello,
I am desperate for help and really hope you can help me. I have two value objects and I want to somehow instrument the code to allow certain methods to be instrumented to write logging into a log file (we are using WSAD and the debugger does not work :-().
If I execute this:
// get (shared) class pool
| ClassPool pool= ClassPool.getDefault();
|
| // change code for MyTestVO
| CtClass clazz1 = pool.get("com.test.MyTestVO");
| CtMethod method1 = clazz1.getDeclaredMethod("getValue");
| method1.insertBefore("System.out.println(\"--- Call to method! ---\");");
| pool.toClass( clazz1 );
|
| // invoke method
| MyTestVO vo = new MyTestVO("Some value");
| vo.getValue();
all is fine. However, when I try to execute another modification as this (immediately after):
// change code for MyOtherTestVO
| CtClass clazz2 = pool.get("com.test.MyOtherTestVO");
| CtMethod method2 = clazz2.getDeclaredMethod("getSomeOtherProperty");
| method2.insertBefore("System.out.println(\"--- Call to the other method! ---\");");
| pool.toClass( clazz2 );
|
| MyOtherTestVO otherVO = new MyOtherTestVO("some other value");
| otherVO.getSomeOtherProperty();
I get this stack trace:
anonymous wrote : --- Call to method! ---
| getValue method body
| Exception in thread "main" javassist.CannotCompileException: by java.lang.IllegalAccessException: java/lang/ClassLoader
| at javassist.ClassPool.toClass(ClassPool.java:834)
| at javassist.ClassPool.toClass(ClassPool.java:769)
| at com.test.QuickTest.main(QuickTest.java:28)
| Caused by: java.lang.IllegalAccessException: java/lang/ClassLoader
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
| at java.lang.reflect.Method.invoke(Method.java:386)
| at javassist.ClassPool.toClass(ClassPool.java:823)
| ... 2 more
an anyone please explain what is going on? It is to do with when the CtPool class attempts to reinvoke the findClass via reflection.
Thanks in advance,
Roger
For your info I have included the full sources beneath (but above should be sufficient I think):
com.test.QuickTest
package com.test;
|
| import javassist.CannotCompileException;
| import javassist.ClassPool;
| import javassist.CtClass;
| import javassist.CtMethod;
| import javassist.NotFoundException;
|
| public class QuickTest {
| public static void main(String[] args) throws NotFoundException, CannotCompileException {
| // get (shared) class pool
| ClassPool pool= ClassPool.getDefault();
|
| // change code for MyTestVO
| CtClass clazz1 = pool.get("com.test.MyTestVO");
| CtMethod method1 = clazz1.getDeclaredMethod("getValue");
| method1.insertBefore("System.out.println(\"--- Call to method! ---\");");
| pool.toClass( clazz1 );
|
| // invoke method
| MyTestVO vo = new MyTestVO("Some value");
| vo.getValue();
|
| // change code for MyOtherTestVO
| CtClass clazz2 = pool.get("com.test.MyOtherTestVO");
| CtMethod method2 = clazz2.getDeclaredMethod("getSomeOtherProperty");
| method2.insertBefore("System.out.println(\"--- Call to the other method! ---\");");
| pool.toClass( clazz2 );
|
| MyOtherTestVO otherVO = new MyOtherTestVO("some other value");
| otherVO.getSomeOtherProperty();
| }
| }
com.test.MyTestVO
package com.test;
|
| public class MyTestVO {
| private String value;
|
| MyTestVO(String value) {
| this.value = value;
| }
|
| public String getValue() {
| System.out.println("getValue method body");
| return value;
| }
| }
com.test.MyOtherTestVO
package com.test;
|
| public class MyOtherTestVO {
| private String someOtherProperty;
|
| MyOtherTestVO(String value) {
| this.someOtherProperty = value;
| }
|
| public String getSomeOtherProperty() {
| System.out.println("getSomeOtherProperty method body");
| return someOtherProperty;
| }
|
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964927#3964927
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964927
19 years, 10 months
[JBoss Seam] - Re: Frustrated and anxious
by wondermike
chuckadams, I think you should give the guys at jboss more time to improve the tools around the framework. The forum is a perfect place to give feedback about the errors and to receive immediate help.
On the other hand I expect being able to work with a framework and not need to post it's bugs into a forum. Well I didn't pay for the framework, so I try to at least help those guys who really do the job by testing the software. That's what they may expect from me. In Germany we've got a saying for that: "One hand washes the other hand".
Maybe the version numbering is a little bit way too optimistic, but putting out too many CR's would never lead to a version 1.0.0
Of course you may lean back and wait for some later version, but being part of the future right now is much more thrilling.
I hope, I didn't offend you with my opinion.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964924#3964924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964924
19 years, 10 months
[Messaging, JMS & JBossMQ] - Re: NoSuchMethodError when receiving from Queue with message
by hmr_mueller
We have exactly the same problem with JBoss 3.2.7, Java5 using Messaging without JMSTemplates of Spring.
2006-08-13 21:08:24,716 TRACE [org.jboss.mq.il.uil2.SocketManager] sendMessage will throw error
| java.lang.reflect.UndeclaredThrowableException
| at org.jboss.mq.il.uil2.msgs.BaseMsg.setError(BaseMsg.java:301)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:371)
| at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;
| at org.jboss.mq.selectors.Operator.equal(Operator.java:201)
| at org.jboss.mq.selectors.Operator.apply(Operator.java:902)
| at org.jboss.mq.selectors.Selector.test(Selector.java:128)
| at org.jboss.mq.Subscription.accepts(Subscription.java:93)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:156)
| at org.jboss.mq.Connection.asynchDeliver(Connection.java:409)
| at org.jboss.mq.il.uil2.UILClientILService.handleMsg(UILClientILService.java:94)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:361)
| ... 3 more
| 2006-08-13 21:08:24,716 TRACE [org.jboss.mq.server.ClientConsumer] Could not send messages to a receiver. It is closed.
| java.lang.reflect.UndeclaredThrowableException
| at org.jboss.mq.il.uil2.msgs.BaseMsg.setError(BaseMsg.java:301)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:371)
| at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;
| at org.jboss.mq.selectors.Operator.equal(Operator.java:201)
| at org.jboss.mq.selectors.Operator.apply(Operator.java:902)
| at org.jboss.mq.selectors.Selector.test(Selector.java:128)
| at org.jboss.mq.Subscription.accepts(Subscription.java:93)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:156)
| at org.jboss.mq.Connection.asynchDeliver(Connection.java:409)
| at org.jboss.mq.il.uil2.UILClientILService.handleMsg(UILClientILService.java:94)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:361)
| ... 3 more
|
If messages which should be read are already on the queue everything works fine. But if the Receiver is started before the messages are on the queue we get the above error.
The jboss-common.jar in the server and the jbossall-client.jar the client is using match.
Can anyone assist?
Thanks, Harald
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964923#3964923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964923
19 years, 10 months