[ 
http://issues.apache.org/jira/browse/AXIS-2150?page=comments#action_12368300 ] 

Nils Hammar commented on AXIS-2150:
-----------------------------------

I have found out a workaround and that is to have a class load the Axis 
functionality in a separate jar-file that resides in common/endorsed. The trick 
here is to let that class make a permanent reference to the Axis class and then 
let the web service application use this class as an intermediate.

It's still stupid to need this hack, but it works.

Example workaround code snippet:

----
public class Comm
{
...
        // Static makes a permanent reference and it is therefore not unloaded
        // Slight memory leak - but only once.
        private static ServiceLocator   locator                         = null;
...
        public void somemethod()
        {
                if (locator == null)
                {
                        // It works the first time, and we only have to do this 
once.
                        locator = new ServiceLocator();
                }
...
                // This can be called multiple times.
                service = locator.getfastscoringSoap(new URL(path));
...
        }
}
----


> Error calling web service after a re-deploy
> -------------------------------------------
>
>          Key: AXIS-2150
>          URL: http://issues.apache.org/jira/browse/AXIS-2150
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Java sdk1.4.2_06
> JBoss 4.0.2 / TomCat 5.0 / WebSphere 6.0
>     Reporter: João Portela

>
> After a redeploy of an application (that called a web service), when I try to 
> call a web service the following error occurs: 
> ?Unable to locate a valid EngineConfigurationFactory?
> java.lang.NullPointerException
>         at 
> org.apache.axis.client.Service.getEngineConfiguration(Service.java:812)
>         at org.apache.axis.client.Service.getAxisClient(Service.java:103)
>         at org.apache.axis.client.Service.(Service.java:112)
>         at myapp.WebService1Soap_BindingStub.(Unknown Source)
>         ...
> Notes: 
>  - I have an axis configuration file in my ear/war application file.
> - It seems that after the redeploy it tries to use previous (load) 
> configurations but due to the redeploy, the configuration no longer exists.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to