PROPERTY_TABLE_TYPE

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

PROPERTY_TABLE_TYPE

Bing He
Team, can anyone show me how to use the argument to setup
PROPERTY_TABLE_TYPE to view or materialized view? Is dbunit able to
extract data from views and materialized views? thanks.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

John Hurst-2
I'm not sure I understand this question.

DbUnit has two main purposes:

1) to prime the database with test data before a test. This has no meaning with regard to a view, although obviously DbUnit cna prime data in tables underlying a view. It might be possible to use DbUnit to prime a materialized view directly, but I don't see why you would want to do that ...

2) to verify database content after a test. This could apply to a materialized view. In fact I often use DbUnit to assert contents of ordinary views, to test non-trivial view logic. The same approach could apply to materialized views. My steps are:

  - Prime the table(s) underlying the view
  - Use DbUnit's table assertion mechanism, to compare an ITable contents to the result of an SQL query against the view.

I've found this technique very valuable for testing non-trivial view logic.

Regards

John Hurst
Wellington, New Zealand

On Thu, Sep 3, 2009 at 3:24 AM, Bing He <[hidden email]> wrote:
Team, can anyone show me how to use the argument to setup
PROPERTY_TABLE_TYPE to view or materialized view? Is dbunit able to
extract data from views and materialized views? thanks.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



--
COH: Level 10 US

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

Matthias Gommeringer
In reply to this post by Bing He
This should do the job, at least for loading:

        DatabaseConnection conn = new DatabaseConnection(...);
        String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
        conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE, types);

HTH
rgds,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bing He" <[hidden email]>
> Gesendet: 02.09.09 17:34:54
> An: [hidden email]
> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE


> Team, can anyone show me how to use the argument to setup
> PROPERTY_TABLE_TYPE to view or materialized view? Is dbunit able to
> extract data from views and materialized views? thanks.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

John Hurst-2

Whoops, I didn't understand the question. Sorry about that.

John Hurst

On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <[hidden email]> wrote:

This should do the job, at least for loading:

       DatabaseConnection conn = new DatabaseConnection(...);
       String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
       conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE, types);

HTH
rgds,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bing He" <[hidden email]>
> Gesendet: 02.09.09 17:34:54
> An: [hidden email]
> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE

> Team, can anyone show me how to use the argument to setup > PROPERTY_TABLE_TYPE to view or mater...

______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de

------------------------------------------------------------------------------ Let Crystal Reports...


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

Bing He
Thanks so much for your quick response John and Matthias.

I just tried with the syntax and got the following exception. Should I
log a jira:))????

org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0,
column=LI_RID, value=oracle.sql.ROWID@267e7c
        at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217)
        at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104)
        at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124)
        at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341)
        at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68)
        at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        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.OldTestClassRunner.run(OldTestClassRunner.java:76)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to
typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to
VARCHAR
        at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132)
        at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159)
        at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212)
        ... 24 more



On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<[hidden email]> wrote:

> Whoops, I didn't understand the question. Sorry about that.
>
> John Hurst
>
> On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <[hidden email]>
> wrote:
>
> This should do the job, at least for loading:
>
>        DatabaseConnection conn = new DatabaseConnection(...);
>        String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
>        conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE,
> types);
>
> HTH
> rgds,
> matthias
>
>> -----Ursprüngliche Nachricht-----
>> Von: "Bing He" <[hidden email]>
>> Gesendet: 02.09.09 17:34:54
>> An: [hidden email]
>> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE
>
>> Team, can anyone show me how to use the argument to setup >
>> PROPERTY_TABLE_TYPE to view or mater...
>
> ______________________________________________________
> GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://movieflat.web.de
>
> ------------------------------------------------------------------------------
> Let Crystal Reports...
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

Matthias Gommeringer
In reply to this post by Bing He
Puh, that's a good question. dbunit seems to not support oracle ROWIDs yet. You are very welcome to create a feature request in the sourceforge tracker and implement a corresponding datatype to support the ROWID (please note that you should use reflection for this so that we do not have a compile time dependency in dbunit). As a quick fix could you remove the ROWID from the materialized view?

rgds,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bing He" <[hidden email]>
> Gesendet: 02.09.09 21:29:13
> An: [hidden email]
> Betreff: Re: [dbunit-user] PROPERTY_TABLE_TYPE


> Thanks so much for your quick response John and Matthias.
>
> I just tried with the syntax and got the following exception. Should I
> log a jira:))????
>
> org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0,
> column=LI_RID, value=oracle.sql.ROWID@267e7c
> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217)
> at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104)
> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124)
> at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341)
> at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68)
> at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> 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.OldTestClassRunner.run(OldTestClassRunner.java:76)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to
> typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to
> VARCHAR
> at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132)
> at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159)
> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212)
> ... 24 more
>
>
>
> On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<[hidden email]> wrote:
> > Whoops, I didn't understand the question. Sorry about that.
> >
> > John Hurst
> >
> > On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <[hidden email]>
> > wrote:
> >
> > This should do the job, at least for loading:
> >
> >        DatabaseConnection conn = new DatabaseConnection(...);
> >        String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
> >        conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE,
> > types);
> >
> > HTH
> > rgds,
> > matthias
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: "Bing He" <[hidden email]>
> >> Gesendet: 02.09.09 17:34:54
> >> An: [hidden email]
> >> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE
> >
> >> Team, can anyone show me how to use the argument to setup >
> >> PROPERTY_TABLE_TYPE to view or mater...
> >
> > ______________________________________________________
> > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://movieflat.web.de
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports...
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

