axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Commented: (AXIS-1261) engineConfigFactoryMissing (for concurrent requests)
Date Tue, 23 Mar 2004 22:32:58 GMT
The following comment has been added to this issue:

     Author: Philip Fletcher
    Created: Tue, 23 Mar 2004 2:32 PM
       Body:
If Tomcat server is left idle for a while, the exception raised changes (and is raised consistently
for the first few threads - later threads run successfully):

$ java Test
java.lang.NullPointerException
        at org.apache.commons.discovery.resource.classes.DiscoverClasses$1.getNextClass(DiscoverClasses.java:125)
        at org.apache.commons.discovery.resource.classes.DiscoverClasses$1.hasNext(DiscoverClasses.java:113)
        at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
        at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
        at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:152)
        at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:199)
        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

HTH
Philip
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1261&page=comments#action_26495

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1

   Assignee: 
   Reporter: Philip Fletcher

    Created: Tue, 23 Mar 2004 12:29 PM
    Updated: Tue, 23 Mar 2004 2:32 PM
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


Mime
View raw message