You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Felix Knecht <fe...@apache.org> on 2009/02/23 13:30:42 UTC

Re: [ApacheDS] Problems with noarch-installer in 1.5.5 SNAPSHOT (NoClassDefFoundError)

Sorry for asking stupid questions, but I must be blind :(

Where are those apacheds.sh/apacheds.bat files created?

Emmanuel Lecharny schrieb:
> On Mon, Feb 23, 2009 at 7:51 AM, Felix Knecht <fe...@apache.org> wrote:
>>>> When I add commons-logging by hand (jar-File,
>>>> apacheds.bat-adjustment), the next Errors deals with a class from
>>>> apacheds-xdbm-base-1.5.5-SNAPSHOT.jar, apacheds.bat does not contain
>>>> it in the classpath. After adding that, next thing missing is Bouncy
>>>> Castle.
>>> Ok, we have to fix this part. Seems like the standard buid does not
>>> check that we can also build the installers. That's a problem...
>>>> It seems that at least the apacheds.bat file is not generated
>>>> correctly. Perhaps the content in the lib-File is not complete as well.
>> IMO it's bad practice to have hardcoded the libraries in the classpath as it is done in this case, apacheds.bat as well
>> as apacheds.sh.
> 
> Not only it's bad practice, but it's also a PITA when we cut a release ...
> 
> 


Re: [ApacheDS] Problems with noarch-installer in 1.5.5 SNAPSHOT (NoClassDefFoundError)

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Hi Felix,
> 
> On Mon, Feb 23, 2009 at 3:16 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
> 
>     > /installers/apacheds-noarch/apacheds.bat
>     > /installers/apacheds-noarch/apacheds.sh
> 
>     But they look completely different. I follow Stefans original
>     description to build it:
> 
> 
> Forget what I said. It seems I was not completely awaken this morning...
> I thought the discussion was about the scripts in the apacheds-noarch
> projet...
> 
> The correct location of the file you're looking for is
> /daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/archive/apacheds.sh

Thanks. This looks like :)
> 
> Regards,
> Pierre-Arnaud


Re: [ApacheDS] Problems with noarch-installer in 1.5.5 SNAPSHOT (NoClassDefFoundError)

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Felix,

On Mon, Feb 23, 2009 at 3:16 PM, Felix Knecht <fe...@apache.org> wrote:

> > /installers/apacheds-noarch/apacheds.bat
> > /installers/apacheds-noarch/apacheds.sh
>
> But they look completely different. I follow Stefans original description
> to build it:
>

Forget what I said. It seems I was not completely awaken this morning... I
thought the discussion was about the scripts in the apacheds-noarch
projet...

The correct location of the file you're looking for is
/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/archive/apacheds.sh

Regards,
Pierre-Arnaud

Re: [ApacheDS] Problems with noarch-installer in 1.5.5 SNAPSHOT (NoClassDefFoundError)

Posted by Felix Knecht <fe...@apache.org>.
> /installers/apacheds-noarch/apacheds.bat
> /installers/apacheds-noarch/apacheds.sh

But they look completely different. I follow Stefans original description to build it:

cd installers/apacheds
mvn -Pserver-installer install
unzip the target/images/apacheds-1.5.5-SNAPSHOT.zip

Then I get a in/apacheds.sh file containing all libraries in the -cp :

