2 Replies Latest reply on Jan 19, 2009 3:25 AM by Alejandro Guizar

    Deploying WebService in BPEL Project - selection of size oth

    ben koch Newbie

      Sorry, because maybe it´s a stupid error. I´m a beginer, and I cannot understan all...

      I've been trying to consume a WebService in BPEL 2.0 process with jbpm and the following exception occurs. Any idea what's the problem?

      11:47:03,840 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==
      11:47:03,872 ERROR [XPathEvaluator] selection of size other than one: []

      I think is a bad assigment, but I´ve not idea. The webservice works good...

      My BPEL file is the next:

      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process exitOnStandardFault="yes" name="HelloWorld"
       targetNamespace="http://jbpm.org/examples/hello"
       xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
       xmlns:ns="http://jbpm.org/examples/helloArtifacts"
       xmlns:ns0="http://sundn/"
       xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://jbpm.org/examples/hello">
       <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
       location="hello.wsdl" namespace="http://jbpm.org/examples/hello"/>
       <bpws:import importType="http://www.w3.org/2001/XMLSchema"
       location="bundleentry://478/cache/www.w3.org/2001/XMLSchema.xsd" namespace="http://www.w3.org/2001/XMLSchema"/>
       <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
       location="http://127.0.0.1:8080/webService/webServiceServletName?wsdl" namespace="http://sundn/"/>
       <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
       location="helloArtifacts.wsdl" namespace="http://jbpm.org/examples/helloArtifacts"/>
       <bpws:partnerLinks>
       <bpws:partnerLink myRole="Greeter" name="caller" partnerLinkType="tns:Greeter-Caller">
       <bpws:documentation>establishes the relationship with the caller agent</bpws:documentation>
       </bpws:partnerLink>
       <bpws:partnerLink name="PartnerLink"
       partnerLinkType="ns:validationPLT" partnerRole="validationRolePLT"/>
       </bpws:partnerLinks>
       <bpws:variables>
       <bpws:variable messageType="tns:nameMessage" name="request">
       <bpws:documentation>holds the incoming message</bpws:documentation>
       </bpws:variable>
       <bpws:variable messageType="tns:greetingMessage" name="response">
       <bpws:documentation>holds the outgoing message</bpws:documentation>
       </bpws:variable>
       <bpws:variable
       messageType="ns0:webServiceName_validNameResponse" name="PartnerLinkResponse"/>
       <bpws:variable messageType="ns0:webServiceName_validName" name="PartnerLinkRequest"/>
       </bpws:variables>
       <bpws:sequence name="MainSeq">
       <bpws:receive createInstance="yes" name="ReceiveName"
       operation="sayHello" partnerLink="caller"
       portType="tns:Greeter" variable="request">
       <bpws:documentation>receive the name of a person</bpws:documentation>
       </bpws:receive>
       <bpws:assign name="Assign" validate="no">
       <bpws:copy>
       <bpws:from part="name" variable="request">
       <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:name]]></bpws:query>
       </bpws:from>
       <bpws:to part="validName" variable="PartnerLinkRequest">
       <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/ns0:webService/ns0:param]]></bpws:query>
       </bpws:to>
       </bpws:copy>
       </bpws:assign>
       <bpws:invoke inputVariable="PartnerLinkRequest" name="Invoke"
       operation="validName" outputVariable="PartnerLinkResponse"
       partnerLink="PartnerLink" portType="ns0:webServiceName"/>
       <bpws:assign name="Assign1" validate="no">
       <bpws:copy>
       <bpws:from part="validNameResponse" variable="PartnerLinkResponse">
       <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/ns0:webService/ns0:return]]></bpws:query>
       </bpws:from>
       <bpws:to part="greeting" variable="response"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from><![CDATA[concat('Hello, ', $request.name, '!')]]></bpws:from>
       <bpws:to part="greeting" variable="response"/>
       </bpws:copy>
       </bpws:assign>
       <bpws:reply name="SendGreeting" operation="sayHello"
       partnerLink="caller" portType="tns:Greeter" variable="response">
       <bpws:documentation>send greeting back to caller</bpws:documentation>
       </bpws:reply>
       </bpws:sequence>
      </bpws:process>


      My Artifacts file:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="helloArtifacts" targetNamespace="http://jbpm.org/examples/helloArtifacts" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://jbpm.org/examples/helloArtifacts" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://jbpm.org/examples/hello" xmlns:wsdl1="http://sundn/">
      <import location="http://127.0.0.1:8080/webService/webServiceServletName?wsdl" namespace="http://sundn/"/>
      
       <plnk:partnerLinkType name="validationPLT">
      <plnk:role name="validationRolePLT" portType="wsdl1:webServiceName"/>
      </plnk:partnerLinkType>
       <import location="http://127.0.0.1:8080/webService/webServiceServletName?wsdl" namespace="http://sundn/"/>
      </definitions>
      


      And my WSDL:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="http://jbpm.org/examples/hello"
       xmlns:tns="http://jbpm.org/examples/hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:plt="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
       xmlns="http://schemas.xmlsoap.org/wsdl/">
      
       <message name="greetingMessage">
       <documentation>carries the greeting</documentation>
       <part name="greeting" type="xsd:string" />
       </message>
      
       <message name="nameMessage">
       <documentation>carries the name of a person</documentation>
       <part name="name" type="xsd:string" />
       <part name="pass" type="xsd:string"></part>
       </message>
      
       <portType name="Greeter">
       <documentation>describes the interface presented to callers</documentation>
       <operation name="sayHello">
       <input message="tns:nameMessage" />
       <output message="tns:greetingMessage" />
       </operation>
       </portType>
      
       <plt:partnerLinkType name="Greeter-Caller">
       <plt:documentation>
       characterizes the relationship between the greeter and its caller
       </plt:documentation>
       <plt:role name="Greeter" portType="tns:Greeter">
       <plt:documentation>
       Caller does not provide services to Greeter, hence the "Caller" role is omitted
       </plt:documentation>
       </plt:role>
       </plt:partnerLinkType>
      
      </definitions>


      I was finding in the log file, I I have not idea...

      2009-01-15 11:27:00,331 DEBUG [org.hibernate.SQL]
       /* load org.jbpm.instantiation.Delegation */ select
       delegation0_.ID_ as ID1_10_0_,
       delegation0_.CLASSNAME_ as CLASSNAME2_10_0_,
       delegation0_.CONFIGURATION_ as CONFIGUR3_10_0_,
       delegation0_.CONFIGTYPE_ as CONFIGTYPE4_10_0_,
       delegation0_.PROCESSDEFINITION_ as PROCESSD5_10_0_
       from
       JBPM_DELEGATION delegation0_
       where
       delegation0_.ID_=?
      
      
      
      
      ...
      
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.loader.Loader] done entity load
      2009-01-15 11:27:00,331 DEBUG [org.jbpm.bpel.graph.scope.FaultActionHandler] handling fault exception: org.jbpm.bpel.graph.exe.ScopeInstance@1bccddb[name=global,token=/,state=AP]
      org.jbpm.bpel.graph.exe.BpelFaultException: org.jbpm.bpel.graph.exe.FaultInstance@3bf56f[name={http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure]
       at org.jbpm.bpel.sublang.xpath.XPathEvaluator.narrowToSingleNode(XPathEvaluator.java:258)
       at org.jbpm.bpel.sublang.xpath.XPathVariableQueryEvaluator.evaluate(XPathVariableQueryEvaluator.java:63)
       at org.jbpm.bpel.graph.basic.assign.FromVariable.extract(FromVariable.java:63)
       at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.bpel.graph.basic.assign.From_$$_javassist_1.extract(From_$$_javassist_1.java)
       at org.jbpm.bpel.graph.basic.assign.Copy.execute(Copy.java:36)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:45)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:123)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:390)
       at org.jbpm.bpel.graph.def.Activity.proceed(Activity.java:241)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:229)
       at org.jbpm.bpel.graph.basic.Receive.messageReceived(Receive.java:53)
       at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.bpel.graph.basic.Receive_$$_javassist_19.messageReceived(Receive_$$_javassist_19.java)
       at org.jbpm.bpel.integration.def.ReceiveAction.deliverMessage(ReceiveAction.java:98)
       at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.bpel.integration.def.ReceiveAction_$$_javassist_92.deliverMessage(ReceiveAction_$$_javassist_92.java)
       at org.jbpm.bpel.integration.jms.StartListener.deliverRequest(StartListener.java:219)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:165)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:697)
       at java.lang.Thread.run(Thread.java:595)
      2009-01-15 11:27:00,331 DEBUG [org.jbpm.bpel.graph.exe.ScopeInstance] state change to FP on Scope(global) for Token(/)
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.cache.NonstrictReadWriteCache] Cache lookup: org.jbpm.bpel.graph.scope.Scope.faultHandlers#1861
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.cache.NonstrictReadWriteCache] Cache miss
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.loader.Loader] loading collection: [org.jbpm.bpel.graph.scope.Scope.faultHandlers#1861]
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.SQL]
       /* load one-to-many org.jbpm.bpel.graph.scope.Scope.faultHandlers */ select
       faulthandl0_.SCOPE_ as SCOPE37_1_,
       faulthandl0_.ID_ as ID1_1_,
       faulthandl0_.NODECOLLECTIONINDEX_ as NODECOL35_1_,
       faulthandl0_.ID_ as ID1_5_0_,
       faulthandl0_.NAME_ as NAME3_5_0_,
       faulthandl0_.DESCRIPTION_ as DESCRIPT4_5_0_,
       faulthandl0_.PROCESSDEFINITION_ as PROCESSD5_5_0_,
       faulthandl0_.ISASYNC_ as ISASYNC6_5_0_,
       faulthandl0_.ISASYNCEXCL_ as ISASYNCE7_5_0_,
       faulthandl0_.ACTION_ as ACTION8_5_0_,
       faulthandl0_.SUPERSTATE_ as SUPERSTATE9_5_0_,
       faulthandl0_.SUPPRESSJOINFAILURE_ as SUPPRES18_5_0_,
       faulthandl0_.COMPOSITEACTIVITY_ as COMPOSI19_5_0_,
       faulthandl0_.JOINCONDITION_ as JOINCON20_5_0_,
       faulthandl0_.ACTIVITY_ as ACTIVITY33_5_0_,
       faulthandl0_.VARIABLE_ as VARIABLE24_5_0_,
       faulthandl0_.FAULTLOCALNAME_ as FAULTLO22_5_0_,
       faulthandl0_.FAULTNAMESPACE_ as FAULTNA23_5_0_
       from
       JBPM_NODE faulthandl0_
       where
       (
       faulthandl0_.CLASS_ = 'V'
       )
       and faulthandl0_.SCOPE_=?
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
      2009-01-15 11:27:00,331 DEBUG [org.hibernate.loader.Loader] result set contains (possibly empty) collection: [org.jbpm.bpel.graph.scope.Scope.faultHandlers#1861]
      
      
      
      I have modify the queries a lot of times... What must I do??
      
      Thanks!