Quartz properties file configuration in web.xml and its location - quartz-scheduler

I tried to resolve the problem of avoid loading default quartz.properties file for long time. Hope someone can give a hand here. Thanks a lot!
Basically, I have read many posts on this problem while their solutions didn't resolve my case. I have placed quartz.properties file under WEB-INF/classes and following are my configurations in web.xml by using context listener:
<context-param>
<param-name>quartz:config-file</param-name>
<param-value>quartz.properties</param-value>
</context-param>
<context-param>
<param-name>quartz:shutdown-on-unload</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>quartz:wait-on-shutdown</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>quartz:start-on-load</param-name>
<param-value>true</param-value>
</context-param>
<listener>
<listener-class>
org.quartz.ee.servlet.QuartzInitializerListener
</listener-class>
</listener>
The results still showed like this:
[INFO] 18 Feb 06:37:29.218 PM main [org.quartz.impl.StdSchedulerFactory]
Using default implementation for ThreadExecutor
[INFO] 18 Feb 06:37:29.265 PM main [org.quartz.core.SchedulerSignalerImpl]
Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO] 18 Feb 06:37:29.265 PM main [org.quartz.core.QuartzScheduler]
Quartz Scheduler v.2.1.6 created.
[INFO] 18 Feb 06:37:29.265 PM main [org.quartz.simpl.RAMJobStore]
RAMJobStore initialized.
[INFO] 18 Feb 06:37:29.281 PM main [org.quartz.core.QuartzScheduler]
Scheduler meta-data: Quartz Scheduler (v2.1.6) 'MyQuartzTest' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 12 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
[INFO] 18 Feb 06:37:29.281 PM main [org.quartz.impl.StdSchedulerFactory]
Quartz scheduler 'MyQuartzTest' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO] 18 Feb 06:37:29.281 PM main [org.quartz.impl.StdSchedulerFactory]
Quartz scheduler version: 2.1.6
[INFO] 18 Feb 06:37:29.281 PM main [org.quartz.core.QuartzScheduler]
Scheduler MyQuartzTest_$_NON_CLUSTERED started.
[INFO] 18 Feb 06:37:29.312 PM MyQuartzTest_Worker-1 [org.quartz.examples.example1.HelloJob]
Hello World! - Mon Feb 18 18:37:29 GMT+08:00 2013
[INFO] 18 Feb 06:38:09.296 PM MyQuartzTest_Worker-2 [org.quartz.examples.example1.HelloJob]
Hello World! - Mon Feb 18 18:38:09 GMT+08:00 2013
[INFO] 18 Feb 06:38:29.296 PM main [org.quartz.core.QuartzScheduler]
Scheduler MyQuartzTest_$_NON_CLUSTERED shutting down.
[INFO] 18 Feb 06:38:29.296 PM main [org.quartz.core.QuartzScheduler]
Scheduler MyQuartzTest_$_NON_CLUSTERED paused.
[INFO] 18 Feb 06:38:29.296 PM main [org.quartz.core.QuartzScheduler]
Scheduler MyQuartzTest_$_NON_CLUSTERED shutdown complete.
Another confuse I have is if it was really loading default quartz.properties file, then why are the thread pool and scheduler name were set properly based on my customized quartz.properties file?
Another hand, I also tried to set different path for quartz.properties file based on the official documentation of Quartz: QuartzInitializerListner. For example:
<context-param>
<param-name>quartz:config-file</param-name>
<param-value>/MyProject/WEB-INF/my_quartz.properties</param-value>
</context-param>
The results showed even worse. It would be totally default settings. Hence, I'm quite lost now. Please kindly elaborate the root cause of this scenario. Thank you very much!

I fixed this issue placing the quartz.properties in my resources folder (src/main/resources).
Your context Param should look like this:
<context-param>
<param-name>quartz:config-file</param-name>
<param-value>quartz.properties</param-value>
</context-param>
Take a look to the quartz's code:
InputStream is = null;
Properties props = new Properties();
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(filename);
where filename is the properties file.
So, it tries to get the file as a Stream. Please check the Java Doc:
https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html
... have fun

Related

Tapestry AppModule not added by RegistryBuilder for one project, works fine for another

