Infinite loop when deploying a war on tomcat 7 - java

I try to deploy a war into Tomcat 7.0.29. I'm having the following log stack :
GRAVE: Error waiting for multi-thread deployment of context descriptors to complete
java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:574)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1413)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:346)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.StackOverflowError
at java.util.HashSet.<init>(HashSet.java:86)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2208)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
(Many stack frames ommited...)
Does anybody face the same problem ?

This is reported upstream as issue #53871 in Tomcat. The problem appears to be with annotation scanning, and Tomcat 7.0.38 includes a clearer error message.
From the bug report:
Due to dependency management problems I deployed a WAR file containing two JAR files containing different versions of a library, where version 1 contained a class A which inherited from B and another version 2 which contained a class B inheriting from A.
The classes were loaded in such an order that A and B cyclically inherited from each other which leads to a stack overflow in populateSCIsForCacheEntry because it does not detect cycles in the inheritance tree.
This was exactly the problem in my case: an old version of dom4j bundled an incompatible version of jaxen. The new error diagnostic in 7.0.38 showed exactly which classes formed a loop and I fixed it by upgrading those dependencies.

I'm also encountering this issue in Tomcat 7.0.29 and Tomcat 7.0.30. However with Tomcat 7.0.28 everything works fine, so I suspect it's Tomcat issue, that was recently introduced.
The error encountered in 7.0.29 and 7.0.30, when starting Tomcat and deploying a war file:
14:01:06,380 ERROR [HostConfig:576] Error waiting for multi-thread deployment of context descriptors to complete java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:574)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1413)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:346)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.StackOverflowError
at java.util.HashSet.<init>(HashSet.java:103)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2243)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2260)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2260)

For me this behavior reproduced in IntelliJ Idea when I set the Application Context to the same name as the the Maven atrifactId in the .pom file.
E.g. my artifactId is 'test', then I set the Application Context (Edit configuration -> Tomcat Server -> Deployment, select the exploded artifact) to '/test'. As soon as I changed the Application Context, everything worked.

I had the same problem. I think it was caused by Tomcat 7, so when I changed to Tomcat 6.0.35, the problem resolved itself like a charm.

Use a lower version of Tomcat. There are problems with the version of Tomcat you are using.

A workaround : I changed the name of the WAR (no finalName in pom.xml and changed the artifact version) and it worked .... why? I don't know till now!
A real and a genuine solution? Definitely a new Tomcat Release . . .

Related

Exception when deploying on glassfish: ArrayIndexOutOfBoundsException: 9578

when I deploy my war file on tomcat it is ok but when I deploy it on glassfish it gives the exception, I searched but found no result how to solve this.
java.lang.ArrayIndexOutOfBoundsException: 9578
at org.objectweb.asm.ClassReader.readClass(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:171)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:133)
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348)
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
...............
[#|2018-10-07T15:19:22.345+0330|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=84;_ThreadName=Thread-2;|Exception while loading the app|#]
[#|2018-10-07T15:19:25.182+0330|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=84;_ThreadName=Thread-2;|Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestController' defined in file [E:\glassfish3-Reservation\glassfish3\glassfish\domains\domain1\applications\myproject\WEB-INF\classes\com\company\controller\TestController.class]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
Your best option is to update your Glassfish server if you can. Your version 3.1.2 is way too old, the current one is 5.0.
Another option would be to look for Lambda expressions in the TestController class and to remove or replace them with standard code.
This exception seems to occur when you are using Lambda expressions or newer Java bytecode with a version of asm.jar which is too old. This is related to your old version of Glassfish which comes bundled with Jersey 1.x which has bundled asm.jar 3.1. This version seems to be not fully compatible with Java8 or newer bytecode.
More related information:
Strange java.lang.ArrayIndexOutOfBoundsException thrown on jetty startup
Java 8 Lambda Expression Within REST Service not working
ArrayIndexOutOfBoundsException when using Java 8 language features

Liferay java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet

I have an error which is already getting me crazy.
It's a Liferay 6.1 with Tomcat and we are talking about the preproduction environment. A portlet is deployed but it fails in the deployment phase. This is the error:
After this error, I see a message saying the portlet has been undeployed.
We have tried to deploy another .war which was working before but the error continues. This error only appears in the preproducction environtmet because in integration and production environtmets it is correctly working.
I have tried the next stepts:
- Stop server
- Delete temp folder
- Delete work
- Delete the portlet from webbapp
- Start server
- Check file permissions
- Check dependencies/libs with other struts portlet which is correctly working.
And nothing, as soon as the portlet is deployed (with a version that previously worked), the same error appears.
The portlet makes use of struts and I have also tried putting the library inside the portlet. But it is still the same.
Any idea?
This is the error:
17:37:58,240 INFO [localhost-startStop-2][HotDeployImpl:178] Deploying qui-es-qui-portlet from queue
17:37:58,241 INFO [localhost-startStop-2][PluginPackageUtil:1033] Reading plugin package for qui-es-qui-portlet
17:37:58,451 WARN [localhost-startStop-2][PortletLocalServiceImpl:1145] Duplicate struts path qui-es-qui
17:37:58,453 ERROR [localhost-startStop-2][PortletBagFactory:123] java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:120)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:546)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:321)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

