Hi Tom, Thanks for your reply.
If I try the same piece of code on a different server (remprod using ARS
6.3), it works perfectly fine. It just breaks down in remtest (ARS 7.0). 
 

Mikhail Serate 
Remedy Development Team 
Information Technologies 
University of Calgary 
(403) 210-9308 
[EMAIL PROTECTED] 

----------------------------------------------------------------------------

"If debugging is the process of removing bugs, then programming must be the
process of putting them in." 

 

  _____  

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Widowfield
Sent: Wednesday, December 20, 2006 11:25 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java Search Record API


** 
Mikhail,

I'm sorry I didn't notice your message earlier.

I have crashed the JVM from time to time when I have accidentally passed a
null object as part of a method argument.  The people who wrote the Java API
weren't the most careful programmers, so in some cases where you'd expect a
NullPointerException to be thrown, you instead get a crashed JVM.  The null
gets passed all the way to the JNI layer where mayhem ensues.

I've found that I have to be very careful to test every object before I use
it.  A simple try/catch block won't cut it.  Sadly, the only way I've found
to be safe is to literally check for null with an if statement, and then
proceed only when I know it's OK.

I'm not saying that's your problem, but it's a species of bug that's bitten
me more than once.

 
Tim Widowfield
http://www.widowfield.com 


----- Original Message ----
From: Mikhail Serate <[EMAIL PROTECTED]>
To: arslist@ARSLIST.ORG
Sent: Friday, December 8, 2006 11:55:07 AM
Subject: [ARSLIST] Java Search Record API

** 

Hello List, 
I've got an API that searches for a Record X in Form A. I created a Java API
for this under the 6.3 version on our test server and it worked fine. Now
we've upgraded this server to 7.0.00 Patch 002 200607211559 and when I ran
it, it gives me this error:

# 
# An unexpected error has been detected by HotSpot Virtual Machine: 
# 
#  Internal Error (455843455054494F4E530E43505000FB), pid=7952, tid=2692 
# 
# Java VM: Java HotSpot(TM) Client VM (1.4.2_12-b03 mixed mode) 
# An error report file with more information is saved as hs_err_pid7952.log 
# 
# If you would like to submit a bug report, please visit: 
#    <http://java.sun.com/webapps/bugreport/crash.jsp>
http://java.sun.com/webapps/bugreport/crash.jsp 
# 

This is the line where it crashes: 
Field[] formFields = FieldFactory.findObjects(userInfo, fListCrit, fCrit); 

This is the snippet of code that goes before the above: 

if(debugMode) System.out.println("retrieving... "); 
try { 
        // Set the field criteria to retrieve all field info 
        if(debugMode) System.out.println("\tSetting field criteria to
retrieve all field info..."); 
        FieldCriteria fCrit = new FieldCriteria(); 
        fCrit.setRetrieveAll(true); 
        
        // Retrieve all types of fields 
        if(debugMode) System.out.println("\tRetrieve all types of fields"); 
        FieldListCriteria fListCrit = new FieldListCriteria(formName, new
Timestamp(0), FieldType.AR_ALL_FIELD); 
        
        // Load the field array with all fields in the form 
        if(debugMode) System.out.println("\tLoad the field array with all
fields in the form"); 
        Field[] formFields = FieldFactory.findObjects(userInfo, fListCrit,
fCrit); 
        .
        . 
} 

This is our server information (test): 
-------------------------------------------------------------- 
Mid Tier Version - 7.0.00 Patch 002 200607211559 
Web Server Information - Microsoft IIS ServletExec/5.0.0.10 
Operating System Name - Windows 2003 
Java Version - 1.5.0_10 
-------------------------------------------------------------- 

I tested the same API on our production server and it works just fine. This
is the server info: 
-------------------------------------------------------------- 
Mid Tier Version - 6.03.00 patch 015 
Web Server Information - IBM WebSphere Application Server/5.1 
Operating System Name - AIX 
Java Version - 1.4.2 
-------------------------------------------------------------- 

All I know is that for Java APIs, when upgrading to a different version, as
long as I'm using the same libraries as I used in a previous version, it
should work just as fine. So I'm thinking it could be a problem with the
server?

If anyone can give me any information about this problem that would be
greatly appreciated. 

Thanks! 

Mikhail Serate 
Remedy Development Team 
Information Technologies 
University of Calgary 
[EMAIL PROTECTED] 

__20060125_______________________This posting was submitted with HTML in
it___

__20060125_______________________This posting was submitted with HTML in
it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to