Forum Discussion
eferguson_26326
Nimbostratus
Jul 29, 2009iControl web service in WebLogic
I am attempting to deploy a simple iControl program as a web service in a Weblogic app server. The program works as a standalone java program, but when it is invoked as a web service, an exception occurs for which I'm not able to track down a source:
-----------------------
**** In enableAllNodes ****
**** Interface created ****
**** Interface initialized ****
Jul 28, 2009 2:47:45 PM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
SEVERE: Could not initialize class org.apache.axis.client.AxisClient
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:113)
at iControl.LocalLBPoolLocator.(LocalLBPoolLocator.java:21)
at iControl.Interfaces.getLocalLBPool(Interfaces.java:167)
at com.gdc4s.soa.alert.iControlClient.enableAllNodes(iControlClient.java:42)
at com.gdc4s.soa.alert.AlertReceiver.notification(AlertReceiver.java:15)
at com.gdc4s.soa.alert.NotificationLogger_NotificationPortImpl.notification(NotificationLogger_NotificationPortImpl.java:33
)
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:597)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:89)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
-----------------------------------
Here's the code:
-----------------------------------
public void enableAllNodes()
{
try
{
System.out.println(" **** In enableAllNodes ****");
iControl.Interfaces interfaces = new iControl.Interfaces();
System.out.println(" **** Interface created ****");
interfaces.initialize(BigIP, Username, Password);
System.out.println(" **** Interface initialized ****");
iControl.LocalLBPoolPortType pool = interfaces.getLocalLBPool();
System.out.println(" **** pool object created ****");
String[] poolList = pool.get_list();
System.out.println(" **** pool list obtained ****");
iControl.LocalLBPoolMemberPortType poolMember = interfaces.getLocalLBPoolMember();
System.out.println(" **** List of pool members created ****");
iControl.LocalLBPoolMemberMemberSessionState[][] stateList = poolMember.get_session_enabled_state(poolList);
System.out.println(" **** List of session states created ****");
int poolCount = poolList.length;
iControl.CommonEnabledState enable = iControl.CommonEnabledState.STATE_ENABLED;
for (int i = 0; i < poolCount; i++)
{
for (int j = 0; j < stateList.length; j++)
{
stateList[j].setSession_state(enable);
}
}
poolMember.set_session_enabled_state(poolList, stateList);
System.out.println(" **** Session states updated ****");
}
catch (Exception e)
{
// TODO Auto-generated catch block
System.out.println(" **** ERROR ****: " + e.getMessage());
e.printStackTrace();
}
}
------------------------
I'm using the same jre in both the java progarm and web service. Since this works as a java app, I assume there is just a library dependency or classpath issue, but I can't see it. Any insight would be greatly appreciated.
3 Replies
- Don_MacVittie_1Historic F5 AccountYessir, it appears that WebLogic (which I haven't used in a while, so I can't verify this...) doesn't include the class org.apache.axis.client.AxisClient
That makes sense since it's not a client by default. I'd check, and just include the axis client jar in the build if it's not there by default.
Hope that helps!
Don. - eferguson_26326
Nimbostratus
Thanks for the response. It turns out that I am already includng axis.jar which contains the class org.apache.axis.client.AxisClient. The issue seems to be the next layer of the onion which is that AxisClient is failing to initialize, presumably because of some missing dependency - maybe some other jar or a classpath not set. I'm still looking blindly for what might be needed. - Don_MacVittie_1Historic F5 AccountAxis does indeed have some dependencies. Check for commons-logging.jar, commons-discovery.jar, axis-ant.jar, jaxrpc.jar, log4j.jar, saaj.jar, qname.jar, and wsdl4j.jar.
I believe that wsdl4j.jar and log4j.jar are iControl.jar dependencies, but it's been a while so I can't be certain. Either way you will want them in there.
There is a list in the SDK of what JARs are required, you can check there if these don't get it for you.
Hope that helps,
Don.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
