How can I solve Error during testing Angular Js in netbeans? - unit-testing

After following this example
https://netbeans.org/kb/docs/webclient/html5-js-support.html
I always get that error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/jstestdriver/hooks/TestListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getMethod0(Class.java:2694)
at java.lang.Class.getMethod(Class.java:1622)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.google.jstestdriver.hooks.TestListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
I want to know why is that happening and how to solve that problem
Thanks for your help.

You need to add the JsTestDriver jar to your lib folder, as listed in the resources table.
The file is available here: https://code.google.com/p/js-test-driver/downloads/list

Related

Getting java.lang.ClassNotFoundException: org.eclipse.jetty.servlet.listener.IntrospectorCleaner

I'm using Jetty as an embedded web server within OSGi and spring-dm environment. All my bundles and war files are deployed successfully. However I'm observing the following warning in my logs:
2015-03-25 17:32:13.748:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.IntrospectorCleaner
java.lang.ClassNotFoundException: org.eclipse.jetty.servlet.listener.IntrospectorCleaner
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1517)
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1863)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.springframework.osgi.web.deployer.jetty.JettyWarDeployer.startWebAppContext(JettyWarDeployer.java:218)
at org.springframework.osgi.web.deployer.jetty.JettyWarDeployer.startDeployment(JettyWarDeployer.java:123)
at org.springframework.osgi.web.deployer.support.AbstractWarDeployer.deploy(AbstractWarDeployer.java:93)
at org.springframework.osgi.web.extender.internal.activator.WarLoaderListener$DeploymentManager$DeployTask.doRun(WarLoaderListener.java:261)
at org.springframework.osgi.web.extender.internal.activator.WarLoaderListener$DeploymentManager$BaseTask.run(WarLoaderListener.java:219)
at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Though this warning is not impacting any functionality, i'm still curious to know why this error is happening. With little debugging I can see that the package "org.eclipse.jetty.servlet.listener" is not imported by any of the modules. I explicitly added this import to jetty-webapp and spring-osgi-web bundles, but that didn't help either.
Upgrade your version of Jetty, you have a very old version with a faulty manifest.
This was fixed well over a year ago.
$ cd jetty-distribution-9.2.10.v20150310
$ jar -xvf lib/jetty-servlet-9.2.10.v20150310.jar META-INF/MANIFEST.MF
inflated: META-INF/MANIFEST.MF
$ grep -A3 Export-Package META-INF/MANIFEST.MF
Export-Package: org.eclipse.jetty.servlet;version="9.2.10",org.eclipse
.jetty.servlet.jmx;version="9.2.10",org.eclipse.jetty.servlet.listene
r;version="9.2.10"
Bundle-Classpath: .

Utilize Axis2 Client code

I am using WSO2 Dev Studio 3.5, I have used Generate Axis2 Web Service Client feature to generate new Axis2 Client. The Dev Studio created new Project and generated Stub for me, but I don't know how to utilize this Stub. I created new class in the same package with generated stub and tried 2 way below, but it all introduced error:
AdderStub stub = new AdderStub()
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/wsdl/WSDLException
at axis2.adder.AdderStub.populateAxisService(AdderStub.java:41)
at axis2.adder.AdderStub.<init>(AdderStub.java:88)
at axis2.adder.AdderStub.<init>(AdderStub.java:77)
at axis2.adder.AdderStub.<init>(AdderStub.java:126)
at axis2.adder.AdderStub.<init>(AdderStub.java:118)
at axis2.adder.TestAdder.main(TestAdder.java:19)
Caused by: java.lang.ClassNotFoundException: javax.wsdl.WSDLException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
AdderStub stub = new AdderStub(null, "http://localhost:9763/services/Adder");
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList
at axis2.adder.AdderStub.populateAxisService(AdderStub.java:41)
at axis2.adder.AdderStub.<init>(AdderStub.java:88)
at axis2.adder.AdderStub.<init>(AdderStub.java:77)
at axis2.adder.TestAdder.main(TestAdder.java:19)
Caused by: java.lang.ClassNotFoundException: org.apache.ws.commons.schema.utils.NamespacePrefixList
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
Could you please help me to utilized Axis2 Client code generated by WSO2 Dev Studio? thanks.
Regards,
Trong
This looks like an issue with Java classpath of this project. Typically, the needed dependency jar list can be found in pom.xml or in case of Ant, in build.xml. You need to include these when running your main class.
For ex. the first error is because the wsdl4j jar was missing in the classpath.

How to resolve a Camel-CXF Web Service client ClassNotFoundException

