[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
So the problem was caused by using log4j in the interceptor classes. Should have done a global search I don't know why I thought it was in the 2 SFSB's somehow... However, when I replaced the log4j with Seam log I was getting NullPointerException: @Name(loggerInterceptor) | public class LoggerInterceptor { | | @Logger | private Log log; | | @AroundInvoke | public Object profile(InvocationContext ic) throws Exception { | log.info(*** Entering method: + ic.getMethod().getName()); | return ic.proceed(); | } | | | } When I added the static keyword the NullPointerException went away: @Name(loggerInterceptor) | public class LoggerInterceptor { | | @Logger | private static Log log; | | @AroundInvoke | public Object profile(InvocationContext ic) throws Exception { | log.info(*** Entering method: + ic.getMethod().getName()); | return ic.proceed(); | } | | | } I will close the JIRA now since that is obviously not a bug. thx. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4110873#4110873 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4110873 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
http://jira.jboss.org/jira/browse/JBSEAM-2354 I attached the xhtml, SFSB implementation class and local interface. Only thing is the em.createQuery is based on MS SQL server data. Exception occurs with or w/o the Seam logger and with or w/o injecting the session-scoped SFSB. thx. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4110696#4110696 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4110696 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
[EMAIL PROTECTED] wrote : You will get an exception. | | If you can put something simple together that reliably shows this, then create a jira issue and we can take a look. I'm not sure exactly what the root cause is here so I'm not sure I can put together a simple example. I tried to inject a SFSB into one of the Seam booking SFSB's and I don't recall it reproducing... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109925#4109925 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109925 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
[EMAIL PROTECTED] wrote : You will get an exception. | | If you can put something simple together that reliably shows this, then create a jira issue and we can take a look. why will I get the exception? And are you talking about the InstantionException specifically? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109915#4109915 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109915 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
You stated Please attach a runnable example with step by step instructions to reproduce so we can take a look. in http://jira.jboss.org/jira/browse/JBSEAM-2256 In this case, the use case/app is dependent on data (via JPA entities) in SQL server db as well as using NTLM authentication. That makes it very difficult to post to the JIRA. Any recommendation? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109935#4109935 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109935 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
You will get an exception. If you can put something simple together that reliably shows this, then create a jira issue and we can take a look. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109636#4109636 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109636 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
[EMAIL PROTECTED] wrote : asookazian wrote : Is it safe to assume, then, that @In(create=true) will only instantiate a session-scoped SFSB once per session from a conversation-scoped SFSB as long as it is not destroyed somehow or nulled after the first instantiation? | | Yes. | | Post the *whole* source of the SecurityAuditAction, I think there must be something funny about your use of Seam logging. A couple weeks back I tried removing all references to the Seam logger in both SFSB's (there are no other POJO's other than entity beans) and the exception still occurred... I have no clue what it is but maybe it's the instance variable objects that can't be serialized b/c they're not marked transient and do not implement Serializable?? I posted a question on the java sun EJB3 forum asking what happens if the ejb container tries to passivate/serialize a SFSB with instance variables that are not marked transient and are not serializable and no response... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109436#4109436 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109436 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
more curious behavior today... 09:29:45,317 INFO [LoggerInterceptor] *** Entering method: destroy | 09:29:45,317 INFO [Manager] destroying conversation with garbage lock: 4 | 09:29:45,317 INFO [SecurityAuditAction] in preDestroy | 09:29:45,317 WARN [Component] Exception calling component @Destroy method: securityAuditAction | javax.ejb.NoSuchEJBException: Could not find stateful bean: a1a5y-ve3h3x-f9lk319d-1-f9lk4ph5-a | at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390) | at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375) | at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:97) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206) | at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119) | at $Proxy110.destroy(Unknown Source) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | at java.lang.reflect.Method.invoke(Unknown Source) | at org.jboss.seam.util.Reflections.invoke(Reflections.java:21) | at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) | at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) | at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106) | at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) | at org.javassist.tmp.java.lang.Object_$$_javassist_1.destroy(Object_$$_javassist_1.java) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | at java.lang.reflect.Method.invoke(Unknown Source) | at org.jboss.seam.util.Reflections.invoke(Reflections.java:21) | at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125) | at org.jboss.seam.Component.callComponentMethod(Component.java:2074) | at org.jboss.seam.Component.callDestroyMethod(Component.java:2005) | at org.jboss.seam.Component.destroy(Component.java:1323) | at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251) | at org.jboss.seam.contexts.Contexts.destroyConversationContext(Contexts.java:413) | at org.jboss.seam.contexts.Lifecycle.destroyConversationContext(Lifecycle.java:153) | at org.jboss.seam.core.Manager.destroyConversation(Manager.java:313) | at org.jboss.seam.core.Manager.conversationTimeout(Manager.java:297) | at org.jboss.seam.core.Manager.endRequest(Manager.java:347) | at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:55) | at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:66) | at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:113) | at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:69) | at org.jboss.seam.servlet.SeamResourceServlet.doPost(SeamResourceServlet.java:86) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) | at
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
asookazian wrote : Is it safe to assume, then, that @In(create=true) will only instantiate a session-scoped SFSB once per session from a conversation-scoped SFSB as long as it is not destroyed somehow or nulled after the first instantiation? Yes. Post the *whole* source of the SecurityAuditAction, I think there must be something funny about your use of Seam logging. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4108631#4108631 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108631 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Activation of SFSB and removal of it by Seam question
package com.cox.beans.session; | | import java.util.ArrayList; | import java.util.Calendar; | import java.util.GregorianCalendar; | import java.util.List; | | import javax.annotation.PostConstruct; | import javax.annotation.PreDestroy; | import javax.ejb.PostActivate; | import javax.ejb.PrePassivate; | import javax.ejb.Remove; | import javax.ejb.Stateful; | import javax.ejb.TransactionAttribute; | import javax.ejb.TransactionAttributeType; | import javax.faces.model.SelectItem; | import javax.persistence.EntityManager; | import javax.persistence.PersistenceContext; | | import org.jboss.seam.annotations.Destroy; | import org.jboss.seam.annotations.Factory; | import org.jboss.seam.annotations.In; | import org.jboss.seam.annotations.Logger; | import org.jboss.seam.annotations.Name; | import org.jboss.seam.annotations.Out; | import org.jboss.seam.annotations.datamodel.DataModel; | import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex; | import org.jboss.seam.log.Log; | | import com.cox.beans.entity.TblSecurityAuditNote; | import com.cox.beans.entity.TblSecurityAuditWorking; | import com.cox.beans.entity.User; | | | | @Stateful | //@Restrict(#{identity.loggedIn}) | //@Scope(ScopeType.SESSION) | @Name(securityAuditAction) | public class SecurityAuditAction implements SecurityAuditLocal { | | @Logger | private Log log; | | //using EXTENDED for PersistenceContextType was causing premature update transaction commit to DB when clicking 'no' on radio button... | @PersistenceContext(unitName=boIcomsSecurityAudit) | private EntityManager em; | | @In(required=false) @Out | private User user; | | @In(required=false) | private TblSecurityAuditNote myNotes[][]; | | @In(create=true) | private NoteLocal noteAction; | | private ListSelectItem myRadioButtonList; | | @DataModel(value=myAuditList) | private List myAuditList; | | private Object[] myAuditListSelection; | | private final int auditNotStarted = 0; | private final int auditWaitingICOMS = 1; | private final int auditComplete = 2; | | @DataModelSelectionIndex(value=myAuditList) | //this is the row number of the underlying collection | private int currentRowNum; | | //adding empty constructor callback lifecycle methods for debugging purposes (interceptor will output when they get called) | | public SecurityAuditAction() {} | | @PostConstruct | public void postConstruct() { | log.info(in postConstruct); | } | | @PostActivate | public void postActivate() { | log.info(in postActivate); | } | | @PrePassivate | public void prePassivate() { | log.info(in prePassivate); | | } | | @PreDestroy | public void preDestroy() { | log.info(in preDestroy); | | } | | private Object[] getMyAuditListSelection() { | return (Object[])myAuditList.get(currentRowNum); | } | | //@Begin | @Factory(myAuditList) | public void findAuditList() | { | | log.info(in getAuditList(): user.getUserId() = + user.getUserId() + user.getBillingId() = + user.getBillingId()); | | int employeeId = 900050881; //using btkach id for now; | | String networkId = noteAction.getNetworkId()==null?:noteAction.getNetworkId(); | | //List myList = em.createQuery(from User u where u.networkId = :networkId).setParameter(networkId, networkId).getResultList(); | //User newUser = (User)myList.get(0); | | //employeeId = newUser.getEmployeeId().intValue(); | | myAuditList = em.createQuery(SELECT gem, tsaw + | FROM TblSecurityAuditWorking tsaw, + | GlobalEmployeeMaster gem + | WHERE tsaw.id.siteId = gem.id.siteId + | AND tsaw.id.employeeNumber = gem.id.employeeNumber + | AND tsaw.reportToId = :employeeId + | ORDER BY tsaw.id.employeeNumber ASC) | .setParameter(employeeId, employeeId) | .getResultList(); | |