0 Replies Latest reply on Sep 3, 2013 3:10 AM by Cristian Stan

    Jboss native WS in AS 7.1.1 problem

    Cristian Stan Newbie

      Hello. I work on an Spring/Hibernate application that we deployed it until now on Jboss 5.1.0. We also have a communication module that sends data through webservices between different application instances. On 5.1.0 we used the native stack so I hope I will be able to also use the native stack on 7.1.1 even though I see it will be EOLed to avoid as much as possible code changes.

       

      So I installed the latest jboss native I could find (4.0.2) by following the "Install.txt" instructions. This are the messages from server start-up (maybe that warn is part of the problem):

       

      INFO [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.

      INFO [org.jboss.as.naming] JBAS011800: Activating Naming Subsystem

      INFO [org.jboss.as.osgi] JBAS011940: Activating OSGi Subsystem

      INFO [org.jboss.as.security] JBAS013101: Activating Security Subsystem

      INFO [org.jboss.as.naming] JBAS011802: Starting Naming Service

      INFO [org.jboss.as.webservices] JBAS015537: Activating WebServices Extension

      INFO [org.jboss.as.security] JBAS013100: Current PicketBox version=4.0.7.Final

      INFO [org.jboss.as.connector] JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      INFO [org.jboss.as.mail.extension] JBAS015400: Bound mail session [java:jboss/mail/Default]

      INFO [org.jboss.ws.common.management.AbstractServerConfig] JBoss Web Services - Native Server 4.0.2.GA

      INFO [org.jboss.as.connector.subsystems.datasources] JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http--10.0.1.152-8080

      WARN [org.jboss.as.webservices] JBAS015506: Cannot load WS deployment aspects from /META-INF/jaxrpc-deployment-aspects.xml

      INFO [org.jboss.as.remoting] JBAS017100: Listening on /10.0.1.152:4447

      INFO [org.jboss.as.remoting] JBAS017100: Listening on /127.0.0.1:9999

       

      This is a code very similar to that I use to get a client proxy:

       

      public static MyEndpointInterface getClientInstance(String wsdlLocation, String serviceLocation, String user, String password) throws Exception {

           QName serviceName = new QName("http://some.url.org/", "MyServiceImplService");

           QName portName = new QName("http://some.urlorg/", "MyServiceImplPort");

           Service service = Service.create(new URL(wsdlLocation), serviceName);

           MyEndpointInterface proxy = service.getPort(portName, MyEndpointInterface.class); /* ERROR OCCURS HERE */

           ((BindingProvider) proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceLocation);

           ((BindingProvider) proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);

           ((BindingProvider) proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);

           ((BindingProvider) proxy).getRequestContext().put("org.jboss.ws.timeout", 5 * 60 * 1000);

           return proxy;

        }

       

      And this is the error I get when I try to use the communication module:

       

      19:30:55,727 ERROR [org.myapp.service.icomm.tasks.SendTask] (pool-10-thread-1) Unknown web service error.: javax.xml.ws.WebServiceException: Cannot create proxy

        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:438) [jbossws-native-core-4.0.2.GA.jar:4.0.2.GA]

        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:246) [jbossws-native-core-4.0.2.GA.jar:4.0.2.GA]

        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:588) [jbossws-native-core-4.0.2.GA.jar:4.0.2.GA]

        at javax.xml.ws.Service.getPort(Service.java:99) [jboss-jaxws-api_2.2_spec-2.0.0.Final.jar:2.0.0.Final]

        at org.myapp.service.icomm.IcommServiceClient.getClientInstance(IcommServiceClient.java:33) [myapp-core-1.0-SNAPSHOT.jar:]

        at org.myapp.service.icomm.tasks.SendCaseTask.taskOperation(SendCaseTask.java:28) [myapp-core-1.0-SNAPSHOT.jar:]

        at org.myapp.service.icomm.tasks.SendTask.call(SendTask.java:74) [myapp-core-1.0-SNAPSHOT.jar:]

        at org.myapp.service.icomm.tasks.SendTask.call(SendTask.java:26) [myapp-core-1.0-SNAPSHOT.jar:]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_38]

        at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_38]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]

        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

      Caused by: java.lang.IllegalArgumentException: interface org.jboss.ws.core.StubExt is not visible from class loader

        at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) [rt.jar:1.6.0_38]

        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581) [rt.jar:1.6.0_38]

        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:418) [jbossws-native-core-4.0.2.GA.jar:4.0.2.GA]

        ... 12 more

       

      If can at least point me in the right direction I would be grateful because I am not sure how I should approach the debugging of this issue. Thank you!