I do have two application (say App1 & App2) on a tomcat server. Both are having ESAPI-2.0-rc5.jar in the C:\Tomcat7_0_29\webapps\AppX\WEB-INF\lib folder. The App2 is using opensaml-2.6.0.jar (inside the C:\Tomcat7_0_29\webapps\App2\WEB-INF\lib folder) for SAML needs.
Now each time when I try to encode a field data in App1, I am getting java.lang.ClassNotFoundException: org.opensaml.ESAPISecurityConfig error.
Tried many options and never get that working together. Please help
Full Stack Trace:
org.owasp.esapi.errors.ConfigurationException: java.lang.ClassNotFoundException: org.opensaml.ESAPISecurityConfig SecurityConfiguration class (org.opensaml.ESAPISecurityConfig) must be in class path.
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:113)
at org.owasp.esapi.ESAPI.securityConfiguration(ESAPI.java:445)
at org.owasp.esapi.ESAPI.encoder(ESAPI.java:208)
at xxx.xxx.xxxx.xx.removeBadChars(BaseObject.java:131)
at xxx.xxx.xxxx.xx.convert(ClaimsUtil.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.opensaml.ESAPISecurityConfig
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:85)
... 24 more
Check to ensure that opensaml's library is on the class path. If this simple solution isn't the case...
Have a look at the maven repo for the most recent release of opensaml:
http://mvnrepository.com/artifact/org.opensaml/opensaml/2.6.1
It looks like that the opensaml library has a dependency on esapi 2.0.1, and what could be happening is that ESAPI-2.0-rc5.jar gets loaded before opensaml's dependency. The only guidance that's really possible for someone who can't clone your environment, is to try downloading the source for opensaml, and build it after updating its dependency management to point to your version of ESAPI.
Faced exactly same issue,
how i resolved this by copying opensaml-2.6.1.jar file into tomcat shared/common lib folder "/tomcat/lib/."
Related
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: .
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.
i had tried to develop a web service using eclipse indigo but there is error after generating wsdl file (java2ws) it display error on Test Service Explorere wizard which result previous generate wsdl file been erase. Thus, I'm manually copy the wsdl file to temp folder and copy back to the desire folder but following error is display when invoke from browser.
Error:
javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149)
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
javax.xml.ws.Service.<init>(Service.java:57)
javax.xml.ws.Service.create(Service.java:687)
com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
root cause
org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:94)
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
javax.xml.ws.Service.<init>(Service.java:57)
javax.xml.ws.Service.create(Service.java:687)
com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
root cause
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'localhost:8080/CreditCardService/CreditcardService?WSDL'.: java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL
com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
javax.xml.ws.Service.<init>(Service.java:57)
javax.xml.ws.Service.create(Service.java:687)
com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
root cause
java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:143)
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:802)
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
javax.xml.ws.Service.<init>(Service.java:57)
javax.xml.ws.Service.create(Service.java:687)
com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
This is the exception for the screen shot.
eclipse.buildId=M20120208-0800
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -vm C:\Program Files\Java\jdk1.6.0_26\jre\bin\client\jvm.dll -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -vm C:\Program Files\Java\jdk1.6.0_26\jre\bin\client\jvm.dll -product org.eclipse.epp.package.jee.product
Error
Wed Aug 22 19:29:09 SGT 2012
Unexpected exception (com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil)
java.lang.RuntimeException: Unable to access localhost:8080/CreditCardWebService/services/CreditCardServicePort?wsdl
at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.createFile(WImportUtil.java:402)
at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importUri(WImportUtil.java:346)
at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importSomethingRunnable(WImportUtil.java:218)
at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil$1.run(WImportUtil.java:136)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importSomething(WImportUtil.java:134)
at com.ibm.rational.ttt.ustc.api.GSC.importWSDL(GSC.java:108)
at com.ibm.rational.ttt.ustc.api.GSC.importWSDL(GSC.java:96)
at com.ibm.ast.ws.gsc.internal.GSCUtils.getWSDLFile(GSCUtils.java:156)
at com.ibm.ast.ws.gsc.internal.GSCDialog.loadWSDL(GSCDialog.java:69)
at com.ibm.ast.ws.gsc.internal.GSCDialog.createDialogArea(GSCDialog.java:59)
at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at com.ibm.ast.ws.gsc.internal.GSCLaunchCommand.launchExternally(GSCLaunchCommand.java:85)
at com.ibm.ast.ws.gsc.internal.GSCLaunchCommand.execute(GSCLaunchCommand.java:146)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.WSDLTestLaunchCommand.commandFactoryExecution(WSDLTestLaunchCommand.java:97)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.WSDLTestLaunchCommand.execute(WSDLTestLaunchCommand.java:72)
at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget.handleLaunchButton(ServiceTestWidget.java:105)
at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget.access$0(ServiceTestWidget.java:84)
at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget$1.widgetSelected(ServiceTestWidget.java:68)
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:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
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)
Is there a way to generate wsdl manually?
I tried typing the java2s but it say the command is not recognize
as internal program.
Please help.
Thanks.
Problem solve by remove the generation of RequestWrapper and deployment success.
Anyone stumbling here on 2022.
I was seeing similar issues with gradleTask using apache cxf plugin.
go through the command line options and add parameter -wsdlLocation with value of the path of wsdl in classpath.
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
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.