Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Import of xml into Jubula database by cmd
Import of xml into Jubula database by cmd [message #757122] Wed, 16 November 2011 15:43 Go to next message
Daniel Vala is currently offline Daniel ValaFriend
Messages: 11
Registered: October 2011
Junior Member
Hi,
I have exported my project in Jubula into one xml file. I can import that file on another computer and all works fine.
Is here a way to import that file into Jubula by command? I run all my tests automatically by autagent command, but I would like to import the latest xml file with my tests first. Is that possible without opening Jubula application and import that by GUI?

Thanks
Re: Import of xml into Jubula database by cmd [message #757125 is a reply to message #757122] Wed, 16 November 2011 15:48 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The tool you need is called the dbtool and it is described here:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node263.html

Regards,
Alex
Re: Import of xml into Jubula database by cmd [message #760807 is a reply to message #757125] Mon, 05 December 2011 10:39 Go to previous messageGo to next message
Daniel Vala is currently offline Daniel ValaFriend
Messages: 11
Registered: October 2011
Junior Member
Thanks, it helped. Now I am able to import database when I delete it first.
But command to delete database does not work. Database is deleted, but it stuck on deleting test results details. Even when use -keepsummary option.

vala@dan:/opt/jubula_5.2.00266/jubula> ./dbtool -delete "TopoNet" 1.0 -keepsummary -dbscheme "Default Embedded (H2)" -dbuser sa -dbpw ""
Mon Dec 05 10:30:54 CET 2011 - [main] Bundle tracker is not set
Mon Dec 05 10:30:54 CET 2011	Commandline parsing finished - performing actions...
Mon Dec 05 10:30:54 CET 2011	Database:	Connecting...
Mon Dec 05 10:30:59 CET 2011	Database:	Connection established.
Mon Dec 05 10:30:59 CET 2011	Deleting project "MyProject" in version "1.0"...
Mon Dec 05 10:31:10 CET 2011	Deleting of project "TopoNet" finished.
Mon Dec 05 10:31:10 CET 2011	Deleting all test result details...


It is the same on linux and on windows. User has permission to the test_results folder.

[Updated on: Wed, 07 December 2011 12:07]

Report message to a moderator

Re: Import of xml into Jubula database by cmd [message #761347 is a reply to message #760807] Tue, 06 December 2011 10:33 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

I couldn't reproduce this - are there a lot of test result details (that could explain why it takes a long time - how long did it hang for?). The other thing that confuses me slightly is that you specify "MyProject" to be deleted, but "TopoNet" is also deleted...

Are there any log files created, and does it work on databases with fewer test results?

Regards,
Alex
Re: Import of xml into Jubula database by cmd [message #761998 is a reply to message #761347] Wed, 07 December 2011 12:06 Go to previous messageGo to next message
Daniel Vala is currently offline Daniel ValaFriend
Messages: 11
Registered: October 2011
Junior Member
Sorry about confusion of project name, TopoNet is on both places.
Deleting results takes at least 15 minutes and still nothing. Where I can find test result in Jubula GUI? I thought it is html and xml result in my specified folder which I specify when I run tests from command line and there are only few files in that folder. I tried to delete them all and it was still the same. No logs at that time were recorded.
Nevertheless I reinstalled my windows, installed Jubula and imported my TopoNet project. Now it works fine. But even if I do not use option -keepsummary, html and xml files in test folder remains.
I hope it will be working in the future. If not, I get you know.

[Updated on: Wed, 07 December 2011 12:07]

Report message to a moderator

Re: Import of xml into Jubula database by cmd [message #762012 is a reply to message #761998] Wed, 07 December 2011 12:32 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Ah, thanks for the clarification. The test results that are being deleted are those kept in the database, not the HTML / XML ones that get saved to the file system. You can see the summaries of all tests that have run in the reporting perspective, and (depending on your project settings), can reopen the test result reports in Jubula from the summary view.

More information on this is in the following sections:

General information on the test result summary view

Project settings for automated result deletion

Hope that helps,
Alex

Re: Import of xml into Jubula database by cmd [message #762033 is a reply to message #762012] Wed, 07 December 2011 13:09 Go to previous messageGo to next message
Daniel Vala is currently offline Daniel ValaFriend
Messages: 11
Registered: October 2011
Junior Member
I see, thanks for info. I have a lot of test results on pc when delete of database freezes. That is the problem. It seems to me that Jubula does not expect that much test results. I deleted few of them manually, then Jubula freezes and now I cannot open the database, see log:

Internal Exception: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:592) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	... 9 common frames omitted
Caused by: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
	at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_18]
	at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_18]
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	... 13 common frames omitted


I also use option clean test results after 5 days in the project settings, but I have all my test results for last few months. That could also be a bug.

Nevertheless my problem is solved, thank you for your help again.
Re: Import of xml into Jubula database by cmd [message #762042 is a reply to message #762033] Wed, 07 December 2011 13:21 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Quote:
I have all my test results for last few months. That could also be a bug.


Bear in mind that what you see in the summary view are the test result summaries. These don't get deleted automatically. What gets deleted are the details, which would allow you to reopen the test result report. If the details column shows "false", this means that the details have been successfully automatically deleted. The -keepsummaries command for the dbtool is for people who want to keep hold of these summaries despite deleting the project. Otherwise, the -delete command will also remove the summaries.

It's true that the deletion of many results can take a long time. If the time is too long, then please describe a reproducible test case as a part of a ticket so that we can take a look.

Best regards,
Alex
Re: Import of xml into Jubula database by cmd [message #762136 is a reply to message #762042] Wed, 07 December 2011 15:46 Go to previous messageGo to next message
Andreas Scharf is currently offline Andreas ScharfFriend
Messages: 21
Registered: December 2011
Junior Member
Hi,

I also have the problem of a missing database driver as Daniel described above. I also didn't any "-driver" option for the dbtool command.

Suggestions?

Cheers,
Andreas
Re: Import of xml into Jubula database by cmd [message #762499 is a reply to message #762136] Thu, 08 December 2011 07:39 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Andreas,

Just when using the dbtool, or in general? The one thing that springs to mind would be that you are perhaps forgetting the -data parameter to enter the workspace, documented here. Looking at Daniel's original command line, he is also missing the -data parameter. Maybe this is the reason?

Best regards,
Alex
Re: Import of xml into Jubula database by cmd [message #762540 is a reply to message #762499] Thu, 08 December 2011 09:13 Go to previous messageGo to next message
Andreas Scharf is currently offline Andreas ScharfFriend
Messages: 21
Registered: December 2011
Junior Member
Hi Alex,

you are right - I forgot to specify the workspace. But the error is still there:

$ ./dbtool.exe -exportall -directory /cygdrive/c/Users/ascharf/JubulaDBTool/ -data /cygdrive/c/Users/ascharf/eclipseHeliosWorkspaces/runtime-org.eclipse.jubula.standalone.product/ -dbscheme "Default Embedded (H2)" -dbuser ascharf -dbpw ""
Thu Dec 08 10:06:34 CET 2011    Database:       Connecting...
[EL Severe]: 2011-12-08 10:06:36.434--ServerSession(28921506)--Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
        at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:592)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:230)
        at org.eclipse.jubula.client.core.persistence.Hibernator.buildSessionFactoryWithLoginData(Hibernator.java:283)
        at org.eclipse.jubula.client.core.persistence.Hibernator.<init>(Hibernator.java:159)
        at org.eclipse.jubula.client.core.persistence.Hibernator.instance(Hibernator.java:591)
        at org.eclipse.jubula.client.core.persistence.Hibernator.access$4(Hibernator.java:586)
        at org.eclipse.jubula.client.core.persistence.Hibernator$2.run(Hibernator.java:194)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
        ... 13 more

!!Error occurred !!
        Database connection failed because of invalid or missing database detail


If I start Jubula and open the Client Log Viewer I additionally see this:

2011-12-08 10:06:36.444 [Worker-0] ERROR o.e.j.c.core.persistence.Hibernator - no or wrong username or password
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:422) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:230) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.jubula.client.core.persistence.Hibernator.buildSessionFactoryWithLoginData(Hibernator.java:283) [org.eclipse.jubula.client.core_1.0.0.201106060803.jar:na]
	at org.eclipse.jubula.client.core.persistence.Hibernator.<init>(Hibernator.java:159) [org.eclipse.jubula.client.core_1.0.0.201106060803.jar:na]
	at org.eclipse.jubula.client.core.persistence.Hibernator.instance(Hibernator.java:591) [org.eclipse.jubula.client.core_1.0.0.201106060803.jar:na]
	at org.eclipse.jubula.client.core.persistence.Hibernator.access$4(Hibernator.java:586) [org.eclipse.jubula.client.core_1.0.0.201106060803.jar:na]
	at org.eclipse.jubula.client.core.persistence.Hibernator$2.run(Hibernator.java:194) [org.eclipse.jubula.client.core_1.0.0.201106060803.jar:na]
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar:na]
Caused by: org.eclipse.persistence.exceptions.DatabaseException: 
Internal Exception: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:592) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394) ~[org.eclipse.persistence.jpa_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	... 9 common frames omitted
Caused by: java.sql.SQLException: No suitable driver found for jdbc:h2:~/.jubula/database/embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
	at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_18]
	at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_18]
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ~[org.eclipse.persistence.core_2.2.0.v20110202-r8913.jar:2.2.0.v20110202-r8913]
	... 13 common frames omitted
