Enabling Apache Axis2 Clustering

I tried enabling clustering support in both standard and war distributions of Apache Axis2 version 1.4. It was not as simple as said. I could see possibly a bug related with coding in war distribution. And in both distributions, I could see improper axis2.xml files and several mistakes in packaging jars. Here's how you go about enabling clustering support:

Environment:

  • Operating System: Fedora 7 (Linux)
  • Java: jdk 1.6.0_03
  • Axis2: 1.4 (axis2-1.4-bin.zip and  axis2-1.4-war.zip)
  • Tomcat: 6.0.14

Axis2 1.4 Standard Distribution:

The clustering related section of the axis2.xml file has couple of mistakes. Here's what I found with the distribution (You need to uncomment the section): 

<cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
        <parameter name="param1">value1</parameter>
        <parameter name="domain">apache.axis2.domain</parameter>
        <parameter name="synchronizeAll">true</parameter>
        <parameter name="maxRetries">10</parameter>
        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
        </configurationManager>
        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
        </contextManager>
</cluster>

Here's the correct version:

<cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager">
        <parameter name="param1">value1</parameter>
        <parameter name="domain">apache.axis2.domain</parameter>
        <parameter name="synchronizeAll">true</parameter>
        <parameter name="maxRetries">10</parameter>
        <configurationManager class="org.apache.axis2.clustering.configuration.DefaultConfigurationManager">
            <listener class="org.apache.axis2.clustering.configuration.DefaultConfigurationManagerListener"/>
        </configurationManager>
        <contextManager class="org.apache.axis2.clustering.context.DefaultContextManager">
            <listener class="org.apache.axis2.clustering.context.DefaultContextManagerListener"/>
        </contextManager>
 </cluster> 

Changes:

  1. All the package names are changed from org.apache.axis2.cluster.* to org.apache.axis2.clustering.*
  2. There were no classes called TribesConfigurationManager and TribesContextManager with Axis2 distribution. I replaced them with DefaultConfigurationManager and DefaultContextManager. "Clustering Guide" found in Axis2 documentation has sample axis2.xml file content and correctly uses "DefaultContextManager" though.
  3. Furthermore, "Clustering Guide" sample axis2.xml file content has a "<replication>" section including parameters names that should not be replicated. I didn't try with them. But hopefully, they should be present in the file.

The standard distribution is missing two jar files that are required for clustering support. I could find the two files in Apache Tomcat (I used version 6.0.14). The lib directory of Tomcat has "catalina-tribes.jar" file and bin directory contains "tomcat-juli.jar" file. Copy both of them to the lib directory of Axis2.

After these, I copied Axis2 directory (AXIS2_HOME) (including everything inside) to two machines and started Axis2 (in both machines). Clustering worked!

Axis2 1.4 War Distribution:

To correct the problems, you need to unzip the war distribution to a temporary directory. You will see axis2 directory being created. As I remember, if you need this to work in JBoss, change the directory name from axis2 to axis2.war (Yep, let that be the directory name).

axis2.xml has the same problems mentioned above with the standard distribution. You need to correct them. The file is located in axis2/WEB-INF/conf directory.

axis2/WEB-INF/lib directory has servlet-api-2.3.jar file which is not required since Tomcat will provide that. You can keep it. However, Tomcat log file (log/catalina.out) will complain about it.

You need to download Axis2 standard distribution to get a key jar file missing in Axis2 war distribution. Copy the axis2-clustering-1.4.jar found in lib directory of standard distribution to axis2/WEB-INF/lib directory.

You should now be able to copy this axis2 directory (including everything inside) to apache-tomcat/webapps directory. If it's JBoss, you will copy axis2.war directory (not the file!) to jboss/server/default/deploy directory if you use the JBoss default configuration.

Start Tomcat and clustering will work! I deployed a cluster sensitive service that replicates data and tested. Here's the POJO service I used: 

package mypkg;

import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;

public class StatefulClusterTester {

    public void setName(String name) {
        ConfigurationContext configurationContext =
            MessageContext.getCurrentMessageContext().getConfigurationContext();
        configurationContext.setProperty("name", name);   
    }
   
