You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2011/01/12 20:13:44 UTC
Strange errors when running tests in eclipse
Hi,
it's now a few weeks I get a painful and unexpected error when launching
a test after having done a svn up followed by a refresh in eclipse. I'm
launching a test in core integ, and the test not even starts, throwing
an exception :
java.io.FileNotFoundException: ERR_10004 Expecting to find a schema.ldif
file in provided baseDirectory path
'/var/folders/t7/t7UwkHaiGleYYgPqGZTbF++++TM/-Tmp-/server-work-AdministrativePointServiceIT/partitions/schema/ou=schema.ldif'
but no such file found.
at
org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader.<init>(LdifSchemaLoader.java:103)
at
org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.initSchema(DefaultDirectoryServiceFactory.java:179)
at
org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.build(DefaultDirectoryServiceFactory.java:232)
at
org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.init(DefaultDirectoryServiceFactory.java:118)
at
org.apache.directory.server.core.factory.DSAnnotationProcessor.createDS(DSAnnotationProcessor.java:128)
at
org.apache.directory.server.core.factory.DSAnnotationProcessor.getDirectoryService(DSAnnotationProcessor.java:219)
at
org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:106)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I understand that it's a problem about the missing ou=schema.ldif file,
and if I rebuild the full server, then the file is created and present.
Is there something changed recently around the schema exctraction ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Strange errors when running tests in eclipse
Posted by Antoine Levy Lambert <an...@gmx.de>.
Hello Emmanuel,
on which operating system are you developing ?
I think it is a bug of the JVM. Force the JVM to use temp dirs with not
so fancy directory names ( not all these + signs). This can be attained
by setting a JVM option
-Djava.io.tmpdir=/some/directory/with/not/a/fancy/name
I had errors like that working with Jetty on a Mac when running the unit
tests of CruiseControl and setting the tmpdir to be something more
"bland" was helping. The fancy names on Mac were introduced by Mac OS
10.5 or 10.6. See this Radar #6978682. on this page
http://developer.apple.com/library/mac/#releasenotes/Java/JavaLeopardUpdate4RN/ResolvedIssues/ResolvedIssues.html
Regards,
Antoine
On 1/12/11 2:13 PM, Emmanuel Lecharny wrote:
> Hi,
>
> it's now a few weeks I get a painful and unexpected error when
> launching a test after having done a svn up followed by a refresh in
> eclipse. I'm launching a test in core integ, and the test not even
> starts, throwing an exception :
>
> java.io.FileNotFoundException: ERR_10004 Expecting to find a
> schema.ldif file in provided baseDirectory path
> '/var/folders/t7/t7UwkHaiGleYYgPqGZTbF++++TM/-Tmp-/server-work-AdministrativePointServiceIT/partitions/schema/ou=schema.ldif'
> but no such file found.
> at
> org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader.<init>(LdifSchemaLoader.java:103)
> at
> org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.initSchema(DefaultDirectoryServiceFactory.java:179)
> at
> org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.build(DefaultDirectoryServiceFactory.java:232)
> at
> org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory.init(DefaultDirectoryServiceFactory.java:118)
> at
> org.apache.directory.server.core.factory.DSAnnotationProcessor.createDS(DSAnnotationProcessor.java:128)
> at
> org.apache.directory.server.core.factory.DSAnnotationProcessor.getDirectoryService(DSAnnotationProcessor.java:219)
> at
> org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:106)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
> I understand that it's a problem about the missing ou=schema.ldif
> file, and if I rebuild the full server, then the file is created and
> present.
>
> Is there something changed recently around the schema exctraction ?
>
Re: Strange errors when running tests in eclipse
Posted by Stefan Seelmann <se...@apache.org>.
On Fri, Jan 14, 2011 at 9:47 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 1/14/11 9:33 AM, Stefan Seelmann wrote:
>>
>> Hi Emmanuel,
>>
>> On Wed, Jan 12, 2011 at 8:13 PM, Emmanuel Lecharny<el...@gmail.com>
>> wrote:
>>>
>>> it's now a few weeks I get a painful and unexpected error when launching
>>> a
>>> test after having done a svn up followed by a refresh in eclipse. I'm
>>> launching a test in core integ, and the test not even starts, throwing an
>>> exception :
>>>
>>> java.io.FileNotFoundException: ERR_10004 Expecting to find a schema.ldif
>>> file in provided baseDirectory path
>>>
>>> I understand that it's a problem about the missing ou=schema.ldif file,
>>> and
>>> if I rebuild the full server, then the file is created and present.
>>>
>>> Is there something changed recently around the schema exctraction ?
>>
>> Yes, we changed the schema extraction code so that it works in OSGi
>> environments (Studio).
>>
>> During the maven build, in the generate-resources phase, the
>> ldap-schema/target/classes/META-INF/apacheds-schema.index file is
>> created. This index file is then used by the
>> DefaultSchemaLdifExtractor to find and copy the schema files.
>>
>> If you refresh and rebuild the Eclipse workspace the the
>> target/classes folder is deleted. The Eclipse build don't generate the
>> index file. Then the schema extractor won't copy any schema file to
>> the target location.
>>
>> What we can try is to create the index file in
>> target/generated-sources which is also done by other maven plugins
>> (e.g. antlr). Those target folders survive a refresh of the Eclipse
>> workspace.
>
> Yes, that would be a good idea. It's a bit painful to have to rebuild the
> whole project in order to have this file created ...
Done: http://svn.apache.org/viewvc?rev=1058920&view=rev
Kind Regards,
Stefan
Re: Strange errors when running tests in eclipse
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 1/14/11 9:33 AM, Stefan Seelmann wrote:
> Hi Emmanuel,
>
> On Wed, Jan 12, 2011 at 8:13 PM, Emmanuel Lecharny<el...@gmail.com> wrote:
>> it's now a few weeks I get a painful and unexpected error when launching a
>> test after having done a svn up followed by a refresh in eclipse. I'm
>> launching a test in core integ, and the test not even starts, throwing an
>> exception :
>>
>> java.io.FileNotFoundException: ERR_10004 Expecting to find a schema.ldif
>> file in provided baseDirectory path
>>
>> I understand that it's a problem about the missing ou=schema.ldif file, and
>> if I rebuild the full server, then the file is created and present.
>>
>> Is there something changed recently around the schema exctraction ?
> Yes, we changed the schema extraction code so that it works in OSGi
> environments (Studio).
>
> During the maven build, in the generate-resources phase, the
> ldap-schema/target/classes/META-INF/apacheds-schema.index file is
> created. This index file is then used by the
> DefaultSchemaLdifExtractor to find and copy the schema files.
>
> If you refresh and rebuild the Eclipse workspace the the
> target/classes folder is deleted. The Eclipse build don't generate the
> index file. Then the schema extractor won't copy any schema file to
> the target location.
>
> What we can try is to create the index file in
> target/generated-sources which is also done by other maven plugins
> (e.g. antlr). Those target folders survive a refresh of the Eclipse
> workspace.
Yes, that would be a good idea. It's a bit painful to have to rebuild
the whole project in order to have this file created ...
Thanks for the feedback !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Strange errors when running tests in eclipse
Posted by Stefan Seelmann <se...@apache.org>.
Hi Emmanuel,
On Wed, Jan 12, 2011 at 8:13 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> it's now a few weeks I get a painful and unexpected error when launching a
> test after having done a svn up followed by a refresh in eclipse. I'm
> launching a test in core integ, and the test not even starts, throwing an
> exception :
>
> java.io.FileNotFoundException: ERR_10004 Expecting to find a schema.ldif
> file in provided baseDirectory path
>
> I understand that it's a problem about the missing ou=schema.ldif file, and
> if I rebuild the full server, then the file is created and present.
>
> Is there something changed recently around the schema exctraction ?
Yes, we changed the schema extraction code so that it works in OSGi
environments (Studio).
During the maven build, in the generate-resources phase, the
ldap-schema/target/classes/META-INF/apacheds-schema.index file is
created. This index file is then used by the
DefaultSchemaLdifExtractor to find and copy the schema files.
If you refresh and rebuild the Eclipse workspace the the
target/classes folder is deleted. The Eclipse build don't generate the
index file. Then the schema extractor won't copy any schema file to
the target location.
What we can try is to create the index file in
target/generated-sources which is also done by other maven plugins
(e.g. antlr). Those target folders survive a refresh of the Eclipse
workspace.
Kind Regards,
Stefan