Matthias Gommeringer
In reply to this post by Bing He
I debugged this problem and it is actually easier than I thought: there is no need to create a new datatype. I extended the oracle datatype factory so that the rowid is handled as string which works fine on my local machine. THe change is committed on the current trunk rev 1030. Please checkout from SVN and create the jar file via maven and let me know if it works properly for you as well.

thx and regards,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bing He" <[hidden email]>
> Gesendet: 02.09.09 21:29:13
> An: [hidden email]
> Betreff: Re: [dbunit-user] PROPERTY_TABLE_TYPE


> Thanks so much for your quick response John and Matthias.
>
> I just tried with the syntax and got the following exception. Should I
> log a jira:))????
>
> org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0,
> column=LI_RID, value=oracle.sql.ROWID@267e7c
> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217)
> at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104)
> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124)
> at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341)
> at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68)
> at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> 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.OldTestClassRunner.run(OldTestClassRunner.java:76)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to
> typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to
> VARCHAR
> at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132)
> at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159)
> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212)
> ... 24 more
>
>
>
> On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<[hidden email]> wrote:
> > Whoops, I didn't understand the question. Sorry about that.
> >
> > John Hurst
> >
> > On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <[hidden email]>
> > wrote:
> >
> > This should do the job, at least for loading:
> >
> >        DatabaseConnection conn = new DatabaseConnection(...);
> >        String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
> >        conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE,
> > types);
> >
> > HTH
> > rgds,
> > matthias
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: "Bing He" <[hidden email]>
> >> Gesendet: 02.09.09 17:34:54
> >> An: [hidden email]
> >> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE
> >
> >> Team, can anyone show me how to use the argument to setup >
> >> PROPERTY_TABLE_TYPE to view or mater...
> >
> > ______________________________________________________
> > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://movieflat.web.de
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports...
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: PROPERTY_TABLE_TYPE

Bing He
Thanks so much Matthias. I will let you know once I tested it.

Regards,

Bing

On Wed, Sep 2, 2009 at 4:33 PM, Matthias
Gommeringer<[hidden email]> wrote:

> I debugged this problem and it is actually easier than I thought: there is no need to create a new datatype. I extended the oracle datatype factory so that the rowid is handled as string which works fine on my local machine. THe change is committed on the current trunk rev 1030. Please checkout from SVN and create the jar file via maven and let me know if it works properly for you as well.
>
> thx and regards,
> matthias
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: "Bing He" <[hidden email]>
>> Gesendet: 02.09.09 21:29:13
>> An: [hidden email]
>> Betreff: Re: [dbunit-user] PROPERTY_TABLE_TYPE
>
>
>> Thanks so much for your quick response John and Matthias.
>>
>> I just tried with the syntax and got the following exception. Should I
>> log a jira:))????
>>
>> org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0,
>> column=LI_RID, value=oracle.sql.ROWID@267e7c
>>       at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217)
>>       at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104)
>>       at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124)
>>       at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341)
>>       at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68)
>>       at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>       at java.lang.reflect.Method.invoke(Method.java:585)
>>       at junit.framework.TestCase.runTest(TestCase.java:168)
>>       at junit.framework.TestCase.runBare(TestCase.java:134)
>>       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.OldTestClassRunner.run(OldTestClassRunner.java:76)
>>       at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>>       at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to
>> typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to
>> VARCHAR
>>       at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132)
>>       at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159)
>>       at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212)
>>       ... 24 more
>>
>>
>>
>> On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<[hidden email]> wrote:
>> > Whoops, I didn't understand the question. Sorry about that.
>> >
>> > John Hurst
>> >
>> > On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <[hidden email]>
>> > wrote:
>> >
>> > This should do the job, at least for loading:
>> >
>> >        DatabaseConnection conn = new DatabaseConnection(...);
>> >        String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"};
>> >        conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE,
>> > types);
>> >
>> > HTH
>> > rgds,
>> > matthias
>> >
>> >> -----Ursprüngliche Nachricht-----
>> >> Von: "Bing He" <[hidden email]>
>> >> Gesendet: 02.09.09 17:34:54
>> >> An: [hidden email]
>> >> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE
>> >
>> >> Team, can anyone show me how to use the argument to setup >
>> >> PROPERTY_TABLE_TYPE to view or mater...
>> >
>> > ______________________________________________________
>> > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
>> > Jetzt freischalten unter http://movieflat.web.de
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports...
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> > trial. Simplify your report design, integration and deployment - and focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > dbunit-user mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> dbunit-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>>
>
>
> ________________________________________________________________
> Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user