Home » Modeling » EMF » [CDO] Testing framework question
| | |
Re: [CDO] Testing framework question [message #430421 is a reply to message #430414] |
Wed, 20 May 2009 10:40 |
|
Kai,
There's a description on how to setup a development workspace:
http://wiki.eclipse.org/CDO_Source_Installation
Others previously reported that they found it helpful ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
Kai Schlamp schrieb:
> Just found an OSGI repository: http://www.springsource.com/repository
> Is that the recommended way to resolve those dependencies?
> Download them and put them into the dropins folder?
>
> Kai Schlamp wrote:
>> Ok, it seems that I have to use org.eclipse.emf.cdo.test.db.
>> Is there an easy way to get all those dependencies (the problem is
>> that those dependencies,
>> like org.eclipse.net4j.db.mysql have further unresolved package
>> dependencies)?
>>
>> Kai Schlamp wrote:
>>> As promised ;-), I am just looking into the CDO testing framework.
>>> But I need a bit help to get started.
>>> I fetched org.eclipse.emf.cdo.test from the CVS. Now I want to add
>>> some tests for the Derby store.
>>> Where are the already available tests of the Derby store?
>>> org.eclipse.emf.cdo.tests.DBStoreTest?
>>> Or does this only uses the MemStore (as MEM is printed when running
>>> it)?
>>> Do I have to fetch org.eclipse.emf.cdo.test.db (brrr, a lot of
>>> unresolved dependencies when I do that)?
>>>
>>> Regards,
>>> Kai
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Testing framework question [message #430422 is a reply to message #430411] |
Wed, 20 May 2009 10:44 |
|
Kai Schlamp schrieb:
> Ok, it seems that I have to use org.eclipse.emf.cdo.test.db.
> Is there an easy way to get all those dependencies (the problem is
> that those dependencies,
> like org.eclipse.net4j.db.mysql have further unresolved package
> dependencies)?
All the Net4j DB adapters (except the Derby one, as Derby comes from
Orbit) still need their JDBC drivers. Since we may not ship them I had
to remove our adapters from the SDKs as well.
The Mysql driver bundle from SpringSource is particularly problematic
and I don't know exactly why. Only yesterday I tried to make my own
Mysql driver bundle by using the PDE Wizard "New bundle from existing
Jar" (or similar). It solved all the strange OSGi/PDE/whatever related
errors at design time. Not sure if it also behaves nicely at runtime...
Cheers
/Eike
----
http://thegordian.blogspot.com
>
> Kai Schlamp wrote:
>> As promised ;-), I am just looking into the CDO testing framework.
>> But I need a bit help to get started.
>> I fetched org.eclipse.emf.cdo.test from the CVS. Now I want to add
>> some tests for the Derby store.
>> Where are the already available tests of the Derby store?
>> org.eclipse.emf.cdo.tests.DBStoreTest?
>> Or does this only uses the MemStore (as MEM is printed when running it)?
>> Do I have to fetch org.eclipse.emf.cdo.test.db (brrr, a lot of
>> unresolved dependencies when I do that)?
>>
>> Regards,
>> Kai
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Testing framework question [message #430430 is a reply to message #430421] |
Wed, 20 May 2009 15:15 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
Thanks, I have a CDO source workspace now. There are some errors in org.eclipse.net4j.db.mysql, but you mentioned that problem in your other message.
Where is org.eclipse.emf.cdo.tests.db now? It is not under the CDO Tests Working Set. Where are the already available tests for the Derby store?
And another thing ... I just started org.eclipse.emf.cdo.tests.DBStoreTest. The Junit test is successful, but on the console the following exception occurs many times:
[ERROR] ClosedChannelException
java.nio.channels.ClosedChannelException
at org.eclipse.internal.net4j.buffer.Buffer.startGetting(Buffer .java:154)
at org.eclipse.net4j.internal.tcp.TCPConnector.handleRead(TCPCo nnector.java:165)
at org.eclipse.net4j.internal.tcp.TCPSelector.handleSelection(T CPSelector.java:255)
at org.eclipse.net4j.internal.tcp.TCPSelector.run(TCPSelector.j ava:170)
at java.lang.Thread.run(Thread.java:619)
-Kai
Eike Stepper wrote:
> Kai,
>
> There's a description on how to setup a development workspace:
> http://wiki.eclipse.org/CDO_Source_Installation
>
> Others previously reported that they found it helpful ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Kai Schlamp schrieb:
>> Just found an OSGI repository: http://www.springsource.com/repository
>> Is that the recommended way to resolve those dependencies?
>> Download them and put them into the dropins folder?
>>
>> Kai Schlamp wrote:
>>> Ok, it seems that I have to use org.eclipse.emf.cdo.test.db.
>>> Is there an easy way to get all those dependencies (the problem is
>>> that those dependencies,
>>> like org.eclipse.net4j.db.mysql have further unresolved package
>>> dependencies)?
>>>
>>> Kai Schlamp wrote:
>>>> As promised ;-), I am just looking into the CDO testing framework.
>>>> But I need a bit help to get started.
>>>> I fetched org.eclipse.emf.cdo.test from the CVS. Now I want to add
>>>> some tests for the Derby store.
>>>> Where are the already available tests of the Derby store?
>>>> org.eclipse.emf.cdo.tests.DBStoreTest?
>>>> Or does this only uses the MemStore (as MEM is printed when running
>>>> it)?
>>>> Do I have to fetch org.eclipse.emf.cdo.test.db (brrr, a lot of
>>>> unresolved dependencies when I do that)?
>>>>
>>>> Regards,
>>>> Kai
|
|
|
Re: [CDO] Testing framework question [message #430442 is a reply to message #430430] |
Thu, 21 May 2009 06:21 |
|
Kai Schlamp schrieb:
> Thanks, I have a CDO source workspace now. There are some errors in
> org.eclipse.net4j.db.mysql, but you mentioned that problem in your
> other message.
> Where is org.eclipse.emf.cdo.tests.db now?
In CVS :P
If you don't get it via the PSFs I guess we forgot to add it there.
> It is not under the CDO Tests Working Set. Where are the already
> available tests for the Derby store?
It seems somehow broken, possibly caused by the Mysql dependency problem.
I'll clarify that...
> And another thing ... I just started
> org.eclipse.emf.cdo.tests.DBStoreTest. The Junit test is successful,
> but on the console the following exception occurs many times:
>
> [ERROR] ClosedChannelException
> java.nio.channels.ClosedChannelException
> at
> org.eclipse.internal.net4j.buffer.Buffer.startGetting(Buffer .java:154)
> at
> org.eclipse.net4j.internal.tcp.TCPConnector.handleRead(TCPCo nnector.java:165)
>
> at
> org.eclipse.net4j.internal.tcp.TCPSelector.handleSelection(T CPSelector.java:255)
>
> at
> org.eclipse.net4j.internal.tcp.TCPSelector.run(TCPSelector.j ava:170)
> at java.lang.Thread.run(Thread.java:619)
This looks like one of these "normal" exceptions due to uncontrollable
race conditions in the transport deactivation phase. It's not nice that
they appear in the log, but they're hard to distinguish from normal
ones. You can ignore them.
Cheers
/Eike
----
http://thegordian.blogspot.com
>
> -Kai
>
>
> Eike Stepper wrote:
>> Kai,
>>
>> There's a description on how to setup a development workspace:
>> http://wiki.eclipse.org/CDO_Source_Installation
>>
>> Others previously reported that they found it helpful ;-)
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> Kai Schlamp schrieb:
>>> Just found an OSGI repository: http://www.springsource.com/repository
>>> Is that the recommended way to resolve those dependencies?
>>> Download them and put them into the dropins folder?
>>>
>>> Kai Schlamp wrote:
>>>> Ok, it seems that I have to use org.eclipse.emf.cdo.test.db.
>>>> Is there an easy way to get all those dependencies (the problem is
>>>> that those dependencies,
>>>> like org.eclipse.net4j.db.mysql have further unresolved package
>>>> dependencies)?
>>>>
>>>> Kai Schlamp wrote:
>>>>> As promised ;-), I am just looking into the CDO testing framework.
>>>>> But I need a bit help to get started.
>>>>> I fetched org.eclipse.emf.cdo.test from the CVS. Now I want to add
>>>>> some tests for the Derby store.
>>>>> Where are the already available tests of the Derby store?
>>>>> org.eclipse.emf.cdo.tests.DBStoreTest?
>>>>> Or does this only uses the MemStore (as MEM is printed when running
>>>>> it)?
>>>>> Do I have to fetch org.eclipse.emf.cdo.test.db (brrr, a lot of
>>>>> unresolved dependencies when I do that)?
>>>>>
>>>>> Regards,
>>>>> Kai
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] Testing framework question [message #430444 is a reply to message #430443] |
Thu, 21 May 2009 11:20 |
|
Kai Schlamp schrieb:
> Hi Eike,
>
> comments below.
>
>>> It is not under the CDO Tests Working Set. Where are the already
>>> available tests for the Derby store?
>> It seems somehow broken, possibly caused by the Mysql dependency
>> problem.
>> I'll clarify that...
>
> Yep, I get a "Unsatisfied version constraint" on every imported bundle
> of org.eclipse.emf.cdo.tests.db.
> But beside that I still wonder where the tests for the Derby store are.
> In org.eclipse.emf.cdo.tests.db there are tests like
> "AllTestsDBHsqldb" or "AllTestsDBMysql",
> but nothing with "Derby".
I think there are none since the focus is on testing the DBStore and not
the JDBC driver.
You could try to copy/adjust the Mysql tests.
Cheers
/Eike
----
http://thegordian.blogspot.com
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] Testing framework question [message #430450 is a reply to message #430446] |
Thu, 21 May 2009 17:16 |
|
Kai,
Please update the whole org.eclipse.emf.cdo.tests.db project from CVS. I
refactored the test configs a bit so that the relation with the test
suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
(the config was already there).
Cheers
/Eike
----
http://thegordian.blogspot.com
Kai Schlamp schrieb:
> Eike Stepper wrote:
>> Kai Schlamp schrieb:
>>> Hi Eike,
>>>
>>> comments below.
>>>
>>>>> It is not under the CDO Tests Working Set. Where are the already
>>>>> available tests for the Derby store?
>>>> It seems somehow broken, possibly caused by the Mysql dependency
>>>> problem.
>>>> I'll clarify that...
>>> Yep, I get a "Unsatisfied version constraint" on every imported bundle
>>> of org.eclipse.emf.cdo.tests.db.
>>> But beside that I still wonder where the tests for the Derby store are.
>>> In org.eclipse.emf.cdo.tests.db there are tests like
>>> "AllTestsDBHsqldb" or "AllTestsDBMysql",
>>> but nothing with "Derby".
>> I think there are none since the focus is on testing the DBStore and not
>> the JDBC driver.
>> You could try to copy/adjust the Mysql tests.
>
> Ok, I see. But there are also no test cases that really put anything
> in a MySQL database or retrieve something something from it (or am I
> missing something). Is everything done "virtual" on a DBStore?
> But to provide a reproducible test case for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 , it seems that I
> need a real derby database.
> So I suggest that I try to provide an bugzilla test for
> org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
> and sets up a temporary Derby database folder.
> And still though, I am not sure how to simulate an application
> restart, as this is the only way how to demonstrate the above
> mentioned bug :-(
>
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Testing framework question [message #430451 is a reply to message #430450] |
Thu, 21 May 2009 18:10 |
|
This is a multi-part message in MIME format.
--------------070902090509070603040307
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Eike Stepper schrieb:
> Kai,
>
> Please update the whole org.eclipse.emf.cdo.tests.db project from CVS. I
> refactored the test configs a bit so that the relation with the test
> suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
> (the config was already there).
>
There seems to be a leakage problem, but most probably only in the test
framework or the Derby config. I tried to develop a new config that
re-uses the derby database folder, but I could not get it to work due to
strange Derby exceptions. If you're a Derby expert you should try the
following (with latest test sources):
| @Override
*protected **void *initConfigSuites(TestSuite parent)
{
addScenario(parent, COMBINED, AllTestsDBDerby.Derby.*ReusableFolder*.INSTANCE, TCP, NATIVE);
}|
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Kai Schlamp schrieb:
>
>> Eike Stepper wrote:
>>
>>> Kai Schlamp schrieb:
>>>
>>>> Hi Eike,
>>>>
>>>> comments below.
>>>>
>>>>
>>>>>> It is not under the CDO Tests Working Set. Where are the already
>>>>>> available tests for the Derby store?
>>>>>>
>>>>> It seems somehow broken, possibly caused by the Mysql dependency
>>>>> problem.
>>>>> I'll clarify that...
>>>>>
>>>> Yep, I get a "Unsatisfied version constraint" on every imported bundle
>>>> of org.eclipse.emf.cdo.tests.db.
>>>> But beside that I still wonder where the tests for the Derby store are.
>>>> In org.eclipse.emf.cdo.tests.db there are tests like
>>>> "AllTestsDBHsqldb" or "AllTestsDBMysql",
>>>> but nothing with "Derby".
>>>>
>>> I think there are none since the focus is on testing the DBStore and not
>>> the JDBC driver.
>>> You could try to copy/adjust the Mysql tests.
>>>
>> Ok, I see. But there are also no test cases that really put anything
>> in a MySQL database or retrieve something something from it (or am I
>> missing something). Is everything done "virtual" on a DBStore?
>> But to provide a reproducible test case for
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 , it seems that I
>> need a real derby database.
>> So I suggest that I try to provide an bugzilla test for
>> org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
>> and sets up a temporary Derby database folder.
>> And still though, I am not sure how to simulate an application
>> restart, as this is the only way how to demonstrate the above
>> mentioned bug :-(
>>
>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>>
>>>
--------------070902090509070603040307
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eike Stepper schrieb:
<blockquote cite="mid:gv42af$ce3$1@build.eclipse.org" type="cite">
<pre wrap="">Kai,
Please update the whole org.eclipse.emf.cdo.tests.db project from CVS. I
refactored the test configs a bit so that the relation with the test
suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
(the config was already there).
</pre>
</blockquote>
There seems to be a leakage problem, but most probably only in the test
framework or the Derby config. I tried to develop a new config that
re-uses the derby database folder, but I could not get it to work due
to strange Derby exceptions. If you're a Derby expert you should try
the following (with latest test sources):<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#ffffff"> </font><font
color="#646464">@Override</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>protected </b></font><font
color="#7f0055"><b>void </b></font><font color="#000000">initConfigSuites</font><font
color="#000000">(</font><font color="#000000">TestSuite parent</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font ><font color="#000000">addScenario</font><font
color="#000000">(</font><font color="#000000">parent, COMBINED, AllTestsDBDerby.Derby. <font
color="#ff0000"><b>ReusableFolder</b></font>.INSTANCE, TCP, NATIVE </font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font></code>
</td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== --><br>
<blockquote cite="mid:gv42af$ce3$1@build.eclipse.org" type="cite">
<pre wrap="">
Cheers
/Eike
----
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a>
Kai Schlamp schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">Eike Stepper wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Kai Schlamp schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Eike,
comments below.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">It is not under the CDO Tests Working Set. Where are the already
available tests for the Derby store?
</pre>
</blockquote>
<pre wrap="">It seems somehow broken, possibly caused by the Mysql dependency
problem.
I'll clarify that...
</pre>
</blockquote>
<pre wrap="">Yep, I get a "Unsatisfied version constraint" on every imported bundle
of org.eclipse.emf.cdo.tests.db.
But beside that I still wonder where the tests for the Derby store are.
In org.eclipse.emf.cdo.tests.db there are tests like
"AllTestsDBHsqldb" or "AllTestsDBMysql",
but nothing with "Derby".
</pre>
</blockquote>
<pre wrap="">I think there are none since the focus is on testing the DBStore and not
the JDBC driver.
You could try to copy/adjust the Mysql tests.
</pre>
</blockquote>
<pre wrap="">Ok, I see. But there are also no test cases that really put anything
in a MySQL database or retrieve something something from it (or am I
missing something). Is everything done "virtual" on a DBStore?
But to provide a reproducible test case for
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926">https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926</a> , it seems that I
need a real derby database.
So I suggest that I try to provide an bugzilla test for
org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
and sets up a temporary Derby database folder.
And still though, I am not sure how to simulate an application
restart, as this is the only way how to demonstrate the above
mentioned bug :-(
</pre>
<blockquote type="cite">
<pre wrap="">Cheers
/Eike
----
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a>
</pre>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>
--------------070902090509070603040307--
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Testing framework question [message #430452 is a reply to message #430450] |
Thu, 21 May 2009 20:54 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
Ok, I managed to get an error free workspace.
But still having some issues when running the AllTestsDBDerby.
I get the below IOException. Is it cause I am under Linux and the test having some issues
creating the temp directory for the database?
-Kai
Eike Stepper wrote:
> Kai,
>
> Please update the whole org.eclipse.emf.cdo.tests.db project from CVS. I
> refactored the test configs a bit so that the relation with the test
> suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
> (the config was already there).
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Kai Schlamp schrieb:
>> Eike Stepper wrote:
>>> Kai Schlamp schrieb:
>>>> Hi Eike,
>>>>
>>>> comments below.
>>>>
>>>>>> It is not under the CDO Tests Working Set. Where are the already
>>>>>> available tests for the Derby store?
>>>>> It seems somehow broken, possibly caused by the Mysql dependency
>>>>> problem.
>>>>> I'll clarify that...
>>>> Yep, I get a "Unsatisfied version constraint" on every imported bundle
>>>> of org.eclipse.emf.cdo.tests.db.
>>>> But beside that I still wonder where the tests for the Derby store are.
>>>> In org.eclipse.emf.cdo.tests.db there are tests like
>>>> "AllTestsDBHsqldb" or "AllTestsDBMysql",
>>>> but nothing with "Derby".
>>> I think there are none since the focus is on testing the DBStore and not
>>> the JDBC driver.
>>> You could try to copy/adjust the Mysql tests.
>> Ok, I see. But there are also no test cases that really put anything
>> in a MySQL database or retrieve something something from it (or am I
>> missing something). Is everything done "virtual" on a DBStore?
>> But to provide a reproducible test case for
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 , it seems that I
>> need a real derby database.
>> So I suggest that I try to provide an bugzilla test for
>> org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
>> and sets up a temporary Derby database folder.
>> And still though, I am not sure how to simulate an application
>> restart, as this is the only way how to demonstrate the above
>> mentioned bug :-(
>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>>
|
|
| |
Re: [CDO] Testing framework question [message #430454 is a reply to message #430452] |
Thu, 21 May 2009 21:09 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
I solved that problem by creating a /temp folder (Ubuntu doesn't have that).
But now I get the next exceptions (see below). I am not sure if this is the exception you mentioned
in your
other posting, but also the "ReusableFolder" didn't solve that problem.
*******************************************************
InitialTest.testTransientObject [Combined, DBStore: Derby (Reusable Folder), TCP, Native]
*******************************************************
org.eclipse.net4j.db.DBException: SQL Exception: Failed to create database
'/temp/derby_309388391081712895.tmp', see the next exception for details.
at
org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:46)
at org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
at org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
at org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
at org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
at org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
at org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
at org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
at junit.framework.TestCase.runBare(TestCase.java:128)
at org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: SQL Exception: Failed to create database '/temp/derby_309388391081712895.tmp', see the
next exception for details.
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn Source)
at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn Source)
at
org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:42)
... 55 more
Kai Schlamp wrote:
> Ok, I managed to get an error free workspace.
> But still having some issues when running the AllTestsDBDerby.
> I get the below IOException. Is it cause I am under Linux and the test
> having some issues
> creating the temp directory for the database?
>
> -Kai
>
> Eike Stepper wrote:
>> Kai,
>>
>> Please update the whole org.eclipse.emf.cdo.tests.db project from CVS. I
>> refactored the test configs a bit so that the relation with the test
>> suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
>> (the config was already there).
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> Kai Schlamp schrieb:
>>> Eike Stepper wrote:
>>>> Kai Schlamp schrieb:
>>>>> Hi Eike,
>>>>>
>>>>> comments below.
>>>>>
>>>>>>> It is not under the CDO Tests Working Set. Where are the already
>>>>>>> available tests for the Derby store?
>>>>>> It seems somehow broken, possibly caused by the Mysql dependency
>>>>>> problem.
>>>>>> I'll clarify that...
>>>>> Yep, I get a "Unsatisfied version constraint" on every imported bundle
>>>>> of org.eclipse.emf.cdo.tests.db.
>>>>> But beside that I still wonder where the tests for the Derby store
>>>>> are.
>>>>> In org.eclipse.emf.cdo.tests.db there are tests like
>>>>> "AllTestsDBHsqldb" or "AllTestsDBMysql",
>>>>> but nothing with "Derby".
>>>> I think there are none since the focus is on testing the DBStore and
>>>> not
>>>> the JDBC driver.
>>>> You could try to copy/adjust the Mysql tests.
>>> Ok, I see. But there are also no test cases that really put anything
>>> in a MySQL database or retrieve something something from it (or am I
>>> missing something). Is everything done "virtual" on a DBStore?
>>> But to provide a reproducible test case for
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 , it seems that I
>>> need a real derby database.
>>> So I suggest that I try to provide an bugzilla test for
>>> org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
>>> and sets up a temporary Derby database folder.
>>> And still though, I am not sure how to simulate an application
>>> restart, as this is the only way how to demonstrate the above
>>> mentioned bug :-(
>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://thegordian.blogspot.com
>>>>
|
|
|
Re: [CDO] Testing framework question [message #430456 is a reply to message #430454] |
Fri, 22 May 2009 07:21 |
|
Kai,
This the exception I was referring to and I have no clue what it means.
It says "see the next exception for details". Where is this next exception?
Cheers
/Eike
----
http://thegordian.blogspot.com
Kai Schlamp schrieb:
> I solved that problem by creating a /temp folder (Ubuntu doesn't have
> that).
> But now I get the next exceptions (see below). I am not sure if this
> is the exception you mentioned in your
> other posting, but also the "ReusableFolder" didn't solve that problem.
>
> *******************************************************
> InitialTest.testTransientObject [Combined, DBStore: Derby (Reusable
> Folder), TCP, Native]
> *******************************************************
> org.eclipse.net4j.db.DBException: SQL Exception: Failed to create
> database '/temp/derby_309388391081712895.tmp', see the next exception
> for details.
> at
> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:46)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>
> at
> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>
> at
> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>
> at junit.framework.TestCase.runBare(TestCase.java:128)
> at
> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at
> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>
> at
> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
> Caused by: SQL Exception: Failed to create database
> '/temp/derby_309388391081712895.tmp', see the next exception for details.
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
> Source)
> at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
> Source)
> at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
> Source)
> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
> Source)
> at
> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:42)
>
> ... 55 more
>
> Kai Schlamp wrote:
>> Ok, I managed to get an error free workspace.
>> But still having some issues when running the AllTestsDBDerby.
>> I get the below IOException. Is it cause I am under Linux and the
>> test having some issues
>> creating the temp directory for the database?
>>
>> -Kai
>>
>> Eike Stepper wrote:
>>> Kai,
>>>
>>> Please update the whole org.eclipse.emf.cdo.tests.db project from
>>> CVS. I
>>> refactored the test configs a bit so that the relation with the test
>>> suites becomes more obvious. I also added an AllTestsDBStoreDerby suite
>>> (the config was already there).
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>>
>>>
>>>
>>> Kai Schlamp schrieb:
>>>> Eike Stepper wrote:
>>>>> Kai Schlamp schrieb:
>>>>>> Hi Eike,
>>>>>>
>>>>>> comments below.
>>>>>>
>>>>>>>> It is not under the CDO Tests Working Set. Where are the already
>>>>>>>> available tests for the Derby store?
>>>>>>> It seems somehow broken, possibly caused by the Mysql dependency
>>>>>>> problem.
>>>>>>> I'll clarify that...
>>>>>> Yep, I get a "Unsatisfied version constraint" on every imported
>>>>>> bundle
>>>>>> of org.eclipse.emf.cdo.tests.db.
>>>>>> But beside that I still wonder where the tests for the Derby
>>>>>> store are.
>>>>>> In org.eclipse.emf.cdo.tests.db there are tests like
>>>>>> "AllTestsDBHsqldb" or "AllTestsDBMysql",
>>>>>> but nothing with "Derby".
>>>>> I think there are none since the focus is on testing the DBStore
>>>>> and not
>>>>> the JDBC driver.
>>>>> You could try to copy/adjust the Mysql tests.
>>>> Ok, I see. But there are also no test cases that really put anything
>>>> in a MySQL database or retrieve something something from it (or am I
>>>> missing something). Is everything done "virtual" on a DBStore?
>>>> But to provide a reproducible test case for
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 , it seems that I
>>>> need a real derby database.
>>>> So I suggest that I try to provide an bugzilla test for
>>>> org.eclipse.emf.cdo.test.bugzilla that fires up the server manually
>>>> and sets up a temporary Derby database folder.
>>>> And still though, I am not sure how to simulate an application
>>>> restart, as this is the only way how to demonstrate the above
>>>> mentioned bug :-(
>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>> ----
>>>>> http://thegordian.blogspot.com
>>>>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] Testing framework question [message #430458 is a reply to message #430457] |
Fri, 22 May 2009 08:10 |
|
Well, the second exception is most probably just a follow-up problem. It
is not "the next exception" Derby is referring to.
Cheers
/Eike
----
http://thegordian.blogspot.com
Kai Schlamp schrieb:
>> This the exception I was referring to and I have no clue what it means.
>> It says "see the next exception for details". Where is this next
>> exception?
>
> When I simply print out the stack trace of the exception in
> DataSourceConncetionProvider.getConnection() I get the Exception below.
> So the cause seems to be a NPE of a null connection.
>
>
> SQL Exception: Failed to create database
> '/temp/derby_8125438050234857967.tmp', see the next exception for
> details.
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
> Source)
> at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
> Source)
> at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
> Source)
> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
> Source)
> at
> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:41)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>
> at
> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>
> at org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
> at
> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>
> at junit.framework.TestCase.runBare(TestCase.java:128)
> at
> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at
> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>
> at
> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
> java.lang.NullPointerException
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:184)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>
> at
> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>
> at
> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>
> at org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
> at
> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>
> at junit.framework.TestCase.runBare(TestCase.java:128)
> at
> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at
> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at
> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>
> at
> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | | |
Re: [CDO] Testing framework question [message #430462 is a reply to message #430461] |
Fri, 22 May 2009 08:40 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
The funny thing is, if set the same absolute path manually (e.g.
dataSource.setDatabaseName("/temp/derby_7920902904625378496.tmp ");) it works, too. But using
dataSource.setDatabaseName(dbFolder.getAbsolutePath()); not. What the heck is this??
Kai Schlamp wrote:
> Ok, Derby does not like the generated dbFolder name. For whatever
> reason. Perhaps of the dot in the name. I don't know.
>
> Kai Schlamp wrote:
>> Ok, I found the problem. When I use the following method in
>> AllTestsDBDerby it works:
>>
>> @Override
>> protected DataSource createDataSource()
>> {
>> dataSource = new EmbeddedDataSource();
>> if (reusableFolder == null)
>> {
>> reusableFolder = createDBFolder();
>> dataSource.setCreateDatabase("create");
>> }
>>
>> dbFolder = reusableFolder;
>> dataSource.setCreateDatabase("create");
>> dataSource.setDatabaseName("/temp/alpha");
>> return dataSource;
>> }
>>
>> So, I just use a constant and set create database. I am not sure why
>> that works, but it does ;-)
>> I will have closer look.
>>
>>
>>
>> Kai Schlamp wrote:
>>> Yep, I just also found that out. I have no idea how to go on :-(
>>>
>>> Eike Stepper wrote:
>>>> Well, the second exception is most probably just a follow-up
>>>> problem. It
>>>> is not "the next exception" Derby is referring to.
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://thegordian.blogspot.com
>>>>
>>>>
>>>>
>>>> Kai Schlamp schrieb:
>>>>>> This the exception I was referring to and I have no clue what it
>>>>>> means.
>>>>>> It says "see the next exception for details". Where is this next
>>>>>> exception?
>>>>> When I simply print out the stack trace of the exception in
>>>>> DataSourceConncetionProvider.getConnection() I get the Exception
>>>>> below.
>>>>> So the cause seems to be a NPE of a null connection.
>>>>>
>>>>>
>>>>> SQL Exception: Failed to create database
>>>>> '/temp/derby_8125438050234857967.tmp', see the next exception for
>>>>> details.
>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>> Source)
>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>> Source)
>>>>> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
>>>>> Source)
>>>>> at
>>>>> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
>>>>> Source)
>>>>> at
>>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known
>>>>> Source)
>>>>> at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown
>>>>> Source)
>>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
>>>>> Source)
>>>>> at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
>>>>> Source)
>>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>>>> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>> Source)
>>>>> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>> Source)
>>>>> at
>>>>> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:41)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>
>>>>>
>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>
>>>>>
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>> at
>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:184)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>
>>>>>
>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>> at
>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at
>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>
>>>>>
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>> at
>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
|
|
|
Re: [CDO] Testing framework question [message #430463 is a reply to message #430462] |
Fri, 22 May 2009 09:10 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
The problem lies in TMPUtil.createTempFolder() method.
A temp file is created and then deleted. Then again the directories are created.
But the new created directory can't be accessed by derby (a directory permission problem).
If you just use the method like below, then it works (derby creates the directory structure itself).
public static File createTempFolder(String prefix, String suffix, File directory) throws
IORuntimeException
{
// TODO Consider servlets
// ServletContext context = session.getServletContext();
// File tempDir = (File)context.getAttribute("javax.servlet.context.tempdir");
try
{
File tmp = File.createTempFile(prefix, suffix, directory);
// String tmpPath = tmp.getAbsolutePath();
tmp.delete();
// tmp = new File(tmpPath);
// tmp.mkdirs();
return tmp;
}
catch (IOException ex)
{
throw new IORuntimeException(ex);
}
}
}
It also demonstrates my reported bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926) then.
The test runs for a while correctly and then crashes with a NullPointerException from
SmartPreparedStatementCache.
And I bet if we would use the NullPreparedStatementCache, an "SQL Exception: A lock could not be
obtained within the time requested" would occur.
Kai Schlamp wrote:
> The funny thing is, if set the same absolute path manually (e.g.
> dataSource.setDatabaseName("/temp/derby_7920902904625378496.tmp ");) it
> works, too. But using
> dataSource.setDatabaseName(dbFolder.getAbsolutePath()); not. What the
> heck is this??
>
> Kai Schlamp wrote:
>> Ok, Derby does not like the generated dbFolder name. For whatever
>> reason. Perhaps of the dot in the name. I don't know.
>>
>> Kai Schlamp wrote:
>>> Ok, I found the problem. When I use the following method in
>>> AllTestsDBDerby it works:
>>>
>>> @Override
>>> protected DataSource createDataSource()
>>> {
>>> dataSource = new EmbeddedDataSource();
>>> if (reusableFolder == null)
>>> {
>>> reusableFolder = createDBFolder();
>>> dataSource.setCreateDatabase("create");
>>> }
>>>
>>> dbFolder = reusableFolder;
>>> dataSource.setCreateDatabase("create");
>>> dataSource.setDatabaseName("/temp/alpha");
>>> return dataSource;
>>> }
>>>
>>> So, I just use a constant and set create database. I am not sure why
>>> that works, but it does ;-)
>>> I will have closer look.
>>>
>>>
>>>
>>> Kai Schlamp wrote:
>>>> Yep, I just also found that out. I have no idea how to go on :-(
>>>>
>>>> Eike Stepper wrote:
>>>>> Well, the second exception is most probably just a follow-up
>>>>> problem. It
>>>>> is not "the next exception" Derby is referring to.
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>> ----
>>>>> http://thegordian.blogspot.com
>>>>>
>>>>>
>>>>>
>>>>> Kai Schlamp schrieb:
>>>>>>> This the exception I was referring to and I have no clue what it
>>>>>>> means.
>>>>>>> It says "see the next exception for details". Where is this next
>>>>>>> exception?
>>>>>> When I simply print out the stack trace of the exception in
>>>>>> DataSourceConncetionProvider.getConnection() I get the Exception
>>>>>> below.
>>>>>> So the cause seems to be a NPE of a null connection.
>>>>>>
>>>>>>
>>>>>> SQL Exception: Failed to create database
>>>>>> '/temp/derby_8125438050234857967.tmp', see the next exception for
>>>>>> details.
>>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>> Source)
>>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>> Source)
>>>>>> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known
>>>>>> Source)
>>>>>> at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown
>>>>>> Source)
>>>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
>>>>>> Source)
>>>>>> at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
>>>>>> Source)
>>>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>>>>> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>> Source)
>>>>>> at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>> Source)
>>>>>> at
>>>>>> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:41)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>
>>>>>>
>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>
>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>
>>>>>>
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>
>>>>>>
>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>
>>>>>>
>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>> at
>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>>>>>> java.lang.NullPointerException
>>>>>> at
>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:184)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>
>>>>>>
>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>
>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>> at
>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at
>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>
>>>>>>
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>
>>>>>>
>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>
>>>>>>
>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>> at
>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
|
|
|
Re: [CDO] Testing framework question [message #430495 is a reply to message #430463] |
Mon, 25 May 2009 07:53 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
Eike, can you confirm that the below solution is also working for you (and change the method in the
CVS).
I can then add a comment in Bug 276926 that the test framework now reproduces the bug.
Thanks in advance,
Kai
Kai Schlamp wrote:
> The problem lies in TMPUtil.createTempFolder() method.
> A temp file is created and then deleted. Then again the directories are
> created.
> But the new created directory can't be accessed by derby (a directory
> permission problem).
>
> If you just use the method like below, then it works (derby creates the
> directory structure itself).
>
> public static File createTempFolder(String prefix, String suffix, File
> directory) throws IORuntimeException
> {
> // TODO Consider servlets
> // ServletContext context = session.getServletContext();
> // File tempDir =
> (File)context.getAttribute("javax.servlet.context.tempdir");
>
> try
> {
> File tmp = File.createTempFile(prefix, suffix, directory);
> // String tmpPath = tmp.getAbsolutePath();
> tmp.delete();
> // tmp = new File(tmpPath);
> // tmp.mkdirs();
> return tmp;
> }
> catch (IOException ex)
> {
> throw new IORuntimeException(ex);
> }
> }
> }
>
> It also demonstrates my reported bug
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926) then.
> The test runs for a while correctly and then crashes with a
> NullPointerException from SmartPreparedStatementCache.
> And I bet if we would use the NullPreparedStatementCache, an "SQL
> Exception: A lock could not be obtained within the time requested" would
> occur.
>
>
> Kai Schlamp wrote:
>> The funny thing is, if set the same absolute path manually (e.g.
>> dataSource.setDatabaseName("/temp/derby_7920902904625378496.tmp ");) it
>> works, too. But using
>> dataSource.setDatabaseName(dbFolder.getAbsolutePath()); not. What the
>> heck is this??
>>
>> Kai Schlamp wrote:
>>> Ok, Derby does not like the generated dbFolder name. For whatever
>>> reason. Perhaps of the dot in the name. I don't know.
>>>
>>> Kai Schlamp wrote:
>>>> Ok, I found the problem. When I use the following method in
>>>> AllTestsDBDerby it works:
>>>>
>>>> @Override
>>>> protected DataSource createDataSource()
>>>> {
>>>> dataSource = new EmbeddedDataSource();
>>>> if (reusableFolder == null)
>>>> {
>>>> reusableFolder = createDBFolder();
>>>> dataSource.setCreateDatabase("create");
>>>> }
>>>>
>>>> dbFolder = reusableFolder;
>>>> dataSource.setCreateDatabase("create");
>>>> dataSource.setDatabaseName("/temp/alpha");
>>>> return dataSource;
>>>> }
>>>>
>>>> So, I just use a constant and set create database. I am not sure why
>>>> that works, but it does ;-)
>>>> I will have closer look.
>>>>
>>>>
>>>>
>>>> Kai Schlamp wrote:
>>>>> Yep, I just also found that out. I have no idea how to go on :-(
>>>>>
>>>>> Eike Stepper wrote:
>>>>>> Well, the second exception is most probably just a follow-up
>>>>>> problem. It
>>>>>> is not "the next exception" Derby is referring to.
>>>>>>
>>>>>> Cheers
>>>>>> /Eike
>>>>>>
>>>>>> ----
>>>>>> http://thegordian.blogspot.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> Kai Schlamp schrieb:
>>>>>>>> This the exception I was referring to and I have no clue what it
>>>>>>>> means.
>>>>>>>> It says "see the next exception for details". Where is this next
>>>>>>>> exception?
>>>>>>> When I simply print out the stack trace of the exception in
>>>>>>> DataSourceConncetionProvider.getConnection() I get the Exception
>>>>>>> below.
>>>>>>> So the cause seems to be a NPE of a null connection.
>>>>>>>
>>>>>>>
>>>>>>> SQL Exception: Failed to create database
>>>>>>> '/temp/derby_8125438050234857967.tmp', see the next exception for
>>>>>>> details.
>>>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>>> Source)
>>>>>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known
>>>>>>> Source)
>>>>>>> at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown
>>>>>>> Source)
>>>>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
>>>>>>> Source)
>>>>>>> at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
>>>>>>> Source)
>>>>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>>>>>> at
>>>>>>> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:41)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>>
>>>>>>>
>>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>>
>>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>>
>>>>>>>
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>>
>>>>>>>
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>
>>>>>>>
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>> at
>>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>
>>>>>>>
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>
>>>>>>>
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>> at
>>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>>>>>>> java.lang.NullPointerException
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:184)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>>
>>>>>>>
>>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>>
>>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>>> at
>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>>
>>>>>>>
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>>
>>>>>>>
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>
>>>>>>>
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>> at
>>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>
>>>>>>>
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>
>>>>>>>
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>> at
>>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
|
|
|
Re: [CDO] Testing framework question [message #430496 is a reply to message #430495] |
Mon, 25 May 2009 08:45 |
|
Kai Schlamp schrieb:
> Eike, can you confirm that the below solution is also working for you
> (and change the method in the CVS).
Sorry, somehow it glitched through my fingers.
Your proposal to fix it in the util plugin was not so good because it
would affect many other clients that might depend on the assumption that
the temp folder does exist after calling createTempFolder(). But I was
able to fix the Derby test config directly. Please update from HEAD and
try again...
Cheers
/Eike
----
http://thegordian.blogspot.com
> I can then add a comment in Bug 276926 that the test framework now
> reproduces the bug.
>
> Thanks in advance,
> Kai
>
> Kai Schlamp wrote:
>> The problem lies in TMPUtil.createTempFolder() method.
>> A temp file is created and then deleted. Then again the directories
>> are created.
>> But the new created directory can't be accessed by derby (a directory
>> permission problem).
>>
>> If you just use the method like below, then it works (derby creates
>> the directory structure itself).
>>
>> public static File createTempFolder(String prefix, String suffix,
>> File directory) throws IORuntimeException
>> {
>> // TODO Consider servlets
>> // ServletContext context = session.getServletContext();
>> // File tempDir =
>> (File)context.getAttribute("javax.servlet.context.tempdir");
>>
>> try
>> {
>> File tmp = File.createTempFile(prefix, suffix, directory);
>> // String tmpPath = tmp.getAbsolutePath();
>> tmp.delete();
>> // tmp = new File(tmpPath);
>> // tmp.mkdirs();
>> return tmp;
>> }
>> catch (IOException ex)
>> {
>> throw new IORuntimeException(ex);
>> }
>> }
>> }
>>
>> It also demonstrates my reported bug
>> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926) then.
>> The test runs for a while correctly and then crashes with a
>> NullPointerException from SmartPreparedStatementCache.
>> And I bet if we would use the NullPreparedStatementCache, an "SQL
>> Exception: A lock could not be obtained within the time requested"
>> would occur.
>>
>>
>> Kai Schlamp wrote:
>>> The funny thing is, if set the same absolute path manually (e.g.
>>> dataSource.setDatabaseName("/temp/derby_7920902904625378496.tmp ");)
>>> it works, too. But using
>>> dataSource.setDatabaseName(dbFolder.getAbsolutePath()); not. What
>>> the heck is this??
>>>
>>> Kai Schlamp wrote:
>>>> Ok, Derby does not like the generated dbFolder name. For whatever
>>>> reason. Perhaps of the dot in the name. I don't know.
>>>>
>>>> Kai Schlamp wrote:
>>>>> Ok, I found the problem. When I use the following method in
>>>>> AllTestsDBDerby it works:
>>>>>
>>>>> @Override
>>>>> protected DataSource createDataSource()
>>>>> {
>>>>> dataSource = new EmbeddedDataSource();
>>>>> if (reusableFolder == null)
>>>>> {
>>>>> reusableFolder = createDBFolder();
>>>>> dataSource.setCreateDatabase("create");
>>>>> }
>>>>>
>>>>> dbFolder = reusableFolder;
>>>>> dataSource.setCreateDatabase("create");
>>>>> dataSource.setDatabaseName("/temp/alpha");
>>>>> return dataSource;
>>>>> }
>>>>>
>>>>> So, I just use a constant and set create database. I am not sure
>>>>> why that works, but it does ;-)
>>>>> I will have closer look.
>>>>>
>>>>>
>>>>>
>>>>> Kai Schlamp wrote:
>>>>>> Yep, I just also found that out. I have no idea how to go on :-(
>>>>>>
>>>>>> Eike Stepper wrote:
>>>>>>> Well, the second exception is most probably just a follow-up
>>>>>>> problem. It
>>>>>>> is not "the next exception" Derby is referring to.
>>>>>>>
>>>>>>> Cheers
>>>>>>> /Eike
>>>>>>>
>>>>>>> ----
>>>>>>> http://thegordian.blogspot.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Kai Schlamp schrieb:
>>>>>>>>> This the exception I was referring to and I have no clue what
>>>>>>>>> it means.
>>>>>>>>> It says "see the next exception for details". Where is this next
>>>>>>>>> exception?
>>>>>>>> When I simply print out the stack trace of the exception in
>>>>>>>> DataSourceConncetionProvider.getConnection() I get the
>>>>>>>> Exception below.
>>>>>>>> So the cause seems to be a NPE of a null connection.
>>>>>>>>
>>>>>>>>
>>>>>>>> SQL Exception: Failed to create database
>>>>>>>> '/temp/derby_8125438050234857967.tmp', see the next exception for
>>>>>>>> details.
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(U nknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>>>>>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
>>>>>>>> Source)
>>>>>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unkno wn
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.internal.db.DataSourceConnectionProvider.g etConnection(DataSourceConnectionProvider.java:41)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:180)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>>>
>>>>>>>>
>>>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>>>
>>>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>>>> at
>>>>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>>>>
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>>>
>>>>>>>>
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>>>
>>>>>>>>
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>>
>>>>>>>>
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>>
>>>>>>>>
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>>
>>>>>>>>
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>>>>>>>> java.lang.NullPointerException
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.getConnection (DBStore.java:184)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DB Store.java:230)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:587)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:62)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:93)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:83)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.getRe pository(RepositoryConfig.java:90)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.setUp (RepositoryConfig.java:118)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.Scenario.setUp(Scenari o.java:190)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.doSetUp(Con figTest.java:505)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.AbstractCDOTest.doSetUp(AbstractCD OTest.java:44)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.ComplexTest.doSetUp(ComplexTest.ja va:81)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.setUp(AbstractOMTest. java:52)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTest.setUp(Confi gTest.java:498)
>>>>>>>>
>>>>>>>>
>>>>>>>> at junit.framework.TestCase.runBare(TestCase.java:128)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.runBare(AbstractOMTes t.java:86)
>>>>>>>>
>>>>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>>>>> at
>>>>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>>>>> at junit.framework.TestCase.run(TestCase.java:120)
>>>>>>>> at
>>>>>>>> org.eclipse.net4j.tests.AbstractOMTest.run(AbstractOMTest.ja va:108)
>>>>>>>>
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWr apper.runTest(ConfigTestSuite.java:126)
>>>>>>>>
>>>>>>>>
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:225)
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.r un(CoreTestApplication.java:23)
>>>>>>>>
>>>>>>>>
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>>
>>>>>>>>
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>>
>>>>>>>>
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>>>>
>>>>>>>>
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
>>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | | | | |
Re: [CDO] Testing framework question [message #430505 is a reply to message #430503] |
Mon, 25 May 2009 14:47 |
|
Kai Schlamp schrieb:
>> And Derby is awfully slow!
>
> Yes, I know. But for the moment it seems to be the best supported
> Store for CDO (especially the only one that does't need a sepearate
> installation, like MySQL for example).
I just managed to come up with a p2 repository at sourceforge:
http://net4j.sourceforge.net/update
You can use it to install the other drivers. I'm also going to announce
it separately ;-)
> CDO supporting the H2 database
> (http://www.h2database.com/html/main.html) would perhaps be a nice
> benefit. It has a Derby compatibility mode and so would probably run
> with some modifications of the DerbyStore. They have a feature list on
> their main page. Sounds quite feature rich and feels very fast.
> There's also an performance comparison chart on their site.
Support for H2 would be nice. But you would not need to develop an own
IStore (for example there is no DerbyStore!). If there is a JDBC driver
for H2 then you'd just need to write a very small DBAdapter for the DDL
part of the SQL. Look at org.eclipse.net4j.db.XYZ for examples. It's
really easy and we'd appreciate to take your contribution ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] Testing framework question [message #430511 is a reply to message #430510] |
Mon, 25 May 2009 15:48 |
|
Kai,
Unfortunately those who planned to develop the OCL query support are now
going to try it first outside of CDO ;-(
Currently I know of nobody to take care of it.
Cheers
/Eike
----
http://thegordian.blogspot.com
Kai Schlamp schrieb:
> Eike Stepper wrote:
>> Kai Schlamp schrieb:
>>>> And Derby is awfully slow!
>>> Yes, I know. But for the moment it seems to be the best supported
>>> Store for CDO (especially the only one that does't need a sepearate
>>> installation, like MySQL for example).
>> I just managed to come up with a p2 repository at sourceforge:
>> http://net4j.sourceforge.net/update
>> You can use it to install the other drivers. I'm also going to announce
>> it separately ;-)
>
> Ah sorry, I meant a MySQL installation. Derby and HSQLDB can be
> delivered with the product itself
> and doesn't not need any further installation by the end user.
> But nice to hear that there is a repository for the drivers now ;-)
>
>>
>>> CDO supporting the H2 database
>>> (http://www.h2database.com/html/main.html) would perhaps be a nice
>>> benefit. It has a Derby compatibility mode and so would probably run
>>> with some modifications of the DerbyStore. They have a feature list on
>>> their main page. Sounds quite feature rich and feels very fast.
>>> There's also an performance comparison chart on their site.
>> Support for H2 would be nice. But you would not need to develop an own
>> IStore (for example there is no DerbyStore!). If there is a JDBC driver
>> for H2 then you'd just need to write a very small DBAdapter for the DDL
>> part of the SQL. Look at org.eclipse.net4j.db.XYZ for examples. It's
>> really easy and we'd appreciate to take your contribution ;-)
>
> I took a quick look and was amazed how simple that would be. When I
> have some time left, I will see if I get H2 to work.
>
> By the way (we are already off topic here ;-)), is there any release
> plan for the query support (SQL or whatever)?
>
> Regards,
> Kai
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] Testing framework question [message #430515 is a reply to message #430513] |
Mon, 25 May 2009 16:12 |
|
Kai Schlamp schrieb:
> And the SQL query (SQL query for CDOID and get that object)? I saw it
> in one of your presentations.
> Or is that already supported (never tried it)?
No, it's also not yet supported because without a higher level query
language the pure SQL would be very tightly coupled to the
implementation details of the chosen mapping strategy. If you could
accept that, it shouldn't be too complicated to do it ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
>
> Eike Stepper wrote:
>> Kai,
>>
>> Unfortunately those who planned to develop the OCL query support are now
>> going to try it first outside of CDO ;-(
>> Currently I know of nobody to take care of it.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> Kai Schlamp schrieb:
>>> Eike Stepper wrote:
>>>> Kai Schlamp schrieb:
>>>>>> And Derby is awfully slow!
>>>>> Yes, I know. But for the moment it seems to be the best supported
>>>>> Store for CDO (especially the only one that does't need a sepearate
>>>>> installation, like MySQL for example).
>>>> I just managed to come up with a p2 repository at sourceforge:
>>>> http://net4j.sourceforge.net/update
>>>> You can use it to install the other drivers. I'm also going to
>>>> announce
>>>> it separately ;-)
>>> Ah sorry, I meant a MySQL installation. Derby and HSQLDB can be
>>> delivered with the product itself
>>> and doesn't not need any further installation by the end user.
>>> But nice to hear that there is a repository for the drivers now ;-)
>>>
>>>>> CDO supporting the H2 database
>>>>> (http://www.h2database.com/html/main.html) would perhaps be a nice
>>>>> benefit. It has a Derby compatibility mode and so would probably run
>>>>> with some modifications of the DerbyStore. They have a feature
>>>>> list on
>>>>> their main page. Sounds quite feature rich and feels very fast.
>>>>> There's also an performance comparison chart on their site.
>>>> Support for H2 would be nice. But you would not need to develop an own
>>>> IStore (for example there is no DerbyStore!). If there is a JDBC
>>>> driver
>>>> for H2 then you'd just need to write a very small DBAdapter for the
>>>> DDL
>>>> part of the SQL. Look at org.eclipse.net4j.db.XYZ for examples. It's
>>>> really easy and we'd appreciate to take your contribution ;-)
>>> I took a quick look and was amazed how simple that would be. When I
>>> have some time left, I will see if I get H2 to work.
>>>
>>> By the way (we are already off topic here ;-)), is there any release
>>> plan for the query support (SQL or whatever)?
>>>
>>> Regards,
>>> Kai
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Testing framework question [message #430517 is a reply to message #430515] |
Mon, 25 May 2009 16:53 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
Eike Stepper wrote:
> Kai Schlamp schrieb:
>> And the SQL query (SQL query for CDOID and get that object)? I saw it
>> in one of your presentations.
>> Or is that already supported (never tried it)?
> No, it's also not yet supported because without a higher level query
> language the pure SQL would be very tightly coupled to the
> implementation details of the chosen mapping strategy. If you could
> accept that, it shouldn't be too complicated to do it ;-)
I could accept that, but don't have the time too look in it much further for the moment.
But in the long term I will think about it.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>> Eike Stepper wrote:
>>> Kai,
>>>
>>> Unfortunately those who planned to develop the OCL query support are now
>>> going to try it first outside of CDO ;-(
>>> Currently I know of nobody to take care of it.
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>>
>>>
>>>
>>> Kai Schlamp schrieb:
>>>> Eike Stepper wrote:
>>>>> Kai Schlamp schrieb:
>>>>>>> And Derby is awfully slow!
>>>>>> Yes, I know. But for the moment it seems to be the best supported
>>>>>> Store for CDO (especially the only one that does't need a sepearate
>>>>>> installation, like MySQL for example).
>>>>> I just managed to come up with a p2 repository at sourceforge:
>>>>> http://net4j.sourceforge.net/update
>>>>> You can use it to install the other drivers. I'm also going to
>>>>> announce
>>>>> it separately ;-)
>>>> Ah sorry, I meant a MySQL installation. Derby and HSQLDB can be
>>>> delivered with the product itself
>>>> and doesn't not need any further installation by the end user.
>>>> But nice to hear that there is a repository for the drivers now ;-)
>>>>
>>>>>> CDO supporting the H2 database
>>>>>> (http://www.h2database.com/html/main.html) would perhaps be a nice
>>>>>> benefit. It has a Derby compatibility mode and so would probably run
>>>>>> with some modifications of the DerbyStore. They have a feature
>>>>>> list on
>>>>>> their main page. Sounds quite feature rich and feels very fast.
>>>>>> There's also an performance comparison chart on their site.
>>>>> Support for H2 would be nice. But you would not need to develop an own
>>>>> IStore (for example there is no DerbyStore!). If there is a JDBC
>>>>> driver
>>>>> for H2 then you'd just need to write a very small DBAdapter for the
>>>>> DDL
>>>>> part of the SQL. Look at org.eclipse.net4j.db.XYZ for examples. It's
>>>>> really easy and we'd appreciate to take your contribution ;-)
>>>> I took a quick look and was amazed how simple that would be. When I
>>>> have some time left, I will see if I get H2 to work.
>>>>
>>>> By the way (we are already off topic here ;-)), is there any release
>>>> plan for the query support (SQL or whatever)?
>>>>
>>>> Regards,
>>>> Kai
|
|
|
Goto Forum:
Current Time: Thu Apr 25 19:11:17 GMT 2024
Powered by FUDForum. Page generated in 0.06074 seconds
|