I'm using Eclipse Mars, Tomcat7, Java8, Sysdeo DevLoader and I followed a Tynamo tutorial to configure the tomcat plugin.
I have two almost identical Tapestry projects. One app works fine the other won't serve any pages, throwing:
SEVERE: Servlet.service() for servlet [default] in context with path [/admin] threw exception
java.lang.RuntimeException: Exception constructing service 'WebSecurityManager': Error invoking constructor public org.tynamo.security.services.TapestryRealmSecurityManager(org.tynamo.security.Authenticator,org.apache.shiro.mgt.SubjectFactory,org.apache.shiro.mgt.RememberMeManager,java.util.Collection): Realms collection argument cannot be empty.
at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
...
Caused by: java.lang.IllegalArgumentException: Realms collection argument cannot be empty.
at org.apache.shiro.mgt.RealmSecurityManager.setRealms(RealmSecurityManager.java:78)
at org.tynamo.security.services.TapestryRealmSecurityManager.<init>(TapestryRealmSecurityManager.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:48)
... 50 more
The problem seems to stem from my AppModule.addRealms not being called in the problem app before the security manager tries to get the Subject. In fact it seems that one of the apps enjoys the 'Tapestry treatment' and the other does not. Here's the one that works:
Nov 05, 2015 11:45:53 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/bray.xml
Nov 05, 2015 11:45:53 AM org.apache.catalina.core.StandardContext setPath
WARNING: A context path must either be an empty string or start with a '/'. The path [bray] does not meet these criteria and has been changed to [/bray]
Nov 05, 2015 11:45:53 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'debug' to '1' did not find a matching property.
Nov 05, 2015 11:45:53 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'useSystemClassLoaderAsParent' to 'false' did not find a matching property.
[DevLoader] Starting DevLoader
[DevLoader] projectdir=/home/claude/git/bray/src/main/webapp
[DevLoader] added file:/home/claude/git/bray/target/classes/
...
[INFO] ioc.RegistryBuilder Adding module definition for class com.mydomain.services.AppModule
[INFO] TapestryModule.ComponentClassResolver Available pages (16):
(blank): com.mydomain.pages.Index
About: com.mydomain.pages.About
Then I see the nice "hello" from Tapestry and my other project (admin) comes up:
...
Application 'app' (version 1.0-SNAPSHOT) startup time: 172 ms to build IoC Registry, 541 ms overall.
______ __ ____
/_ __/__ ____ ___ ___ / /_______ __ / __/
/ / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
/_/ \_,_/ .__/\__/___/\__/_/ \_, / /____/
/_/ /___/ 5.3.8 (development mode)
Nov 05, 2015 11:45:58 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/admin.xml
Nov 05, 2015 11:45:58 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'debug' to '1' did not find a matching property.
Nov 05, 2015 11:45:58 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'useSystemClassLoaderAsParent' to 'false' did not find a matching property.
[DevLoader] Starting DevLoader
[DevLoader] projectdir=/home/claude/git/tegu/admin/src/main/webapp
...
Nov 05, 2015 11:45:58 AM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
log4j:WARN No appenders could be found for logger (org.apache.tapestry5.ioc.RegistryBuilder).
log4j:WARN Please initialize the log4j system properly.
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/docs.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/examples.xml
I expected to see something like this after my admin.xml descriptor is deployed:
[INFO] ioc.RegistryBuilder Adding module definition for class com.myotherdomain.admin.services.AppModule
[INFO] TapestryModule.ComponentClassResolver Available pages (16):
...but instead there is silence. I can't see anything different in the two apps that would cause one to work and the other to fail. Where should I look?
The DevLoader Classpath was wrong. Fixing that fixed everything.
The DevLoader Classpath did not include the path /myapp/target/classes -- and that's where my app's AppModule was (/myapp/target/classes/com/mydomain/myapp/services/AppModule.class to be exact). This can be fixed in Project -> Properties -> Tomcat and checking the checkbox for the right path. The wrong configuration can also be seen in a file next to the project's WEB-INF called .#webclasspath which spells out the complete path (the relative path is shown in the config page). After fixing the setup, start Tomcat and .#webclasspath should be automatically updated.

spring MVC + Jersey integration configuration error

