[JBoss jBPM] - logging in to jbpm-console from api code
by rossputin
Hi,
does anyone know how I can log into the jbpm-console webapp from java code, so the 'request.remoteUser' field tested in the various .xhtml pages is assigned a value.
For example at the moment in an XSLT I am creating a process, and the first task in that process, I then want to click on a link, and navigate to the processes screen, or the tasks screen, but as I am not logged in, I can not get proper views on tasks etc.
I have looked at the identity component, but do not think this is where the work is done, it looks like it is handled in a form with an action called 'j_security_check',
thanks for your help in advance,
Ross
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080436#4080436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080436
18 years, 7 months
[JBoss Seam] - Re: Seam email problem
by martin.krajci
I have tried your configuration.
<?xml version="1.0" encoding="UTF-8"?>
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:framework="http://jboss.com/products/seam/framework"
| xmlns:mail="http://jboss.com/products/seam/mail"
| xmlns:spring="http://jboss.com/products/seam/spring"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd
| http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-1.2.xsd
| http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
| http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-1.2.xsd">
|
| <core:init jndi-pattern="@jndiPattern@"/>
| <core:ejb installed="@embeddedEjb@"/>
| <core:dispatcher />
|
| <component name="org.jboss.seam.core.manager">
| <!-- half second wait for conversation lock on concurrent requests -->
| <property name="concurrentRequestTimeout">500</property>
| <!-- 20 minutes conversation timeout -->
| <property name="conversationTimeout">1200000</property>
| <property name="conversationIdParameter">cid</property>
| <property name="conversationIsLongRunningParameter">clr</property>
| </component>
|
| <spring:context-loader />
|
|
| <mail:mail-session host="smtp.gmail.com" port="465" username="martin.krajci" password="xxx" ssl="true"/>
|
| <!--
| <mail:mail-session host="localhost" port="2525" username="test" password="test" />
| <mail:mail-session session-jndi-name="java:/CechieMailService" debug="true"/>
| -->
|
| </components>
I also tried to turn off the windows firewall, but the exception is still the same:
12:05:08,210 INFO [MailSession] Creating JavaMail Session (localhost:null)
12:05:08,220 INFO [MailSession] connected to mail server
12:05:09,242 ERROR [ReservationComponent] Error sending mail
javax.faces.FacesException: Exception reading response
at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:142)
at org.jboss.seam.ui.JSF.renderChild(JSF.java:180)
at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRend
erer.java:150)
at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.ja
va:112)
at cz.krajci.cechie.business.logic.ReservationComponent.finishBooking(Re
servationComponent.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
ntextImpl.java:166)
at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationCo
ntext.java:37)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:57)
at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(Bijecti
onInterceptor.java:47)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:69)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundIn
voke(ManagedEntityIdentityInterceptor.java:37)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:69)
at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(Conv
ersationInterceptor.java:54)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:69)
at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(Met
hodContextInterceptor.java:27)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
103)
at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionB
eanInterceptor.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
ntextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Int
erceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationIntercepto
r.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invok
e(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsI
nterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
erceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulIn
stanceInterceptor.java:83)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
ationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
enticationInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
usInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContain
er.java:204)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.
java:100)
at $Proxy154.finishBooking(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocation
Context.java:31)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideIn
terceptor.java:72)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:57)
at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInte
rceptor.java:40)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocation
Context.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
103)
at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInter
ceptor.java:50)
at org.javassist.tmp.java.lang.Object_$$_javassist_28.finishBooking(Obje
ct_$$_javassist_28.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:2
76)
at org.jboss.seam.ui.facelet.MethodExpressionHelper.invokeTheExpression(
MethodExpressionHelper.java:102)
at org.jboss.seam.ui.facelet.ParamMethodExpression.invoke(ParamMethodExp
ression.java:62)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.ja
va:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Met
hodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionList
enerImpl.java:91)
at javax.faces.component.UICommand.broadcast(UICommand.java:383)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.j
ava:180)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot
.java:158)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewR
oot.java:346)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
ionPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseX
MLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.
java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketException: Connection reset
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java
:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:37
0)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:136)
... 111 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java
:1440)
... 117 more
I'm still suspecting seam that it doesn't read the components.xml correctly, because spring:context-loader doesn't load the applicationContext.xml either even I have configured everything like in the example. But this is different problem. Please let us focus on the email one.
If you have not run out of ideas please let me know.
Thanx.
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080431#4080431
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080431
18 years, 7 months
[JBoss Seam] - Problem with JBPM nodes and transitions
by chawax
Hi,
I use JBPM to model a business process and I want to integrate it with Seam. Part of the process is composed of nodes and transitions, with no interaction with users (actually no task nodes). But for a reason I can't find, one transition can't work ...
My JBPM process is a very simple one : 3 nodes linked by single transitions and an end state. My JPDL is as following :
<node name="Node1">
| <transition name="goToNode2" to="Node2">
| <action expression="#{afficherMessageConsole.transition1}" />
| </transition>
| <action expression="#{afficherMessageConsole.goToNode2}" />
| </node>
| <node name="Node2">
| <transition name="goToNode3" to="Node3">
| <action expression="#{afficherMessageConsole.transition2}" />
| </transition>
| <action expression="#{afficherMessageConsole.goToNode3}" />
| </node>
| <node name="Node3">
| <transition name="goToEnd" to="End"></transition>
| <action expression="#{afficherMessageConsole.goToEnd}" />
| </node>
| <end-state name="End"></end-state>
My actions just write on System.out. I added @org.jboss.seam.annotations.Transition annotation to goToxxx methods, and no annotation for other methods (in fact I added @Transition annotation only to methods binded to nodes, not to transitions).
When I run this process, the transition between Node1 and Node2 is ok, but transition between Node2 and Node3 doesn't work. The transition2 method is never called ! Note there is nothing in the logs.
Did I did something wrong ?
Thanks in advance for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080430#4080430
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080430
18 years, 7 months