<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
<!--

/*
  The original subSilver Theme for phpBB version 2+
  Created by subBlue design
  http://www.subBlue.com

  NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
  theme administration centre. When you have finalised your style you could cut the final CSS code
  and place it in an external file, deleting this section to save bandwidth.
*/


 /* General page style. The scroll bar colours only visible in IE5.5+ */
body {
        background-color: #E5E5E5;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 11;
        color: #000000;
}

/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
p, td                { font-size : 11; color : #000000; }
a:link,a:active,a:visited { color : #006699; }
a:hover                { text-decoration: underline; color : #DD6900; }
hr        { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
h1,h2                { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000;}


/* This is the border line & background colour round the entire page */
.bodyline        { background-color: #FFFFFF; border: 1px #98AAB1 solid; }


/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; line-height: 12px}
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover        { color: #DD6900; text-decoration: underline; }


/* Forum title: Text and link to the forums used in: index.php */
.forumlink                { font-weight: bold; font-size: 12px; color : #006699; }
a.forumlink         { text-decoration: none; color : #006699; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }


/* The content of the posts (body of text) */
.postbody { font-size : 12px; line-height: 18px}
a.postlink:link        { text-decoration: none; color : #006699 }
a.postlink:visited { text-decoration: none; color : #5493B4; }
a.postlink:hover { text-decoration: underline; color : #DD6900}


/* Quote & Code blocks */
.code {
        font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
        background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
        border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

.quote {
        font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
        background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
        border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

-->
</style>
</head>
        <body>

        <div class="postbody">Hello all, <br />
<br />
I currently try to set up a JBI file in order to use the storedQuery operation and I'm facing a problem when a message is send to my component.<br />
<br />
The message (in the fault) returned is: <br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr>           <td><span class="genmed"><b>Code:</b></span></td>        </tr>        <tr>          <td class="code">Failed to process the exchange &#58; NullPointerException &#58; null</td>        </tr></table><span class="postbody"><br />
<br />
<br />
Here is my JBI file:<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr>           <td><span class="genmed"><b>Code:</b></span></td>        </tr>        <tr>          <td class="code"><?xml version="1.0" encoding="UTF-8"?><br />
<!-- <br />
&nbsp; &nbsp;JBI descriptor for the PEtALS' "petals-bc-xquare" component &#40;XQuare&#41;.<br />
&nbsp; &nbsp;Originally created for the version 2.0 of the component.<br />
&nbsp;--><br />
<jbi&#58;jbi version="1.0" <br />
&nbsp; &nbsp;xmlns&#58;interfaceNs="http&#58;//petals.ow2.org/components/xquare/version-2.0"<br />
&nbsp; &nbsp;xmlns&#58;jbi="http&#58;//java.sun.com/xml/ns/jbi"<br />
&nbsp; &nbsp;xmlns&#58;petalsCDK="http&#58;//petals.ow2.org/components/extensions/version-4.0"<br />
&nbsp; &nbsp;xmlns&#58;serviceNs="http&#58;//prosodie.com"<br />
&nbsp; &nbsp;xmlns&#58;xquare="http&#58;//petals.ow2.org/components/xquare/version-2.0"<br />
&nbsp; &nbsp;xmlns&#58;xsi="http&#58;//www.w3.org/2001/XMLSchema-instance"><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. --><br />
&nbsp; &nbsp;<jbi&#58;services binding-component="true"><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<!-- Import a Service into PEtALS => provides a Service. --><br />
&nbsp; &nbsp;&nbsp; &nbsp;<jbi&#58;provides &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;interface-name="interfaceNs&#58;XQuare"<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;service-name="serviceNs&#58;SqlService"<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;endpoint-name="SqlServiceEndpoint"><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<!-- CDK specific elements --><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<petalsCDK&#58;wsdl>description.wsdl</petalsCDK&#58;wsdl><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<!-- Component specific elements -->&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;url>jdbc&#58;jtds&#58;sqlserver&#58;//xxxx&#58;1433/bbb</xquare&#58;url><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;user>sa</xquare&#58;user><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;password>xxx</xquare&#58;password><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;driver>net.sourceforge.jtds.jdbc.Driver</xquare&#58;driver><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;mapping>mapping.map</xquare&#58;mapping><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;maxActive>8</xquare&#58;maxActive><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;maxIdle>8</xquare&#58;maxIdle><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;minIdle>0</xquare&#58;minIdle><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;maxWait>-1</xquare&#58;maxWait><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;timeBetweenEvictionRunsMillis>-1</xquare&#58;timeBetweenEvictionRunsMillis><br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;storedQueries><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<xquare&#58;storedQuery id="0"><!&#91;CDATA&#91;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;declare variable $serialNumber as xs&#58;string external<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<result> &#123;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;for $u in collection&#40;"_userData"&#41;/_userData&#91;serialNumber = $serialNumber&#93;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return $u<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125; </result>&#93;&#93;><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</xquare&#58;storedQuery><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</xquare&#58;storedQueries>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;</jbi&#58;provides><br />
&nbsp; &nbsp;</jbi&#58;services><br />
</jbi&#58;jbi></td>        </tr></table><span class="postbody"><br />
<br />
The input message:<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr>           <td><span class="genmed"><b>Code:</b></span></td>        </tr>        <tr>          <td class="code"><storedQuery id="0"><br />
<param name="serialNumber">269</param><br />
</storedQuery></td>        </tr></table><span class="postbody"><br />
<br />
The message in the petals console is:<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr>           <td><span class="genmed"><b>Code:</b></span></td>        </tr>        <tr>          <td class="code">&#91;Petals.Container.Components.petals-bc-xquare&#93;-SEVERE 2009-08-26 18&#58;14&#58;23,752 null<br />
java.lang.NullPointerException<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.component.framework.util.XMLUtil.getAttributeValue&#40;XMLUtil.java&#58;354&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.getStoredQuery&#40;XQuareBCJBIListener.java&#58;479&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.doStoredQuery&#40;XQuareBCJBIListener.java&#58;385&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.onJBIMessage&#40;XQuareBCJBIListener.java&#58;229&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.processInOutAsProvider&#40;MessageExchangeProcessor.java&#58;524&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.processAsProvider&#40;MessageExchangeProcessor.java&#58;421&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.process&#40;MessageExchangeProcessor.java&#58;308&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.run&#40;MessageExchangeProcessor.java&#58;145&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask&#40;Unknown Source&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor$Worker.run&#40;Unknown Source&#41;<br />
&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.Thread.run&#40;Unknown Source&#41;</td>        </tr></table><span class="postbody"><br />
<br />
Could you tell me how to configure a storedQuery in a JBI XQuare component file and what is wrong in my case?<br />
<br />
Thank you.</div>
        <br /><div class="gensmall"><br />
<br />
<br />
-------------------- m2f --------------------<br />
<br />
Read this forum topic online here:<br />
<a href="http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=890#890" target="_blank">http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=890#890</a><br />
<br />
-------------------- m2f --------------------</div>
        </body>
</html>