    public String getName() {
        ConfigurationContext configurationContext =
            MessageContext.getCurrentMessageContext().getConfigurationContext();
        return (String) configurationContext.getProperty("name");
    }
}

I used wsdl2java to generate stub code and invoked setName on one machine and getName on the other machine.

<service name="StatefulClusterTester">

  <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
        class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
       
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
        class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
  </messageReceivers>
 
  <parameter name="ServiceClass">mypkg.StatefulClusterTester</parameter>

</service> 

I could use ServiceContext data replicated as well. In this case, I had to set scope of the service as "application" in the services.xml file: 

package mypkg;

import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;

public class StatefulClusterTester {

    public void setName(String name) {
        ServiceContext serviceContext =
            MessageContext.getCurrentMessageContext().getServiceContext();
        serviceContext.setProperty("name", name);   
    }
   
    public String getName() {
        ServiceContext serviceContext =
            MessageContext.getCurrentMessageContext().getServiceContext();
        return (String) serviceContext.getProperty("name");
    }
}

  

<service name="StatefulClusterTester" scope="application">

  <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
        class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
       
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
        class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
  </messageReceivers>
 
  <parameter name="ServiceClass">mypkg.StatefulClusterTester</parameter>

</service>

Problems With URL Configuration:

Axis2 can be configured to use an axis2.xml file and a repository (containing services and other modules) accessible through urls. You need to copy the axis2.xml file and the entire repository directory found in standard distribution or the WEB-INF/services and WEB-INF/modules directories found in war distribution to a directory that can be accessed through a web server. Here's what I created in a web shared directory in my Linux machine:

