I am having some issues with a Maven profile setup to run HtmlUnit test cases. The
profile uses the Maven Cargo plugin to deploy the application and then subsequently run interface tests with HtmlUnit on the deployed application.
On my local machine I am able to run this Maven profile cleanly without fail every time, however on my continuous integration server which is running Hudson (ver. 1.386) this profile is hit or miss whether it is able to deploy or not. My Tomcat log shows this error:
SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.myfaces.webapp.AbstractMyFacesListener.(AbstractMyFacesListener.java:36)
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 java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079)
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.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
... 23 more
The problem is perplexing because it can happen or it could not happen without ANY changes on the code and the fact that the exact same code runs perfectly on my local machine. The problem/error is purely part of the deployment within the Cargo plugin, but there is no clear reason why it is occurring. Any thoughts, advice, or solutions would be a great deal of help for me.
Some more details:
Local machine(runs): Windows 7 64-bit, Maven 2.2.1, Tomcat 6.0.32
CIS Server(fails): Windows 2008 Server 64-bit, Maven 2.2.1, Tomcat 6.0.32, Hudson 1.386.
Maven command & goals: "mvn clover2:instrument clover2:clover site -P integration" (integration is the Maven profile)
Have you had a look at the last section of http://commons.apache.org/logging/troubleshooting.html ?
Related
I've read tons of materials but I can't figure out what's happening. I'm doing a simple web application with Eclipse Oxygen, GWT 2.8, MapDB3, when I try to launch the web app through Run as --> GWT development mode with Jetty I obtain the error above. I'm going mad.
Problem accessing /asteonlineing/greet. Reason:
HTTP 500 Server Error
Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at org.mapdb.DBMaker.fileDB(DBMaker.kt)
at com.google.asteonlineing.server.AoLServiceImpl.<init>(AoLServiceImpl.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [...a lot more]
I tried to add the kotlin's jar to my project's lib directory but the error slightly changes and it's alway http error 500 but about:
java.lang.NoClassDefFoundError: org/eclipse/collections/impl/list/mutable/primitive/LongArrayList
Finally I've figured out that MapDB 3.0.5 has a long list of dependencies.
I've installed all of them and that error disappeared but others are coming, but code related.
Finally I've figured out that MapDB 3.0.5 has a long list of dependencies, when I've installed all of them that error disappeared.
You can find them in
https://mvnrepository.com/artifact/org.mapdb/mapdb/3.0.5
Whenever I try to start the server in eclipse, the above message crops up. The following is the error message in the console
java.lang.NoClassDefFoundError: org/apache/tomcat/util/digester/Rule
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:269)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:465)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.digester.Rule
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
Looks like your Tomcat jars were corrupted.
Backup the Webapps folder inside Tomcat Folder.
Remove/Un-install Tomcat.
Re-install the Tomcat and Copy paste Webapps folder and restart server in Eclipse IDE.
If you don't want already deployed apps in Tomcat, re-install the tomcat.
In your project explorer in eclipse, look for Servers folder. Delete it and uninstall the Tomcat server as well. Install the Tomcat server again and configure your web app during the installation.
We are using Hudson to continuously build few projects, which executes sql files in database using a groovy script (Execute Groovy system script) as a post build action. The script (which uses enum) works fine most of the time, but throws following error on random basis:
FATAL: java/lang$Enum
java.lang.NoClassDefFoundError: java/lang$Enum
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:334)
at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:284)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2904)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:227)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:59)
...
...
All subsequent build fails with same error once we get this error. We fixed this once by defining JAVA_HOME environment variable (which got erased somehow). It worked for few days only to re-appear again. This time, we defined JAVA_HOME in Hudson configuration and it worked temporarily as the issue re-appeared after few days. We haven't set Groovy path in hudson configuration as we haven't installed groovy separately. Version details are:
Hudson = 3.3.3
Hudson Subversion Plug-in = 2.3.11
Hudson Groovy builder = 1.13-h-3
Groovy Support Plugin = 3.0.3
Windows = 2012
JRE = 1.8.0_111
What other options can we try to resolve the issue?
PS: We have tried Jenkins, but fall back to Hudson due to one issue/feature in Subversion plugin in Jenkins, which checkout the repository when workspace is locked, which we cannot afford.
I have Jenkins of 1.611 version, JDK 1.7 and remote WAS8.5 is running on JDK 1.6 version. When I am trying to deploy EAR or WAR file by the help of Github (i.e., I am pushing the project from eclipse Luna which has java 7 configuration), Iam facing the following error:
Connecting to IBM WebSphere Application Server...
The following artifacts will be deployed in this order...
-------------------------------------------
SpringWSEAR.ear
-------------------------------------------
Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException:
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:122)
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:98)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.getAppName(WebSphereDeployerPlugin.java:268)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.createArtifact(WebSphereDeployerPlugin.java:226)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:168)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:764)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:724)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1769)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Caused by: com.ibm.websphere.management.application.client.AppDeploymentException: [Root exception is java.lang.IncompatibleClassChangeError: Implementing class]
at com.ibm.websphere.management.application.AppManagementFactory.handleException(AppManagementFactory.java:672)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:141)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:91)
at com.ibm.websphere.management.application.client.AppDeploymentController.readArchive(AppDeploymentController.java:254)
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:108)
... 13 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getWARFileAnnotationsDetector(WARFileImpl.java:2908)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.containsEJBContent(WARFileImpl.java:1975)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1372)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1331)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:512)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:477)
at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:563)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:129)
... 16 more
Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE
Finished: FAILURE
Is there any version differences between eclipse or jenkins or WAS???
Any Help would be appreciated...
This is a known issue with the WebSphere Deployer Plugin, of which you appear to have filed a duplicate on the Jenkins issue tracker.
The latest comments on that issue indicate that a fix has been made, but this has not yet been released.
Its got resolved.. I have been using WAS8.5 jars which were running on JDK 1.7. I have replaced those by JDK 1.6 jars. And deployed successfully. Thank you..
I have an entreprise application with an EJB and WAR project that have to use a library project (Model).
I've imported the library project in the library folder of both projects.
It seems to work until now, I do not know why but when I start the project I get a ClassNotFound Exception in Server Logs.
I'm using GlassFish Server and JSF Framework (Java Server Faces).
So this is the error I got in the server log :
Caused by: java.lang.TypeNotPresentException: Type model.GameModel not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:68)
at java.lang.reflect.Method.getGenericReturnType(Method.java:241)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.<init>(BackedAnnotatedMethod.java:38)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.of(BackedAnnotatedMethod.java:32)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:193)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:186)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:154)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:66)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:47)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
... 49 more
Caused by: java.lang.ClassNotFoundException: model.GameModel
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:833)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:344)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
... 78 more
I already have tried to remove/re-import the library
To check all the imports.
To clean & build, run, deploy, restart the server, remove the server
and add it again, etc.
To start NetBeans as administrator.
But I've no idea what's going wrong here, if someone could give me clue I'll appreciate.
Edit : I tried to add a package "model" inside both projects instead of calling my library, it's working but that's not how I want to implement my model.
(Sorry for my english, I'm not a native speaker)