I am running into this exception:
org.quartz.SchedulerException: SchedulerPlugin class not specified for plugin 'shutdownhook'
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:984)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1371)
at org.quartz.ee.servlet.QuartzInitializerServlet.init(QuartzInitializerServlet.java:160)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
It seems that Quartz can not find shutdownhook plugin. This has happened when I added the following line to the quartz.properties file for safe shutdown.
org.quartz.plugin.shutdownhook.cleanShutdown=TRUE
Any ideas how to add the shutdownhook to the quartz?
Before the following configuration line:
org.quartz.plugin.shutdownHook.cleanShutdown=TRUE
add the following line:
org.quartz.plugin.shutdownHook.class=org.quartz.plugins.management.ShutdownHookPlugin
As suggested in the official quartz site (in the bottom of the page).
Related
Ubuntu-server Alfresco was working fine before, but now I get some errors. I'm doing nothing except changing the Admin password via Web-interface and cleaning of old log files.
Now I get 404 error. The log is provided below:
11:40:10,390 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.service.cmr.rendition.RenditionServiceException: 09250000 Unable to find rendering action root node.
at org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl.checkRenderingActionRootNodeExists(RenditionDefinitionPersisterImpl.java:199)
at org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl.findActionNode(RenditionDefinitionPersisterImpl.java:154)
at org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl.findOrCreateActionNode(RenditionDefinitionPersisterImpl.java:177)
at org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl.saveRenditionDefinition(RenditionDefinitionPersisterImpl.java:143)
at org.alfresco.repo.rendition.RenditionServiceImpl.saveRenditionDefinition(RenditionServiceImpl.java:233)
at org.alfresco.repo.thumbnail.ThumbnailRegistry$1.doWork(ThumbnailRegistry.java:160)
at org.alfresco.repo.thumbnail.ThumbnailRegistry$1.doWork(ThumbnailRegistry.java:149)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
at org.alfresco.repo.thumbnail.ThumbnailRegistry.initThumbnailDefinitions(ThumbnailRegistry.java:148)
at org.alfresco.repo.thumbnail.ThumbnailRegistry.access$400(ThumbnailRegistry.java:49)
at org.alfresco.repo.thumbnail.ThumbnailRegistry$RegistryLifecycle.onBootstrap(ThumbnailRegistry.java:271)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.thumbnail.ThumbnailRegistry.onApplicationEvent(ThumbnailRegistry.java:255)
at org.alfresco.repo.thumbnail.ThumbnailRegistry.onApplicationEvent(ThumbnailRegistry.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Does anyone know what could be wrong? I can provide additional information if you ask; just tell me what you want to see.
So, I've done all what Gagravarr said, thanks for Him. Error "root node" has disappeared.
I got some new errors but all been fixed, except one:
Will try to resolve it myself. If not I will ask here again. Thanks!
I have a maven generated war file. When I try and deploy the war file, I am getting the following error in catalina.out:
SEVERE: Exception fixing docBase: {0}
java.io.FileNotFoundException: /usr/share/tomcat6/webapps/ROOT/META-INF/MANIFEST.MF (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:457)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:173)
at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:882)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1017)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5280)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4086)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:881)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:734)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:497)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1199)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
What is this MANIFEST.mf file and why do I need it suddently? I have deployed probably 20 Tomcat applications that work fine without this error occurring and certainly no manifest file.
Check permissions in that directory; I suspect Tomcat can't see META-INF and/or the manifest file.
When running an application locally on my box, the application works perfectly. When deployed to QA, the error below is received. I am running Tomcat 5.5.23 locally and in QA. The application also uses Spring MVC.
ERROR 2011-03-01 16:41:42: Exception loading sessions from persistent storagejava.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.everbank.uft.entities.ldc.VoidReason
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.util.ArrayList.readObject(ArrayList.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1402)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:931)
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)
at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:432)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.NotSerializableException: com.everbank.uft.entities.ldc.VoidReason
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1478)
at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:948)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:517)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:463)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:667)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4363)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893)
at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1180)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1151)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:510)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
... 6 more
ERROR 2011-03-01 16:42:49: UserTrackingFilter.doFilter() failed. message:Servlet execution threw an exceptionjavax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.everbank.uft.filters.UserTrackingFilter.doFilter(UserTrackingFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.everbank.uft.filters.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
This means you have put an object in the session that is not serializable, and you have enabled session persistence on server stop.
You have multiple options:
make the class in question implement Serializable
remove it from the session on sessionDestroyed(..) of a HttpSessionListener
if it is a member of another class stored in the session, make it transient
simply ignore the error
You should also clean the "work" directory of tomcat so that no previous serialized session is restored.
com.everbank.uft.entities.ldc.VoidReason is not Serializable, it does not implement Serializable or inherit from something that does.
Could there be serialized Tomcat sessions on your QA server that are damaged or otherwise jacked up?
Try deleting: ${catalina.home}/work/Catalina/localhost/"whatever your app name is"/SESSION.ser
I started a new project in Java web services in NetBeans with Tomcat 5.5 as server. When I try to run I got this error
Deployment is in progress...
deploy?config=file:/C:/Users/sadesh/AppData/Local/Temp/context46924.xml&war=file:/C:/Users/sadesh/Documents/NetBeansProjects/TambramBuzz/build/web/
FAIL - Invalid context path null was specified
Deployment error:
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)
... 16 more
BUILD FAILED (total time: 0 seconds)
How can I resolve it?
The server log says
SEVERE: Error starting static
Resources
java.lang.IllegalArgumentException:
Document base
C:\Users\sadesh\Documents\NetBeansProjects\cssjquery\build\web
does not exist or is not a readable
directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4024)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
You have this error:
FAIL - Invalid context path null was specified Deployment error: The module has not been deployed. See the server log for details.
So what does the server log say?
I built a webapp that works perfectly fine in my localhost (tomcat). But when I tried to deploy, velocity crashes in init(), leaving me with this strange stack trace here (sorry for the size):
ERROR [main] (VelocityConfigurator.java:62) - Error initializing Velocity!
org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206)
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255)
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589)
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:229)
at org.apache.velocity.app.Velocity.init(Velocity.java:107)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.initVelocity(VelocityConfigurator.java:57)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.configure(VelocityConfigurator.java:42)
at com.webcodei.velociraptor.VelociListener.contextInitialized(VelociListener.java:26)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute :
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
... 33 more
Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:177)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
at org.apache.log4j.FileAppender.(FileAppender.java:109)
at org.apache.log4j.RollingFileAppender.(RollingFileAppender.java:72)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
... 35 more
ERROR [main] (VelocityConfigurator.java:63) - java.lang.RuntimeException: Error configuring Log4JLogChute :
org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206)
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255)
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589)
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:229)
at org.apache.velocity.app.Velocity.init(Velocity.java:107)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.initVelocity(VelocityConfigurator.java:57)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.configure(VelocityConfigurator.java:42)
at com.webcodei.velociraptor.VelociListener.contextInitialized(VelociListener.java:26)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute :
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
... 33 more
Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:177)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
at org.apache.log4j.FileAppender.(FileAppender.java:109)
at org.apache.log4j.RollingFileAppender.(RollingFileAppender.java:72)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
... 35 more
ERROR [main] (VelocityConfigurator.java:64) - Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206)
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255)
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589)
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:229)
at org.apache.velocity.app.Velocity.init(Velocity.java:107)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.initVelocity(VelocityConfigurator.java:57)
at com.webcodei.velociraptor.velocity.VelocityConfigurator.configure(VelocityConfigurator.java:42)
at com.webcodei.velociraptor.VelociListener.contextInitialized(VelociListener.java:26)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute :
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
... 33 more
Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:177)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
at org.apache.log4j.FileAppender.(FileAppender.java:109)
at org.apache.log4j.RollingFileAppender.(RollingFileAppender.java:72)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
... 35 more
Does anyone knows the workaround? Or at least understood the error? I've done some googling but no clues.. only this page facing the same problem but no solution..
Velocity tries to put the logfile in the directory Tomcat was started from, and I believe that is actually /.
You can force Velocity to log to Tomcat's standard log by adding these lines to your velocity.properties:
runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
runtime.log.logsystem.log4j.category=velocity
runtime.log.logsystem.log4j.logger=velocity
The velocity.properties should go into /WEB-INF/velocity.properties but you can override that in you servlet definition in web.xml.
If you're initialising Velocity by properties and not the velocity.properties:
VelocityEngine engine = new VelocityEngine();
Properties props = new Properties();
props.put("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
props.put("runtime.log.logsystem.log4j.category", "velocity");
props.put("runtime.log.logsystem.log4j.logger", "velocity");
engine.init(props);
Read more here:
http://velocity.apache.org/engine/devel/developer-guide.html#usinglog4jwithexistinglogger
and here:
http://minaret.biz/tips/tomcatLogging.html#velocity
I think this line has the answer. Looks like there is an issue creating the velocity.log file. What does your configuration file look like?
Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)
It appears the process attempting to open the log file does not have permission to do so:
Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)
I have had exactly the same problem with my code and after hours of googling for that , I just decided to add some other Velocity libraries to my project.
My project only had the apache-velocity jar file, then from here, I also added Velocity-Dep to my Maven project and Yesssssssssss! VICTORY!
I too had same Issue but I was able to resolve this overriding the default log file to customized log file. Just add this 3 lines of code in the method where you are calling evaluate Function.
Velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,"org.apache.velocity.runtime.log.Log4JLogChute");
Velocity.setProperty("runtime.log.logsystem.log4j.logger","com.mindtree.igg.website.email.TemplateMergeUtilVelocityImpl");
VelocityContext velocityContext = new VelocityContext(parameters);
This is one way of solving it ie, without using property file.
I faced the same issue and have written a descriptive blog with the possible causes and solutions. Here is the link