[Users] XQuare \ SU provide JBI setup

Dach petals-use at ebmwebsourcing.com
Wed Mar 16 10:35:47 CET 2011


Hello all, 

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.

The message (in the fault) returned is: 

Code:
Failed to process the exchange : NullPointerException : null




Here is my JBI file:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	JBI descriptor for the PEtALS' "petals-bc-xquare" component (XQuare).
	Originally created for the version 2.0 of the component.
 -->
<jbi:jbi version="1.0" 
	xmlns:interfaceNs="http://petals.ow2.org/components/xquare/version-2.0"
	xmlns:jbi="http://java.sun.com/xml/ns/jbi"
	xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
	xmlns:serviceNs="http://prosodie.com"
	xmlns:xquare="http://petals.ow2.org/components/xquare/version-2.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
	<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
	<jbi:services binding-component="true">
	
		<!-- Import a Service into PEtALS => provides a Service. -->
		<jbi:provides 		
			interface-name="interfaceNs:XQuare"
			service-name="serviceNs:SqlService"
			endpoint-name="SqlServiceEndpoint">
	
			<!-- CDK specific elements -->
			<petalsCDK:wsdl>description.wsdl</petalsCDK:wsdl>
				
			<!-- Component specific elements -->	
			<xquare:url>jdbc:jtds:sqlserver://xxxx:1433/bbb</xquare:url>
			<xquare:user>sa</xquare:user>
			<xquare:password>xxx</xquare:password>
			<xquare:driver>net.sourceforge.jtds.jdbc.Driver</xquare:driver>
			<xquare:mapping>mapping.map</xquare:mapping>
			<xquare:maxActive>8</xquare:maxActive>
			<xquare:maxIdle>8</xquare:maxIdle>
			<xquare:minIdle>0</xquare:minIdle>
			<xquare:maxWait>-1</xquare:maxWait>
			<xquare:timeBetweenEvictionRunsMillis>-1</xquare:timeBetweenEvictionRunsMillis>

			<xquare:storedQueries>
				<xquare:storedQuery id="0"><![CDATA[
					declare variable $serialNumber as xs:string external
					<result> {
					   for $u in collection("_userData")/_userData[serialNumber = $serialNumber]
					   return $u
					} </result>]]>
				</xquare:storedQuery>
			</xquare:storedQueries>						
		</jbi:provides>
	</jbi:services>
</jbi:jbi>



The input message:

Code:
<storedQuery id="0">
<param name="serialNumber">269</param>
</storedQuery>



The message in the petals console is:

Code:
[Petals.Container.Components.petals-bc-xquare]-SEVERE 2009-08-26 18:14:23,752 null
java.lang.NullPointerException
        at org.ow2.petals.component.framework.util.XMLUtil.getAttributeValue(XMLUtil.java:354)
        at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.getStoredQuery(XQuareBCJBIListener.java:479)
        at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.doStoredQuery(XQuareBCJBIListener.java:385)
        at org.ow2.petals.bc.xquare.provide.XQuareBCJBIListener.onJBIMessage(XQuareBCJBIListener.java:229)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:524)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:421)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.process(MessageExchangeProcessor.java:308)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.run(MessageExchangeProcessor.java:145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)



Could you tell me how to configure a storedQuery in a JBI XQuare component file and what is wrong in my case?

Thank you.




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=890#890

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/a0f18fe5/attachment.htm>


More information about the Users mailing list