[JBoss Seam] - Re: Tomcat + Embedded EJB
by KnisterPeter
When I change my EJB to have the EntityMangager annotated with @In instead of @PerstistenceContext it does get deployed in the ejb server , but then no EntityManager is injected and I get the following exception when calling a method on that bean:
org.jboss.seam.RequiredException: In attribute requires non-null value: register.em
| org.jboss.seam.Component.getValueToInject(Component.java:1919)
| org.jboss.seam.Component.injectAttributes(Component.java:1368)
| org.jboss.seam.Component.inject(Component.java:1195)
| org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:597)
| org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054256#4054256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054256
18Â years, 11Â months
[JBoss Seam] - Seam application packaging question
by leezard
Hi all,
I'm trying to build seam sample application using maven.
I have only a few dependencies in my project:
seam-1.2.1, seam-ui-1.2.1, facelets and java5 api (just for development).
Now when I package whole application into EAR maven includes all seam's dependencies into this EAR. Those dependencies are:
hibernate-annotatnions
asm
hibernate
commons-logging
jta
persistence-api
asm-attrs
antlr
jms
javaassist
ecache
dom4j
cglib
commons-collections
I read "packaging" chapter of seam doc, and there is shown sample EAR structure of seam application. There are only a few jars included:
seam
seam-ui
facelets
el-api
el-ri
Now, do I have to exclude all the dependencies from my EAR and include only jars mentioned in seam doc? Are the other jars avalilable in Jboss already?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054249#4054249
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054249
18Â years, 11Â months
[JBoss Seam] - @In @Out @In(create=true) confusion
by dreuzel
The problem
with annotation is that one does not understand what happens behind the screen.
I'm using a ejb3-hibernate entity definition(simply defined)
in the pojo
@In tableclass xyz is used
I'm sometimes receving exceptions the xyz nullpointer exception
because (i think) I conditionaly use XYZ IN MY FACELET xhtml definition
depending on some other pojo variable i render the variables pointing to XYZ, conditionaly
as in some cases xyz.variables(the prime key) are not rendered the @in initialized xyz is not initialised... ====> exception
the exception occurs during page initialisation, during the rendering, prior to calling @begin so there is very little i can do to solve the bug
it does not help using @out nor @in(create=true)
can anyone confirm my theory ??? (seam 1.2.1)
any chance for improvement with 1.3 ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054244#4054244
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054244
18Â years, 11Â months