Is the method of compiling a java file in eclipse and add it to an unzipped jar and renaming the jar back correct?

I have a jar called framework.jar. I'm renaming it to framework.zip, decompiling one of its class files, modifing it, and putting it back in to the zip and renaming it back to framework.jar.
While I do this without making any modifications to any of the .class files, my tomcat runs fine. However, with my modifications, I get a Lifecycle exception.
Note that I took the corresponding latest compiled .class file from eclipse and replaced the same .class file file.
update:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngin
e[Catalina].StandardHost[localhost].StandardContext[/enovia]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1120)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
.java:1678)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.O
penEJBException: Unable to create annotation scanner for web module enovia: null
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatW
ebAppBuilder.java:2049)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWeb
AppBuilder.java:1091)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWe
bAppBuilder.java:1051)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(Global
ListenerSupport.java:127)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scan
ner for web module enovia: null
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoa
der.java:838)
at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java
:219)
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatW
ebAppBuilder.java:2047)
... 17 more
Caused by: java.lang.IllegalArgumentException
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinde
r.java:1120)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java
:139)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java
:152)
at org.apache.xbean.finder.AsynchronousInheritanceAnnotationFinder.<init
>(AsynchronousInheritanceAnnotationFinder.java:43)
at org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:
114)
at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:68)
at org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.ja
va:57)
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoa
der.java:830)
... 19 more
May 13, 2015 9:14:52 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory D:\16x_tomcat\apache-tomee-plu
s-1.6.0\webapps\enovia
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catal
ina.LifecycleException: Failed to start component [StandardEngine[Catalina].Stan
dardHost[localhost].StandardContext[/enovia]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1120)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
.java:1678)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
update 2:
As greg-449's comment pointed out, the issue was because I was using a java 8 compiler. And that jar was built on a java 7 compiler.
Tomcat: LifecycleException when deploying
Based on the post referenced above you might be missing some start up, note that there should be a log file for a more detailed error report.
Also the legally behind editing pre-compiled jar files...
In almost all cases it is illegal to redistribute work. So therefore if you redistributed in most cases it would not be legal but you really need to check the copyright.
One way to get around it... shhh I didn't tell you this, is to make the user download the jar legally and have them modify it. Normally this is done by giving them a program to do so. And almost all the time the program involves Byte code, so you should use ASM or BCEL. This will shift the legal implications from you to the user. Therefore the user will be violating the terms of user agreement.
For example I used to be apart of the development team for a runescape bot, They used java so we had the user download the jar from the game as they needed anyway and before running it we would inject listeners in the jar. Using BCEL or Reflection

JBoss AS 7 throwing 'java.lang.reflect.MalformedParameterizedTypeException' during start

