You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Si...@saaconsultants.com on 2005/05/18 16:58:45 UTC
Embedding 0.9 Problems
Hi
I'm trying to wrap your server as an mbean for deployment in jBoss.
I've been unable to use apacheds-main-0.9.jar as some of it's embedded
classes cause classpath and deployment issues with other mbeans so I have
decided to use apacheds-core-0.9.jar with a full set of its dependant JARs.
When I start the server using the following code I get the attached
ClassCastException.
Does anyone have any ideas on what may be wrong? It's likely to be a
problem with classpath and/or JAR file combination but just can't spot
it...
---------------------------------------------------------------------
Directory related JAR's I have added to the classpath:
apacheds-core-0.9.jar apacheds-shared-0.9.jar
asn1-ber-0.3.jar
asn1-codec-0.3.jar aspectj-1.2.1.jar
commons-collections-3.0.jar
commons-io-1.0.jar commons-lang-2.0.jar
commons-primitives-20041207.202534.jar
jakarta-oro-2.0.8.jar jakarta-regexp-1.3.jar
jdbm-0.12.jar
kerberos-common-0.4.jar kerberos-protocol-0.4.jar
ldap-common-0.9.jar
ldap-protocol-0.9.jar mina-0.7.jar
---------------------------------------------------------------------
env.put ( Context.PROVIDER_URL, "ou=system" );
env.put (
Context.INITIAL_CONTEXT_FACTORY,"org.apache.ldap.server.jndi.ServerContextFactory"
);
InitialDirContext ctx = new InitialDirContext( env );
---------------------------------------------------------------------
java.lang.ClassCastException
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.register(BootstrapSchemaLoader.java:227)
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.access$0(BootstrapSchemaLoader.java:212)
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader$1.schemaObjectProduced(BootstrapSchemaLoader.java:49)
at
org.apache.ldap.server.schema.bootstrap.ApacheComparatorProducer.produce(ApacheComparatorProducer.java:66)
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.load(BootstrapSchemaLoader.java:193)
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.loadDepsFirst(BootstrapSchemaLoader.java:169)
at
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.load(BootstrapSchemaLoader.java:108)
at
org.apache.ldap.server.jndi.CoreContextFactory.initialize(CoreContextFactory.java:515)
at
org.apache.ldap.server.jndi.CoreContextFactory.getInitialContext(CoreContextFactory.java:212)
at
org.apache.ldap.server.jndi.ServerContextFactory.getInitialContext(ServerContextFactory.java:153)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at
javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:80)
---------------------------------------------------------------------
org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader.register(BootstrapSchemaLoader.java:227)
case( ProducerTypeEnum.COMPARATOR_PRODUCER_VAL ):
>>>>> Comparator comparator = ( Comparator ) schemaObject;
ComparatorRegistry comparatorRegistry;
---------------------------------------------------------------------
TIA
Simon Temple
Re: Starting on XP....Again
Posted by Tony Blanchard <bl...@wanadoo.fr>.
I have missed the begining of this thread.
What are you trying to start ? Is this the apacheds-main server ?
I am on XP SP2 and the main standalone server works fine on my computer.
Hope this help,
Tony
Alex Karasulu a écrit :
> Trustin Lee wrote:
>
>> Hi Marc,
>>
>> 2005/5/19, Marc Boorshtein <mb...@yahoo.com>:
>>
>>
>>> I know I brought this up with .8, but I can't get
>>> apacheds to start on windows xp with the problem the
>>> error "Can not create loopback connection". As I do
>>> not need NIO functions for what I am doing, can you
>>> disable NIO in apacheds and use standard blocking
>>> sockets?
>>>
>>
>>
>> We'll add non-NIO transport types in MINA 0.9 which is still not
>> mature. I believe it will take some time until we implement it. Of
>> course you can implement your own one. :)
>>
>>
>
> Ooops guess I was wrong. Thought this was in there. :).
>
> Alex
>
>
>
>
Re: Starting on XP....Again
Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:
>Hi Marc,
>
>2005/5/19, Marc Boorshtein <mb...@yahoo.com>:
>
>
>>I know I brought this up with .8, but I can't get
>>apacheds to start on windows xp with the problem the
>>error "Can not create loopback connection". As I do
>>not need NIO functions for what I am doing, can you
>>disable NIO in apacheds and use standard blocking
>>sockets?
>>
>>
>
>We'll add non-NIO transport types in MINA 0.9 which is still not
>mature. I believe it will take some time until we implement it. Of
>course you can implement your own one. :)
>
>
Ooops guess I was wrong. Thought this was in there. :).
Alex
Re: Starting on XP....Again
Posted by Trustin Lee <tr...@gmail.com>.
Hi Marc,
2005/5/19, Marc Boorshtein <mb...@yahoo.com>:
> I know I brought this up with .8, but I can't get
> apacheds to start on windows xp with the problem the
> error "Can not create loopback connection". As I do
> not need NIO functions for what I am doing, can you
> disable NIO in apacheds and use standard blocking
> sockets?
We'll add non-NIO transport types in MINA 0.9 which is still not
mature. I believe it will take some time until we implement it. Of
course you can implement your own one. :)
Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
Re: Starting on XP....Again
Posted by Alex Karasulu <ao...@bellsouth.net>.
Marc Boorshtein wrote:
>I know I brought this up with .8, but I can't get
>apacheds to start on windows xp with the problem the
>error "Can not create loopback connection". As I do
>not need NIO functions for what I am doing, can you
>disable NIO in apacheds and use standard blocking
>sockets?
>
>
Yeah you should be able to mess with MINA settings to do this. MINA can
use NIO or revert to using standard sockets.
Regards,
Alex
Starting on XP....Again
Posted by Marc Boorshtein <mb...@yahoo.com>.
I know I brought this up with .8, but I can't get
apacheds to start on windows xp with the problem the
error "Can not create loopback connection". As I do
not need NIO functions for what I am doing, can you
disable NIO in apacheds and use standard blocking
sockets?
Marc
Re: Embedding 0.9 Problems
Posted by Si...@saaconsultants.com.
The cause of the problem is the JDBM JAR: jdbm-0.12.jar
I have now switched to using jdbm-0.20-dev.jar and it runs fine.
Thanks
Simon Temple
Simon.Temple@saac
onsultants.com
To
18/05/2005 17:17 "Apache Directory Developers List"
<de...@directory.apache.org>
cc
Please respond to
"Apache Directory Subject
Developers List" Re: Embedding 0.9 Problems
<dev@directory.ap
ache.org>
OK
I have removed JBoss from the equation and created a Class with a simple
Main() method.
If I have apacheds-main-0.9.jar on the classpath it works fine. If I have
the following on the classpath I get the ClassCastException:
jdbm-0.12.jar
apacheds-shared-0.9.jar
apacheds-core-0.9.jar
kerberos-common-0.4.jar
jakarta-oro-2.0.8.jar
jakarta-regexp-1.3.jar
aspectjrt.jar
asn1-ber-0.3.jar
asn1-codec-0.3.jar
commons-collections-3.0.jar
kerberos-protocol-0.4.jar
commons-io-1.0.jar
antlr-2.7.2.jar
commons-primitives-20041207.202534.jar
commons-lang-2.0.jar
ldap-clients-0.9.jar
ldap-common-0.9.jar
mina-0.7.jar
ldap-protocol-0.9.jar
So it seems to point to the JAR file combination I'm using?
I've tried to ensure I have the correct versions of everything but...
Is there a full list anywhere or does someone have an Eclipse project that
holds references to all the required JARs for 0.9?
TIA
Simon Temple
Stephane Bailliez
<sbailliez@apache
.org> To
Apache Directory Developers List
18/05/2005 16:13 <de...@directory.apache.org>
cc
Please respond to Subject
"Apache Directory Re: Embedding 0.9 Problems
Developers List"
<dev@directory.ap
ache.org>
Simon.Temple@saaconsultants.com wrote:
>
>
>Hi
>
>I'm trying to wrap your server as an mbean for deployment in jBoss.
>
>I've been unable to use apacheds-main-0.9.jar as some of it's embedded
>classes cause classpath and deployment issues with other mbeans so I have
>decided to use apacheds-core-0.9.jar with a full set of its dependant
JARs.
>
>When I start the server using the following code I get the attached
>ClassCastException.
>
>Does anyone have any ideas on what may be wrong? It's likely to be a
>problem with classpath and/or JAR file combination but just can't spot
>it...
>
>
Can you clarify your deployment structure ?
I smell the dreaded jboss unified class loader issue, so it might be
time to actually to look at isolating applications and disable the java2
delegation model.
As the server is also stuffing your parent classloader with a whole lot
of third parties it is based on, you certainly inherit some libs that do
not help in having a clean environment.
Re: Embedding 0.9 Problems
Posted by Si...@saaconsultants.com.
OK
I have removed JBoss from the equation and created a Class with a simple
Main() method.
If I have apacheds-main-0.9.jar on the classpath it works fine. If I have
the following on the classpath I get the ClassCastException:
jdbm-0.12.jar
apacheds-shared-0.9.jar
apacheds-core-0.9.jar
kerberos-common-0.4.jar
jakarta-oro-2.0.8.jar
jakarta-regexp-1.3.jar
aspectjrt.jar
asn1-ber-0.3.jar
asn1-codec-0.3.jar
commons-collections-3.0.jar
kerberos-protocol-0.4.jar
commons-io-1.0.jar
antlr-2.7.2.jar
commons-primitives-20041207.202534.jar
commons-lang-2.0.jar
ldap-clients-0.9.jar
ldap-common-0.9.jar
mina-0.7.jar
ldap-protocol-0.9.jar
So it seems to point to the JAR file combination I'm using?
I've tried to ensure I have the correct versions of everything but...
Is there a full list anywhere or does someone have an Eclipse project that
holds references to all the required JARs for 0.9?
TIA
Simon Temple
Stephane Bailliez
<sbailliez@apache
.org> To
Apache Directory Developers List
18/05/2005 16:13 <de...@directory.apache.org>
cc
Please respond to Subject
"Apache Directory Re: Embedding 0.9 Problems
Developers List"
<dev@directory.ap
ache.org>
Simon.Temple@saaconsultants.com wrote:
>
>
>Hi
>
>I'm trying to wrap your server as an mbean for deployment in jBoss.
>
>I've been unable to use apacheds-main-0.9.jar as some of it's embedded
>classes cause classpath and deployment issues with other mbeans so I have
>decided to use apacheds-core-0.9.jar with a full set of its dependant
JARs.
>
>When I start the server using the following code I get the attached
>ClassCastException.
>
>Does anyone have any ideas on what may be wrong? It's likely to be a
>problem with classpath and/or JAR file combination but just can't spot
>it...
>
>
Can you clarify your deployment structure ?
I smell the dreaded jboss unified class loader issue, so it might be
time to actually to look at isolating applications and disable the java2
delegation model.
As the server is also stuffing your parent classloader with a whole lot
of third parties it is based on, you certainly inherit some libs that do
not help in having a clean environment.
Re: Embedding 0.9 Problems
Posted by Stephane Bailliez <sb...@apache.org>.
Simon.Temple@saaconsultants.com wrote:
>
>
>Hi
>
>I'm trying to wrap your server as an mbean for deployment in jBoss.
>
>I've been unable to use apacheds-main-0.9.jar as some of it's embedded
>classes cause classpath and deployment issues with other mbeans so I have
>decided to use apacheds-core-0.9.jar with a full set of its dependant JARs.
>
>When I start the server using the following code I get the attached
>ClassCastException.
>
>Does anyone have any ideas on what may be wrong? It's likely to be a
>problem with classpath and/or JAR file combination but just can't spot
>it...
>
>
Can you clarify your deployment structure ?
I smell the dreaded jboss unified class loader issue, so it might be
time to actually to look at isolating applications and disable the java2
delegation model.
As the server is also stuffing your parent classloader with a whole lot
of third parties it is based on, you certainly inherit some libs that do
not help in having a clean environment.