Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat, Hibernate, Oracle v 10.1.0.4.0 and not writing to db

Status
Not open for further replies.

zooxmusic

Programmer
Nov 24, 2004
96
US
Hi all,
I have a huge issue here at my place of employment and I am at a loss. This application has been running for at minimum a year and last wed I started having problems. This application simply reads in a jpeg stream and writes it to an oracle table using hibernate. The problem I see is that everything looks good on my side (because I log all exceptions and I have none) and I also log when I write the image. The problem is that there is absolutely nothing in the db after it all says it has written. Now if I restart tomcat it seems to start working again which bothers me greatly because nothing has changed in a year or more. Here is the sheet of facts and info that I made for my boss. Maybe someone has some insight.

Facts

• This issue started on Wednesday, January 23rd at around 6:30 am
• It has been stated on all fronts that nothing has changed
• JDBC Connection on both nodes are:
o JDBC Driver v 10.2.0.1.0
o Database is v 10.1.0.4.0
? Interoperability chart states this is a good match
? I have used this driver since September 21st
• I am using JDK version 1.5.0_06 on both nodes
• I am using Tomcat version 5.5.17 on both nodes
• I am using Hibernate 3 as my persistence medium on both nodes
o Hibernates connection pooling is utilized
• Tomcat logs reveal no exceptions or errors
• It seems that a restart of Tomcat does fix the problem temporarily
• My application logs reveal no errors or exceptions
o but I do log before I commit
o I also log if there is an exception on commit
• There is no evidence of any record in the database
• Hibernate uses a JNDI data source to connect to the database that is configured in the environment of Tomcat
o This uses a failover TNS string to 3 nodes


What do I see happening?
• It seems I am getting a false positive from the database/driver that the record has been written as I have no exception and I have a valid primary key for the record returned to me but no record in the db

What can be changed that has any level of uncertainty?

• I can remove the use of Hibernate and use direct java statements.
o I am the only one here using hibernate which is probably not a good idea to begin with from a support standpoint
• I can deploy to a different application server (OC4J, JBoss etc…)
o I am familiar with Tomcat and JBoss but I am not an expert
o I am not sure we have an expert with OC4J either
• I can add more logging
o For obvious reasons
• I can downgrade my JDBC driver
o Incase there is a bug in the one I have been using or a mismatch upon the database version
• I can remove the JNDI data source and use a direct db url
o To remove a layer
• I can re-retrieve the record I just wrote to make sure that it is written
o This will impact performance

I am unable to trigger this behavior?



Thanks

Brian


Spend like you don't need the money,
love like you've never been hurt and dance like nobody's watching!
 
You say that nothing has changed in your setup, platform, db, or code. Are you 100% sure ?

If you run the insert of data using a standalone test programme, does it work every time ?

Are you using a temporary table at all during the insert ?

What happens if you do the insert manually (rather than going via hibernate) ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
thanks sedj,
All tests you said I have tried and they work fine.

I am 100% sure that nothing on my side changed. I honestly do think someone is covering up something here but I can't prove it. Thats why I am trying to maybe get even a small clue on what it could possibly be so maybe I can expose them.

Thanks
Brian


Spend like you don't need the money,
love like you've never been hurt and dance like nobody's watching!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top