axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <ru...@us.ibm.com>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/client/http AdminClient.java
Date Thu, 14 Jun 2001 23:43:59 GMT
> +    /**
> +     * Initialize static stuff - this is kind of kludgey here.  Probably
> +     * wants to live somewhere more reasonable. ???
> +     *
> +     */
> +    public static void staticInit() {
> +        // System.out.println("Registering URL stream handler
factory.");
> +
URL.setURLStreamHandlerFactory(Transport.getURLStreamHandlerFactory());
> +    }

This scares the bejeebers out of me.  First it can cause a security
exception.  Second, it might otherwise interfere with the hosting
application that is calling Axis, or the service which is called.  Finally,
it causes the functional tests to fail, thus:

java.lang.Error: factory already defined
        at java.net.URL.setURLStreamHandlerFactory(URL.java:862)
        at org.apache.axis.AxisEngine.staticInit(AxisEngine.java:117)
        at
org.apache.axis.client.http.AdminClient.doAdmin(AdminClient.java:97)
        at
test.functional.TestStockSample.doTestUndeploy(TestStockSample.java:101)
        at
test.functional.TestStockSample.testStockService(TestStockSample.java:115)
        at java.lang.reflect.Method.invoke(Native Method)
        at junit.framework.TestCase.runTest(TestCase.java:166)
        at junit.framework.TestCase.runBare(TestCase.java:140)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(Unknown
Source)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(Unknown
Source)

- Sam Ruby


Mime
View raw message