9 Replies Latest reply: Mar 30, 2012 3:04 AM by H Dam RSS

update Weld 1.1.6 for JBoss AS 7.0.2

H Dam Newbie

Hi,

 

Now I using JBoss AS 7.0.2, this JBoss including weld-1.1.2. I need to update weld up to version 1.1.6 for this JBoss 7.0.2. I replaced weld-1.1.2 by my weld-1.1.6 in Jboss modules dir, but jboss not working. How do I do?

 

I refered this link https://community.jboss.org/thread/161864, but I consider my jboss haven't pom.xml to update by mvn, is it right?

 

Thanks.

  • 1. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Tomaz Cerar Master

    Hi,

     

    i would recomend you to upgrade to 7.1.2-SNAPSHOT (current nightly builds of as7) as there is 1.1.6 already included.

    but if that is not an option, you can replace it manualy but it requires bit of work.

     

    you need to replace weld jars inside:

     

    %jboss_home%\modules\org\jboss\weld\core\main

    %jboss_home%\modules\org\jboss\weld\spi\main

    %jboss_home%\modules\org\jboss\weld\api\main

    and fix reference to new versions inside module.xml in this folders.

     

    Other option is to take weld sources and set the jboss_home variable to point to your jboss.

    then run mvn clean install -Pupdate-jboss-as

     

    hope this helps, but keep in mind that there is also part of code that takes care of integration with as7 (weld subsystem) that should also be upgraded(module org.jboss.as.weld) but this i am not sure will work if you just take jar from recent builds as 7.0.2 is quite old and there have been changes in internal api of as7...

     

     

    --

    tomaz

  • 2. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Ales Justin Master

    %jboss_home%\modules\org\jboss\weld\core\main

    %jboss_home%\modules\org\jboss\weld\spi\main

    %jboss_home%\modules\org\jboss\weld\api\main

    and fix reference to new versions inside module.xml in this folders.

    You can change just the top module, the spi and api haven't changed.

  • 3. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    H Dam Newbie

    Hi,

     

    I replaced weld jars inside:

     

    %jboss_home%\modules\org\jboss\weld\core\main

    %jboss_home%\modules\org\jboss\weld\spi\main

    %jboss_home%\modules\org\jboss\weld\api\main

    and fix reference to new versions inside module.xml in this folders.

    But when I start jboss, I have following error:

     

    10:54:04,791 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."test.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".WeldService: org.jboss.weld.exceptions.DefinitionException: WELD-001450 Interceptor method public java.lang.Object org.jboss.solder.exception.control.ExceptionHandledInterceptor.passExceptionsToSolderCatch(javax.interceptor.InvocationContext) throws java.lang.Throwable does not declare that it throws Exception.

              at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

    Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001450 Interceptor method public java.lang.Object org.jboss.solder.exception.control.ExceptionHandledInterceptor.passExceptionsToSolderCatch(javax.interceptor.InvocationContext) throws java.lang.Throwable does not declare that it throws Exception.

              at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.isValidBusinessMethodInterceptorMethod(InterceptorMetadataUtils.java:98)

              at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.isInterceptorMethod(InterceptorMetadataUtils.java:53)

              at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.buildMethodMap(InterceptorMetadataUtils.java:130)

              at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.readMetadataForInterceptorClass(InterceptorMetadataUtils.java:38)

              at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader$1.apply(DefaultMetadataCachingReader.java:30)

              at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader$1.apply(DefaultMetadataCachingReader.java:28)

              at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)

              at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)

              at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)

              at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader.getInterceptorMetadata(DefaultMetadataCachingReader.java:54)

              at org.jboss.weld.bean.InterceptorImpl.<init>(InterceptorImpl.java:64)

              at org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:59)

              at org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:228)

              at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:137)

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

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

              at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)

              at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)

              ... 5 more

     

  • 4. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Michael Wittig Newbie

    same problem for me. Trying to upgrade weld in Jboss 7.1.1.FInal because of https://community.jboss.org/message/725632#725632

  • 5. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Dmitri Voronov Novice

    Hi all,

     

    I'm using Weld SE and now changed to Weld SE 1.1.6 and am facing the same issue.

     

    org.jboss.weld.exceptions.DefinitionException: WELD-001450 Interceptor method public java.lang.Object org.jboss.solder.exception.control.ExceptionHandledInterceptor.passExceptionsToSolderCatch(javax.interceptor.InvocationContext) throws java.lang.Throwable does not declare that it throws Exception.
         at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.isValidBusinessMethodInterceptorMethod(InterceptorMetadataUtils.java:98)
         at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.isInterceptorMethod(InterceptorMetadataUtils.java:53)
         at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.buildMethodMap(InterceptorMetadataUtils.java:130)
         at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.readMetadataForInterceptorClass(InterceptorMetadataUtils.java:38)
         at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader$1.apply(DefaultMetadataCachingReader.java:30)
         at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader$1.apply(DefaultMetadataCachingReader.java:28)
         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)
         at org.jboss.weld.interceptor.reader.cache.DefaultMetadataCachingReader.getInterceptorMetadata(DefaultMetadataCachingReader.java:54)
         at org.jboss.weld.bean.InterceptorImpl.(InterceptorImpl.java:64)
         at org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:59)
         at org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:228)
         at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:137)
         at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:204)
         at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349)
         at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70)
         at org.jboss.weld.environment.se.Weld.initialize(Weld.java:133)
    

    I'm not sure if it is really a specification breach if an interceptor throwing a Throwable instead of Exception.

  • 6. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Tomaz Cerar Master

    Dimitri, H Dam

    there is bug in solder, that is already fixed in upstream,

    can you try to build https://github.com/seam/solder it yourself and try again with new version?

     

     

    --

    tomaz

  • 7. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Geoffrey De Smet Newbie

    Also seeing this. Is there a jira to watch, so we get notified when a compatible solder release is made?

  • 8. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    Shane Bryzak Master

    I've just released Solder 3.1.1.Final to the JBoss Maven repo, try updating your version to this and let me know if there's any problems.

  • 9. Re: update Weld 1.1.6 for JBoss AS 7.0.2
    H Dam Newbie

    I updated Solder 3.1.1.Final and replace the weld jar to 1.1.6.Final and everything is OK. Thanks.