beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matt c (JIRA)" <j...@apache.org>
Subject [jira] Closed: (BEEHIVE-1153) NPE from JDBCControl when method returns XMLBeans Document type
Date Thu, 05 Jul 2007 16:08:04 GMT

     [ https://issues.apache.org/jira/browse/BEEHIVE-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

matt c closed BEEHIVE-1153.
---------------------------


Verified as fixed, and verified that this is currently being tested as part of the Beehive
regression test suite.

> NPE from JDBCControl when method returns XMLBeans Document type
> ---------------------------------------------------------------
>
>                 Key: BEEHIVE-1153
>                 URL: https://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
>            Assignee: 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message