incubator-agila-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn J Gonzales <ggonza...@exist.com>
Subject Re: Building and Installation Guide
Date Wed, 08 Jun 2005 06:28:36 GMT
Matthieu Riou wrote:

>I think this error has nothing to do with your WSDL document but more
>with MySQL configuration. Would you also post the full query that has
>been executed just before the stacktrace so I can see what could be
>wrong with it?
>
>Thanks,
>
>Matthieu.
>  
>
Right, this error doesn't have to do with the WSDL document. The problem 
is that MySQL versions older than 4.1 don't support subqueries; you'll 
have to upgrade to version 4.1 or higher, Anoop. The SQL that Hibernate 
generates is replete with subqueries.

Matthieu, the error I was talking about was this: after successfully 
deploying the WSDL from example1, I proceeded to deploy the process 
definition, also from example1. The following occurred:

[Agila] DEBUG [http-8080-Processor21] AgilaDeployerImpl.deploy(355) | 
<process>
Hibernate: select processimp0_.ID as ID, processimp0_.name as name, 
processimp0_.vers as vers, processimp0_.namespace as namespace, 
processimp0_.ACTIVITY_ID as ACTIVITY5_ from PROCESS processimp0_ where 
(processimp0_.name=?)and(processimp0_.namespace=? 
)and(processimp0_.vers>=0 )and(processimp0_.vers=(select 
MAX(processimp1_.vers) from PROCESS processimp1_ where 
(processimp1_.name=? )and(processimp1_.namespace=? )))
[Agila] ERROR [http-8080-Processor21] 
AgilaDeployerImpl.deployDefinitions(485) | A propertyAlias is defined 
without property : customerFirstName
[Agila] INFO [http-8080-Processor21] 
DBSessionManager.rollbackTransaction(120) | Rollbacking transaction with 
thread : Thread[http-8080-Processor21,5,main]
[Agila] ERROR [http-8080-Processor21] DeployerWSA.deployBPEL(66) | A 
DeploymentException has been caught in DeployerWSA
org.apache.agila.bpel.deployer.exception.DeploymentException: 
org.apache.agila.bpel.deployer.exception.DeploymentException: 
org.apache.agila.bpel.deployer.exception.
DeploymentException: a propertyAlias is defined without property : 
customerFirstName
        at 
org.apache.agila.bpel.deployer.priv.AgilaDeployerImpl.deploy(AgilaDeployerImpl.java:388)
        at 
org.apache.agila.bpel.deployer.priv.AgilaDeployerImpl.deployBPEL(AgilaDeployerImpl.java:225)
        at 
org.apache.agila.bpel.wsa.DeployerWSA.deployBPEL(DeployerWSA.java:64)
        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:324)

