Ok, I have the server running.  Many libs required.
Sending this for future reference...

I had a number of ClassDefNotFound and other classpath
issues at runtime.

So, this is the list of .jar files from MINA and SSHD projects...

commons-lang-2.4.jar
commons-logging-1.0.3.jar
javassist-3.7.ga.jar
jzlib-1.0.7.jar 
mina-core-2.0.0-M6.jar
netty2-1.9.2.jar
ognl-2.7.2.jar
rxtx-2.1.7.jar
slf4j-api-1.5.2.jar
spring-2.5.5.jar
sshd-core-0.1.0.jar
tomcat-apr-5.5.23.jar
xbean-spring-3.4.3.jar

I then had an issue with SLF4J, because no implementation
is included.

So I added one, from the latest release:

slf4j-nop-1.5.8.jar

Nope, I got the error below.

It was a versioning issue, I had to replace the .jar that came
with MINA/SSHD (slf4j-api-1.5.2.jar) with:

slf4j-api-1.5.8.jar

Now my server runs fine.  Phew.

It seems the the distribution of SSHD could include the slf4j- nop-1.5.2.jar, saving people a little trouble. (Yes, that's a no-op version, no logging.)

--Kent

On Aug 19, 2009, at 2:17 PM, Kent Spaulding wrote:

Hi all,

Quite new to this, searched the forums, but seem to have a classpath issue. It would be very nice if http://mina.apache.org/sshd/embedding-sshd-in-5-minutes.html had a section on the classpath
setup.

My code for an SSHD class is simple enough, follows the 'embedding' webpage, doesn't do shell or commands.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/ impl/StaticLoggerBinder
        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org .apache .sshd .common.AbstractFactoryManager.<init>(AbstractFactoryManager.java:37)
        at org.apache.sshd.SshServer.<init>(SshServer.java:105)
        at org.apache.sshd.SshServer.setUpDefaultServer(SshServer.java:238)
        at com.skyworthttg.samples.sshd.SSHD.main(SSHD.java:13)

I have mina-core-2.0.0-M6.jar in the classpath, along with all the .jar from the zip's ./lib directory.

The SLF4J impl jar must not be distributed with 2.0.0-M6?

Is that the only missing dependency?

Thanks,
--Kent

Reply via email to