felix@donar ~/svn/apache/directory/installers/trunk/apacheds/target/images/apacheds_1.5.5-SNAPSHOT $ cat apacheds.sh
#!/bin/sh
#
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.
#
java -Dlog4j.configuration=file:conf/log4j.properties -cp
lib/antlr-2.7.7.jar:lib/apacheds-bootstrap-extract-1.5.5-SNAPSHOT.jar:lib/apacheds-bootstrap-partition-1.5.5-SNAPSHOT.jar:lib/apacheds-btree-base-1.5.5-SNAPSHOT.jar:lib/apacheds-core-1.5.5-SNAPSHOT.jar:lib/apacheds-core-avl-1.5.5-SNAPSHOT.jar:lib/apacheds-core-constants-1.5.5-SNAPSHOT.jar:lib/apacheds-core-cursor-1.5.5-SNAPSHOT.jar:lib/apacheds-core-entry-1.5.5-SNAPSHOT.jar:lib/apacheds-core-jndi-1.5.5-SNAPSHOT.jar:lib/apacheds-core-shared-1.5.5-SNAPSHOT.jar:lib/apacheds-jdbm-1.5.5-SNAPSHOT.jar:lib/apacheds-jdbm-store-1.5.5-SNAPSHOT.jar:lib/apacheds-kerberos-shared-1.5.5-SNAPSHOT.jar:lib/apacheds-noarch-installer-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-changepw-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-dhcp-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-dns-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-kerberos-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-ldap-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-ntp-1.5.5-SNAPSHOT.jar:lib/apacheds-protocol-shared-1.5.5-SNAPSHOT.jar:lib/apacheds-schema-
bootstrap-1.5.5-SNAPSHOT.jar:lib/apacheds-schema-extras-1.5.5-SNAPSHOT.jar:lib/apacheds-schema-registries-1.5.5-SNAPSHOT.jar:lib/apacheds-server-jndi-1.5.5-SNAPSHOT.jar:lib/apacheds-server-xml-1.5.5-SNAPSHOT.jar:lib/apacheds-utils-1.5.5-SNAPSHOT.jar:lib/apacheds-xbean-spring-1.5.5-SNAPSHOT.jar:lib/apacheds-xdbm-search-1.5.5-SNAPSHOT.jar:lib/apacheds-xdbm-tools-1.5.5-SNAPSHOT.jar:lib/bootstrapper.jar:lib/commons-cli-1.1.jar:lib/commons-collections-3.2.1.jar:lib/commons-daemon-1.0.1.jar:lib/commons-io-1.4.jar:lib/commons-lang-2.4.jar:lib/jcl-over-slf4j-1.5.2.jar:lib/log4j-1.2.14.jar:lib/mina-core-2.0.0-M4.jar:lib/shared-asn1-0.9.14-SNAPSHOT.jar:lib/shared-asn1-codec-0.9.14-SNAPSHOT.jar:lib/shared-bouncycastle-reduced-0.9.14-SNAPSHOT.jar:lib/shared-ldap-0.9.14-SNAPSHOT.jar:lib/shared-ldap-constants-0.9.14-SNAPSHOT.jar:lib/slf4j-api-1.5.2.jar:lib/slf4j-log4j12-1.5.2.jar:lib/spring-beans-2.5.5.jar:lib/spring-context-2.5.5.jar:lib/spring-core-2.5.5.jar:lib/xbean-spring-3.4.3.jar
org.apache.directory.server.UberjarMain conf/server.xml


But the one you mentioned from installers/apacheds-no... look like
felix@donar ~/svn/apache/directory/installers/trunk/apacheds-noarch $ cat apacheds.sh
#!/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

if [ -e target/apacheds-noarch-installer-1.5.5-SNAPSHOT-app.jar ] ; then
  echo uber jar exists
else
  echo uber jar not found need to build it
  mvn clean install
fi

java -Dlog4j.debug -Dlog4j.configuration=file:./log4j.properties -jar
target/apacheds-noarch-installer-1.5.5-SNAPSHOT-app.jar target/plan/server.xml

Where is the first script built? We should change the first script not to have coded the classpath jars but to collect
all of them from the lib directory in a variable and add this variable to the classpath. This way we generate
dynamically a list of all jars in the lib directory and add them to the classpath. This will avoid missing libraries in
the classpath (but existing in the lib directory).

> 
> They are used to launch the server from the /installers/apacheds-noarch
> project.
> 
> Hope this helps,
> Pierre-Arnaud
> 


Re: [ApacheDS] Problems with noarch-installer in 1.5.5 SNAPSHOT (NoClassDefFoundError)

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Felix,

On Mon, Feb 23, 2009 at 1:30 PM, Felix Knecht <fe...@apache.org> wrote:

> Sorry for asking stupid questions, but I must be blind :(
>
> Where are those apacheds.sh/apacheds.bat files created?


/installers/apacheds-noarch/apacheds.bat
/installers/apacheds-noarch/apacheds.sh

They are used to launch the server from the /installers/apacheds-noarch
project.

Hope this helps,
Pierre-Arnaud