Hi All,

I'm getting error for the following code snippet


......//some code
PatientForm ptForm = (PatientForm)form;
......//some code
myDb = jdo.getDatabase();
myDb.begin();

  PatientBizDelegate.processFillUpLists(ptForm,myDb);//this method has will
fill up 8 Lists and set them to the form obj. Data is filled up from
cache(all these lists will be using castor).
  forward =
PatientBizDelegate.processAddUpdateOfPatient(ptJdo,ptForm,forward,logOutput,
myDb);
myDb.commit();
myDb.close();


here is the method for processFillUpLists

public static final PatientForm processFillUpVectors(PatientForm
patientForm, Database myDb) throws PersistenceException
{
        List ptypeList = PatientLiteDB.getPatientType(myDb);
        List relcationList= PatientLiteDB.getPatientRelationCode(myDb);
        List pssList= PatientLiteDB.getSignatureSource(myDb);
        List psaList= PatientLiteDB.getSourceOfAdmissionList(myDb);
        List mpList= ProviderDB.getMainProviderJdoList(myDb);
        .......... //here rest of the code follows
        return patientForm;
}

here is the code snippet for one of the above methods, and the rest will be
of the same pattern.

public static final List getPatientRelationCode(Database myDb) throws
PersistenceException
{
        List prcList = new ArrayList();
        OQLQuery productOql = myDb.getOQLQuery("SELECT obj FROM
com.PCPgo.prm.web.util.PatientReleaseCode obj");
        QueryResults results = productOql.execute(Database.ReadOnly);
        while (results.hasMore())
        {
                prcList.add(results.next());
        }
        results.close();
        productOql.close();
        return prcList;
}

NOTE: All the above code works fine when a single user using the system. If
I've more than 2 users I'm getting the following error more often. This also
happens when we are testing with more than 3 virtual users.


java.lang.IllegalStateException: Transaction not in progress -- must open a
transaction in order to perform this operation
        at
org.exolab.castor.persist.TransactionContext.prepare(TransactionContext.java
:1434)
        at org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:528)
        at
com.PCPgo.prm.web.patient.PatientLiteAction.execute(PatientLiteAction.java:2
41)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:465)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:534)

Thanks,
Aditya



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to