i am trying to integrate spring mvc +jersey
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/jpaContext.xml
classpath:/applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>SpringApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>orgProfiles.webserviceJersey.MyApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SpringApplication</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>orgProfilesServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/servlet-config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>orgProfilesServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>orgProfilesServlet</servlet-name>
<url-pattern>*.json</url-pattern>
</servlet-mapping>
</web-app>
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd"
>
<bean id="greetingService" class="orgProfiles.webserviceJersey.GreetingServiceImpl"/>
<bean class="orgProfiles.webserviceJersey.DateTimeService" scope="request"/>
<bean class="orgProfiles.webserviceJersey.SpringSingletonResource"/>
<bean class="orgProfiles.webserviceJersey.SpringRequestResource" scope="request"/>
<bean class="orgProfiles.webserviceJersey.CustomExceptionMapper"/>
</beans>
when i try to run the application it will end up with the following error message :
Aug 28, 2014 1:16:16 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Aug 28, 2014 1:16:17 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:orgProfiles' did not find a matching property.
Aug 28, 2014 1:16:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 28, 2014 1:16:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 28, 2014 1:16:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1366 ms
Aug 28, 2014 1:16:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 28, 2014 1:16:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Aug 28, 2014 1:16:24 PM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [org.glassfish.jersey.server.spring.SpringWebApplicationInitializer#30e65807]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Aug 28, 2014 1:16:24 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 28, 2014 1:16:25 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /orgProfiles threw load() exception
java.lang.ClassNotFoundException: orgProfiles.src.main.java.webserviceJersey.MyApplication
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.glassfish.jersey.internal.util.ReflectionHelper$7.run(ReflectionHelper.java:407)
at org.glassfish.jersey.internal.util.ReflectionHelper$7.run(ReflectionHelper.java:397)
at java.security.AccessController.doPrivileged(Native Method)
at org.glassfish.jersey.servlet.WebComponent.createResourceConfig(WebComponent.java:463)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:302)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Aug 28, 2014 1:16:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 28, 2014 1:16:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 28, 2014 1:16:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8375 ms
How can i resolve this issue ?
According to your beans name orgProfiles.src.main.java.webserviceJersey.MyApplication should be orgProfiles.webserviceJersey.MyApplication

404 not found with jersey 1.8 and tomcat 7 Resful and eclipse

I am new to J2EE and I want to create a restful webservice so I follow a tutorial and based on that I've created a simple Dynamic web application project in eclipse (Kepler Service Release 1) then I add the jersey 1.8 libraries and I've configured the appache tomcat (apache-tomcat-7.0.50) with eclipse then after adding a index.html I can see the http://localhost:8080/myproject/ page content ,
but I get error 404 (nt found) with this url
http://localhost:8080/myproject/api/v1/status
and
http://localhost:8080/myproject/api/v1/status/version
this is the java resource file
package myproject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
#Path("/v1/status/*")
public class v1_status {
private static final String api_version = "00.01.00";
#GET
#Produces(MediaType.TEXT_HTML)
public String returnName(){
return "<p>Web Services</p>";
}
#Path("/version")
#GET
#Produces(MediaType.TEXT_HTML)
public String returnVersion()
{
return "<p>Web Services</p>" + api_version;
}
}
and this is the web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>myproject</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<!-- com.sun.jersey.config.property.packages
jersey.config.server.provider.packages -->
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>myproject</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
</web-app>
I have tested the jersey version 2 , but when I add the 2 version tomcat gets me error in starting phase ...
what's wrong here ? I've saw other threads in stackoverflow about this issue but i cant figure out how should I solve the problem becasue everythings looks fine in the project but final result is not.
this is the tomcat startup log
Feb 15, 2014 5:04:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\oracle\product\10.2.0\client_2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\Program Files\MATLAB\R2013a\runtime\win64;E:\Program Files\MATLAB\R2013a\bin
Feb 15, 2014 5:04:50 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:myproject' did not find a matching property.
Feb 15, 2014 5:04:51 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 15, 2014 5:04:51 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 15, 2014 5:04:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 720 ms
Feb 15, 2014 5:04:51 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 15, 2014 5:04:51 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.50
Feb 15, 2014 5:04:51 PM org.apache.tomcat.websocket.server.WsSci onStartup
INFO: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available.
Feb 15, 2014 5:04:52 PM com.sun.jersey.api.core.servlet.WebAppResourceConfig init
INFO: Scanning for root resource and provider classes in the Web app resource paths:
/WEB-INF/lib
/WEB-INF/classes
Feb 15, 2014 5:04:52 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class myproject.v1_status
Feb 15, 2014 5:04:52 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Provider classes found:
class org.codehaus.jackson.jaxrs.JsonParseExceptionMapper
class org.codehaus.jackson.jaxrs.JacksonJsonProvider
class org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider
class org.codehaus.jackson.jaxrs.JsonMappingExceptionMapper
Feb 15, 2014 5:04:53 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.18 11/22/2013 01:21 AM'
Feb 15, 2014 5:04:53 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 15, 2014 5:04:54 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 15, 2014 5:04:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2836 ms
Solved, the asterisk (*) in the #Path("/v1/status/*") was the cause of problem
after removing it , I get correct result , so it should be #Path("/v1/status/") ...

