[JBoss JIRA] (JBSEAM-3468) Using TransactionManagementType.BEAN sometimes gives javax.persistence.TransactionRequiredException depending on the components on the xhtml page
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-3468?page=com.atlassian.jira.plugi... ]
SBS JIRA Integration updated JBSEAM-3468:
-----------------------------------------
Forum Reference: https://community.jboss.org/message/783547#783547
> Using TransactionManagementType.BEAN sometimes gives javax.persistence.TransactionRequiredException depending on the components on the xhtml page
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-3468
> URL: https://issues.jboss.org/browse/JBSEAM-3468
> Project: Seam 2
> Issue Type: Bug
> Components: EJB3
> Affects Versions: 2.0.2.SP1
> Environment: Windows XP, JBoss AS 4.2.2
> Reporter: Susanne Jarl
>
> I have a SLSB:
> @Name("statService")
> @Stateless
> @TransactionManagement(TransactionManagementType.BEAN)
> public class StatServiceBean implements StatServiceLocal {
> @In
> EntityManager entityManager;
>
> @Resource
> SessionContext ejbContext;
> public void generateStat() {
> Query query = entityManager.createNativeQuery(
> "INSERT INTO x"
> + "SELECT y, :currentDate, count(distinct(ip)) AS number "
> + "FROM z"
> + "WHERE datetime BETWEEN :currentDate AND :currentDatePlusOne "
> + "GROUP BY (x1) " + "ORDER BY number desc ").setParameter(
> "currentDate", calCurrent.getTime()).setParameter("currentDatePlusOne",
> calCurrentPlusOneDay.getTime());
>
> // Save to database. Create manual transaction since the built in only works for 5 minutes.
> UserTransaction transaction = ejbContext.getUserTransaction();
> try {
> transaction.begin();
> query.executeUpdate();
> transaction.commit();
> }
> catch (Exception e) {
> try {
> log.error("Transaction failed when updating stat. Try rolling back.", e);
> transaction.rollback();
> }
> catch (Exception exp) {
> log.error("Transaction failed roling back.", exp);
> }
> }
> }
> I have a xhtml page with components calling the generateStat method and depending of what components are on it this code works or it gives me a TransactionRequiredException.
> This does not work:
> <s:link action="#{statService.generateStat}" value="Update stat" />
> This does not work "alone":
> <h:form><h:commandButton action="#{statService.generateStat}" value="Uppdatera sidvisningsstatistik" /></h:form>
> but if you add for example:
> <f:subview id="subcriberView" rendered="#{userAdmin.subscriber != null}">
> </f:subview>
> so you have both the form with the button and this subview component that calls userAdmin which is a stateful session bean and "subscriber" is just a property, then it works! The sql insert statement is run and the database gets updated and I don't get any exceptions.
> So I guess this must be a bug!
> It seems like you need a call to some SFSB in the same request in order to get the manual userTransaction begin and commit to work. But in the case with <s:link> then it does not help to add the f:subview code so I don't know...
> In my components.xml I have this code:
> <transaction:ejb-transaction />
>
> but if I remove it, there is no difference.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (SOLDER-337) Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
by Marek Schmidt (JIRA)
[ https://issues.jboss.org/browse/SOLDER-337?page=com.atlassian.jira.plugin... ]
Marek Schmidt commented on SOLDER-337:
--------------------------------------
This is a duplicate of SOLDER-336, there is an open pull request with the fix https://github.com/seam/solder/pull/79
> Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
> --------------------------------------------------------
>
> Key: SOLDER-337
> URL: https://issues.jboss.org/browse/SOLDER-337
> Project: Solder
> Issue Type: Bug
> Reporter: Juergen Zimmermann
> Attachments: testcase.zip
>
>
> The attached testcase results in a NPE in a JBoss Solder class when it is deployed to 7.1.3.Final and also to 7.2.0.alpha1-SNAPSHOT. It works fine with 7.1.2.Final.
> Just do a "mvn package jboss-as:deploy" to invoke the testcase. The testcase is preconfigured for 7.1.3. To switch to 7.1.2 or 7.2.0.alpha1 the related property is in the beginning of pom.xml
> I'm not sure whether the issue is related to Weld (1.1.8 inside JBoss 7.1.2, 1.1.9 inside JBoss 7.1.3, 1.1.10 inside JBoss 7.2) or whether the issue is related to Solder. Anyway, this issue prevents an upgrade from JBoss 7.1.2.
> The stacktrace in the JBoss console:
> ...
> INFO [org.jboss.solder.config.xml.bootstrap.XmlConfigExtension] Wrapping InjectionTarget to set field values: test.ArticleController
> ERROR [org.jboss.msc.service.fail] 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: Exception List with 1 exceptions:
> Exception 0 :
> org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
> Exception 0 :
> java.lang.NullPointerException
> at org.jboss.solder.bean.generic.GenericBeanExtension.registerGenericBeanObserverMethod(GenericBeanExtension.java:378)
> at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:75)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:60)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:40)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (SOLDER-337) Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
by Marek Schmidt (JIRA)
[ https://issues.jboss.org/browse/SOLDER-337?page=com.atlassian.jira.plugin... ]
Marek Schmidt resolved SOLDER-337.
----------------------------------
Resolution: Duplicate Issue
> Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
> --------------------------------------------------------
>
> Key: SOLDER-337
> URL: https://issues.jboss.org/browse/SOLDER-337
> Project: Solder
> Issue Type: Bug
> Reporter: Juergen Zimmermann
> Attachments: testcase.zip
>
>
> The attached testcase results in a NPE in a JBoss Solder class when it is deployed to 7.1.3.Final and also to 7.2.0.alpha1-SNAPSHOT. It works fine with 7.1.2.Final.
> Just do a "mvn package jboss-as:deploy" to invoke the testcase. The testcase is preconfigured for 7.1.3. To switch to 7.1.2 or 7.2.0.alpha1 the related property is in the beginning of pom.xml
> I'm not sure whether the issue is related to Weld (1.1.8 inside JBoss 7.1.2, 1.1.9 inside JBoss 7.1.3, 1.1.10 inside JBoss 7.2) or whether the issue is related to Solder. Anyway, this issue prevents an upgrade from JBoss 7.1.2.
> The stacktrace in the JBoss console:
> ...
> INFO [org.jboss.solder.config.xml.bootstrap.XmlConfigExtension] Wrapping InjectionTarget to set field values: test.ArticleController
> ERROR [org.jboss.msc.service.fail] 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: Exception List with 1 exceptions:
> Exception 0 :
> org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
> Exception 0 :
> java.lang.NullPointerException
> at org.jboss.solder.bean.generic.GenericBeanExtension.registerGenericBeanObserverMethod(GenericBeanExtension.java:378)
> at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:75)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:60)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:40)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (SOLDER-337) Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/SOLDER-337?page=com.atlassian.jira.plugin... ]
Stuart Douglas updated SOLDER-337:
----------------------------------
Assignee: (was: Stuart Douglas)
This is actually a solder bug, in ProcessObserverMethod solder does not take into account the possibility that the methods annotated type might be null.
The righfaces push extension registers an observer method programatically, which causes this condition.
> Solder doesn't work with 7.1.3 and 7.2.0.alpha1-SNAPSHOT
> --------------------------------------------------------
>
> Key: SOLDER-337
> URL: https://issues.jboss.org/browse/SOLDER-337
> Project: Solder
> Issue Type: Bug
> Reporter: Juergen Zimmermann
> Attachments: testcase.zip
>
>
> The attached testcase results in a NPE in a JBoss Solder class when it is deployed to 7.1.3.Final and also to 7.2.0.alpha1-SNAPSHOT. It works fine with 7.1.2.Final.
> Just do a "mvn package jboss-as:deploy" to invoke the testcase. The testcase is preconfigured for 7.1.3. To switch to 7.1.2 or 7.2.0.alpha1 the related property is in the beginning of pom.xml
> I'm not sure whether the issue is related to Weld (1.1.8 inside JBoss 7.1.2, 1.1.9 inside JBoss 7.1.3, 1.1.10 inside JBoss 7.2) or whether the issue is related to Solder. Anyway, this issue prevents an upgrade from JBoss 7.1.2.
> The stacktrace in the JBoss console:
> ...
> INFO [org.jboss.solder.config.xml.bootstrap.XmlConfigExtension] Wrapping InjectionTarget to set field values: test.ArticleController
> ERROR [org.jboss.msc.service.fail] 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: Exception List with 1 exceptions:
> Exception 0 :
> org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
> Exception 0 :
> java.lang.NullPointerException
> at org.jboss.solder.bean.generic.GenericBeanExtension.registerGenericBeanObserverMethod(GenericBeanExtension.java:378)
> at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:75)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:60)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:40)
> at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
> at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
> at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> 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)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years