How to insert Spatial data i.e POINT or POLYGON?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to insert Spatial data i.e POINT or POLYGON?

Shivananda Shiragavi

Hi,

 

I would like to know that, How to write the xml file to insert the Spatial Data?

 

Currently I am using MySQL database server, Structure of table is as follows:

 

Table1

  |

   ---------- id

   ---------- origin (POINT)

   ---------- name

 

My xml file is like:

 

<?xml version="1.0" encoding="UTF-8"?>

<dataset>

      <Table1  id="5" name="ABCD" origin="GeomFromText('POINT(0 0)')" />

</dataset>

 

When I am running my test case I am getting

 

org.dbunit.dataset.NoSuchColumnException: Table1.ORIGIN -  (Non-uppercase input column: origin) in ColumnNameToIndexes cache Table1. Note that the Table1's column names are NOT case sensitive.

                at org.dbunit.dataset.AbstractTableMetaData.getColumnIndex(AbstractTableMetaData.java:117)

                at org.dbunit.operation.AbstractOperation.getOperationMetaData(AbstractOperation.java:89)

                at org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:140)

                at org.dbunit.AbstractDatabaseTester.executeOperation(AbstractDatabaseTester.java:190)

                at org.dbunit.AbstractDatabaseTester.onSetup(AbstractDatabaseTester.java:103)

                at org.dbunit.DatabaseTestCase.setUp(DatabaseTestCase.java:156)

                at com.zd.test.TestDBUnit.setUp(TestDBUnit.java:36)

                at junit.framework.TestCase.runBare(TestCase.java:132)

                at junit.framework.TestResult$1.protect(TestResult.java:110)

                at junit.framework.TestResult.runProtected(TestResult.java:128)

                at junit.framework.TestResult.run(TestResult.java:113)

                at junit.framework.TestCase.run(TestCase.java:124)

                at junit.framework.TestSuite.runTest(TestSuite.java:232)

                at junit.framework.TestSuite.run(TestSuite.java:227)

                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 

Please Help me out.

 

Thanks,

 

Shivananda Shiragavi

 

 

 

DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user