This is specific to ADS. Something has been changed in the dependencies that
the archetype runs with. Lets see if we get the original DAS contribution that
I just emailed you to compile correctly. If that compiles then you have the
same test case there.
Spark Shen wrote:
One more question:
When executing the test case
org.apache.tuscany.das.ldap.connect.test.ADSEmbeddedConnectionTest, I
got the following exception:
org.apache.directory.server.schema.bootstrap.partition.UniqueResourceException
: Problem locating bootstrap partition database file list. Be sure
there is exactly one bootstrap partition jar in your classpath.
No resources named
'org/apache/directory/server/schema/bootstrap/partition/DBFILES' located
on classpath
at
org.apache.directory.server.schema.bootstrap.partition.DbFileListing.getUniqueResource(DbFileListing.java:139)
at
org.apache.directory.server.schema.bootstrap.partition.DbFileListing.getUniqueResourceAsStream
(DbFileListing.java:129)
at
org.apache.directory.server.schema.bootstrap.partition.DbFileListing.init(DbFileListing.java:82)
at
org.apache.directory.server.schema.bootstrap.partition.DbFileListing.<init>(
DbFileListing.java:51)
at
org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor.<init>(SchemaPartitionExtractor.java:43)
at
org.apache.directory.server.core.DefaultDirectoryService.initialize
(DefaultDirectoryService.java:833)
at
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:254)
at
org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext
(AbstractContextFactory.java:124)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init (InitialContext.java:223)
at
javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
at
org.apache.tuscany.das.ldap.connect.ADSEmbeddedConnection.startup(ADSEmbeddedConnection.java:159)
at
org.apache.tuscany.das.ldap.connect.ADSEmbeddedConnection.connect(ADSEmbeddedConnection.java:164)
at
org.apache.tuscany.das.ldap.connect.test.ADSEmbeddedConnectionTest.testConnect(ADSEmbeddedConnectionTest.java
:25)
2007/11/14, Ole Ersoy <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
Spark Shen wrote:
> And I got the java.lang.UnsupportedOperationException .
> I am not quite sure whether its my program is wrong or the retrieving
> schema
> operation is not supported.
I'm guessing you tried it on some version prior to 1.50 or 1.51?
>
> Besides the file you mentioned, I looked into another file:
>
http://svn.apache.org/repos/asf/incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/connect/test/ADSEmbeddedConnectionTest.java
>
> and find a code snippet:
>
> LdapContext schemaContext = adsEmbeddedConnection.
>
> connect(configuration.
> getSchemaPartitionName());
>
> then what I want to do is:
> schemaContext.list("")
>
> The test case itself relies on many third party jars.
> I did not have a maven env, and am trying to configure one.
>
> Seems it will take me some efforts to find all the dependent
jars, and then play with it.
Maven should pull them all down for you and install them in your local
repository, once you have maven installed.
So once you have the mvn command working, you simply cd into the
ldap das
project root and run
"mvn clean install"
Maven will download all the dependencies for you.
Then run
"mvn eclipse:eclipse"
at the project root and maven will turn the projects into eclipse
projects
that you can import and play with.
> Where can I find the developer guide?
> http://incubator.apache.org/tuscany/starting-with-das.htmll
<http://incubator.apache.org/tuscany/starting-with-das.htmll>
> <http://incubator.apache.org/tuscany/starting-with-das.htmll> ?
>
I wrote some documentation here:
https://svn.apache.org/repos/asf/directory/sandbox/oersoy/guides/das.ldap.design.documentation/
Still need to finish this up. I used it to get moving on the DAS
and then once I had momentum, I just finished the initial
implementation. It's an eclipse documentation plugin, so just
download and drop into your eclipse plugins folder.
> If it will not cost you too much energy, would you give me a
standalone main file which can start an apacheds server,
> and then get the schemaContext, and at last list all the schema
entries?
>
There's also a maven archetype that I have created specifically for
this purpose that is located in my Sandbox.
http://svn.apache.org/repos/asf/directory/sandbox/oersoy/apacheds.testing.archetype
This will enable you to create a project starting point for
experimentation. It does require you to be familiar with maven and
maven archetypes.
--
Spark Shen
China Software Development Lab, IBM