Getting "NoClassDefFoundError: org/apache/juddi/ClassUtil" when deploying jUDDI client code on SOA-P

Solution Unverified - Updated -

Issue

  • I am trying to access jUDDI on SOA-P 5 from the code. The jUDDI client code looks like this:
import org.apache.juddi.ClassUtil;
import org.apache.juddi.v3.client.config.UDDIClientContainer;
import org.apache.juddi.v3.client.transport.Transport;
import org.uddi.v3_service.UDDISecurityPortType;
...
public class JuddiClient {
  private UDDISecurityPortType security = null;
  public JuddiClient() {
    try {
      String clazz = UDDIClientContainer.getUDDIClerkManager(null).getClientConfig().getUDDINode("default").getProxyTransport();
      Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
      if (transportClass != null) {
        Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
        security = transport.getUDDISecurityService();
      }
    } catch (Exception e) { e.printStackTrace(); }
    // BASIC auth credentials
    Map<String, Object> requestContext = ((BindingProvider) security).getRequestContext();
    requestContext.put(BindingProvider.USERNAME_PROPERTY, "admin");
    requestContext.put(BindingProvider.PASSWORD_PROPERTY, "admin");
    ...
  • The client code has the following dependency in the pom.xml:
    <dependency>
      <groupId>org.apache.juddi</groupId>
      <artifactId>juddi-core</artifactId>
      <version>3.1.3</version>
      <scope>provided</scope>
    </dependency>
  • The above client works fine locally. However, when I deploy the same code on SOA-P, I get the following error:
2013-01-09 03:57:16,848 INFO  [STDOUT] (pool-29-thread-1) [2013-01-09 03:57:16,847] ERROR [LogUtil.java => logError:79] [pool-29-thread-1] - APPID : ProfileApp| ERROR CODE : RECEIVED| ERROR DESCRIPTION : org/apache/juddi/ClassUtil| ERROR LOG ID : | STACK TRACE : org.jboss.soa.esb.actions.ActionProcessingException: Bean Action 'initException' exception.
        at org.jboss.soa.esb.listeners.message.BeanContainerAction.process(BeanContainerAction.java:190)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:665)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:612)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:587)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: org/apache/juddi/ClassUtil
        at com.mycompany.uddi.test.JuddiClient.<init>(JuddiClient.java:39)
        at com.mycompany.action.profile.DeregisterAction.initException(DeregisterAction.java:85)
        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 org.jboss.soa.esb.listeners.message.BeanContainerAction.process(BeanContainerAction.java:178)
        ... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.juddi.ClassUtil from BaseClassLoader@19103b8f{vfszip:/opt/jboss-soa-p-5.3.0/jboss-as/server/default/deploy/xxxxx.esb/}
        at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:477)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 14 more

Environment

  • JBoss Enterprise SOA Platform (SOA-P) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In