7 Replies Latest reply on Feb 14, 2007 4:59 PM by dwin

    webservices in jboss 5.0

      Hello I'm using jboss 4.0.5 in order to deploy webservices using anotations like @Webservice and @webmethod. When I deploy the aplication I get a webservice and a EJB3.0.

      But when I deploy the same code in Jboss 5.0.0 the webservices doesn't work. The endpoint haven´t been publicated. Somebody can tell what I´m doing wrong.

      Here an example of Webservice


      package bean;
      import java.util.ArrayList;
      import javax.ejb.Stateless;
      import javax.jws.WebMethod;
      import javax.jws.WebService;

      @Stateless
      @WebService
      public class j4Bean {

      @WebMethod
      public ArrayList getInt(int num)
      {
      ArrayList list= new ArrayList();
      list.add("Hola");

      return list;
      }
      }


      Here is the interface

      package bean;

      import java.util.ArrayList;

      import javax.ejb.Remote;
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      import javax.jws.soap.SOAPBinding.Style;

      @Remote
      @WebService
      @SOAPBinding(style=Style.RPC)
      public interface j4 {

      @WebMethod ArrayList getInt(int num);

      }


        • 1. Re: webservices in jboss 5.0
          dwin

          what do you mean by it doesn't deploy? Do you get exceptions thrown by the JBoss runtime?

          (assuming your http port is 8080 and you're publishing on your localhost) you can try going to

          http://localhost:8080/jbossws/services

          you should see the WSDL there

          • 2. Re: webservices in jboss 5.0

            There are no exceptions, and there are no java errors.

            The problem is that the aplication is deployed as an EJB3.0, but no as a Webservice. http://localhost:8080/jbossws/services is Empty.

            Im working with the default configuration.
            I've been looking in the ($JBOSS)/default/tmp and ($JBOSS)/default/work and there wasn't any webservice resources.

            thanks for your answer.

            Here is the las part of the output that appears when a I start Jboss 5.0


            [TomcatDeployment] deploy, ctxPath=/, warUrl=.../deploy/ROOT.war/
            23:24:31,301 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]
            23:24:33,928 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=j5.jar,name=j5bean,service=EJB3 with dependencies:
            23:24:34,075 INFO [EJBContainer] STARTED EJB: bean.j5bean ejbName: j5bean
            23:24:34,180 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
            23:24:34,200 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
            23:24:34,210 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.Beta1 (build: CVSTag=https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_Beta1 date=200611191849)] Started in 21s:557ms


            • 3. Re: webservices in jboss 5.0
              dwin

              just curious, what do you have in your ejb jar?

              or better yet, how are you deploying the EJB? In a jar within an EAR? do you use an IDE to deploy it for you?

              What is the output as soon as you put the jar in the default/deploy folder? You see some messages that it was deployed or unsuccessfully deployed.

              • 4. Re: webservices in jboss 5.0

                Hello again. I´m working with eclipse to develop the application. But in order to complie and deploy it I'm using "ANT". I'm deploying a JAR without a EAR.

                The ouput on JBOSS 5 is corrcet. No Warnings, no errors, and no signals of Webservices. The real problem is that everythisng seems to work fine, but the application is not published as a Webservice.

                Here I attach de whole output in my jboss.




                JBoss Bootstrap Environment

                JBOSS_HOME: /Applications/jboss-5

                JAVA: java

                JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

                CLASSPATH: /Applications/jboss-5/bin/run.jar:/lib/tools.jar

                =========================================================================

                10:33:06,663 INFO [ServerImpl] Starting JBoss (Microcontainer)...
                10:33:06,688 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.Beta1 (build: CVSTag=https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_Beta1 date=200611191849)
                10:33:06,688 INFO [ServerImpl] Home Dir: /Applications/jboss-5
                10:33:06,688 INFO [ServerImpl] Home URL: file:/Applications/jboss-5/
                10:33:06,689 INFO [ServerImpl] Library URL: file:/Applications/jboss-5/lib/
                10:33:06,690 INFO [ServerImpl] Patch URL: null
                10:33:06,690 INFO [ServerImpl] Server Name: default
                10:33:06,690 INFO [ServerImpl] Server Home Dir: /Applications/jboss-5/server/default
                10:33:06,691 INFO [ServerImpl] Server Home URL: file:/Applications/jboss-5/server/default/
                10:33:06,697 INFO [ServerImpl] Server Data Dir: /Applications/jboss-5/server/default/data
                10:33:06,698 INFO [ServerImpl] Server Temp Dir: /Applications/jboss-5/server/default/tmp
                10:33:06,698 INFO [ServerImpl] Server Config URL: file:/Applications/jboss-5/server/default/conf/
                10:33:06,698 INFO [ServerImpl] Server Library URL: file:/Applications/jboss-5/server/default/lib/
                10:33:06,698 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml
                10:33:06,767 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/Applications/jboss-5/server/default/conf/bootstrap-beans.xml
                10:33:07,715 INFO [ProfileImpl] Using profile root:/Applications/jboss-5/bin/file:/Applications/jboss-5/server/default/profile
                10:33:08,804 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-68,"Apple Computer, Inc."
                10:33:08,804 INFO [ServerInfo] OS-System: Mac OS X 10.4.8,i386
                10:33:08,926 INFO [JMXKernel] Legacy JMX core initialized
                10:33:12,700 INFO [WebService] Using RMI server codebase: http://juan-jose-moreno-albert.local:8083/
                10:33:13,622 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
                10:33:19,772 INFO [Embedded] Catalina naming disabled
                10:33:19,795 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
                10:33:19,797 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
                10:33:20,031 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
                10:33:20,101 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
                10:33:20,102 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
                10:33:20,102 INFO [Catalina] Initialization processed in 305 ms
                10:33:20,102 INFO [StandardService] Arrancando servicio jboss.web
                10:33:20,105 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.Beta1
                10:33:20,137 INFO [StandardHost] Desactivada la validaci?n XML
                10:33:20,150 INFO [Catalina] Server startup in 48 ms
                10:33:22,860 INFO [ServiceEndpointManager] WebServices: jbossws-2.0.0.CR2.DEV (date=200611171751)
                10:33:23,974 INFO [TomcatDeployment] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
                10:33:24,462 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
                10:33:25,947 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/invoker]
                10:33:25,997 INFO [RARDeployment] Required license terms exist, view .../deploy/jboss-ha-local-jdbc.rar!/META-INF/ra.xml
                10:33:26,001 INFO [RARDeployment] Required license terms exist, view .../deploy/jboss-local-jdbc.rar!/META-INF/ra.xml
                10:33:26,001 INFO [RARDeployment] Required license terms exist, view .../deploy/jboss-xa-jdbc.rar!/META-INF/ra.xml
                10:33:26,001 INFO [RARDeployment] Required license terms exist, view .../deploy/jboss-ha-xa-jdbc.rar!/META-INF/ra.xml
                10:33:26,113 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                10:33:26,627 WARN [QuartzTimerServiceFactory] sql failed: CREATE TABLE qrtz_job_details(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
                10:33:26,738 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
                10:33:26,763 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
                10:33:26,766 INFO [JobStoreCMT] Using db table-based data access locking (synchronization).
                10:33:26,779 INFO [JobStoreCMT] Removed 0 Volatile Trigger(s).
                10:33:26,779 INFO [JobStoreCMT] Removed 0 Volatile Job(s).
                10:33:26,780 INFO [JobStoreCMT] JobStoreCMT initialized.
                10:33:26,780 INFO [StdSchedulerFactory] Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance.
                10:33:26,781 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
                10:33:26,782 INFO [JobStoreCMT] Freed 0 triggers from 'acquired' / 'blocked' state.
                10:33:26,784 INFO [JobStoreCMT] Recovering 0 jobs that were in-progress at the time of the last shut-down.
                10:33:26,784 INFO [JobStoreCMT] Recovery complete.
                10:33:26,786 INFO [JobStoreCMT] Removed 0 'complete' triggers.
                10:33:26,787 INFO [JobStoreCMT] Removed 0 stale fired job entries.
                10:33:26,789 INFO [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started.
                10:33:26,795 INFO [TomcatDeployment] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/jbossws-context37912-exp.war/
                10:33:26,832 WARN [TomcatInjectionContainer] could not find servlet class org.jboss.ws.integration.jboss.PortComponentLinkServlet in classpath when processing annotations.
                10:33:26,932 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jbossws]
                10:33:27,008 INFO [RARDeployment] Required license terms exist, view .../deploy/jms-ra.rar!/META-INF/ra.xml
                10:33:27,017 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                10:33:27,215 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console]
                10:33:27,486 INFO [RARDeployment] Required license terms exist, view .../deploy/mail-ra.rar!/META-INF/ra.xml
                10:33:27,557 INFO [MailService] Mail Service bound to java:/Mail
                10:33:27,623 INFO [TomcatDeployment] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
                10:33:28,300 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/web-console]
                10:33:28,490 WARN [JDBCPersistenceManager]

                JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
                Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
                Using an isolation level more strict than READ_COMMITTED may lead to deadlock.

                10:33:28,671 INFO [ServerPeer] JBoss Messaging 1.0.1.GA server [server.0] started
                10:33:28,726 INFO [Topic] Topic[/topic/testTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
                10:33:28,743 INFO [Queue] Queue[/queue/testQueue] started, fullSize=75000, pageSize=2000, downCacheSize=2000
                10:33:28,746 INFO [Queue] Queue[/queue/DLQ] started, fullSize=75000, pageSize=2000, downCacheSize=2000
                10:33:28,765 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                10:33:29,083 INFO [ConnectionFactory] Connector socket://192.168.23.23:4457 has leasing enabled, lease period 20000 milliseconds
                10:33:29,083 INFO [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] deployed
                10:33:29,155 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MSSQLDS' to JNDI name 'MSSQLDS'
                10:33:29,171 INFO [RARDeployment] Required license terms exist, view .../deploy/quartz-ra.rar!/META-INF/ra.xml
                10:33:29,202 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
                10:33:29,205 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
                10:33:29,205 INFO [RAMJobStore] RAMJobStore initialized.
                10:33:29,205 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
                10:33:29,206 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
                10:33:29,206 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
                10:33:29,212 INFO [TomcatDeployment] deploy, ctxPath=/, warUrl=.../deploy/ROOT.war/
                10:33:29,351 INFO [StandardContext] Ya ha sido arrancado el Contenedor org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]
                10:33:32,124 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=j5.jar,name=j5bean,service=EJB3 with dependencies:
                10:33:32,274 INFO [EJBContainer] STARTED EJB: bean.j5bean ejbName: j5bean
                10:33:32,384 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
                10:33:32,404 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
                10:33:32,414 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.Beta1 (build: CVSTag=https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_Beta1 date=200611191849)] Started in 25s:712ms


                • 5. Re: webservices in jboss 5.0
                  dwin

                  Hey Deployer

                  I think its more of a JBoss 5 issue more than a JBossWS issue.

                  It seems that JBoss 5 is not picking up any application at all and I am not quite sure why.

                  you can check

                  http://localhost:8080/status

                  to check any deployed applications


                  you should post in the JBoss AS forum to ask why JBoss 5 is not picking up (or deploying) applications.


                  • 6. Re: webservices in jboss 5.0
                    thomas.diesler

                    As of this writing hot deployment is not implemented yet in jboss50. Otherwise we have many ejb3 endpoints in our jbossws-1.2.0 samples that all work fine

                    • 7. Re: webservices in jboss 5.0
                      dwin

                      oooh I see

                      that clears it up a bunch