I'm using JBoss 7.1.3 (built from sources) with Ubuntu 13.10 64 bits and open-jdk 7. And all the application works fine. Works fine with other developers using Windows and other Linux too (with java 7 from Oracle and OpenJDK).
Now I'm trying to start the application in another machine (a virtual machine with Redhat 6 - 64 bits with open-jdk 7)
Using extacly same jboss from other machine (zip the jboss folder and unzip in the new machine) and the application do not start anymore.
I tryed with a clean JBoss 7.1.3, 7.2.0 and even WildFly 8.1.0.CR1 but the error persists.
I also compile the application sources on the new machine, but the error persists.
Follow the error:
20:49:12,388 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."vendas-1.0.1-SNAPSHOT.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."vendas-1.0.1-SNAPSHOT.war".WeldService: com.google.common.collect.ComputationException: java.lang.reflect.MalformedParameterizedTypeException
at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
Caused by: com.google.common.collect.ComputationException: java.lang.reflect.MalformedParameterizedTypeException
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397)
at org.jboss.weld.resources.SharedObjectCache.getTypeClosure(SharedObjectCache.java:82)
at org.jboss.weld.resources.SharedObjectFacade.getTypeClosure(SharedObjectFacade.java:65)
at org.jboss.weld.introspector.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:52)
at org.jboss.weld.introspector.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:31)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:34)
at org.jboss.weld.introspector.jlr.AbstractWeldAnnotated.getTypeClosure(AbstractWeldAnnotated.java:193)
at org.jboss.weld.bean.AbstractBean.initTypes(AbstractBean.java:187)
at org.jboss.weld.bean.ManagedBean.<init>(ManagedBean.java:280)
at org.jboss.weld.bean.ManagedBean.of(ManagedBean.java:253)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.createManagedBean(AbstractBeanDeployer.java:212)
at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:139)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:204)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:350)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
... 5 more
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:60) [rt.jar:1.7.0_55]
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:53) [rt.jar:1.7.0_55]
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:95) [rt.jar:1.7.0_55]
at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105) [rt.jar:1.7.0_55]
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140) [rt.jar:1.7.0_55]
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) [rt.jar:1.7.0_55]
at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:84) [rt.jar:1.7.0_55]
at java.lang.Class.getGenericSuperclass(Class.java:696) [rt.jar:1.7.0_55]
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverFromClass(HierarchyDiscovery.java:126)
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverTypes(HierarchyDiscovery.java:95)
at org.jboss.weld.util.reflection.HierarchyDiscovery.init(HierarchyDiscovery.java:74)
at org.jboss.weld.util.reflection.HierarchyDiscovery.getTypeClosure(HierarchyDiscovery.java:58)
at org.jboss.weld.resources.SharedObjectCache$4.apply(SharedObjectCache.java:58)
at org.jboss.weld.resources.SharedObjectCache$4.apply(SharedObjectCache.java:55)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
... 20 more
Is there any clue?
thanks
Have you tried changing your maven artifactId ?
That strangely solved my issue (while reinstalling jboss and restarting the PC didn't).
Had same issue with latest Payara 4.1 173 (I know, not JBoss/WildFly but it utilizes same WELD engine). I was able to fix this by doing the following:
re-install Payara's lib and modules directory (within glassfish directory)
make sure to keep mariadb*.sql in, else the JDBC resources won't work
purge ~/personal_domain/osgi-cache/
This is the place where JARs are being collected, maybe there is a similar place? If you downgrade e.g. javax.faces.jar from 2.3.2 (beta) to 2.2.14 (bundles with Payara) and you don't purge osgi-cache, you still have 2.3.2 and not 2.2.14 because it is being loaded from osgi-cache. Upgrading such JARs works fine, not downgrading.
Again, I know it is not WildFly/JBoss, but this did solve my issue.
I thought this might be worthing it because that same exception drove me crazy here. I also added a new logger org.jboss.weld with FINEST as log-level and saw that it successfully parsed the annotations and still the exception came. I also tried to remove public constructors from all converters and validators but no avail. Only until I did the mentioned above steps, I was able to recover Payara.

grails tomcat 7 invocation target exception

We have a Grails app running in tomcat 7, was working fine till last week.
We don't know what changed.
we are getting a error as
SEVERE: Error listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: grails.plugin.databasemigration.GrailsChangeLogParser
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:118)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.runtime.InvokerInvoca
We tried,
Cleaning the war building environment
Run dbm-update
Re-install tomcat
Increasing xms and xmx of tomcat
any thing did not help, still error is thrown
gails version is 2.1.0
OK, the problem was we had a server with 8GB RAM machine, till last week the war size was 58 to 59 mb. This week we released code with a new plugin google-visualization:0.6.2 (for charts) and war size became 60 mb. Our server was not capable of handling this size war.
We also verified it by placing the same war in another server with 32GB RAM and was working fine. Also if we remove google-visualization:0.6.2 (for charts) plugin and deployed in 8GB server it was working fine.

Categories