beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Schoettger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (BEEHIVE-1153) NPE from JDBCControl when method returns XMLBeans Document type
Date Wed, 08 Nov 2006 22:10:52 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-1153?page=all ]

Chad Schoettger resolved BEEHIVE-1153.
--------------------------------------

    Fix Version/s: V.Next
       Resolution: Fixed
         Assignee: matt c  (was: Chad Schoettger)

Fixed, svn rev 472654

Created XMLStreamReader implementation for reading from a ResultSet.  Allows for proper mapping
of a ResultSet to an XMLBeans document type schema type.

Also added new DRTs for document schema types.

> NPE from JDBCControl when method returns XMLBeans Document type
> ---------------------------------------------------------------
>
>                 Key: BEEHIVE-1153
>                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1153
>             Project: Beehive
>          Issue Type: Bug
>          Components: System Controls
>    Affects Versions: V1Alpha, V1Beta, v1m1, 1.0, 1.0.1, 1.0.2
>            Reporter: Chad Schoettger
>         Assigned To: matt c
>             Fix For: V.Next
>
>
> When a JDBCControl method returns a XMLBeans Document type, an NPE is thrown.
> Sample Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="java:///database/customer_db" xmlns="java:///database/customer_db"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
>   <xsd:element name="XCustomer" wld:DefaultNamespace="java:///database/customer_db">
>     <xsd:complexType>
>       <xsd:choice maxOccurs="unbounded">
>         <xsd:element name="XCustomerRow">
>           <xsd:complexType>
>             <xsd:sequence>
>               <xsd:element name="CUSTID" type="xsd:int" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="NAME" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="ADDRESS" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="CITY" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="STATE" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="ZIP" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="AREA_CODE" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>               <xsd:element name="PHONE" type="xsd:string" minOccurs="0" nillable="true"></xsd:element>
>             </xsd:sequence>
>           </xsd:complexType>
>         </xsd:element>
>       </xsd:choice>
>     </xsd:complexType>
>   </xsd:element>
> </xsd:schema>
> Sample JDBCControl Method:
>   @JdbcControl.SQL(statement = "SELECT custid, name, address, city, state, zip, area_code,
phone FROM customer WHERE custid = {key}")
>     public XCustomerDocument getCustomerByID(int key); 
> Stack Trace:
> java.lang.NullPointerException
> 	at org.apache.beehive.controls.system.jdbc.RowToXmlObjectMapper.mapRowToReturnType(RowToXmlObjectMapper.java:103)
> 	at org.apache.beehive.controls.system.jdbc.DefaultXmlObjectResultSetMapper.mapToResultType(DefaultXmlObjectResultSetMapper.java:60)
> 	at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.execPreparedStatement(JdbcControlImpl.java:366)
> 	at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.invoke(JdbcControlImpl.java:224)
> 	at org.apache.beehive.controls.system.jdbc.test.results.ResultsTestCtrlBean.getAUserXmlDoc(ResultsTestCtrlBean.java:1157)
> 	at org.apache.beehive.controls.system.jdbc.units.results.XmlBeanResultsTest.testXmlBeanDocReturnType(XmlBeanResultsTest.java:78)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message