Memory problem. Running DB queries from axis2 service and the java ResultSet 
object. The bug disappear if I load the garbage collector in my loops.
---------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-3858
                 URL: https://issues.apache.org/jira/browse/AXIS2-3858
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.3
         Environment: MAC-G4
OS X 10.4.11
CPU: PowerPC G4
768MB RAM
Java 1.5.0_13-b05-241
Eclipse SDK Version: 3.3.2
Tomcat6 in Eclipse environment (using EclipseTotale plugin)
            Reporter: Igor Sychev
            Priority: Critical


Hello!

I have a question about running DB queries from axis2 v. 1.3 web services using 
java ResultSet.
The bug has a devil complexity, I will be incredibly happy to find a solution.
Down follows a sources from the test application, this application created only 
to test an assumption about the bug.

 I'm using my class:

public class ExtResultSet
{       
  public ResultSet rs; 
  public String stateMsg;
  ...     
}

And I execute runtest() method of this class as a service:
public class DRVtest
{
  public  Connection conn;
  public  Statement stmt;
  private ExtResultSet ers;

  public void runtest(int Ini)
  {
          ... Connecting stuff ...

     ers = new ExtResultSet();   // This "new" call is not enought! Why?!

      for(...)
                {
                for(...)
                {
                for(...)
                {
                        StringBuffer seqQuery = new StringBuffer();            
                        seqQuery.append("SELECT NO_ID FROM RS WHERE ....");
                        ...
                        // If I print here:
                        // new ExtResultSet();
                        // The problem will disappear!!!

                        try{
                                        ers.rs = stmt.executeQuery( 
seqQuery.toString() );
                        }
                        catch(SQLException e)
                        { ... }
                       
                        int x_no = -1;
                       
                        try{
                                while( ers.rs.next() )
                                {
                                        x_no = ers.rs.getInt("no_id");
                                }
                         }
                         catch(SQLException e)
                         { ... }       
...

First, I had an idea that my JDBC driver for Firebird 1.5 is not stable, I 
tried to switch on Postgresql but nothing happened...

This code newer fails if I execute runtest() as a standard java application ( I 
tried on different  java versions and OS ).

It is obvious, the bug disappear if I load the garbage collector in my loops.

I'm running Tomcat6 in Eclipse environment (using EclipseTotale plugin) to 
debug service thread. 
The fault messages:

[ERROR]
java.lang.NullPointerException
        at 
org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:83)
        at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
        at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
        at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.ru


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to