-
1. Re: Seam Managed persistence Context Problem
lightguard Nov 18, 2011 1:06 PM (in response to mbsakho)Sounds like you're using 3.0.0.Final. Please use a 3.1.0 Beta (Beta4 is the current one) and use Seam Transaction (it was split out of Seam Persistence in 3.1.0).
-
2. Re: Seam Managed persistence Context Problem
mbsakho Nov 21, 2011 9:56 AM (in response to mbsakho)I've updated to 3.1.0 Beta. (Seam persistence, seam transaction and solder).
My application is not started now and I'm getting another stacktrace below:
"
15:43:16,999 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."extranet-sigma.war".WeldService:
org.jboss.msc.service.StartException in service jboss.deployment.unit."extranet-sigma.war".WeldService:
org.jboss.weld.exceptions.DefinitionException:
WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default]
declared as [[field] @Default @ExtensionManaged @PersistenceUnit @ConversationScoped @Produces private com.natixis.extranet.sigma.services.Resources.emFactory]]
must be @Dependent scoped
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_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
"
It's telling me that the the field emfactory must be @Dependent scoped.
here is the owner class of the designed field.
'
public class Resources
{
@SuppressWarnings("unused")
@Produces
@ExtensionManaged
@PersistenceUnit
@ConversationScoped
@Default
private EntityManagerFactory emFactory;
}
'
I really don't undestand what's wrong.
Any idea?
Meissa -
3. Re: Seam Managed persistence Context Problem
hantsy Nov 21, 2011 10:02 AM (in response to mbsakho)I switched to Beta 5 today and it was already in jboss maven repository,I found beta 5 was tagged yesterday, but there is no official news.
-
4. Re: Seam Managed persistence Context Problem
hantsy Nov 21, 2011 10:04 AM (in response to mbsakho)The following is my code fragment used in my project.
@ExtensionManaged @Produces @PersistenceUnit @ConversationScoped EntityManagerFactory producerField;
-
5. Re: Seam Managed persistence Context Problem
mbsakho Nov 21, 2011 10:05 AM (in response to mbsakho)<blockquote>
_Jason Porter wrote on Nov 18, 2011 13:06:_<br/>
Sounds like you're using 3.0.0.Final. Please use a 3.1.0 Beta (Beta4 is the current one) and use Seam Transaction (it was split out of Seam Persistence in 3.1.0).
</blockquote>
I've updated to 3.1.0 Beta.
My application is not starting now and I'm having a new kind of exception. Here is the trace:
5:43:16,999 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."extranet-sigma.war".WeldService:
org.jboss.msc.service.StartException in service jboss.deployment.unit."extranet-sigma.war".WeldService:
org.jboss.weld.exceptions.DefinitionException:
WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default]
declared as [[field] @Default @ExtensionManaged @PersistenceUnit @ConversationScoped @Produces private com.natixis.extranet.sigma.services.Resources.emFactory]]
must be @Dependent scoped
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_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default] declared
as [[field] @Default @ExtensionManaged @PersistenceUnit @ConversationScoped @Produces private com.natixis.extranet.sigma.services.Resources.emFactory]] must be @Dependent scoped
at org.jboss.weld.bean.builtin.ee.EEResourceProducerField.checkEEResource(EEResourceProducerField.java:133)
at org.jboss.weld.bean.builtin.ee.EEResourceProducerField.initialize(EEResourceProducerField.java:125)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:119)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:227)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:378)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
... 5 more
It's telling me that the emFactory field must be @Dependant scoped. The owner class of the field is below:
'
public class Resources
{
@SuppressWarnings("unused")
@Produces
@ExtensionManaged
@PersistenceUnit
@ConversationScoped
private EntityManagerFactory emFactory;
}
'
I really don't undestant what's wrong.
Any idea? -
6. Re: Seam Managed persistence Context Problem
lightguard Nov 21, 2011 11:54 PM (in response to mbsakho)For both Meissa and Hansty is that the only thing that changed in the application was moving to Beta5?
-
7. Re: Seam Managed persistence Context Problem
hantsy Nov 22, 2011 1:17 AM (in response to mbsakho)I did not encounter problem now.
-
8. Re: Seam Managed persistence Context Problem
lightguard Nov 22, 2011 1:40 AM (in response to mbsakho)Okay, great. I also just tried it with Beta5 and didn't run into a problem.
-
9. Re: Seam Managed persistence Context Problem
mbsakho Nov 22, 2011 5:00 AM (in response to mbsakho)<blockquote>
_Jason Porter wrote on Nov 22, 2011 01:40:_<br/>
Okay, great. I also just tried it with Beta5 and didn't run into a problem.
</blockquote>
I've updated seam-persistence and seam-transaction to 3.1.0.beta5.
I'm still having the exception below.
10:51:27,498 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."extranet-sigma.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."extranet-sigma.war".WeldService: org.jboss.weld.exceptions.DefinitionException: WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default] declared as [[field] @PersistenceUnit @Produces @ExtensionManaged @ConversationScoped private com.natixis.extranet.sigma.services.Resources.entityManagerFactory]] must be @Dependent scoped
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_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default] declared as [[field] @PersistenceUnit @Produces @ExtensionManaged @ConversationScoped private com.natixis.extranet.sigma.services.Resources.entityManagerFactory]] must be @Dependent scoped
at org.jboss.weld.bean.builtin.ee.EEResourceProducerField.checkEEResource(EEResourceProducerField.java:133)
at org.jboss.weld.bean.builtin.ee.EEResourceProducerField.initialize(EEResourceProducerField.java:125)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:119)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:227)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:378)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
... 5 more
Are there additionnal librairies that need to be updated?
Meissa -
10. Re: Seam Managed persistence Context Problem
hantsy Nov 22, 2011 5:10 AM (in response to mbsakho)If u are using the Eclispe and m2e, switch to Dependency Hierarchy tab in the POM editor.
Have a look and confirm there is no conflicts.
I encountered some problem before , and it was caused by dependency version conflict.
-
11. Re: Seam Managed persistence Context Problem
mbsakho Nov 22, 2011 5:27 AM (in response to mbsakho)
hantsy bai wrote on Nov 22, 2011 05:10:
If u are using the Eclispe and m2e, switch to Dependency Hierarchy tab in the POM editor.
Have a look and confirm there is no conflicts.
I encountered some problem before , and it was caused by dependency version conflict.I confirm that there is no conflcts in the Dependency Hierarchy of the POM Editor.
I really don't undestand what I've missed.
Meissa -
12. Re: Seam Managed persistence Context Problem
mbsakho Nov 22, 2011 6:12 AM (in response to mbsakho)While looking to the execption stack, I see the recurrent message below:
WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory]
with qualifiers [@Any @Default] declared as [[field] @PersistenceUnit @ExtensionManaged @Produces @ConversationScoped
private com.natixis.extranet.sigma.services.Resources.entityManagerFactory]] must be @Dependent scoped
The class that's involved is below:
public class Resources
{
@SuppressWarnings("unused")
@ExtensionManaged
@Produces
@PersistenceUnit
@ConversationScoped
private EntityManagerFactory entityManagerFactory;
}
It's just similar of what people are using here.
I really don't undestand the reason of the complain.
Meissa -
13. Re: Seam Managed persistence Context Problem
mbsakho Nov 22, 2011 10:49 AM (in response to mbsakho)I've finally managed to make it working.
Tke problem was due to the solder version 3.0.0 that is not compatible with the
Beta 5 version of seam persistence.
Meissa -
14. Re: Seam Managed persistence Context Problem
lightguard Nov 23, 2011 1:09 AM (in response to mbsakho)Yep, bad version of Solder. I've seen that too. Makes sure you're using the most current version of all modules.