TypeCastException while inserting GIS-Data (SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus Notes!)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TypeCastException while inserting GIS-Data (SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus Notes!)

Peter Marquardt-3
When I try to insert some GIS-data into a table I'm getting the following
exception:

org.dbunit.dataset.datatype.TypeCastException: Error casting value for
table 'LGEO_VORGANG_GEOM' and column 'GEOM'

The sample data has been previously exported successfully from the same
table!

Here's the result of the export (also the input for the insert):

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
 <LGEO_VORGANG_GEOM ID="52063" GEOM="SDO_GEOMETRY(2001, 31467,
SDO_POINT_TYPE(12, 14, NULL), NULL, NULL)"/>
</dataset>

The insert is done by the following ant target:

       <target name="geodata1" description="Insert Geo-Data">
               <dbunit driver="${jdbcDriver}" url="${jdbcURL}"
userid="${jdbcUser}" password="${jdbcPassword}" schema="${dbSchema}">
                   <classpath>
                       <pathelement location="${jdbcDriverPath}"/>
                   </classpath>
                   <dbconfig>
                       <property name="datatypeFactory"
value="org.dbunit.ext.oracle.OracleDataTypeFactory" />
                   </dbconfig>
                   <operation type="INSERT"
src="${data.dir}/geodaten1.xml"/>
               </dbunit>
       </target>
 
I'm using DbUnit 2.4.7 and  Oracle9i database.

Do you have any idea what's going wrong?

Thanks.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: TypeCastException while inserting GIS-Data (SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus Notes!)

casey lucas

sdo_geometry support has been updated in the trunk.  Can you try with the
latest trunk build?  My sdo_geometry testing has been on 10g and 11g so I'm
not 100% sure how 9i will behave.

-casey

-----Original Message-----
From: Peter Marquardt [mailto:[hidden email]]
Sent: Tuesday, March 23, 2010 5:45 AM
To: [hidden email]
Subject: [dbunit-user] TypeCastException while inserting GIS-Data (SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus Notes!)

When I try to insert some GIS-data into a table I'm getting the following
exception:

org.dbunit.dataset.datatype.TypeCastException: Error casting value for
table 'LGEO_VORGANG_GEOM' and column 'GEOM'

The sample data has been previously exported successfully from the same
table!

Here's the result of the export (also the input for the insert):

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
 <LGEO_VORGANG_GEOM ID="52063" GEOM="SDO_GEOMETRY(2001, 31467,
SDO_POINT_TYPE(12, 14, NULL), NULL, NULL)"/>
</dataset>

The insert is done by the following ant target:

       <target name="geodata1" description="Insert Geo-Data">
               <dbunit driver="${jdbcDriver}" url="${jdbcURL}"
userid="${jdbcUser}" password="${jdbcPassword}" schema="${dbSchema}">
                   <classpath>
                       <pathelement location="${jdbcDriverPath}"/>
                   </classpath>
                   <dbconfig>
                       <property name="datatypeFactory"
value="org.dbunit.ext.oracle.OracleDataTypeFactory" />
                   </dbconfig>
                   <operation type="INSERT"
src="${data.dir}/geodaten1.xml"/>
               </dbunit>
       </target>
 
I'm using DbUnit 2.4.7 and  Oracle9i database.

Do you have any idea what's going wrong?

Thanks.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: TypeCastException while inserting GIS-Data (SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus Notes!)

Peter Marquardt-3
Hi Casey,

thanks for your quick answer!

It would be very kind from you, if you could do the build for me and send
me the jar. Is that possible?
Sorry - I'm working with cvs and ant and not with subversion and maven. So
I would loose a lot of time and I'm in a hurry (the customer is
waiting...).

Thank you very much.

Mit freundlichem Gruß

        Peter Marquardt


---------------------------------------------
Peter Marquardt
Senior Consultant
BTB - Betriebswirtschaftliche und -technische
Beratungsgesellschaft mbH
Wilhelm-Haas-Straße 6
D-70771 Leinfelden-Echterdingen (Oberaichen)

Tel.: +49 (0) 711 - 97 53 - 1 57
Fax: +49 (0) 711 - 97 53 - 2 09
eMail: [hidden email]
http://www.btbnet.de

HRB Stuttgart 22 32 48
Geschäftsführer: Peter Groth



Von:    "Lucas, Casey" <[hidden email]>
An:     "[hidden email]"
<[hidden email]>
Datum:  23.03.2010 15:00
Betreff:        Re: [dbunit-user] TypeCastException while inserting
GIS-Data        (SDO_GEOMETRY,  Oracle9i) - now readable text version
(sorry - Lotus Notes!)




sdo_geometry support has been updated in the trunk.  Can you try with the
latest trunk build?  My sdo_geometry testing has been on 10g and 11g so
I'm
not 100% sure how 9i will behave.

-casey

-----Original Message-----
From: Peter Marquardt [mailto:[hidden email]]
Sent: Tuesday, March 23, 2010 5:45 AM
To: [hidden email]
Subject: [dbunit-user] TypeCastException while inserting GIS-Data
(SDO_GEOMETRY, Oracle9i) - now readable text version (sorry - Lotus
Notes!)

When I try to insert some GIS-data into a table I'm getting the following
exception:

org.dbunit.dataset.datatype.TypeCastException: Error casting value for
table 'LGEO_VORGANG_GEOM' and column 'GEOM'

The sample data has been previously exported successfully from the same
table!

Here's the result of the export (also the input for the insert):

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
 <LGEO_VORGANG_GEOM ID="52063" GEOM="SDO_GEOMETRY(2001, 31467,
SDO_POINT_TYPE(12, 14, NULL), NULL, NULL)"/>
</dataset>

The insert is done by the following ant target:

       <target name="geodata1" description="Insert Geo-Data">
               <dbunit driver="${jdbcDriver}" url="${jdbcURL}"
userid="${jdbcUser}" password="${jdbcPassword}" schema="${dbSchema}">
                   <classpath>
                       <pathelement location="${jdbcDriverPath}"/>
                   </classpath>
                   <dbconfig>
                       <property name="datatypeFactory"
value="org.dbunit.ext.oracle.OracleDataTypeFactory" />
                   </dbconfig>
                   <operation type="INSERT"
src="${data.dir}/geodaten1.xml"/>
               </dbunit>
       </target>
 
I'm using DbUnit 2.4.7 and  Oracle9i database.

Do you have any idea what's going wrong?

Thanks.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user