2011-12-08 10:06:36.451 [main] ERROR o.e.j.c.cmd.AbstractCmdlineClient - java.lang.IllegalArgumentException: Database connection failed because of invalid or missing database detail
2011-12-08 10:06:36.451 [main] ERROR o.e.j.c.cmd.AbstractCmdlineClient - An error ocurred: Database connection failed because of invalid or missing database detail


In this message it seems like dbuser/dbpw is wrong. What user and pw is jubula using by default for the embedded database? I assumed (from Daniels example) that it is my local username and no (i.e. "") pw.

Cheers,
Andreas
Re: Import of xml into Jubula database by cmd [message #762543 is a reply to message #762540] Thu, 08 December 2011 09:16 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Andreas,

Use sa and ''

I just realised it's documented for the test executor, but not for the dbtool. I'll update the documentation accordingly Wink

Best regards,
Alex
Re: Import of xml into Jubula database by cmd [message #762549 is a reply to message #762543] Thu, 08 December 2011 09:34 Go to previous messageGo to next message
Andreas Scharf is currently offline Andreas ScharfFriend
Messages: 21
Registered: December 2011
Junior Member
Hi Alex,

thanks for this info. Now I get this error:

In the command line:
$ ./dbtool.exe -exportall -directory /cygdrive/c/Users/ascharf/JubulaDBTool/ -data /cygdrive/c/Users/ascharf/eclipseHeliosWorkspaces/runtime-org.eclipse.jubula.standalone.product/ -dbscheme "Default Embedded (H2)" -dbuser sa -dbpw ""
Thu Dec 08 10:30:18 CET 2011    Database:       Connecting...
!!Error occurred !!
        Database connection failed because of invalid or missing database detail


And in Client Log Viewer:
2011-12-08 10:30:20.895 [Worker-0] ERROR o.e.j.c.core.persistence.Hibernator - DBVersion: major version invalid
2011-12-08 10:30:20.903 [main] ERROR o.e.j.c.cmd.AbstractCmdlineClient - java.lang.IllegalArgumentException: Database connection failed because of invalid or missing database detail
2011-12-08 10:30:20.903 [main] ERROR o.e.j.c.cmd.AbstractCmdlineClient - An error ocurred: Database connection failed because of invalid or missing database detail


Which says that some major version is invalid.

Cheers,
Andreas
Re: Import of xml into Jubula database by cmd [message #762552 is a reply to message #762549] Thu, 08 December 2011 09:40 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
That sounds like the database version and the Jubula version don't fit together. Can you connect to the database from the Integrated Test Environment? If so, then you're somehow trying to access a different database with the dbtool. If not, follow the migration instructions in the installation manual (export all projects using the old version of Jubula, then perform the migration, then import the projects into the new database).
Re: Import of xml into Jubula database by cmd [message #762574 is a reply to message #762552] Thu, 08 December 2011 10:27 Go to previous messageGo to next message
Andreas Scharf is currently offline Andreas ScharfFriend
Messages: 21
Registered: December 2011
Junior Member
The database I'm using was created with my development version of Jubula. Is it a problem that I use the dbtool.exe from the downloaded standalone Jubula version (which of course if older than my development version) with my development Jubula? If yes, can I build the dbtool.exe for my current development version of Jubula?

Kind regards,
Andreas
Re: Import of xml into Jubula database by cmd [message #762631 is a reply to message #762574] Thu, 08 December 2011 12:21 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Andreas,

yes, that'll be the problem. We've made various database changes since the last release. The first one would seem to be this one, but you should look through the jubula-dev archives to be sure which changes affect you (it may be a good idea to join the mailing list as well). You should be able to start the dbtool from your IDE by launching org.eclipse.jubula.app.dbtool.launcher as an Eclipse Application.

Best regards,
Alex
Re: Import of xml into Jubula database by cmd [message #769534 is a reply to message #762631] Thu, 22 December 2011 09:07 Go to previous messageGo to next message
Andreas Scharf is currently offline Andreas ScharfFriend
Messages: 21
Registered: December 2011
Junior Member
Hi Alex,

because need to do Im- and Export of databases for our CI server I need the command line dbtool. Are there any scripts to build the dbtool.exe on my own?

Best regards and some nice christmas days,
Andreas
Re: Import of xml into Jubula database by cmd [message #769561 is a reply to message #769534] Thu, 22 December 2011 10:31 Go to previous message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 376
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Hi Andreas

dbtool is a headless OSGi application. It is defined in org.eclipse.jubula.app.dbtool

You may start it from within your IDE by specifying the application id and adding the required plug-ins to the launch configuration. You may try exporting it with PDE tools which should work (but I've never done this myself).

Part of this may be guesswork. Can't help you with this because my development machine with the launch configurations is at work.

Achim
Previous Topic:Drag&drop tests don't work on MacOS X
Next Topic:How to Add JavaScript to Text Area/Text Field
Goto Forum:
  


Current Time: Fri Apr 19 16:04:25 GMT 2024

Powered by FUDForum. Page generated in 0.02513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top