[JBoss jBPM] - Invoke an external web service
by agusgr
Hello,
I have deployed the helloWorld example ant it works, but now I'm trying to develop a bpel process with an invocation to a external web service.
I deploy de procces and when I test it, an exception occurs.
anonymous wrote :
| 2007-02-20 09:00:58,656 DEBUG [org.jbpm.bpel.integration.jms.StartListener] caught exception while passing control to process, searching for handler
| org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$e8ed498a.raiseException()
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:57)
| at org.jbpm.bpel.def.Receive.accept(Receive.java:82)
| at org.jbpm.bpel.def.Receive$$FastClassByCGLIB$$516412f0.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.Receive$$EnhancerByCGLIB$$6140a381.accept()
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:97)
| at org.jbpm.bpel.def.Sequence.accept(Sequence.java:105)
| at org.jbpm.bpel.def.Activity$$FastClassByCGLIB$$a89e54a2.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.Activity$$EnhancerByCGLIB$$4c05c877.accept()
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
| at org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:109)
| at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:115)
| at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:694)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$e8ed498a.raiseException()
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
| at org.jbpm.bpel.def.Assign.execute(Assign.java:55)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
| ... 20 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:94)
| at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:234)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:171)
| at org.jbpm.bpel.def.Invoke.execute(Invoke.java:44)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
| ... 25 more
| 2007-02-20 09:00:58,671 ERROR [org.jbpm.bpel.integration.jms.StartListener] could not start process instance
| org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:120)
| at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:694)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$e8ed498a.raiseException()
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:57)
| at org.jbpm.bpel.def.Receive.accept(Receive.java:82)
| at org.jbpm.bpel.def.Receive$$FastClassByCGLIB$$516412f0.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.Receive$$EnhancerByCGLIB$$6140a381.accept()
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:97)
| at org.jbpm.bpel.def.Sequence.accept(Sequence.java:105)
| at org.jbpm.bpel.def.Activity$$FastClassByCGLIB$$a89e54a2.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.Activity$$EnhancerByCGLIB$$4c05c877.accept()
| at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
| at org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:109)
| at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:115)
| ... 2 more
| Caused by: org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke()
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$e8ed498a.raiseException()
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
| at org.jbpm.bpel.def.Assign.execute(Assign.java:55)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
| ... 20 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:94)
| at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:234)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:171)
| at org.jbpm.bpel.def.Invoke.execute(Invoke.java:44)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
| ... 25 more
Somebody know why??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019241#4019241
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019241
19Â years, 2Â months
[Security & JAAS/JBoss] - Re: Is there a tutorial on form-based login using JAAS on JB
by smeaggie
yes there is, I just posted this one somewhere else around here too, it uses a database as username/password storage:
1) setup the connection to the database. put a "database-ds.xml" file in the deploy directory wich contains something like:
| <datasources>
| <local-tx-datasource>
| <jndi-name>exampleDS</jndi-name>
| <connection-url>jdbc:postgresql://127.0.0.1:5432/example</connection-url>
| <driver-class>org.postgresql.Driver</driver-class>
| <user-name>ex</user-name>
| <password>_______</password>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <metadata>
| <type-mapping>PostgreSQL 7.2</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
make sure you enter the correct driver, connection string etc. Now open login-config.xml in the server's conf/ directory. you need to define a security domain here. add this to the file:
| <application-policy name = "exampleDomain">
| <authentication>
| <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
| <module-option name = "unauthenticatedIdentity">guest</module-option>
| <module-option name = "dsJndiName">java:/exampleDS</module-option>
| <module-option name = "principalsQuery">SELECT PASSWD FROM USERS WHERE USERID=?</module-option>
| <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM ROLES WHERE USERID=?</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
note the definition "exampleDomain" and how the dsJndiName is set to java:/exampleDS. exampleDS comes from the database connection definition above! the two queries in this file mean the following: the principalsQuery should return the password of the user where userid is the name the user entered in the login form. The rolesQuery must return all roles associated with the username. So it's time to create two tables in your database, with at least this info:
| table USERS
| +-------------------------------------+
| | userid | passwd |
| +-------------------------------------+
| | test | secret |
| +-------------------------------------+
|
| table ROLES
| +-------------------------------------+
| | userid | roleid |
| +-------------------------------------+
| | test | admin |
| | test | manager |
| +-------------------------------------+
|
(don't mind the ascii art)
we've created a user "test" with the password "secret" and the roles "admin" and "manager".
time to secure the web application, open up jboss-web.xml (from the WEB-INF directory) and put this in it:
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-web>
| <security-domain>java:/jaas/exampleDomain</security-domain>
| <context-root>/example</context-root>
| </jboss-web>
|
this sets the security domain for the web application to "exampleDomain" wich is declared in the login-config.xml above! jboss now knows wich login module configuration applies to this application.
now edit web.xml (also in the WEB-INF directory) and add this:
| <security-constraint>
| <display-name>manager</display-name>
| <web-resource-collection>
| <web-resource-name>manager_pages</web-resource-name>
| <description/>
| <url-pattern>/manager/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| <http-method>HEAD</http-method>
| <http-method>PUT</http-method>
| <http-method>OPTIONS</http-method>
| <http-method>TRACE</http-method>
| <http-method>DELETE</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description/>
| <role-name>manager</role-name>
| </auth-constraint>
| <user-data-constraint>
| <description/>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
|
| <security-constraint>
| <display-name>admin</display-name>
| <web-resource-collection>
| <web-resource-name>admin_pages</web-resource-name>
| <description/>
| <url-pattern>/admin/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| <http-method>HEAD</http-method>
| <http-method>PUT</http-method>
| <http-method>OPTIONS</http-method>
| <http-method>TRACE</http-method>
| <http-method>DELETE</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description/>
| <role-name>admin</role-name>
| </auth-constraint>
| <user-data-constraint>
| <description/>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
|
| <login-config>
| <auth-method>FORM</auth-method>
| <realm-name>example</realm-name>
| <form-login-config>
| <form-login-page>/login.html</form-login-page>
| <form-error-page>/login_error.html</form-error-page>
| </form-login-config>
| </login-config>
|
| <security-role>
| <description/>
| <role-name>admin</role-name>
| </security-role>
| <security-role>
| <description/>
| <role-name>manager</role-name>
| </security-role>
|
this defines two security constraints: one for everything behind /manager (where only users with the "manager" role are allowed) and one for admins, everything behind /admin.
the login pages (login.html and login-error.html) should look like this:
| <html>
| <body>
| <form action="j_security_check" method="post">
| <input type="text" name="j_username"><br>
| <input type="password" name="j_password"><br>
| <input type="submit" value="login">
| </form>
| </body>
| </html>
|
hope this helps!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019228#4019228
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019228
19Â years, 2Â months
[JBoss Seam] - Re: EL enhancements
by lightbulb432
Below is the log of the exception. Also, I have the following in my faces-config.xml:
<application>
| ...
| <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
| </application>
javax.el.ELException: Error Parsing: #{compHome.done(x.id)}
| at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:140)
| at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:157)
| at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:201)
| at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:74)
| at org.jboss.seam.ui.facelet.SeamExpressionFactory.createValueExpression(SeamExpressionFactory.java:105)
| at com.sun.facelets.el.ELText$ELTextVariable.apply(ELText.java:161)
| at com.sun.facelets.el.ELText$ELTextComposite.apply(ELText.java:142)
| at com.sun.facelets.compiler.TextInstruction.apply(TextInstruction.java:56)
| at com.sun.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:85)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
| at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
| at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| Caused by: com.sun.el.parser.ParseException: Encountered "(" at line 1, column 20.
| Was expecting one of:
| "}" ...
| "." ...
| "[" ...
| ">" ...
| "gt" ...
| "<" ...
| "lt" ...
| ">=" ...
| "ge" ...
| "<=" ...
| "le" ...
| "==" ...
| "eq" ...
| "!=" ...
| "ne" ...
| "&&" ...
| "and" ...
| "||" ...
| "or" ...
| "*" ...
| "+" ...
| "-" ...
| "?" ...
| "/" ...
| "div" ...
| "%" ...
| "mod" ...
|
| at com.sun.el.parser.ELParser.generateParseException(ELParser.java:1651)
| at com.sun.el.parser.ELParser.jj_consume_token(ELParser.java:1531)
| at com.sun.el.parser.ELParser.DeferredExpression(ELParser.java:134)
| at com.sun.el.parser.ELParser.CompositeExpression(ELParser.java:61)
| at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:103)
| at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:157)
| at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:201)
| at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:74)
| at org.jboss.seam.ui.facelet.SeamExpressionFactory.createValueExpression(SeamExpressionFactory.java:105)
| at com.sun.facelets.el.ELText$ELTextVariable.apply(ELText.java:161)
| at com.sun.facelets.el.ELText$ELTextComposite.apply(ELText.java:142)
| at com.sun.facelets.compiler.TextInstruction.apply(TextInstruction.java:56)
| at com.sun.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:85)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
| at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
| at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019226#4019226
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019226
19Â years, 2Â months