4 Replies Latest reply on Mar 23, 2009 7:50 AM by jaikiran

    Deployment error with JBoss 5.0.1, NetBeans 6.5 and JAX-WS 2

    aojensen

      Hi all,

      I am encountering a very odd problem when deploying a vanilla EJB 3.0 web service using the JAX-WS on JBoss 5.0.1 from NetBeans 6.5. The problem also occurs on JBoss 5.0.0, so upgrading from the older version would not fix the problem for me.

      I have created the following test web service implementation:

      /*
      * To change this template, choose Tools | Templates
      * and open the template in the editor.
      */

      package dk.ejb;
      
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebService;
      import javax.ejb.Stateless;
      
      /**
       *
       * @author aj
       */
      @WebService()
      @Stateless()
      public class TestWS {
      
       /**
       * Web service operation
       */
       @WebMethod(operationName = "add")
       public int add(@WebParam(name = "a")
       final int a, @WebParam(name = "b")
       final int b) {
       //TODO write your implementation code here:
       return a + b;
       }
      }


      And I have added the JAX-WS 2.1 RI to the project classpath from NetBeans. Adding the latest nightly build from Sun wouldn't fix the problem either.

      The problem is that I encounter the following stack trace when deploying the EJB jar:

      11:28:26,328 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10249484{vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/}
      11:28:26,328 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10249484{vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/}
      11:28:26,328 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10249484{vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/}
      11:28:26,328 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10249484{vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/}
      11:28:26,370 INFO [JBossASKernel] Created KernelDeployment for: jaxb-xjc.jar
      11:28:26,370 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=EJBModule2.jar,jar=jaxb-xjc.jar,name=jaxb-xjc,service=EJB3
      11:28:26,370 INFO [JBossASKernel] with dependencies:
      11:28:26,370 INFO [JBossASKernel] and demands:
      11:28:26,370 INFO [JBossASKernel] and supplies:
      11:28:26,370 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=EJBModule2.jar,jar=jaxb-xjc.jar,name=jaxb-xjc,service=EJB3) to KernelDeployment of: jaxb-xjc.jar
      11:28:26,371 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/jaxb-xjc.jar/1.0/
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:613)
      Caused by: java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of 1.0
       at org.jboss.ejb3.deployers.Ejb3ClientDeployer.getDeploymentJndiName(Ejb3ClientDeployer.java:214)
       at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:104)
       at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)
       at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       ... 25 more
      11:28:26,381 WARN [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      DEPLOYMENTS IN ERROR:
       Deployment "vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/xmir2-ejb.jar/" is in error due to the following reason(s): java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of 1.0
       Deployment "vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/EJBModule2.jar/" is in error due to the following reason(s): java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of 1.0
      
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:806)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:613)


      The server bootstraps with the following output:
      run.sh: Could not set maximum file descriptor limit: unlimited
      =========================================================================
      
       JBoss Bootstrap Environment
      
       JBOSS_HOME: /Users/aj/jboss-5.0.1.GA
      
       JAVA: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java
      
       JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m
      
       CLASSPATH: /Users/aj/jboss-5.0.1.GA/bin/run.jar
      
      =========================================================================
      
      /Users/aj/jboss-5.0.1.GA/bin/run.sh: line 89: ulimit: open files: cannot modify limit: Invalid argument
      11:24:55,376 INFO [ServerImpl] Starting JBoss (Microcontainer)...
      11:24:55,377 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)
      11:24:55,378 INFO [ServerImpl] Bootstrap URL: null
      11:24:55,378 INFO [ServerImpl] Home Dir: /Users/aj/jboss-5.0.1.GA
      11:24:55,378 INFO [ServerImpl] Home URL: file:/Users/aj/jboss-5.0.1.GA/
      11:24:55,378 INFO [ServerImpl] Library URL: file:/Users/aj/jboss-5.0.1.GA/lib/
      11:24:55,379 INFO [ServerImpl] Patch URL: null
      11:24:55,379 INFO [ServerImpl] Common Base URL: file:/Users/aj/jboss-5.0.1.GA/common/
      11:24:55,379 INFO [ServerImpl] Common Library URL: file:/Users/aj/jboss-5.0.1.GA/common/lib/
      11:24:55,383 INFO [ServerImpl] Server Name: default
      11:24:55,383 INFO [ServerImpl] Server Base Dir: /Users/aj/jboss-5.0.1.GA/server
      11:24:55,384 INFO [ServerImpl] Server Base URL: file:/Users/aj/jboss-5.0.1.GA/server/
      11:24:55,384 INFO [ServerImpl] Server Config URL: file:/Users/aj/jboss-5.0.1.GA/server/default/conf/
      11:24:55,384 INFO [ServerImpl] Server Home Dir: /Users/aj/jboss-5.0.1.GA/server/default
      11:24:55,384 INFO [ServerImpl] Server Home URL: file:/Users/aj/jboss-5.0.1.GA/server/default/
      11:24:55,384 INFO [ServerImpl] Server Data Dir: /Users/aj/jboss-5.0.1.GA/server/default/data
      11:24:55,384 INFO [ServerImpl] Server Library URL: file:/Users/aj/jboss-5.0.1.GA/server/default/lib/
      11:24:55,384 INFO [ServerImpl] Server Log Dir: /Users/aj/jboss-5.0.1.GA/server/default/log
      11:24:55,384 INFO [ServerImpl] Server Native Dir: /Users/aj/jboss-5.0.1.GA/server/default/tmp/native
      11:24:55,384 INFO [ServerImpl] Server Temp Dir: /Users/aj/jboss-5.0.1.GA/server/default/tmp
      11:24:55,384 INFO [ServerImpl] Server Temp Deploy Dir: /Users/aj/jboss-5.0.1.GA/server/default/tmp/deploy
      11:24:55,901 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/Users/aj/jboss-5.0.1.GA/server/default/conf/bootstrap.xml
      11:24:56,336 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
      11:24:56,338 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
      11:24:56,588 INFO [CopyMechanism] VFS temp dir: /Users/aj/jboss-5.0.1.GA/server/default/tmp
      11:24:56,588 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
      11:24:57,442 INFO [ServerInfo] Java version: 1.5.0_16,Apple Inc.
      11:24:57,442 INFO [ServerInfo] Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
      11:24:57,442 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_16-133,Apple Inc.
      11:24:57,442 INFO [ServerInfo] OS-System: Mac OS X 10.5.6,i386
      11:24:57,477 INFO [JMXKernel] Legacy JMX core initialized
      11:24:59,082 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@4847ca(root=/Users/aj/jboss-5.0.1.GA/server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
      11:24:59,084 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@4847ca(root=/Users/aj/jboss-5.0.1.GA/server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
      11:24:59,084 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@74784{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
      11:25:00,206 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
      11:25:04,808 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
      11:25:04,808 INFO [NativeServerConfig] 3.0.5.GA
      11:25:11,922 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
      11:25:12,061 INFO [MailService] Mail Service bound to java:/Mail
      11:25:13,502 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
      11:25:13,523 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
      11:25:13,675 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
      11:25:13,675 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
      11:25:14,277 INFO [TransactionManagerService] Initializing recovery manager
      11:25:14,413 INFO [TransactionManagerService] Recovery manager configured
      11:25:14,413 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
      11:25:14,437 INFO [TransactionManagerService] Starting transaction recovery manager
      11:25:14,921 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
      11:25:14,922 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
      11:25:14,922 INFO [StandardService] Starting service jboss.web
      11:25:14,924 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA
      11:25:14,976 INFO [Catalina] Server startup in 153 ms
      11:25:14,990 INFO [TomcatDeployment] deploy, ctxPath=/invoker
      11:25:15,520 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
      11:25:15,559 INFO [TomcatDeployment] deploy, ctxPath=/web-console
      11:25:15,877 INFO [RARDeployment] Required license terms exist, view vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
      11:25:15,915 INFO [RARDeployment] Required license terms exist, view vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
      11:25:15,943 INFO [RARDeployment] Required license terms exist, view vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
      11:25:15,965 INFO [RARDeployment] Required license terms exist, view vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
      11:25:15,990 INFO [RARDeployment] Required license terms exist, view vfszip:/Users/aj/jboss-5.0.1.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
      11:25:16,565 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
      11:25:16,588 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
      11:25:16,590 INFO [RAMJobStore] RAMJobStore initialized.
      11:25:16,590 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      11:25:16,590 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
      11:25:16,591 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      11:25:16,996 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      11:25:17,382 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started
      11:25:17,488 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
      11:25:17,488 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@9af180 started
      11:25:17,489 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
      11:25:17,489 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
      11:25:17,497 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
      11:25:17,497 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@66e02f started
      11:25:17,499 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
      11:25:17,499 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@79d75c started
      11:25:17,539 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      11:25:17,542 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      11:25:17,656 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      11:25:17,669 INFO [TomcatDeployment] deploy, ctxPath=/
      11:25:17,737 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
      11:25:17,798 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      11:25:17,818 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      11:25:17,827 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 22s:441ms
      


      I really hope that you can help me, as I've been stuck with this problem for a very long time now.

      Regards,

      Anders