EJB 3.1 Deployment
david24365 Sep 27, 2012 8:07 AMHi, 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