axis2repo/
|-- axis2.xml
|-- modules
|   |-- addressing-1.4.mar
|   |-- axis2-scripting-1.4.mar
|   |-- mex-1.4.mar
|   |-- modules.list
|   |-- ping-1.4.mar
|   `-- soapmonitor-1.4.mar
`-- services
    |-- services.list
    `-- version-1.4.aar

Then I wrote the following class, compiled it and run with all the jar files in Axis2/lib directory added to the class path. 

import java.net.MalformedURLException;
import java.net.URL;

import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.transport.http.SimpleHTTPServer;

public class Axis2URLBasedStarter {

  public static void main(String[] args) throws AxisFault, MalformedURLException {
    ConfigurationContext configctx = ConfigurationContextFactory.createConfigurationContextFromURIs(
        new URL("http://192.168.0.10/axis2repo/axis2.xml"),
        new URL("http://192.168.0.10/axis2repo/"));

    SimpleHTTPServer smt = new SimpleHTTPServer(configctx, 8080);
    smt.start();

    }
}


192.168.0.10 is the IP address of the machine where I placed the above repository directory hierarchy including the axis2.xml file.

Pretty good! It worked even with clustering enabled.

However, the War distribution seems to have problems. Of the war distribution, WEB-INF/web.xml file has some sections that can be used to configure Axis2 to use a URL based configuration file and a repository.

The web.xml file declares a Servlet called AxisServlet. Within the declaration, several init parameters are present which are commented by default. Note that to correctly set parameters, for each <param-name> and <param-value> pair, you need to use <init-param> tag (which is not suggested in web.xml file that comes with Axis2). Here's how you may ago about using a remote configuration file and a remote repository:

<init-param>
    <param-name>axis2.xml.url</param-name>
    <param-value>http://192.168.0.10/axis2repo/axis2.xml</param-value>
</init-param>
<init-param>
    <param-name>axis2.repository.url</param-name>
    <param-value>http://192.168.0.10/axis2repo/</param-value>
</init-param>

However, setting the axis2.xml.url did not work. It generated the following error in my machine and failed to start Axis2 instance:

[INFO] org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]

 This may be a bug in coding. I didn't try to find why this was generated or correct the problem. I commented out this init-parameter setting and kept axis2.repository.url. It worked. However, the last "/" (of http://192.168.0.10/axis2repo/) was important. If it was missing, again I could see an error.

No Clue!

I still couldn't figure out the purpose of ConfigurationManager. May be it's not working in the way it should be. I couldn't find any article or guide about using it except for this. Assuming that at least the ConfigurationManager would notify the cluster nodes of a newly added service, I tried the following:

1. Got clustering to work with the remote repository
2. Started two Axis2 instances (in Tomcat)
3. Placed a new service in the repository, added the .aar file name to services.list file
4. Stopped one Axis2 instance and restarted the same (Say instance 1)
5. Tested the availability of the new service. It was present in instance 1, but not in instance 2.

What could be the purpose of this ConfigurationManager? 

Updated

In the initial post, I had mentioned that data replication was not working with ServiceContext. However, after setting the service scope to "application", it worked. The post was updated accordingly.
I am yet to try with client specific data replication may be by scoping the service to soapsession.

Classpath problems when using axis2 1.4 with Weblogic 8.1 sp6

I dont know if you can help me with my problem, it seems that it might be related with what you write:

Okey: the problem is as following:
- setting: we have an existing (old-)application that runs under weblogic 8.1 sp6, and now part of it should be accessable through web services, and for this we use axis2 1.4.
We deploy axis2.war as an exploded war that is a part of the old web-application in weblogic.

- task: to add an object (a string) to our call to a webservice, and retrive it.

- method: for this we use org.apache.axis2.context.MessageContext, that can access the local addressinghandler module (addressing-1.4.mar) that is also deployed with our web-application.

- problem: when deployed localy as a seperate application under weblogic, we have no problem, and can finde the elements we need, but as part of the maegler3 application, we get the following error:

2008-11-28 11:08:02,703 ERROR axis2.rpc.receivers.RPCMessageReceiver - org/apache/axis2/context/MessageContext
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.lang.NoClassDefFoundError: org/apache/axis2/context/MessageContext
at xxxx.webservices.services.impl.UserServiceImpl.
createCustomer(UserServiceImpl.java:29)
... 23 more
2008-11-28 11:08:02,719 ERROR apache.axis2.engine.AxisEngine - org/apache/axis2/context/MessageContext
org.apache.axis2.AxisFault: org/apache/axis2/context/MessageContext
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:158)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
... 17 more
Caused by: java.lang.NoClassDefFoundError: org/apache/axis2/context/MessageContext
at xxxxx.webservices.services.impl.UserServiceImpl.createCustomer(UserServiceImpl.java:29)
... 23 more

org/apache/axis2/context/MessageContext is included into the classpath at local/webapplication level, in the form of axis2-kernel-1.4.jar that is situated in our web-inf/lib, so the element is on the local classpath, but is not read. If we take the jar from the local classpath, and copy it into the ear\APP-INF\lib, the object is found, and another object is asked for, the we also need to move onto the ear level classpath. This causes the web services to use the classes/jar's on the ear level classpath, and since MessageContext is in the same jar as the classes used for accessing the addressing handler, at some point MessgaeContext functionality tries to call this handler, but with no luck. The handler is not available, and this I think is while the endpoints do no longer mach the handler deployed by axis2, as we are now trying to access the handler on ear level rather than in our local classpath.

- what has been tried (that tells us something): I've tried to remove all jar' in the webinf/lib folder, and slovly adding jar' until this error reapears. The result was that we added the jars, in the order they were asked for until we got to axis2-adb-1.4.jar after that the classes asked for was MessageContext, that was in axis2-kernel-1.4.jar, but when added the service didn't react to the jar added, but only to the jar added, if it was added in the ear\APP-INF\lib folder. To me this behavior suggests that the classpath is read first from the local classpath, and the if a class is missing, it goes to the ear folder, and searches there, the problem is just, that we do not know what class file is missing, we only know that it occures after adding axis2-adb-1.4.jar.
After this we tried to add the missing jar' to the ear\APP-INF\lib folder, for then to be asked for one more, but after this, we got a new problem. As the class loader now looks at ear level, the addressing handler becomes not available. I think this is while the endpoints to the addressing handler is situated in axis2-kernel-1.4.jar and when deployed in axis2, the class loader can not find it, as it is searching in ear\APP-INF\lib.

- The challange as I see it: is to find this class, and find, how to include it in the local classpath, but how to succed with this ..... how do we check the path called in the code....

With regards
Niels Platz

A classpath issue...

Hi Niels,

You have mentioned a "meagler3" application what I am not aware of. It seems to be the EAR you are creating. From what you mention, the problem seems to be with the different class loaders. While I couldn't fully grasp your deployment structure, here are some food for thought:

1. Try with the latest version of Axis2 (1.4.1) which may eliminate some issues. It has jars bundled correctly whereas 1.4 had some jar issue.

2. Check if anything here can help: http://ws.apache.org/axis2/1_4_1/app_server.html

3. Another resource to look at: http://wso2.org/library/90

4. Read the "Service and module isolation": http://www.developer.com/open/print.php/10930_3589126_2

5. Make sure no trace of Axis2 is present in your WebLogic or system classpath. Package the Axis2 libraries only inside the application you want it to be. Don't have the libraries in shared folders.

Let me know if you find any success.

Regards,
Kamal

a Classpath issue

Hi Kamal

I've read your sugestions, but sorry to say, the ones that were possible to use (in my situation) did not solve the problem.... I think I owe it to you, to clarify my problem.
- Overall, we have an existing system, that's been around for ages, and now we want to expose some of the functionality as web services. The old system is a deployed as a weblogic application lets call it MX, it then contains several WebAppComponent'.
- Now adding my services in a seperat web application works. When deployed together it does as it was created to do, but due to internal rules, it can not be deployed as a seperate web application, so eventhough it works, I need to add the services, as another WebAppComponent, and when I do that, suddenly I get the following error:

2008-12-22 09:58:55,033 ERROR axis2.rpc.receivers.RPCMessageReceiver - org/apache/axis2/context/MessageContext
java.lang.reflect.InvocationTargetException
......
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.lang.NoClassDefFoundError: org/apache/axis2/context/MessageContext
at dk.nykredit.product.flytte.webservices.services.impl.UserServiceImpl.createCustomer(UserServiceImpl.java:72)
... 26 more

Okey this is a problem with the classpath or classloader, as it no longer finds the jar that contains MessageContext, so I to have come to this conclution, but where to go from now becomes hard.
What I gather is that the classloader do not find the jar' under the application, but if I put the jar needed onto the classloader, it can not find the addressing.mar module, it says that it is not available.

So my problem is that I wish let my services caller/user access my service, with information in a header, that I would then let my handlers get for me (the addressing.mar handler) and then access it from within my service classes and extract the information from the header, using the MessageContext.

Another way of obtaining what I need is to insert a filter, take the info from the header, and then put it onto the session, and the access the session from the services classes, but how do I do that? I've created the filter (np), put the info onto the Session (np), but how do I get it down during runtime, when my services are activated?

Hope you can help me on both or just one of the two wayes of solving this.

With regards
Niels

Some more answers

Hi Niels,

It seems something is wrong in the way you have packaged the composite application. If correctly made, you shouldn't get the errors associated with missing classes. Try what is mentioned in the following resources:

http://wso2.org/library/90

http://www.developer.com/services/article.php/3777111

http://www.redhat.com/magazine/021jul06/features/apache_axis2/  (Look at Use Case 2)

I don't suggest using Servlet sessions as you have mentioned. It doesn't look right and you create unwanted dependancies. However, if you ever want to access (Servlet) session, you may attempt to scope the services in 'transportsession' scope and access the data throught ServiceContext or ServiceGroupContext (which are accessible through MessageContext). I haven't tried anything similar and not sure it would work well. It's just a guess (and a bad suggestion).

See if you can package the application as described in the documents mentioned above.

Kamal

 

Elaborating the issue

Happy hollydays to you Kamal,
Hope you have had a good christmas and thanks for your quick responses.
I've read your sugestions, the last link did not work for me, but the rest has been tried (by both me a colleuge), but sadly with no success. We found though that axis2 1.4 in weblogic 8.1 sp6 behaves very differently depending on it being a application by it self, of part of another application. We found that we are missing a classloader in the classloader hirachracy, and my lack of expirence tells me very little about this, so I go to you for help :)

If we deploy our services.war file, containing our services and modules, as a seperate application on weblogic, then the classloaders looks like this:

test createCustomer: classpath =
weblogic.utils.classloaders.ChangeAwareClassLoader@fab5b1(
finder: weblogic.utils.classloaders.CodeGenClassFinder@e84763,
annotation: axis2@services,
parent: weblogic.utils.classloaders.GenericClassLoader@1aea727(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1a6c368,
annotation: axis2@,
parent: weblogic.utils.classloaders.GenericClassLoader@1e13a2c(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1670cc6,
annotation: ApplicationClassLoader@,
parent: weblogic.utils.classloaders.GenericClassLoader@29d75(
finder: weblogic.utils.classloaders.CodeGenClassFinder@77b794,
annotation: null,
parent: sun.misc.Launcher$AppClassLoader@53ba3d))))

When part of the xxy application, then it looks like this:

test createCustomer: classpath =
weblogic.utils.classloaders.GenericClassLoader@11ce4fe(
finder: weblogic.utils.classloaders.CodeGenClassFinder@16a2c7b,
annotation: xxy@,
parent: weblogic.utils.classloaders.GenericClassLoader@1285252(
finder: weblogic.utils.classloaders.CodeGenClassFinder@18e5ebd,
annotation: ApplicationClassLoader@,
parent: weblogic.utils.classloaders.GenericClassLoader@177fa9a(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1edcd24,
annotation: null,
parent: sun.misc.Launcher$AppClassLoader@53ba3d)))

I don't know if that gives you a hint on what is wrong, but in my view this suggests that our classloader hirachracy is not including the classloaders needed to access the modules, from the services. This also suggests to me that to solve the problem we need to get hold on the axis2 classloader, but how do I do that? I've read the weblogic8.1 sp6 documentation, which suggests to create a classloader hirachracy (though only for development use), or a METAINF file..... still how do I get a hold on the axis2 classloader.....

Thanks for all your help.
With regards, and hollydays greetings
Niels

the hunt continues for axis2 to work

Happy hollydays to you Kamal,
Hope you have had a good christmas and thanks for your quick responses.
I've read your sugestions, the last link did not work for me, but the rest has been tried (by both me a colleuge), but sadly with no success. We found though that axis2 1.4 in weblogic 8.1 sp6 behaves very differently depending on it being a application by it self, of part of another application. We found that we are missing a classloader in the classloader hirachracy, and my lack of expirence tells me very little about this, so I go to you for help :)

If we deploy our services.war file, containing our services and modules, as a seperate application on weblogic, then the classloaders looks like this:

test createCustomer: classpath =
weblogic.utils.classloaders.ChangeAwareClassLoader@fab5b1(
finder: weblogic.utils.classloaders.CodeGenClassFinder@e84763,
annotation: axis2@services,
parent: weblogic.utils.classloaders.GenericClassLoader@1aea727(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1a6c368,
annotation: axis2@,
parent: weblogic.utils.classloaders.GenericClassLoader@1e13a2c(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1670cc6,
annotation: ApplicationClassLoader@,
parent: weblogic.utils.classloaders.GenericClassLoader@29d75(
finder: weblogic.utils.classloaders.CodeGenClassFinder@77b794,
annotation: null,
parent: sun.misc.Launcher$AppClassLoader@53ba3d))))

When part of the xxy application, then it looks like this:

test createCustomer: classpath =
weblogic.utils.classloaders.GenericClassLoader@11ce4fe(
finder: weblogic.utils.classloaders.CodeGenClassFinder@16a2c7b,
annotation: xxy@,
parent: weblogic.utils.classloaders.GenericClassLoader@1285252(
finder: weblogic.utils.classloaders.CodeGenClassFinder@18e5ebd,
annotation: ApplicationClassLoader@,
parent: weblogic.utils.classloaders.GenericClassLoader@177fa9a(
finder: weblogic.utils.classloaders.CodeGenClassFinder@1edcd24,
annotation: null,
parent: sun.misc.Launcher$AppClassLoader@53ba3d)))

I don't know if that gives you a hint on what is wrong, but in my view this suggests that our classloader hirachracy is not including the classloaders needed to access the modules, from the services. This also suggests to me that to solve the problem we need to get hold on the axis2 classloader, but how do I do that? I've read the weblogic8.1 sp6 documentation, which suggests to create a classloader hirachracy (though only for development use), or a METAINF file..... still how do I get a hold on the axis2 classloader.....

Thanks for all your help.
With regards, and hollydays greetings
Niels

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.