You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ji...@apache.org on 2004/03/25 14:23:58 UTC

[jira] Closed: (AXIS-1261) engineConfigFactoryMissing (for concurrent requests)

Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Thu, 25 Mar 2004 5:22 AM

looks like this got fixed.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1261

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1261
    Summary: engineConfigFactoryMissing  (for concurrent requests)
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1

   Assignee: 
   Reporter: Philip Fletcher

    Created: Tue, 23 Mar 2004 12:29 PM
    Updated: Thu, 25 Mar 2004 5:22 AM
Environment: Linux 2.4.20; Java 1.4.1; Tomcat 5.0.19; Axis 1.1 on Pentium4 + 1Gb

Description:
Bug logged at request of Davanum Srinivas:

To attempt to test concurrent performance of Axis (using samples/userguide/example3), I have created two testing classes: TestThread (extends Thread:) which calls samples.userguide.example3.Client.main( args ) from it's run method and Test which simply starts 10 TestThread threads.

Occasionally (1 in 10) I will get a NullPointerException for the first 2-5 threads often accompanied by:
org.apache.axis.configuration.EngineConfigurationFactoryFinder$1 run
SEVERE: Unable to locate a valid EngineConfigurationFactory
java.lang.NullPointerException

The error is generated from line 183 of EngineConfigurationFactoryFinder.java where it has the following comments:

log.error(Messages.getMessage("engineConfigFactoryMissing"));
 // we should be throwing an exception here,
 //
 // but again, requires more refactoring than we want to swallow
 // at this point in time.  Ifthis DOES occur, it's a coding error:
 // factory should NEVER be null.
 // Testing will find this, as NullPointerExceptions will be generated
 // elsewhere.

The two (very noddy) test classes follow, along with an example stack trace:
===TestThread.java===
public class TestThread extends Thread {

  private String mythread;

  public void run() {
    java.util.Random r = new java.util.Random();
    int randomtime = r.nextInt() % 250;
    String tname = Thread.currentThread().getName();
    String args[] =  { "-lhttp://localhost:8080/axis/services/MyService", tname };
    //Run twice in this thread
    samples.userguide.example3.Client.main( args );
    samples.userguide.example3.Client.main( args );
  }
}

===Test.java===
class Test {
  public static void main(String[] args) {
   //Start some threads
    for ( int i=0; i<10; i++ ) {
      new TestThread().start();
    }
  }
}

===Stack Trace===
$java Test
Mar 23, 2004 7:25:59 PM org.apache.axis.configuration.EngineConfigurationFactoryFinder$1 run
SEVERE: Unable to locate a valid EngineConfigurationFactory
java.lang.NullPointerException
        at org.apache.axis.client.Service.getEngineConfiguration(Service.java:801)
        at org.apache.axis.client.Service.getAxisClient(Service.java:143)
        at org.apache.axis.client.Service.<init>(Service.java:152)
        at Client.main(Client.java:27)
        at TestThread.run(TestThread.java:16)
java.lang.NullPointerException



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira