[I have put this in the forum as well, but really need to get feedback
on this soon - thanx ahead of time]
We are migrating a J2EE1.2 web app from WebSphere App Server
AdvancedEdition 4.0.x to WebSphere App Server Network Deployment
5.1.0.x. Originally, this application was using Castor JDO 0.9.4.3.
When we originally setup the application under WebSphere Studio
Application Developer's 5.1 test environment, there were no issues
identified in our testing - not with Castor, not with XML, etc. Upon
deploying the application to the actual WebSphere 5.1 environment (on
AIX machines) we started seeing odd errors related to Castor:
2004 Aug 31 15:24:09 DEBUG tas.persistence.AbstractDatabase
Named query (allergyQueryStatusSortByNameAsc) = 'SELECT p FROM
edu.umich.med.tas.psl.entities.Allergy p WHERE patientCdrId=$1 and
editStatus=$2 ORDER BY UPPER(description) ASC, beginDate DESC,
lastUpdatedDate DESC'
2004 Aug 31 15:24:10 ERROR dcnav.actions.GetStepAction
[DefaultExceptionHandler] userid = H07J; patient_cdr_id = 143323; action
path = /scripts
java.lang.StringIndexOutOfBoundsException
at
java.lang.StringBuffer.deleteCharAt(StringBuffer.java(Inlined Compiled
Code))
at
org.exolab.castor.jdo.oql.ParseTreeWalker.getOrderClause(ParseTreeWalker.java(Compiled
Code))
at
org.exolab.castor.jdo.oql.ParseTreeWalker.createQueryExpression(ParseTreeWalker.java(Compiled
Code))
at
org.exolab.castor.jdo.oql.ParseTreeWalker.<init>(ParseTreeWalker.java(Inlined
Compiled Code))
at
org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java(Compiled
Code))
at
edu.umich.med.tas.persistence.castor.CastorDatabase.createQuery(CastorDatabase.java:172)
at
edu.umich.med.tas.persistence.AbstractDatabase.getQuery(AbstractDatabase.java:36)
[snip]
The first line shows the OQL we are feeding to Castor. This query
would work just fine for several attempts after the app server was
(re)started, but would shortly thereafter start to throw this
exception.
I have this morning upgraded our app to use Castor 0.9.5.3, and have
removed all the old xerces, JAXP, and other XML libs from the
application (we originally needed them since WAS 4.0.x is a creature of
JDK 1.3.1-ness). Redeployed to no avail; the problem still occurs after
a brief period of time.
My view of the code for ParseTreeWalker indicates why there is an
exception thrown: if you have an ORDER BY clause, but the child nodes
(in my case UPPER(description) ASC and beginDate DESC and
lastUpdatedDate DESC) are not present, the STringBuffer created has no
content. What is not clear is why this information would be present
initially, but lost later on.
Any clues?
Thanx,
jeff
Jeffrey Bonevich
Applications Programmer
MCIT/Technical Application Support
University of Michigan Health Systems
Phone: 734.615.8296
Mobile: 734.678.7242
Email: [EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user