EJB-3.1 #Startup & #Schedule anotation in Apache Tomee for Timer Execution

I have following code to run on Apache-tomee, i am using eclipse for coding, and i want to run my simple schedule job using #Schedule annotation at application start-up.
#Startup
#Singleton
public class ScheduleEJB {
private static int count = 0;
#Schedule(second="*/10", minute="*", hour="*", info="MyTimer")
public void execute() {
System.out.println("its running count..."+count);
count++;
}
}
When i deployed this code on Tomee, it get me following message and unable to run my schedule method execute() automatically at startup, where as this code works fine in glassfish, but i am not going to use it either glassfish of jboss.
Dec 21, 2012 9:59:45 AM org.quartz.impl.StdSchedulerFactory instantiate
INFO: Using default implementation for ThreadExecutor
Dec 21, 2012 9:59:45 AM org.quartz.core.SchedulerSignalerImpl
INFO: Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
Dec 21, 2012 9:59:45 AM org.quartz.core.QuartzScheduler
INFO: Quartz Scheduler v.2.1.6 created.
Dec 21, 2012 9:59:45 AM org.quartz.simpl.RAMJobStore initialize
INFO: RAMJobStore initialized.
Dec 21, 2012 9:59:45 AM org.quartz.core.QuartzScheduler initialize
INFO: Scheduler meta-data: Quartz Scheduler (v2.1.6) 'OpenEJB-TimerService-Scheduler' with instanceId 'OpenEJB'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter' - with 0 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
Dec 21, 2012 9:59:45 AM org.quartz.impl.StdSchedulerFactory instantiate
INFO: Quartz scheduler 'OpenEJB-TimerService-Scheduler' initialized from an externally provided properties instance.
Dec 21, 2012 9:59:45 AM org.quartz.impl.StdSchedulerFactory instantiate
INFO: Quartz scheduler version: 2.1.6
Dec 21, 2012 9:59:45 AM org.quartz.core.QuartzScheduler start
INFO: Scheduler OpenEJB-TimerService-Scheduler_$_OpenEJB started.
Dec 21, 2012 9:59:45 AM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Created Ejb(deployment-id=ScheduleEJB, ejb-name=ScheduleEJB, container=My Singleton Container)
Dec 21, 2012 9:59:45 AM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Started Ejb(deployment-id=ScheduleEJB, ejb-name=ScheduleEJB, container=My Singleton Container)
Did you already have a look to TomEE examples page?
There is a similar example which actually running.
http://openejb.apache.org/examples-trunk/schedule-methods/README.html
Maybe you could give it a try and check what is actually different with yours.
Your code runs fine on last release of TomEE. What was your version?

I had used Quartz in my Java web-application but when Quartz will execute after its execution, Tomcat is being off.

I wrote a code in Quartz that will update database on a daily basis exactly once a day.
I am using Eclipse in my web-application so had started the Tomcat through Eclipse.
But after updating the database from Quartz it is forcing the Tomcat to be terminated in Eclipse. So my application is not working after the Quartz portion is running (due to Tomcat termination). The messages I got in Eclipse 4 Quartz is displayed below:
Job name:Event Update1
Group name:mysql
Trigger name:cronTrigger4Event1
Firing Time:Mon Jan 24 14:30:00 IST 2011
dateFormat.format(calendar.getTime()) : 2011-01-24
Inserting values in Mysql database table!
1 row affected
Jan 24, 2011 2:30:00 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
[INFO] 24 Jan 2011 14:30:05.506 Thread-34 [org.quartz.core.QuartzScheduler]
Scheduler QuartzScheduler_$_NON_CLUSTERED shutting down.
[INFO] 24 Jan 2011 14:30:05.506 Thread-34 [org.quartz.core.QuartzScheduler]
Scheduler QuartzScheduler_$_NON_CLUSTERED paused.
[INFO] 24 Jan 2011 14:30:05.506 Thread-34 [org.quartz.core.QuartzScheduler]
Scheduler QuartzScheduler_$_NON_CLUSTERED shutdown complete.
Any help is appreciated.
i think your problem in tomcat and eclipse not in quartz itself so you have two solutions
1- get the tomcat out of eclipse and deploy you application manually, don't forget to give you application server more memory.
2- get you schedule jobs out of you application and use the Linux system cron jobs.