• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JBosss 5.1.0 and Connection Issue

 
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a EAR file which runs fine on IBM websphere (6.0 and 6.1), now I have deployed the same in Jboss 5.1.0.As this is a dynamic website I need to make an oracle connection and where the datasource name is different from DefaultDS. I am not using EJB's.

I have configured JBoss inside Eclipse 3.7 (Indigo) and going to do any modification on the code etc through eclipse-JBoss combination only.
The application is deployed successfully and is working fine (log in, quite almost all the functionality is working fine) except one, which is throwing the following exception. Though we have not changed anything for that functionality in the code.

What I have done so far in this approach,

1. Created the oracle-ds.xml with DB and application specific parameters.
2. Deployed the oracle-ds.xml in C:\jboss-5.1.0.GA_MYAPP\server\default\deploy directory
3. Kept the hsqldb-ds.xml as it is, in the same location (As it comes default)
4. Provided the ojdbc14.jar in C:\jboss-5.1.0.GA_MYAPP\common\lib
5. Created and kept jboss-web.xml in <project_home>/src/web/WEB-INF

Output ::
==========
1. JBoss starts successfully showing it is able to detect the new application specific JNDI name (MY_ds)

2. But I am getting the following 2 different exceptions ,

2.1


2.2 This exception we are getting whenever some basic functionality is hitting the DB


What has been done so far ::
=================
1. Tried with commeting out the autoCommit() statements from the code (As the log shows that the autoCommit is set at the JBoss level, so code level autocommit has been closed)
Output :: Receiving the same exception,

2. Modified the oracle-ds.xml with
connection property's autoCommit as 'false', but with no luck.

Info ::
oracle-ds.xml


Thanks in advance,
Joydeep
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

If it isn't too long, could you post the code for the entire class com.lilly.sdd.common.data.TwoBO please?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure you spelled the option correctly? Is it "autoCommit" or "autocommit"? Case matters! By the way, this in bot a JBoss question, it is a question about Oracle and its JDBC driver. All the JBossdoesi s pass the settings to the Oracle JDBC driver, which is the one complaining (though based on the exception stack trace it appears that JBoss is not properly wrapping the original exception).
 
Joydeep Ghatak
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks James, Thanks Peter,

Hi Peter,
I have tried with both "autoCommit" and "autocommit" in the parameter list, but both are giving the same exception :-(
Moreover the same code was deployed in webshpere AS, where it was working perfectly well.

And as you have mentioned "JBoss is not properly wrapping the original exception", is there any issue with this specific version of JBoss (Jboss 5.1) ? or if you can provide some more information on the same it will be great.

Hi James,
The complete code is more than 350 lines long so I am not putting that here.
But the method which is throwing the exceptions is,

Note ::
1. Originally the following two lines were not commented out, but once we received the above exception we have commented out the above two lines

2. I have checked the the control is going into the 'if (myTX)'
3. myTx is a boolean operator.
and same is the case for rollbackTrans()
I think the main issue is the following exception :-(

Note ::
and

Thanks in advance to both of you.
Thanks,
Joydeep

 
Joydeep Ghatak
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

The issue is resolved. Doing a change at the code base level we are able to resolve the issue.
Though we are still facing the following exception,



Thanks,
Joydeep
 
James Boswell
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joydeep

It may be worth checking where you use the Connection instances and make sure you explicitly close them (say in a finally block).
 
Joydeep Ghatak
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks James,
We are working on the same.

But just a thought, the same code works properly in Websphere but showing this exception in JBoss.
May be JBoss is more fine tuned from connection point of view.

Thanks,
Joydeep
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic