[英]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. 我正在使用带有Ubuntu 13.10 64位和open-jdk 7的JBoss 7.1.3(从源代码构建)。所有应用程序都可以正常工作。 Works fine with other developers using Windows and other Linux too (with java 7 from Oracle and OpenJDK).
与使用Windows和其他Linux的其他开发人员(使用Oracle和OpenJDK的Java 7)也可以很好地配合。
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. 现在,我正在尝试在另一台机器(带有Redhat 6-64位,带有open-jdk 7的虚拟机)中启动该应用程序,并使用另一台机器上的完全相同的jboss(将jboss文件夹压缩并在新机器上解压缩)和该应用程序不要再开始了。
I tryed with a clean JBoss 7.1.3, 7.2.0 and even WildFly 8.1.0.CR1 but the error persists. 我尝试使用干净的JBoss 7.1.3、7.2.0甚至WildFly 8.1.0.CR1,但错误仍然存在。
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 ? 您是否尝试过更改MavenartifactId? That strangely solved my issue (while reinstalling jboss and restarting the PC didn't).
那奇怪地解决了我的问题(重新安装jboss并重新启动PC却没有)。
Had same issue with latest Payara 4.1 173 (I know, not JBoss/WildFly but it utilizes same WELD engine). 最新的Payara 4.1 173也有同样的问题(我知道,不是JBoss / WildFly,但它使用相同的WELD引擎)。 I was able to fix this by doing the following:
我可以通过执行以下操作解决此问题:
lib
and modules
directory (within glassfish
directory) lib
和modules
目录(在glassfish
目录中) mariadb*.sql
in, else the JDBC resources won't work mariadb*.sql
,否则JDBC资源将无法使用 ~/personal_domain/osgi-cache/
~/personal_domain/osgi-cache/
This is the place where JARs are being collected, maybe there is a similar place? 这是收集JAR的地方,也许有类似的地方? If you downgrade eg 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
. 如果您将javax.faces.jar从2.3.2(测试版)降级到2.2.14(与Payara捆绑在一起)并且没有清除
osgi-cache
,那么您仍然拥有2.3.2而不是2.2.14,因为它正在从osgi-cache
加载。 Upgrading such JARs works fine, not downgrading. 升级这样的JAR可以正常工作,而不是降级。
Again, I know it is not WildFly/JBoss, but this did solve my issue. 同样,我知道它不是WildFly / JBoss,但这确实解决了我的问题。
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. 我还添加了一个以
FINEST
作为日志级别的新记录器org.jboss.weld
,并看到它成功解析了注释,但仍然出现异常。 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.
直到执行了上述步骤,我才能够恢复Payara。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.