4 Replies Latest reply on Apr 23, 2014 8:11 PM by Daniel Fb

    JBoss AS 7.1 problem with java.lang.reflect.MalformedParameterizedTypeException

    srleberic Newbie

      Hi All,

       

      we are trying to migrate our JSF1.2/Richfaces 3.3.3 application from JBoss AS 6 to JBoss AS 7, using CDI and its WELD implementation that comes with AS 7.1.

       

      But when try to deploy application to the server, getting following exception :

       

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."yyyyy.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."yyyyy.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:1110) [rt.jar:1.7.0_04]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

      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.ClassTransformer.loadClass(ClassTransformer.java:149)

                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)

                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)

                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)

                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)

                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_04]

                at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:53) [rt.jar:1.7.0_04]

                at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:95) [rt.jar:1.7.0_04]

                at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105) [rt.jar:1.7.0_04]

                at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140) [rt.jar:1.7.0_04]

                at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) [rt.jar:1.7.0_04]

                at sun.reflect.generics.repository.FieldRepository.getGenericType(FieldRepository.java:85) [rt.jar:1.7.0_04]

                at java.lang.reflect.Field.getGenericType(Field.java:236) [rt.jar:1.7.0_04]

                at org.jboss.weld.introspector.jlr.WeldFieldImpl.of(WeldFieldImpl.java:52)

                at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:154)

                at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)

                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49)

                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40)

                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)

                ... 12 more

       

       

      This was solved in previous versions of JBoss AS in deployer configuration file scanning-deployers-jboss-beans.xml :

          

      <bean name="ResourceErrorHandler" class="org.jboss.scanning.plugins.visitor.IgnoreSetErrorHandler">

                     <install method="addIgnored">

                                    <parameter>java.lang.reflect.MalformedParameterizedTypeException</parameter>

                     </install>

      </bean>

       

       

      Since JBoss AS 7 is organized differently and this configuration is not available anymore, is there a way to define similar Ignore rule?

       

      Could someone help me with how can I resolve and proceed further?

       

      Thanks in advance.