grails-quartz
grails-quartz copied to clipboard
Error to start Quartz Plugin on Grails 1.3.7 and Weblogic
I have written an application that uses Quartz Plugin. I tested that it works when running grails run-app as well as war on Tomcat. However when I deploy it to Weblogic, I got the following exception. It seems that the Quartz plugin cannot be found, although I have checked that the class file exist at WEB-INF/classes. Below are the stacktrace:
<Notice> <Stdout> <000000> <2011-11-23 11:19:34,010 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [QuartzGrailsPlugin]!
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:376)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:82)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1616)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2761)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:889)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:815)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1222)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:433)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [QuartzGrailsPlugin]!
... 37 more
Caused by: java.lang.NoClassDefFoundError: org.codehaus.groovy.grails.plugins.quartz.TaskArtefactHandler
at QuartzGrailsPlugin.class$(QuartzGrailsPlugin.groovy)
at QuartzGrailsPlugin.$get$$class$org$codehaus$groovy$grails$plugins$quartz$TaskArtefactHandler(QuartzGrailsPlugin.groovy)
at QuartzGrailsPlugin.
I saw the same problem when I run the application in WebSphere.
I tried it again in IDE with the WebSphere's JDK, then I found the error of this:
Base Directory: C:\Dev\GitRepository\git\tm\TM | Loading Grails 2.0.0 | Configuring classpath. | Environment set to development..... | Packaging Grails application..... | Compiling 1 source files [groovyc] Compiling 1 source file to C:\Dev\GitRepository\git\tm\TM\target\classes | Compiling 1 source files..... | Error Error loading plugin manager: Could not create a new instance of class [QuartzGrailsPlugin]! org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [QuartzGrailsPlugin]! at org.codehaus.groovy.grails.commons.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:120) at org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.initialisePlugin(DefaultGrailsPlugin.java:140) ... ... ... at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262) Caused by: java.lang.ClassFormatError: JVMCFRE009 field of the interface must be public static and final; class=org/codehaus/groovy/grails/plugins/quartz/GrailsTaskClassProperty, offset=1614 at java.lang.ClassLoader.defineClassImpl(Native Method)
I have a look of the GrailsTaskClassProperty, it seemed that it's correct.
Any other suggestion about this problem? Thanks!
Any suggestions.I have the same problem with websphere