Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Generate DBUnit Dataset Does nothing
Generate DBUnit Dataset Does nothing [message #34534] Wed, 15 August 2007 07:31 Go to next message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Hi all. Not sure if this is the correct place, but here goes.

When right clicking on a database/schema/table there is an option to
Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
does not work.

Any idea when it will be implemented as this would be invaluable.

Thanks

Darren Bell
Senior Software Engineer/DBA
Dolby Labs.
Re: Generate DBUnit Dataset Does nothing [message #34640 is a reply to message #34534] Thu, 16 August 2007 13:14 Go to previous messageGo to next message
Eclipse User
Originally posted by: brianf.sybase.com

Hi Darren!

It does work, but it's very limited right now. Can you tell me what you were
doing and if you saw any exceptions in the log?

--Fitz
Senior Software Engineer/Sybase
DTP Connectivity

"Darren Bell" <djb@dolby.co.uk> wrote in message
news:f9uo5b$4j2$1@build.eclipse.org...
> Hi all. Not sure if this is the correct place, but here goes.
>
> When right clicking on a database/schema/table there is an option to
> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
> does not work.
>
> Any idea when it will be implemented as this would be invaluable.
>
> Thanks
>
> Darren Bell
> Senior Software Engineer/DBA
> Dolby Labs.
Re: Generate DBUnit Dataset Does nothing [message #35012 is a reply to message #34640] Mon, 20 August 2007 06:07 Go to previous messageGo to next message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> Hi Darren!
>
> It does work, but it's very limited right now. Can you tell me what you were
> doing and if you saw any exceptions in the log?
>
> --Fitz
> Senior Software Engineer/Sybase
> DTP Connectivity
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:f9uo5b$4j2$1@build.eclipse.org...
>> Hi all. Not sure if this is the correct place, but here goes.
Ahh, this could be it:

!ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection

How do i get DBUnit in. Is there a plugin for it?

>>
>> When right clicking on a database/schema/table there is an option to
>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>> does not work.
>>
>> Any idea when it will be implemented as this would be invaluable.
>>
>> Thanks
>>
>> Darren Bell
>> Senior Software Engineer/DBA
>> Dolby Labs.
>
>
Re: Generate DBUnit Dataset Does nothing [message #35046 is a reply to message #35012] Mon, 20 August 2007 11:15 Go to previous messageGo to next message
Eclipse User
Originally posted by: brianf.sybase.com

There is... We can't distribute the DbUnit jar itself due to license issues,
but if you download the source for the dbunit plugin from DTP enablement,
there's an ANT script that will download it for you, or you can grab it
yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
directory in the SDK DTP builds.

"Darren Bell" <djb@dolby.co.uk> wrote in message
news:fabp4d$ns0$1@build.eclipse.org...
> Brian Fitzpatrick wrote:
>> Hi Darren!
>>
>> It does work, but it's very limited right now. Can you tell me what you
>> were doing and if you saw any exceptions in the log?
>>
>> --Fitz
>> Senior Software Engineer/Sybase
>> DTP Connectivity
>>
>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>> news:f9uo5b$4j2$1@build.eclipse.org...
>>> Hi all. Not sure if this is the correct place, but here goes.
> Ahh, this could be it:
>
> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>
> How do i get DBUnit in. Is there a plugin for it?
>
>>>
>>> When right clicking on a database/schema/table there is an option to
>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>> does not work.
>>>
>>> Any idea when it will be implemented as this would be invaluable.
>>>
>>> Thanks
>>>
>>> Darren Bell
>>> Senior Software Engineer/DBA
>>> Dolby Labs.
>>
Re: Generate DBUnit Dataset Does nothing [message #35114 is a reply to message #35046] Tue, 21 August 2007 07:12 Go to previous messageGo to next message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> There is... We can't distribute the DbUnit jar itself due to license issues,
> but if you download the source for the dbunit plugin from DTP enablement,
> there's an ANT script that will download it for you, or you can grab it
> yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
> directory in the SDK DTP builds.
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:fabp4d$ns0$1@build.eclipse.org...
>> Brian Fitzpatrick wrote:
>>> Hi Darren!
>>>
>>> It does work, but it's very limited right now. Can you tell me what you
>>> were doing and if you saw any exceptions in the log?
>>>
>>> --Fitz
>>> Senior Software Engineer/Sybase
>>> DTP Connectivity
>>>
>>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>>> news:f9uo5b$4j2$1@build.eclipse.org...
>>>> Hi all. Not sure if this is the correct place, but here goes.
>> Ahh, this could be it:
>>
>> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>>
>> How do i get DBUnit in. Is there a plugin for it?
>>
>>>> When right clicking on a database/schema/table there is an option to
>>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>>> does not work.
>>>>
>>>> Any idea when it will be implemented as this would be invaluable.
>>>>
>>>> Thanks
>>>>
>>>> Darren Bell
>>>> Senior Software Engineer/DBA
>>>> Dolby Labs.
>

Fantastic. Many thanks, that worked.
But, there is a large problem. The data is exported in no particular
order. Could it be ordered in such a way that when dbunit next uploads
the dataset, the rows are in the correct sequence so as not to violate
any referential constraints.

I'm sure there is a function in DBUnit to do this. I'll have to try and
find it.

Also, could you support the following layout:

<dataset>
<table name="ZBASE.ENTITY_TYPE">
<column>ID</column>
<column>LC_CRT_BY_USER</column>
<column>LC_CRT_BY_SYSTEM</column>
<column>LC_CRT_TIMESTAMP</column>
<column>LC_CRT_DATE</column>
<column>LC_UPD_BY_USER</column>
<column>LC_UPD_BY_SYSTEM</column>
<column>LC_UPD_TIMESTAMP</column>
<column>LC_UPD_DATE</column>
<column>VERSION</column>
<column>ENT_ALLOW_CAT</column>
<column>ENT_ALLOW_CF</column>
<column>ENT_ASSOC_CLASS</column>
<column>ENT_DESCRIPTION</column>
<column>ENT_NAME</column>
<row>
<value>ITEM_ENT_ID</value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>1</value>
<value>1</value>
<value>1</value>
<value>com.dolby.persist.test.model.Item</value>
<value>Test items in the persistence project</value>
<value>item</value>
</row>
<row>
<value>CUSTFLD_ENT_ID</value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>1</value>
<value>1</value>
<value>1</value>
<value>com.dolby.persist.model.cf.CustomField</value>
<value>Custom Fields</value>
<value>customField</value>
</row>
</table>
</dataset>

If you could it would be cool.

-Darren.
Re: Generate DBUnit Dataset Does nothing [message #35146 is a reply to message #35114] Tue, 21 August 2007 13:11 Go to previous messageGo to next message
Eclipse User
Originally posted by: brianf.sybase.com

Hi Darren...

Go ahead and enter a BZ enhancement request for that and we can look at it
for Ganymede.

Glad it got you started!

--Fitz

>
> Fantastic. Many thanks, that worked.
> But, there is a large problem. The data is exported in no particular
> order. Could it be ordered in such a way that when dbunit next uploads
> the dataset, the rows are in the correct sequence so as not to violate any
> referential constraints.
>
> I'm sure there is a function in DBUnit to do this. I'll have to try and
> find it.
>
> Also, could you support the following layout:
>
> <dataset>
> <table name="ZBASE.ENTITY_TYPE">
> <column>ID</column>
> <column>LC_CRT_BY_USER</column>
> <column>LC_CRT_BY_SYSTEM</column>
> <column>LC_CRT_TIMESTAMP</column>
> <column>LC_CRT_DATE</column>
> <column>LC_UPD_BY_USER</column>
> <column>LC_UPD_BY_SYSTEM</column>
> <column>LC_UPD_TIMESTAMP</column>
> <column>LC_UPD_DATE</column>
> <column>VERSION</column>
> <column>ENT_ALLOW_CAT</column>
> <column>ENT_ALLOW_CF</column>
> <column>ENT_ASSOC_CLASS</column>
> <column>ENT_DESCRIPTION</column>
> <column>ENT_NAME</column>
> <row>
> <value>ITEM_ENT_ID</value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>1</value>
> <value>1</value>
> <value>1</value>
> <value>com.dolby.persist.test.model.Item</value>
> <value>Test items in the persistence project</value>
> <value>item</value>
> </row>
> <row>
> <value>CUSTFLD_ENT_ID</value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>1</value>
> <value>1</value>
> <value>1</value>
> <value>com.dolby.persist.model.cf.CustomField</value>
> <value>Custom Fields</value>
> <value>customField</value>
> </row>
> </table>
> </dataset>
>
> If you could it would be cool.
>
> -Darren.
Re: Generate DBUnit Dataset Does nothing [message #35214 is a reply to message #35146] Wed, 22 August 2007 04:26 Go to previous messageGo to next message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> Hi Darren...
>
> Go ahead and enter a BZ enhancement request for that and we can look at it
> for Ganymede.
>
> Glad it got you started!
>
> --Fitz
>
>> Fantastic. Many thanks, that worked.
>> But, there is a large problem. The data is exported in no particular
>> order. Could it be ordered in such a way that when dbunit next uploads
>> the dataset, the rows are in the correct sequence so as not to violate any
>> referential constraints.
>>
>> I'm sure there is a function in DBUnit to do this. I'll have to try and
>> find it.
>>
>> Also, could you support the following layout:
>>
>> <dataset>
>> <table name="ZBASE.ENTITY_TYPE">
>> <column>ID</column>
>> <column>LC_CRT_BY_USER</column>
>> <column>LC_CRT_BY_SYSTEM</column>
>> <column>LC_CRT_TIMESTAMP</column>
>> <column>LC_CRT_DATE</column>
>> <column>LC_UPD_BY_USER</column>
>> <column>LC_UPD_BY_SYSTEM</column>
>> <column>LC_UPD_TIMESTAMP</column>
>> <column>LC_UPD_DATE</column>
>> <column>VERSION</column>
>> <column>ENT_ALLOW_CAT</column>
>> <column>ENT_ALLOW_CF</column>
>> <column>ENT_ASSOC_CLASS</column>
>> <column>ENT_DESCRIPTION</column>
>> <column>ENT_NAME</column>
>> <row>
>> <value>ITEM_ENT_ID</value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>1</value>
>> <value>1</value>
>> <value>1</value>
>> <value>com.dolby.persist.test.model.Item</value>
>> <value>Test items in the persistence project</value>
>> <value>item</value>
>> </row>
>> <row>
>> <value>CUSTFLD_ENT_ID</value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>1</value>
>> <value>1</value>
>> <value>1</value>
>> <value>com.dolby.persist.model.cf.CustomField</value>
>> <value>Custom Fields</value>
>> <value>customField</value>
>> </row>
>> </table>
>> </dataset>
>>
>> If you could it would be cool.
>>
>> -Darren.
>
>
Yeah, this is great. We use Hibernate annotations for our model and
Maven2 as the build. During the build we use hibernate tools to
generate the schema to a test database and then our tests run uploading
the dbunit data to the generated database and the the tests run.

If i can end the xml editing and just export the tables, this would be cool.

I'll head off over to BZ :)

Thanks for you help.

-D
Re: Generate DBUnit Dataset Does nothing [message #35217 is a reply to message #35046] Wed, 22 August 2007 11:21 Go to previous messageGo to next message
Eclipse User
Originally posted by: dserodio.gmail.com

Isn't it possible to capture this exception and show an appropriate
error message instructing the user how to "fix" it?

TIA,
Daniel Serodio

Brian Fitzpatrick wrote:
> There is... We can't distribute the DbUnit jar itself due to license issues,
> but if you download the source for the dbunit plugin from DTP enablement,
> there's an ANT script that will download it for you, or you can grab it
> yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
> directory in the SDK DTP builds.
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:fabp4d$ns0$1@build.eclipse.org...
>> Brian Fitzpatrick wrote:
>>> Hi Darren!
>>>
>>> It does work, but it's very limited right now. Can you tell me what you
>>> were doing and if you saw any exceptions in the log?
>>>
>>> --Fitz
>>> Senior Software Engineer/Sybase
>>> DTP Connectivity
>>>
>>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>>> news:f9uo5b$4j2$1@build.eclipse.org...
>>>> Hi all. Not sure if this is the correct place, but here goes.
>> Ahh, this could be it:
>>
>> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>>
>> How do i get DBUnit in. Is there a plugin for it?
>>
>>>> When right clicking on a database/schema/table there is an option to
>>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>>> does not work.
>>>>
>>>> Any idea when it will be implemented as this would be invaluable.
>>>>
>>>> Thanks
>>>>
>>>> Darren Bell
>>>> Senior Software Engineer/DBA
>>>> Dolby Labs.
>
Re: Generate DBUnit Dataset Does nothing [message #35833 is a reply to message #34640] Fri, 31 August 2007 11:02 Go to previous messageGo to next message
Eclipse User
Originally posted by: polyenergy.gmail.com

Hi!!! I read your ad and I have the same problem. I already added the
dbunit but the tables are not being displayed. By the way, I'm connecting
to a Sql Server database and I have already checked my database
permissions.
What should I do???
Re: Generate DBUnit Dataset Does nothing [message #36041 is a reply to message #35833] Mon, 03 September 2007 06:20 Go to previous messageGo to next message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Poly wrote:
> Hi!!! I read your ad and I have the same problem. I already added the
> dbunit but the tables are not being displayed. By the way, I'm
> connecting to a Sql Server database and I have already checked my
> database permissions. What should I do???

Have a look at the second reply from Brian, that fixed it. Basically,
you just need to put the dbunit jar in the correct plugin as it cannot
be shipped with dtp.

-D
Re: Generate DBUnit Dataset Does nothing [message #36075 is a reply to message #36041] Mon, 03 September 2007 10:10 Go to previous messageGo to next message
Eclipse User
Originally posted by: polyenergy.gmail.com

Thanks for you quick reply. I already paste the "dbunit.jar" in the
folder "....\org.dbunit\libs\" and it just displays the user with its
respective folders such as "tables", "stored procedures", "views", etc,
but inside those folders nothing is being display... just the empty
folders. I have already given the "public" permissions to my data base,
but it doesn't work neither :( Do you have any suggestion?
Re: Generate DBUnit Dataset Does nothing [message #36208 is a reply to message #36075] Wed, 12 September 2007 11:59 Go to previous message
Eclipse User
Originally posted by: brianf.sybase.com

Hi there...

I'm a little confused by your question. There were some issues with what the
SQL Server enablement code would display and load in the 1.5 release that
have been addressed in recent 1.5.1 builds (just pick a recent nightly build
and give that a shot).

But that would not be affected by the DbUnit jar not being in the libs
directory.

Can you provide some additional information about what you're trying to do?

Thanks!
--Brian Fitzpatrick
Sybase, Inc./DTP Committer

"Poly" <polyenergy@gmail.com> wrote in message
news:043b32a6a63a1e87e9d67a322c22be38$1@www.eclipse.org...
> Thanks for you quick reply. I already paste the "dbunit.jar" in the
> folder "....\org.dbunit\libs\" and it just displays the user with its
> respective folders such as "tables", "stored procedures", "views", etc,
> but inside those folders nothing is being display... just the empty
> folders. I have already given the "public" permissions to my data base,
> but it doesn't work neither :( Do you have any suggestion?
>
Re: Generate DBUnit Dataset Does nothing [message #587253 is a reply to message #34534] Thu, 16 August 2007 13:14 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Hi Darren!

It does work, but it's very limited right now. Can you tell me what you were
doing and if you saw any exceptions in the log?

--Fitz
Senior Software Engineer/Sybase
DTP Connectivity

"Darren Bell" <djb@dolby.co.uk> wrote in message
news:f9uo5b$4j2$1@build.eclipse.org...
> Hi all. Not sure if this is the correct place, but here goes.
>
> When right clicking on a database/schema/table there is an option to
> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
> does not work.
>
> Any idea when it will be implemented as this would be invaluable.
>
> Thanks
>
> Darren Bell
> Senior Software Engineer/DBA
> Dolby Labs.
Re: Generate DBUnit Dataset Does nothing [message #587442 is a reply to message #34640] Mon, 20 August 2007 06:07 Go to previous message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> Hi Darren!
>
> It does work, but it's very limited right now. Can you tell me what you were
> doing and if you saw any exceptions in the log?
>
> --Fitz
> Senior Software Engineer/Sybase
> DTP Connectivity
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:f9uo5b$4j2$1@build.eclipse.org...
>> Hi all. Not sure if this is the correct place, but here goes.
Ahh, this could be it:

!ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection

How do i get DBUnit in. Is there a plugin for it?

>>
>> When right clicking on a database/schema/table there is an option to
>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>> does not work.
>>
>> Any idea when it will be implemented as this would be invaluable.
>>
>> Thanks
>>
>> Darren Bell
>> Senior Software Engineer/DBA
>> Dolby Labs.
>
>
Re: Generate DBUnit Dataset Does nothing [message #587455 is a reply to message #35012] Mon, 20 August 2007 11:15 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
There is... We can't distribute the DbUnit jar itself due to license issues,
but if you download the source for the dbunit plugin from DTP enablement,
there's an ANT script that will download it for you, or you can grab it
yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
directory in the SDK DTP builds.

"Darren Bell" <djb@dolby.co.uk> wrote in message
news:fabp4d$ns0$1@build.eclipse.org...
> Brian Fitzpatrick wrote:
>> Hi Darren!
>>
>> It does work, but it's very limited right now. Can you tell me what you
>> were doing and if you saw any exceptions in the log?
>>
>> --Fitz
>> Senior Software Engineer/Sybase
>> DTP Connectivity
>>
>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>> news:f9uo5b$4j2$1@build.eclipse.org...
>>> Hi all. Not sure if this is the correct place, but here goes.
> Ahh, this could be it:
>
> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>
> How do i get DBUnit in. Is there a plugin for it?
>
>>>
>>> When right clicking on a database/schema/table there is an option to
>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>> does not work.
>>>
>>> Any idea when it will be implemented as this would be invaluable.
>>>
>>> Thanks
>>>
>>> Darren Bell
>>> Senior Software Engineer/DBA
>>> Dolby Labs.
>>
Re: Generate DBUnit Dataset Does nothing [message #587482 is a reply to message #35046] Tue, 21 August 2007 07:12 Go to previous message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> There is... We can't distribute the DbUnit jar itself due to license issues,
> but if you download the source for the dbunit plugin from DTP enablement,
> there's an ANT script that will download it for you, or you can grab it
> yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
> directory in the SDK DTP builds.
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:fabp4d$ns0$1@build.eclipse.org...
>> Brian Fitzpatrick wrote:
>>> Hi Darren!
>>>
>>> It does work, but it's very limited right now. Can you tell me what you
>>> were doing and if you saw any exceptions in the log?
>>>
>>> --Fitz
>>> Senior Software Engineer/Sybase
>>> DTP Connectivity
>>>
>>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>>> news:f9uo5b$4j2$1@build.eclipse.org...
>>>> Hi all. Not sure if this is the correct place, but here goes.
>> Ahh, this could be it:
>>
>> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>>
>> How do i get DBUnit in. Is there a plugin for it?
>>
>>>> When right clicking on a database/schema/table there is an option to
>>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>>> does not work.
>>>>
>>>> Any idea when it will be implemented as this would be invaluable.
>>>>
>>>> Thanks
>>>>
>>>> Darren Bell
>>>> Senior Software Engineer/DBA
>>>> Dolby Labs.
>

Fantastic. Many thanks, that worked.
But, there is a large problem. The data is exported in no particular
order. Could it be ordered in such a way that when dbunit next uploads
the dataset, the rows are in the correct sequence so as not to violate
any referential constraints.

I'm sure there is a function in DBUnit to do this. I'll have to try and
find it.

Also, could you support the following layout:

<dataset>
<table name="ZBASE.ENTITY_TYPE">
<column>ID</column>
<column>LC_CRT_BY_USER</column>
<column>LC_CRT_BY_SYSTEM</column>
<column>LC_CRT_TIMESTAMP</column>
<column>LC_CRT_DATE</column>
<column>LC_UPD_BY_USER</column>
<column>LC_UPD_BY_SYSTEM</column>
<column>LC_UPD_TIMESTAMP</column>
<column>LC_UPD_DATE</column>
<column>VERSION</column>
<column>ENT_ALLOW_CAT</column>
<column>ENT_ALLOW_CF</column>
<column>ENT_ASSOC_CLASS</column>
<column>ENT_DESCRIPTION</column>
<column>ENT_NAME</column>
<row>
<value>ITEM_ENT_ID</value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>1</value>
<value>1</value>
<value>1</value>
<value>com.dolby.persist.test.model.Item</value>
<value>Test items in the persistence project</value>
<value>item</value>
</row>
<row>
<value>CUSTFLD_ENT_ID</value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>DJB</value>
<value>*TEST</value>
<value><![CDATA[2005-01-01 12:30:00.0]]></value>
<value><![CDATA[2005-01-01]]></value>
<value>1</value>
<value>1</value>
<value>1</value>
<value>com.dolby.persist.model.cf.CustomField</value>
<value>Custom Fields</value>
<value>customField</value>
</row>
</table>
</dataset>

If you could it would be cool.

-Darren.
Re: Generate DBUnit Dataset Does nothing [message #587496 is a reply to message #35114] Tue, 21 August 2007 13:11 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Hi Darren...

Go ahead and enter a BZ enhancement request for that and we can look at it
for Ganymede.

Glad it got you started!

--Fitz

>
> Fantastic. Many thanks, that worked.
> But, there is a large problem. The data is exported in no particular
> order. Could it be ordered in such a way that when dbunit next uploads
> the dataset, the rows are in the correct sequence so as not to violate any
> referential constraints.
>
> I'm sure there is a function in DBUnit to do this. I'll have to try and
> find it.
>
> Also, could you support the following layout:
>
> <dataset>
> <table name="ZBASE.ENTITY_TYPE">
> <column>ID</column>
> <column>LC_CRT_BY_USER</column>
> <column>LC_CRT_BY_SYSTEM</column>
> <column>LC_CRT_TIMESTAMP</column>
> <column>LC_CRT_DATE</column>
> <column>LC_UPD_BY_USER</column>
> <column>LC_UPD_BY_SYSTEM</column>
> <column>LC_UPD_TIMESTAMP</column>
> <column>LC_UPD_DATE</column>
> <column>VERSION</column>
> <column>ENT_ALLOW_CAT</column>
> <column>ENT_ALLOW_CF</column>
> <column>ENT_ASSOC_CLASS</column>
> <column>ENT_DESCRIPTION</column>
> <column>ENT_NAME</column>
> <row>
> <value>ITEM_ENT_ID</value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>1</value>
> <value>1</value>
> <value>1</value>
> <value>com.dolby.persist.test.model.Item</value>
> <value>Test items in the persistence project</value>
> <value>item</value>
> </row>
> <row>
> <value>CUSTFLD_ENT_ID</value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>DJB</value>
> <value>*TEST</value>
> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
> <value><![CDATA[2005-01-01]]></value>
> <value>1</value>
> <value>1</value>
> <value>1</value>
> <value>com.dolby.persist.model.cf.CustomField</value>
> <value>Custom Fields</value>
> <value>customField</value>
> </row>
> </table>
> </dataset>
>
> If you could it would be cool.
>
> -Darren.
Re: Generate DBUnit Dataset Does nothing [message #587539 is a reply to message #35146] Wed, 22 August 2007 04:26 Go to previous message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Brian Fitzpatrick wrote:
> Hi Darren...
>
> Go ahead and enter a BZ enhancement request for that and we can look at it
> for Ganymede.
>
> Glad it got you started!
>
> --Fitz
>
>> Fantastic. Many thanks, that worked.
>> But, there is a large problem. The data is exported in no particular
>> order. Could it be ordered in such a way that when dbunit next uploads
>> the dataset, the rows are in the correct sequence so as not to violate any
>> referential constraints.
>>
>> I'm sure there is a function in DBUnit to do this. I'll have to try and
>> find it.
>>
>> Also, could you support the following layout:
>>
>> <dataset>
>> <table name="ZBASE.ENTITY_TYPE">
>> <column>ID</column>
>> <column>LC_CRT_BY_USER</column>
>> <column>LC_CRT_BY_SYSTEM</column>
>> <column>LC_CRT_TIMESTAMP</column>
>> <column>LC_CRT_DATE</column>
>> <column>LC_UPD_BY_USER</column>
>> <column>LC_UPD_BY_SYSTEM</column>
>> <column>LC_UPD_TIMESTAMP</column>
>> <column>LC_UPD_DATE</column>
>> <column>VERSION</column>
>> <column>ENT_ALLOW_CAT</column>
>> <column>ENT_ALLOW_CF</column>
>> <column>ENT_ASSOC_CLASS</column>
>> <column>ENT_DESCRIPTION</column>
>> <column>ENT_NAME</column>
>> <row>
>> <value>ITEM_ENT_ID</value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>1</value>
>> <value>1</value>
>> <value>1</value>
>> <value>com.dolby.persist.test.model.Item</value>
>> <value>Test items in the persistence project</value>
>> <value>item</value>
>> </row>
>> <row>
>> <value>CUSTFLD_ENT_ID</value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>DJB</value>
>> <value>*TEST</value>
>> <value><![CDATA[2005-01-01 12:30:00.0]]></value>
>> <value><![CDATA[2005-01-01]]></value>
>> <value>1</value>
>> <value>1</value>
>> <value>1</value>
>> <value>com.dolby.persist.model.cf.CustomField</value>
>> <value>Custom Fields</value>
>> <value>customField</value>
>> </row>
>> </table>
>> </dataset>
>>
>> If you could it would be cool.
>>
>> -Darren.
>
>
Yeah, this is great. We use Hibernate annotations for our model and
Maven2 as the build. During the build we use hibernate tools to
generate the schema to a test database and then our tests run uploading
the dbunit data to the generated database and the the tests run.

If i can end the xml editing and just export the tables, this would be cool.

I'll head off over to BZ :)

Thanks for you help.

-D
Re: Generate DBUnit Dataset Does nothing [message #587552 is a reply to message #35046] Wed, 22 August 2007 11:21 Go to previous message
Daniel Serodio is currently offline Daniel Serodio
Messages: 14
Registered: July 2009
Junior Member
Isn't it possible to capture this exception and show an appropriate
error message instructing the user how to "fix" it?

TIA,
Daniel Serodio

Brian Fitzpatrick wrote:
> There is... We can't distribute the DbUnit jar itself due to license issues,
> but if you download the source for the dbunit plugin from DTP enablement,
> there's an ANT script that will download it for you, or you can grab it
> yourself from http://www.dbunit.org/ and drop it in the org.dbunit/libs
> directory in the SDK DTP builds.
>
> "Darren Bell" <djb@dolby.co.uk> wrote in message
> news:fabp4d$ns0$1@build.eclipse.org...
>> Brian Fitzpatrick wrote:
>>> Hi Darren!
>>>
>>> It does work, but it's very limited right now. Can you tell me what you
>>> were doing and if you saw any exceptions in the log?
>>>
>>> --Fitz
>>> Senior Software Engineer/Sybase
>>> DTP Connectivity
>>>
>>> "Darren Bell" <djb@dolby.co.uk> wrote in message
>>> news:f9uo5b$4j2$1@build.eclipse.org...
>>>> Hi all. Not sure if this is the correct place, but here goes.
>> Ahh, this could be it:
>>
>> !ENTRY org.eclipse.ui 4 0 2007-08-20 11:05:49.637
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> java.lang.NoClassDefFoundError: org.dbunit.database.IDatabaseConnection
>>
>> How do i get DBUnit in. Is there a plugin for it?
>>
>>>> When right clicking on a database/schema/table there is an option to
>>>> Generate DBUnit Schema (i nearly fell off my chair seeing this), but it
>>>> does not work.
>>>>
>>>> Any idea when it will be implemented as this would be invaluable.
>>>>
>>>> Thanks
>>>>
>>>> Darren Bell
>>>> Senior Software Engineer/DBA
>>>> Dolby Labs.
>
Re: Generate DBUnit Dataset Does nothing [message #587738 is a reply to message #34640] Fri, 31 August 2007 11:02 Go to previous message
Eclipse User
Originally posted by: polyenergy.gmail.com

Hi!!! I read your ad and I have the same problem. I already added the
dbunit but the tables are not being displayed. By the way, I'm connecting
to a Sql Server database and I have already checked my database
permissions.
What should I do???
Re: Generate DBUnit Dataset Does nothing [message #587805 is a reply to message #35833] Mon, 03 September 2007 06:20 Go to previous message
Darren Bell is currently offline Darren Bell
Messages: 17
Registered: July 2009
Junior Member
Poly wrote:
> Hi!!! I read your ad and I have the same problem. I already added the
> dbunit but the tables are not being displayed. By the way, I'm
> connecting to a Sql Server database and I have already checked my
> database permissions. What should I do???

Have a look at the second reply from Brian, that fixed it. Basically,
you just need to put the dbunit jar in the correct plugin as it cannot
be shipped with dtp.

-D
Re: Generate DBUnit Dataset Does nothing [message #587817 is a reply to message #36041] Mon, 03 September 2007 10:10 Go to previous message
Eclipse User
Originally posted by: polyenergy.gmail.com

Thanks for you quick reply. I already paste the "dbunit.jar" in the
folder "....\org.dbunit\libs\" and it just displays the user with its
respective folders such as "tables", "stored procedures", "views", etc,
but inside those folders nothing is being display... just the empty
folders. I have already given the "public" permissions to my data base,
but it doesn't work neither :( Do you have any suggestion?
Re: Generate DBUnit Dataset Does nothing [message #587846 is a reply to message #36075] Wed, 12 September 2007 11:59 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Hi there...

I'm a little confused by your question. There were some issues with what the
SQL Server enablement code would display and load in the 1.5 release that
have been addressed in recent 1.5.1 builds (just pick a recent nightly build
and give that a shot).

But that would not be affected by the DbUnit jar not being in the libs
directory.

Can you provide some additional information about what you're trying to do?

Thanks!
--Brian Fitzpatrick
Sybase, Inc./DTP Committer

"Poly" <polyenergy@gmail.com> wrote in message
news:043b32a6a63a1e87e9d67a322c22be38$1@www.eclipse.org...
> Thanks for you quick reply. I already paste the "dbunit.jar" in the
> folder "....\org.dbunit\libs\" and it just displays the user with its
> respective folders such as "tables", "stored procedures", "views", etc,
> but inside those folders nothing is being display... just the empty
> folders. I have already given the "public" permissions to my data base,
> but it doesn't work neither :( Do you have any suggestion?
>
Previous Topic:(Exec error:Launching failed)
Next Topic:Eclipse php development tools (PDT) vs MAMP Mysql
Goto Forum:
  


Current Time: Thu Jul 31 23:46:20 EDT 2014

Powered by FUDForum. Page generated in 0.05049 seconds