After declaring the bpel namespace in the definitions root, and 
prefixing the property and propertyAlias tags, deployment of the process 
went ok. Isn't this because the deployment method 
org.apache.agila.bpel.deployer.priv.AgilaDeployerImpl.deployDefinitions() 
uses the bpel namespace 
(http://schemas.xmlsoap.org/ws/2003/03/business-process/) to select the 
property and propertyAlias nodes, as shown below?

                469  XPath xpathSelector = 
DocumentHelper.createXPath("//*/defaultNS:property[@name=\"" + 
propertyName + "\"]");
                470  HashMap nsMap = new HashMap(1);
                471  nsMap.put("defaultNS", BPEL_NS);
                472  xpathSelector.setNamespaceURIs(nsMap);
                473  Node propNode = xpathSelector.selectSingleNode(doc);

Also, deploying the wsdef.xml file produced an error:

    Couldn't find a definition for Message: 
name={http://www.apache.org/agila/samples/exemple1/definition/}errorMessage

which I think is an effect of the transition to WSDL4J for validation. 
I've attached a diff of the wsdef.xml file for example1.


Another thing, after having successfully deployed the process (after 
editing wsdef.xml as above), I got a null pointer exception, as below 
(I'm still looking into it):

[Agila] DEBUG [http-8080-Processor25] AgilaDeployerImpl.deployBPEL(233) 
| WSDL document 
C:\resources\jakarta-tomcat-5.0.28\webapps\agila-ws\WEB-INF\deploy/apache.org
.agila.samples.exemple1.process~2 as been deployed properly.
[Agila] ERROR [http-8080-Processor22] DeployProcess.execute(84) | A 
problem occured when deploying the process.
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NullPointerException
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}hostname:Glenn

java.lang.NullPointerException
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
        at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2754)
        at org.apache.axis.client.Call.invoke(Call.java:2737)
        at org.apache.axis.client.Call.invoke(Call.java:2413)
        at org.apache.axis.client.Call.invoke(Call.java:2336)
        at org.apache.axis.client.Call.invoke(Call.java:1793)
        at 
org.apache.agila.bpel.client.AgilaDeployer.deployBPEL(AgilaDeployer.java:106)
        at 
org.apache.agila.bpel.web.deployer.action.DeployProcess.execute(DeployProcess.java:79)
        at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
        at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

Cheers,
Glenn

>On 6/7/05, Anoop kumar V <anoopkumarv@gmail.com> wrote:
>  
>
>>Thanks Glenn,
>>
>>tried that as well - but I stil get a lot of exceptions: primarily a JDBC
>>exception:
>>
>>WARNING: SQL Error: 1064, SQLState: 42000
>>Jun 7, 2005 11:11:46 AM net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
>>SEVERE: Syntax error or access violation, message from server: "You have an
>>error in your SQL syntax. Check the manual that corresponds to your MySQL
>>server version for the right syntax to use near 'select
>>MAX(processimp1_.vers) from PROCESS proces
>>simp1_ where ("
>>Jun 7, 2005 11:11:46 AM net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
>>WARNING: SQL Error: 1064, SQLState: 42000
>>Jun 7, 2005 11:11:46 AM net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
>>SEVERE: Syntax error or access violation, message from server: "You have an
>>error in your SQL syntax. Check the manual that corresponds to your MySQL
>>server version for the right syntax to use near 'select
>>MAX(processimp1_.vers) from PROCESS proces
>>simp1_ where ("
>>Jun 7, 2005 11:11:46 AM net.sf.hibernate.JDBCException <init>
>>SEVERE: Could not execute query
>>java.sql.SQLException: Syntax error or access violation, message from
>>server: "You have an error in your SQL syntax. Check the manual that
>>corresponds to your MySQL server version for the right syntax to use near
>>'select MAX(processimp1_.vers) from
>>PROCESS processimp1_ where ("
>>at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
>>at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
>>at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
>>at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
>>at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java
>>:1496)
>>at com.mchange.v2.sql.filter.FilterPreparedStatement.executeQuery(
>>FilterPreparedStatement.java:68)
>>at com.mchange.v2.c3p0.impl.C3P0PooledConnection$2.executeQuery(
>>C3P0PooledConnection.java:567)
>>at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
>>at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:875)
>>at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269)
>>at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
>>Loader.java:133)
>>at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
>>at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
>>at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
>>at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
>>at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1521)
>>at
>>org.apache.agila.bpel.engine.priv.core.definition.impl.dao.ProcessDAO.findByNS
>>(ProcessDAO.java:125)
>>at org.apache.agila.bpel.engine.priv.core.definition.ProcessFactory.getByNS(
>>ProcessFactory.java:217)
>>at
>>org.apache.agila.bpel.engine.priv.AgilaEngineAdminImpl.org$apache$agila$bpel$engine$priv$AgilaEngineAdminImpl$loadDocumentsNS$aop
>>(AgilaEngineAdminImpl.java)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>at java.lang.reflect.Method.invoke(Unknown Source)
>>at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java
>>:70)
>>at org.apache.agila.bpel.engine.common.aspect.TransactionInterceptor.invoke(
>>TransactionInterceptor.java:60)
>>at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java
>>:59)
>>at org.apache.agila.bpel.engine.common.aspect.TransactionInterceptor.invoke(
>>TransactionInterceptor.java:60)
>>at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java
>>:59)
>>at org.apache.agila.bpel.engine.common.aspect.TransactionInterceptor.invoke(
>>TransactionInterceptor.java:60)
>>
>>
>>Here are the lines that I changed in the wsdef.xml:
>>
>>
>><bpel:property name="customerFirstName" type="xsd:string"/>
>><bpel:propertyAlias propertyName="customerFirstName"
>>messageType="creditInformationMessage" part="firstName"/>
>><bpel:propertyAlias propertyName="customerFirstName"
>>messageType="approvalMessage" part="firstName"/>
>><bpel:propertyAlias propertyName="customerFirstName"
>>messageType="riskAssessmentMessage" part="firstName"/>
>>
>><bpel:property name="customerLastName" type="xsd:string"/>
>><bpel:propertyAlias propertyName="customerLastName"
>>messageType="creditInformationMessage" part="lastName"/>
>><bpel:propertyAlias propertyName="customerLastName"
>>messageType="approvalMessage" part="lastName"/>
>><bpel:propertyAlias propertyName="customerLastName"
>>messageType="riskAssessmentMessage" part="lastName"/>
>>
>><bpel:property name="workitem" type="xsd:string"/>
>><bpel:propertyAlias propertyName="workitem" messageType="workMessage"
>>part="wipart" query="/workitemid"/>
>>
>>let me know what I am doing wrong.
>>
>>Thanks and best regards,
>>Anoop
>>
>>On 6/6/05, Glenn J Gonzales <ggonzales@exist.com> wrote:
>>    
>>
>>>Hi Anoop,
>>>
>>>I believe this is because the wsdef.xml file likes the 'bpel' namespace
>>>for the property and propertyAlias tags. I think it should be like this:
>>>
>>><bpel:property name="customerFirstName" type="xsd:string"/>
>>><bpel:propertyAlias propertyName="customerFirstName"
>>>messageType="creditInformationMessage" part="firstName"/>
>>>. . .
>>>
>>>The samples from Twister had this, and worked ok, I don't know why the
>>>'bpel' namespace disappeared in the samples for Agila. Hope this helps.
>>>
>>>Cheers,
>>>Glenn
>>>
>>>Anoop kumar V wrote:
>>>
>>>      
>>>
-------

Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird/


Mime
View raw message