I'm having a painful time resolving a Camel-CXF ClassNotFoundException. I've included a sample program exhibiting the problem
You can find the source code at:
git#bitbucket.org:levonk/camel-cxf-example.git
To run the program after checking out the project run:
mvn test exec:java
Here is the exception stack trace:
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[cxf://http://www.webservicex.net/globalw... because of Failed to resolve endpoint: cxf://http://www.webservicex.net/globalweather.asmx/GetWeather?publishedEndpointUrl=http%3A%2F%2Fwww.webservicex.net%2Fglobalweather.asmx&serviceClass=net.webservicex.GlobalWeather.class due to: net.webservicex.GlobalWeather.class
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:181)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:750)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1829)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1609)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1478)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1446)
at org.apache.camel.main.Main.doStart(Main.java:109)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
at org.apache.camel.main.MainSupport.run(MainSupport.java:343)
at com.levonk.app.example.camel.MainApp.main(MainApp.java:17)
... 6 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://http://www.webservicex.net/globalweather.asmx/GetWeather?publishedEndpointUrl=http%3A%2F%2Fwww.webservicex.net%2Fglobalweather.asmx&serviceClass=net.webservicex.GlobalWeather.class due to: net.webservicex.GlobalWeather.class
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:508)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:62)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:191)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:861)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
... 17 more
Caused by: java.lang.ClassNotFoundException: net.webservicex.GlobalWeather.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:287)
at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:261)
at org.apache.camel.component.cxf.CxfEndpoint.setServiceClass(CxfEndpoint.java:653)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:492)
at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:546)
at org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:434)
at org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:249)
at org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:258)
at org.apache.camel.component.cxf.CxfComponent.createEndpoint(CxfComponent.java:84)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:119)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:488)
... 25 more
This is an issue with the maven Exec Maven plugin not picking up the classes generated from your WSDL at runtime.
The correct way to do structure this sort of thing in Maven is to separate your WSDL -> Java generation out into a seperate project, and add a dependency on that project in your cxf-client. This way, the generated code is just a dependency like any other. See https://github.com/FuseByExample/smx-ws-examples for an example of how to do this.

Eclipse Axis2 Service Archiver Plugin Problem

My Eclipse Axis2 Service Archiver plugin is no longer working properly. I have used it to build several .aar files but now when i open the plugin I only get blank gray screens. I've tried deleting the org.apache.axis2.eclipse.codegen.plugin folder from my workspace plugins directory and even removing the org.apache.axis2.eclipse.service.plugin_1.6.0.jar and reinstalling but I still get the same blank screens. I'm using Eclipse Indigo now, I even went back to Eclipse Helios and the same problem occurred. Any suggestions?
This might help:
1) Shut down eclipse
2) Change into the workspace plugins folder (something like:
workspace/.metadata/.plugins/org.apache2.eclipse.service.plugin)
3) Delete the file there (called dialog-settings or something).
4) Then restart eclipse and try if it works.
Hope it works.
I find the solution occasionally. When you get a grey dialog, maximize it, and it will display correctly
Caused by: java.lang.ClassNotFoundException:
org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
Looks like you need axiom library in your cp.
I used to have the same problem, I solved it by going to Axis Runtime configuration under Eclipse Settings then remove the path to axis2 runtime. Apply and re-set the runtime path. Apply and try again to use your plugin.
I found the answer. I had extracted the jar for the plugin into the plugins folder in the eclipse installation directory. I moved them to the dropins folder in the eclipse installation directory and restarted eclipse. It is working properly now.
UPDATE: The problem is back. I found it is printing an exception in the workspace log:
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.axis2.tool.service.eclipse.ui.ServiceXMLGenerationPage.updateTable(ServiceXMLGenerationPage.java:241)
at org.apache.axis2.tool.service.eclipse.ui.ServiceXMLGenerationPage.createControl(ServiceXMLGenerationPage.java:160)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1183)
at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1242)
at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1226)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: org.apache.axiom.om.OMException: java.lang.ClassNotFoundException: org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:139)
at org.apache.axiom.om.OMAbstractFactory.getOMFactory(OMAbstractFactory.java:152)
at com.gvr.fms.devcomm.interfacelayer.DevcommWebService.<clinit>(DevcommWebService.java:32)
... 57 more
Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:133)
... 59 more

error in deploying war when code coverage (cobertura) plugin in grails is used

I have 2 different Grails applications using 2 different versions of the code coverage plugin. The first uses version 1.1.8 (old, I know) and when I build and deploy a war file, all is well.
However, the 2nd one is another matter. I installed the plugin as directed in the guide and the installed version is 1.2.2. When I generate the war, no error is thrown. However, when I deploy on Tomcat, I encounter an error. I checked the logs and this is what came out:
2011-04-13 23:23:11,927 [Thread-2] ERROR org.springframework.web.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 java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:70)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
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.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
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:445)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
2011-04-13 23:23:37,995 [http-8080-3] ERROR org.springframework.web.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 java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
... 1 more
2011-04-13 23:24:48,313 [http-8080-3] ERROR org.springframework.web.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 java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
... 1 more
Thing is, I've been googling but it seems like this is a one-off problem... Any thoughts??? For me to generate a war now, I have to UNinstall the plugin everytime... something you can't do when you move the app to automated builds! :(
Btw, I'm using:
Tomcat 6
Java 1.6
Grails 1.3.6
Any help will be appreciated!
Thanks!
Lee
Take a look at this question You shouldn't normally need to use the code coverage plugin in a war file so just exclude it.