-
1. Re: Timer-Service does not start on JBoss AS7
sfcoy Dec 31, 2012 6:03 PM (in response to jeetu)Please add the full server log as an attachment.
You should not need to add anything to your configuration for this to work as it is standard behaviour, even with the ordinary standalone.xml configuration.
-
2. Re: Timer-Service does not start on JBoss AS7
jeetu Dec 31, 2012 6:10 PM (in response to sfcoy)Thanks for looking into this Stephen. Attaching my full server log.
Regards
Jithendra
-
full_server_log.txt.zip 6.4 KB
-
-
3. Re: Timer-Service does not start on JBoss AS7
sfcoy Dec 31, 2012 8:00 PM (in response to jeetu)- Are you using a jboss-deployment-structure.xml in Titan.war? If so, please attach it. You should not normally be seeing "JBAS018567: Deployment "deployment.Titan.war" is using a private module..." warnings in the logs.
- Is Titan.war using OSGI?
- Please show the code for your singleton Timer, or at least the annotated portions.
- Please show the output of tar tf Titan.war.
-
4. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 2, 2013 12:30 PM (in response to sfcoy)Hi Stephen,
Responses corresponding to your queries.
1. The Titan.war has the jboss-deployment-structure.xml and am attaching that. I am using the maven-war-plugin to do the build.
2. No, Titan.war does not use OSGI.
3. Code i have for the singleton timer
@Singleton
Public class TimerEjb {@Schedule(hour="*", minute="*")
public void triggerCron(){
System.out.println("Invoking Cron Trigger");
}
}
4. The output of the jar -tf is in the attached output.log
Thanks again.
Regards
Jithendra
-
output.log.zip 5.0 KB
-
jboss-deployment-structure.xml 272 bytes
-
-
5. Re: Timer-Service does not start on JBoss AS7
nickarls Jan 2, 2013 3:20 PM (in response to jeetu)That's a lot of jars (serveral of which shouldn't belong there)
-
6. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 2, 2013 3:26 PM (in response to nickarls)The project is a work in progress. Cleanup is down the way! Our first project of this kind, still in the learning process. Suggestions are welcome. I am guessing the existence of the non-needed jars cause the issue that i am seeing right??
Regards
Jithendra
-
7. Re: Timer-Service does not start on JBoss AS7
nickarls Jan 2, 2013 3:34 PM (in response to jeetu)Not guaranteed but a possibility. You could start with a minimal project containing just a war with the single @Startup @Singleton with a @Timer and see if it fires.
-
8. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 2, 2013 4:41 PM (in response to nickarls)Hi Nicklas,
Tried with a minimal project with only one singleton as you suggested and tried deploying that on the server. The server threw similar deployment exception below.
13:59:46,254 INFO [org.jboss.as.server] (management-handler-thread - 7) JBAS015870: Deploy of deployment "test-timer-service.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./test-timer-service Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"test-timer-service.war\".component.TimerSample.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"test-timer-service.war\".jboss.security.jacc Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"test-timer-service.war\".component.TimerSample.ejb3.timerService Missing[jboss.thread.executor.ejb3.my-timer]"]}
My singleton looks like this.
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;@Startup
@Singleton
public class TimerSample {@Schedule(hour="*", minute="*")
public void triggerCron(){
System.out.println("Trigger CRON ");
}}
Regards
Jithendra
-
9. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 2, 2013 4:43 PM (in response to jeetu)Hi Nicklas,
Just to confirm, i have asked one of my mate to deploy the simple project i have created on his server. He deployed it with no issues and it worked fine. Wondering what is wrong with my server. Will try to compare the standalone-full.xml and see if he has any other capability that i dont have.
Regards
Jithendra
-
10. Re: Timer-Service does not start on JBoss AS7
sfcoy Jan 2, 2013 7:09 PM (in response to jeetu)Jithendra,
The general rule of thumb is that you do not deploy jars in your application that duplicates code that is present in the application server (there's exceptions, but not in your case just yet). A full JEE server provides a lot more functionality than a servlet container such as Tomcat or Jetty, where you may need to have more stuff in your WAR files.
There is nothing useful in your jboss-deployment-structure.xml so get rid of that to begin with.
As you appear to be building with Maven, it will be easiest to clean up your pom.xml. Therefore, if you can post that we can make some recommendations.
-
11. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 2, 2013 7:20 PM (in response to sfcoy)Stephen,
Attaching my pom.xml. I would leave it to your able hands to suggest me what takes it to make it better.
Regards
Jithendra
-
pom.xml 27.0 KB
-
-
12. Re: Timer-Service does not start on JBoss AS7
nickarls Jan 3, 2013 2:10 AM (in response to jeetu)1. Leave org.jboss.spec.jboss-javaee-6.0 in
2. Comment all the other deps.
3. Uncomment until it compiles
(and even then you can check if some of the stuff can be changed to references to server-side-modules where applicable)
I find it hard to believe that you really reference stuff like Oracle drivers, connection pool implementations etc.
-
13. Re: Timer-Service does not start on JBoss AS7
jeetu Jan 10, 2013 12:24 PM (in response to nickarls)Thanks for the suggestions Nicklas. I will do it.
I have anyway able to make the timer service working by just blowing away my standalone-full.xml and replaced it with the original version without any of my configuration changes and it started working fine. Then i added my changes and it all gels well now.
If i now compare the working version with the version i had problems with, there is not much of a difference. Wierd!!
Anyways thanks for all the time.
Regards
Jithendra