Solved

J2EE troubleshotting, repeated executions of business logic..

Posted on 2004-09-20
7
220 Views
Last Modified: 2013-11-24
OC4J 9.0.4.0.0 (ejb2.0), Oracle9i, Swing client for a three tier setup...

- Problem has gotten worse over time, with code that have not been altered
- Problem persists in persistence(pun intented), we experience double insertions of data, for no apparent reason
- Business logic that should prevent this kind of behavior is not present or not executed
- User presses button once, 99% of the time only one set of inserts happen, sometimes two (few oocassions more, one time 130!!), swing client will act like 'hanging'
- Timestamp comparrision in one case revealed that there were 5 seconds between the dupes (equals 5 second client hang?)

hypothesis ; connections/operations succeed but return a false state, thus the application layer(JDBC driver?) repeats the task ? Other than that, a far fetched idea about a flawed connection pool in OC4J for transaction handling (wich does not explain the entire scenario) i am kinda blank on this one..
Of course the problem is non repeatable in 'safe envoriment' ... only happens in wild (read : production !!!!!)

Have ANYONE seens something like this before ? Im on the verge of blaming the hardware here .. nic's routers whatever ... i cant see what else ..
Funny thing is, that this HAS worked flawless for like 6mo's .. then suddenly... and in decreasing intervals...

Ideas ?

0
Comment
Question by:CyTG
  • 3
7 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 12103221
I'd start by comparing every library on both the production machine and the dev machine...  You may find that there are 2 different versions of something low level...
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12103233
Then I'd check that the database is not running out of ids/diskspace/log space, and see if there are any errors in any of the log files it may generate...
0
 
LVL 7

Expert Comment

by:bvanderveen
ID: 12105017
How long has it been since you've shut down your app server.  Sorry for a MS-like "solution", but I am wondering if some cache or other issues may have built up in you containers.
0
 
LVL 1

Author Comment

by:CyTG
ID: 12111186
TimYates -> i have copied the entire installation from production (oc4j) to ensure the exact same setup in the test envoriment .... still not repeatable. The database is supposedly doing fine, no warnings/errors in the logs ...

bvanderveen -> actually we've begun rebooting both database and application server each night .. problem persists(pun intented again)

Thanks for the suggestions though ! :o)

Regards.
0
 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 12111229
Are they both running the exact same versions of java...

I guess it's because the production site is getting used more than the development site...

What happens if you set up a JMeter task to hit your development site for a few hours...do you get the same bug exhibiting itself?

http://jakarta.apache.org/jmeter/
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now