5 Replies Latest reply on Sep 29, 2012 9:56 AM by wdfink

    EJB 3.1 Deployment

    david24365

      Hi, I´m trying to do an EJB that prints Hello World! every 30 seconds in JBoss AS 6.1

       

      When I test it in my local enviroment everything works fine, but when I pack it in a war and deploy it to another server it gives me a deployment error.

       

      This is the EJB code:

       

       

      package com.cpdv.tareasprogramadas;
      
      
      import java.util.Date;
      
      
      import javax.ejb.Schedule;
      import javax.ejb.Singleton;
      
      
      @Singleton
      public class HelloService {
      
      
                @Schedule(second="*/30", minute="*",hour="*", persistent=false) 
                public void sayHello(){
                          System.out.println("hello world! " + new Date());
                }
      }
      
      
      

       

      And here is the stack trace when I place the war in the deploy directory:

       

      08:54:28,111 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      
      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3" is missing the following dependencies:
          Dependency "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory' **")
        Deployment "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
          Dependency "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
        Deployment "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3,type=singleton-bean-jndi-binder" is missing the following dependencies:
          Dependency "<UNKNOWN jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3,type=singleton-bean-jndi-binder>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3' **")
        Deployment "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
      
      
      DEPLOYMENTS IN ERROR:
        Deployment "<UNKNOWN jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3,type=singleton-bean-jndi-binder>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.j2ee:jar=CPDVirtual.war,name=HelloService,service=EJB3' **
        Deployment "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory' **
      
      
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.2.GA]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.2.GA]
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.2.GA]
              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.1.0.Final]
              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
              at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
              at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
              at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_24]
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_24]
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_24]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_24]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_24]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_24]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      
      
      

       

       

      Thank you very much

        • 1. Re: EJB 3.1 Deployment
          wdfink

          Does the other server run a different (or stripped) profile?

          • 2. Re: EJB 3.1 Deployment
            david24365

            Yes, in my pc I'm running the default server, from $JBOSS_HOME/server/default

             

            In the other enviroment it's running from $JBOSS_HOME/server/anotherserver

             

            (I don't know why. I didn't configure it and I can't change it)

            • 3. Re: EJB 3.1 Deployment
              wdfink

              I suppose that the anotherserver is a stripped profile whitout a (ejb) timer service.

              You should check the environment and how it is started.

              • 4. Re: EJB 3.1 Deployment
                david24365

                That sounds meaningful, but I don't have any idea about how to check the environment and how it is started

                 

                Can you give me a hint about that?

                • 5. Re: EJB 3.1 Deployment
                  wdfink

                  There must be a command like 'JBOSS_HOME/bin/run.bat ......' and the options are of interest.

                  Also it might be added as a windows service, you might as the admin of the system in that case.

                   

                  The server contain a directory 'servers' which include the profile that is started by the '-c' option of the startcommand. Here you have to check whether the ejb timer configuration is missed.