[JBoss Seam] - jndi name of ejb in ear
by knaas
EJBs deployed from an EAR are put under the EAR's jndi namespace. For instance if the ear file is "my-ear.ear", and there is a Local Session Bean with the name of "MySessionBean", it will be bound to "my-ear/MySessionBean". In order for Seam to lookup this EJB, it requires a change to the components.xml so that instead of using "#{ejbName}/local" it uses "my-ear/#{ejbName}/local". While this works great, the ear name is now hardcoded in the ejb jar module inside of the ear. This isn't such a big problem until someone renames the ear file. At this point,the components.xml has to be updated since Seam can no longer find "my-ear/MySessionBean/local". This is a big problem, especially when trying to run multiple versions of the same application on a single server.
One possibility to fix the problem is to override the jndi name using either the @LocalBinding or @JndiName annotations. However, the jndi bindings of different EARS can collide since they both name is now hardcoded in the Java class.
Would it be possible for the Seam jndiPattern to automatically look in the EAR's jndi namespace?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991091#3991091
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991091
19 years, 7 months
[JBoss Seam] - Re: how to use taskinstance??
by juangiovanolli
you has solved, in part my problem. now i'm getting a new error :
| 16:36:30,281 ERROR [STDERR] org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:276)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:50)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
| at org.jboss.seam.core.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
| at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.unwrap(Component.java:1764)
| at org.jboss.seam.Component.getInstance(Component.java:1597)
| at org.jboss.seam.Component.getInstance(Component.java:1564)
| at org.jboss.seam.Component.getInstance(Component.java:1546)
| at org.jboss.seam.core.ProcessInstance.instance(ProcessInstance.java:70)
| at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:213)
| at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:200)
| at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:55)
| at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:149)
| at org.jboss.seam.Component.getInstance(Component.java:1556)
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1789)
| at org.jboss.seam.Component.injectFields(Component.java:1312)
| at org.jboss.seam.Component.inject(Component.java:1082)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
| at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
| at com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$90451471.destroy(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1694)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:186)
| at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:356)
| at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:239)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:180)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:83)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo
| 16:36:30,281 ERROR [STDERR] lTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 16:36:30,281 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
| 16:36:30,281 WARN [Contexts] Could not destroy component: taskManager
| org.jbpm.JbpmException: couldn't load process instance '11'
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:281)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:50)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
| at org.jboss.seam.core.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
| at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.unwrap(Component.java:1764)
| at org.jboss.seam.Component.getInstance(Component.java:1597)
| at org.jboss.seam.Component.getInstance(Component.java:1564)
| at org.jboss.seam.Component.getInstance(Component.java:1546)
| at org.jboss.seam.core.ProcessInstance.instance(ProcessInstance.java:70)
| at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:213)
| at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:200)
| at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:55)
| at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:149)
| at org.jboss.seam.Component.getInstance(Component.java:1556)
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1789)
| at org.jboss.seam.Component.injectFields(Component.java:1312)
| at org.jboss.seam.Component.inject(Component.java:1082)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
| at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
| at com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$90451471.destroy(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1694)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:186)
| at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:356)
| at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:239)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:180)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:83)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:276)
| ... 98 more
|
any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991089#3991089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991089
19 years, 7 months
[EJB/JBoss] - NullPointerException from LogInterceptor
by K.P.Seal
Hi all,
I've been having a very frustrating problem with an EJB lately. The closest information I've been able to find elsewhere suggests that the problem is caused by something using Log4J incorrectly (doh!). However, since the stack trace indicates that the logging is being undertaken by JBoss' EJB LogInterceptor I'm left a little bit confused.
It would appear that a null message is making it as far as the underlying writer but I can't quite figure out why.
The EJB I've got looks up another EJB's home via JNDI. It then invokes the create method using reflection. It then invokes a business method on the created remote by reflection. Within this business method invocation an exception is thrown (subclass of EJBException) - it would appear to be JBoss' handling of this exception that is causing the NPE.
I'd be grateful for any light that you could cast onto this problem.
I'm using JBoss 4.0.4 GA and JDK 1.5.0.
Caused by: java.lang.NullPointerException
| at java.io.Writer.write(Writer.java:126)
| at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:39)
| at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:299)
| at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
| at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
| at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
| at org.apache.log4j.Category.callAppenders(Category.java:187)
| at org.apache.log4j.Category.forcedLog(Category.java:372)
| at org.apache.log4j.Category.log(Category.java:864)
| at org.jboss.logging.Log4jLoggerPlugin.error(Log4jLoggerPlugin.java:219)
| at org.jboss.logging.Logger.error(Logger.java:234)
| at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:308)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy95.handleEvent(Unknown Source)
| ... 72 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991082#3991082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991082
19 years, 7 months
[JBoss Seam] - is not mapped ?
by Andreh
I'm getting this Exception in the JBoss Seam debug page... and I don't have any idea of what could it be...
and I'm using jboss-seam-1.1.0.CR1
anonymous wrote :
| Exception during INVOKE_APPLICATION(5): java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: userentity is not mapped [select u.login from userentity u where u.login=:login]
my userentity ->
| import static org.jboss.seam.ScopeType.SESSION;
|
| import java.io.Serializable;
|
| import javax.persistence.Entity;
| import javax.persistence.Id;
| import javax.persistence.Table;
|
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
|
|
| @Entity
| @Name("userentity")
| @Scope(SESSION)
| @Table(name="users")
| public class UsuarioEntity implements Serializable {
|
| private static final long serialVersionUID = 0L;
| private String login;
| private String pass;
| private String email;
|
| public UsuarioEntity(){}
|
| @Id @Length(min=6,max=15)
| public String getLogin() {
| return login;
| }
| public void setLogin(String login) {
| this.login = login;
| }
| @NotNull @Length(min=6,max=15)
| public String getPass() {
| return pass;
| }
| public void setPass(String pass) {
| this.pass = pass;
| }
| @NotNull @Length(max=30)
| public String getEmail() {
| return email;
| }
| public void setEmail(String email) {
| this.email = email;
| }
| }
|
am I doing something wrong? =S
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991080#3991080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991080
19 years, 7 months
[JBossCache] - problems with jalapeno/cayenne JBC optimistic cache with inv
by nielsenk
After debugging and reading through the code, it seemed to me that jalapeno/cayenne JBC will always send an eviction on any put to the cache. The problem I am facing goes as follows:
I am using hibernate for persistence in a clustered environment. hibernate is running in side of a servlet container (SunONE to be specific). I planned on using JBC optimistically with asynchronous invalidations but when I run under this configuration I get the following problem:
A loads X.v1 from the database.
A sends invalidation(eviction) on put to local JBC (since B is empty no worries).
A has warm cache
B loads X.v1 from the database.
B sends invalidation(eviction) on put to local JBC.
B has warm cache
A evicts X.v1 from cache and now has a cold cache even though the data has not changed.
Is this a known issue/feature? I cant imagine we are the only organization that wishes to run under this configuration.
Looking at the code it seems that the InvalidationInterceptor only operates in this way (sending evictions).
I can send configs and such if need be.
Thanks in advance,
Keith.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991074#3991074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991074
19 years, 7 months
[JBoss Seam] - how to use taskinstance??
by juangiovanolli
i'm trying to persist variables into the current taskInstance. for this i'm injecting the taskInstance object of jboss.seam.core. but it fails as you can see below:
|
| javax.faces.el.EvaluationException: /main.xhtml @13,49 value="#{taskManager.description}": Exception getting value of property description of base of type : com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$c41132d8
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.faces.el.EvaluationException: Bean: com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$c41132d8, property: description
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| ... 36 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
| ... 42 more
| Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: taskManager.taskInstance
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1823)
| at org.jboss.seam.Component.injectFields(Component.java:1312)
| at org.jboss.seam.Component.inject(Component.java:1082)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
| at com.santex.darwin.web.samp
|
and the class where i'm trying to inject it is this:
TaskBean.java
| package com.santex.darwin.web.sample;
|
| import javax.ejb.Remove;
|
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.CreateProcess;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.EndTask;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.StartTask;
| import org.jboss.seam.core.TaskInstance;
|
| import com.santex.darwin.service.core.workflow.WorkflowManager;
|
| /**
| *
| * @author Juan Giovanolli
| * 29/11/2006
| */
| @Name("taskManager")
|
| public class TaskBean implements Task
| {
|
| private String description;
|
| @In(create = true)
| WorkflowManager workflowManagerImpl;
|
|
| @In(create=true)
| TaskInstance taskInstance;
|
|
| public WorkflowManager getWorkflowManagerImpl()
| {
| return workflowManagerImpl;
| }
|
| public void setWorkflowManagerImpl(WorkflowManager workflowManagerImpl)
| {
| this.workflowManagerImpl = workflowManagerImpl;
| }
|
| /**
| * @return the description
| */
| public String getDescription()
| {
| return description;
| }
|
| /**
| * @param description the description to set
| */
| public void setDescription(String pDescription)
| {
| this.description = pDescription;
| }
|
| @StartTask
| public String startTask() {
| try {
| taskInstance.getTaskInstance().setVariable("a1", a);
| }
| catch (Exception e) {
| e.printStackTrace();
| }
| return "";
| }
|
| @EndTask
| public String endTask() {
| try {
| taskInstance.getTaskInstance().setVariable("a2", a);
| }
| catch (Exception e) {
| e.printStackTrace();
| }
| return "";
| }
|
| @Remove @Destroy
| public void destroy() {
|
| }
|
| @CreateProcess(definition = "ProcessAbstract")
| public String startProcess()
| {
| return "";
| }
|
| }
|
|
Any ideas?? or still better: any examples?
Thks.!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991068#3991068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991068
19 years, 7 months
[JBoss Seam] - Using textInput inside a dataTable inside a form?
by SmokingAPipe
Let's say that I want a user to be able to update an invoice with many line items on it. They should be able to make all their quantity updates and hit submit. The abreviated and somewhat simplified HTML might look like this:
| <form>
| <table>
| <tr>
| <th>Item:</th>
| <th>Quantitiy ordered</th>
| </tr>
|
| <tr>
| <td>Diet Coke</td>
| <td><input name="invoice[0]quantity" type="text" value="5"/></th>
| </tr>
|
| <tr>
| <td>Sprite</td>
| <td><input name="invoice[1]quantity" type="text" value="2"/></th>
| </tr>
| </table>
|
| <input type="submit" value="Update quantities"/>
| </form>
|
I like to use these contructions quite a lot. I have tried, without success, to make something like this work. The problem is that I'll have a table like this:
| <h:form>
| <t:dataTable id="invoiceTable"
| var="item"
| value="#{invoice.items}"
| >
|
| <t:column>
| <f:facet name="header">
| <h:outputText value="Item name"/>
| </f:facet>
| <h:outputText value="#{item.name}"/>
| </t:column>
|
| <t:column>
| <f:facet name="header">
| <h:outputText value="Quantity"/>
| </f:facet>
|
| <h:inputText value="#{item.quantity}" size="5"/>
|
| </t:column>
| </t:dataTable>
|
| <h:commandButton value="Update invoice" action="#{invoiceManager.update}"/>
|
| </h:form>
|
which of course, does not work, because the inputText value="#{item.quantity}" is not actually a value binding because the "item" variable only exists within the table iteration (is this correct?) Is there a way to get this type of thing to work? I'm totally stumped.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991067#3991067
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991067
19 years, 7 months
[Installation, Configuration & Deployment] - Invalid use of destroyed classloader
by fmaredia
Using Apache AXIS, we get the following error after our application has been hot redeployed . There is no problem on the front-end, even as far as functionality, however an error is generated in the log. It seems that the class gets destroyed and does not seem to be rebuilt properly. I am not sure what I really need to do to resolve the problem. If I restart the JBoss server then everything works fine (once again initially until I redeploy then the error occurs again), however I do not want to restart every time I need to redeploy my application.
The following is the error, once again it only appears after we redeploy the application:
10:59:54,415 ERROR [STDERR] java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:
10:59:54,415 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.findResources(RepositoryClassLoader.java:585)
10:59:54,415 ERROR [STDERR] at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
10:59:54,415 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
10:59:54,431 ERROR [STDERR] at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
10:59:54,431 ERROR [STDERR] at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
10:59:54,431 ERROR [STDERR] at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
10:59:54,431 ERROR [STDERR] at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
10:59:54,431 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
10:59:54,431 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
10:59:54,431 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
10:59:54,431 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
10:59:54,431 ERROR [STDERR] at org.apache.axis.client.Service.getEngineConfiguration(Service.java:812)
10:59:54,431 ERROR [STDERR] at org.apache.axis.client.Service.getAxisClient(Service.java:103)
10:59:54,431 ERROR [STDERR] at org.apache.axis.client.Service.(Service.java:112)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991066#3991066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991066
19 years, 7 months
[EJB 3.0] - Problem with named query...
by EricChile
I am getting the following error when deploying because of a named query. It seems that hibernate is not following the mapping correctly?
org.hibernate.QueryException: could not resolve property: serviceCode of: org.usiis.model.ProviderUsers [select o from org.usiis.model.Users o Where o.providerUsersList.providerId = :providerId AND o.providerUsersList.providerUserServicesList.serviceCode = :serviceCode AND (o.providerUsersList.providerUserServicesList.
| dateEnd <= :endDate OR o.providerUsersList.providerUserServicesList.dateStarted is null)order by o.username ]
|
BEANs
Users
|
| @Entity
| @NamedQueries({
|
|
| @NamedQuery(name = "Users.findAllInactiveByProviderIdServiceCodeDate",
| query = "select o from Users o Where o.providerUsersList.providerId = :providerId " +
| "AND o.providerUsersList.providerUserServicesList.serviceCode = :serviceCode " +
| "AND (o.providerUsersList.providerUserServicesList.dateEnd <= :endDate " +
| "OR o.providerUsersList.providerUserServicesList.dateStarted is null)" +
| "order by o.username ")
|
|
| @Id
| @Column(name="USER_ID", nullable = false)
| private Long userId;
| @OneToMany(mappedBy = "users")
| private List<ProviderUsers> providerUsersList;
|
|
|
ProviderUsers
| @Id
| @Column(name="PROVIDER_USER_ID", nullable = false)
| private Long providerUserId;
| @Column(name="PROVIDER_ID")
| private String providerId;
| @OneToMany(mappedBy = "providerUsers")
| private List<ProviderUserServices> providerUserServicesList;
|
|
ProviderUserServices
| @Column(name="DATE_END")
| private Timestamp dateEnd;
| @Column(name="DATE_REQUESTED", nullable = false)
| private Timestamp dateRequested;
| @Column(name="DATE_STARTED")
| private Timestamp dateStarted;
| @Column(name="SERVICE_CODE", nullable = false)
| private Long serviceCode;
| @Id
| @Column(name="USER_SERVICES_ID", nullable = false)
| private Long userServicesId;
|
Why does hibernate want to associate serviceCode with ProviderUsers when it is in ProviderUserServices in the query? Is this a bug with hibernate?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991065#3991065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991065
19 years, 7 months
[JBoss Seam] - Re: Security
by SmokingAPipe
I'm looking forward to it. I spent several days looking into the Java Security APIs and I got the big Sun Java Security book and read it. I want a simple way to let users log in and view web pages! How hard could that be? But after carefully reading Sun's Java Security book, I learned that I could easily build plugable security architectures and whatever but there was no reasonable way to, say, password protect a database. I'm looking forward to being able to do declarative security: "These web pages can only be accessed by users in role ___. These class methods can only be accessed by users in role ___. These objects can only be accessed by users in role ___." Combine that with annotations on classes like, "this class is a user with role ___", and then a way to define a Authentication class that lets me say "if(password.equalsIgnoreCase(user.password)). HOW HARD COULD THAT BE? And yet there doesn't seem to be any way to do that at all with Sun's security architecture. Anyway if Seam can make that happen that will be great.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991061#3991061
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991061
19 years, 7 months
[JBoss jBPM] - Re: need help to set a task
by cocampo
To declare an action that sends mails as you "enter" a task:
| <task-node name="1a revision contrato">
| ...
| <task name="revision_contrato_1">
| <timer
| name="send_mail"
| duedate="5 seconds"
| repeat="7 days">
| <action
| class='com.timers.test.MailSender' />
| </timer>
| </task>
| ...
| </task-node>
|
Here's a snippet from MailSender class:
| public class MailSender implements ActionHandler {
| ...
| public void execute(ExecutionContext executionContext) throws Exception {
| MailSender ms = new MailSender();
| ...
| ms.send();
| ...
|
Also, in order to activate timers, I'm declaring the next in my web.xml file:
| <servlet>
| <servlet-name>JbpmThreadsServlet</servlet-name>
| <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
If you have the jbpm.war in the same app server, you don't need to declare it.
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991059#3991059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991059
19 years, 7 months
[JBoss Seam] - NPE After adding @RequestParameter to SESSION bean
by lowecg2004
I added a @RequestParameter to a SESSION scoped bean and this now occurs at session destruction:
17:26:01,626 ERROR [STDERR] ENCOUNTERED EXCEPTION CALLING: class com.triggersoft.business.MyAccountBean.destroy
| 17:26:01,626 ERROR [STDERR] java.lang.NullPointerException
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Parameters.convertMultiValueRequestParameter(Parameters.java:47)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.Component.injectParameters(Component.java:1153)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.Component.inject(Component.java:1116)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at com.triggersoft.business.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:62)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:81)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.$Proxy562.destroy(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.MyAccount$$FastClassByCGLIB$$b080abac.invoke(<generated>)
| 17:26:01,642 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor447.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor449.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.MyAccount$$EnhancerByCGLIB$$bd4780c0.destroy(<generated>)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.Component.callComponentMethod(Component.java:1793)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.Component.callDestroyMethod(Component.java:1749)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:230)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| 17:26:01,642 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
I've moved the @RequestParameter to an EVENT scoped bean and all is well, but I thought I'd raise it anyway as it was an NPE.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991056#3991056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991056
19 years, 7 months