Strange problem for getting "0 resources" when running BTM projects in eclipse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange problem for getting "0 resources" when running BTM projects in eclipse

magic.philip
Dear all,
I have no idea why I start the wtp project(BTM in tomcat 6) in the eclipse I can not have any resources.
The console display following messages...
recovery committed 0 dangling transaction(s) and rolled back 0 aborted transaction(s) on 0 resource(s) [] (restricted to serverId '172.16.100.145')

However if I start the tomcat6 in command mode(without eclipse), I can have all resources running.
The console display following messages...

recovery committed 0 dangling transaction(s) and rolled back 0 aborted transaction(s) on 4 resource(s) [jdbc/xa1, jdbc/xa2, jdbc/xa3, jdbc/xa4] (restricted to serverId 'tomcat-btm-node0')

Can somebody tell me how to set it in eclipse....?

Best Regards,
Philip Chen
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem for getting "0 resources" when running BTM projects in eclipse

Mathrusse, Chris (SFO-CAD)
This is due to the difference in the way tomcat is started within eclipse vs starting tomcat from the command line. Eclipse starts tomcat by building up the classpath an invoking the main class to get the server started. Unfortunately it does not invoke the setenv.sh file and btm is not started successfully because it does not know where anything is. You need to add some configuration parameters to the VM Arguments of the server.

Within Eclipse, Double click on the server to open the properties editor, then click "Open launch configuration". Click the Arguments tab and append the following to the existing values as an example:

 -Dbtm.root="/usr/share/tomcat" -Dbitronix.tm.configuration="/usr/share/tomcat/conf/btm-config.properties" -Djava.library.path="/usr/share/tomcat/lib"

Of course you will need to ensure that the above paths are valid. You installation location may be different from the /usr/share/tomcat path listed above. Also, make certain that you use the quotes around the paths. Once you have this in place click Ok to save the configuration.

That's it. You should be able to start the server from within Eclipse and BTM will come to life.

I hope this helps...
Chris




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

pastedGraphic.pdf (14K) Download Attachment
ATT00001.txt (2K) Download Attachment