1
我工作的接縫,並試圖通過使用煤層@In屬性要求非空值
@Name("myBeanClass")
@Scope(ScopeType.CONVERSATION)
public class MyBeanClass {
start();
}
注入一個接縫部件,並試圖通過使用下面的代碼從另一個類使用上述start()
@In(create = true, required = false, value = "myBeanClass")
protected MyBeanClass myBeanClass
public Class TestClass {
public void start() {
myBeanClass.start();
}
}
我甚至在MyBeanClass
變化範圍類型,雪村等嘗試,它仍然是給我同樣的eception
12:34:43,233 WARN [org.jboss.seam.Component] [http-localhost%2F127.0.0.1-8080-2] Cannot create Seam component, scope is not active: favoriteManager(PAGE)
12:34:43,240 WARN [org.jboss.seam.Component] [http-localhost%2F127.0.0.1-8080-2] Cannot create Seam component, scope is not active: favoriteManager(PAGE)
12:34:53,081 ERROR [org.jboss.aspects.tx.TxPolicy] [http-localhost%2F127.0.0.1-8080-2] javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: myBeanClass.favoriteManager
12:34:53,093 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2]
javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: orgUnitUpdateManager.favoriteManager
12:34:53,094 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
12:34:53,094 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
12:34:53,094 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
12:34:53,140 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
12:34:53,140 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
12:34:53,140 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
12:34:53,140 ERROR [STDERR] [http-localhost%2F127.0.0.1-8080-2] at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
而且也是我能夠從同一類注入等類,我是失敗只在注射myBeanClass
任何一個可以建議如果我錯過了任何東西的情況下?
我確信豆的名稱和變量名是相同的
WOOW。 ü拯救我的生命! – 2015-11-09 11:24:31