NoClassDefFoundError im Websphere — Gläser vorhanden sind

Habe ich eine einfache Spring-MVC-Anwendung, die aussieht, einige Benutzerdaten von einem LDAP-server und druckt eine einfache HTML-Seite mit dem JSP. Die Anwendung funktioniert gut auf Tomcat 6. Es nutzt Spring LDAP 1.3.1 und LDAPTemplate zu tun, die LDAP-Suchvorgänge.

Wenn ich allerdings implementieren Sie diese Anwendung, KRIEG, Websphere 7, die app läuft nicht -- Websphere gibt einen 500 Internal server error. Blick auf Websphere-Protokolldatei, ich sehe

[14/12/10 14:50:09:169 GMT] 00000022 DispatcherSer E org.springframework.web.servlet.FrameworkServlet initServletBean Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.ldap.core.support.LdapContextSource] for bean with name 'contextSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org.springframework.beans.factory.InitializingBean
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:885)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

Mein web-inf\lib-Verzeichnis alle JAR-Dateien, einschließlich org.springframework.beans-3.0.5.RELEASE.jar enthält InitializingBean. Ich bin mir daher nicht sicher, warum, Websphere, meldet sich die Klasse als vermisst.

Inhalte meiner web-inf\lib:

aopalliance.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.apache.log4j-1.2.15.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
commons-pool-1.5.4.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
ldapbp-1.0.jar
org.springframework.aop-3.0.5.RELEASE.jar
org.springframework.asm-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.context-3.0.5.RELEASE.jar
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.jdbc-3.0.5.RELEASE.jar
org.springframework.oxm-3.0.5.RELEASE.jar
org.springframework.transaction-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar
org.springframework.web.servlet-3.0.5.RELEASE.jar
spring-ldap-1.3.1.RELEASE-all.jar

Und hier ist die definition der contextSource bean, die Websphere ist Probleme beim laden von (Benutzername/Kennwort gültig ist und funktioniert mit Tomcat):

<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
  <property name="url" value="ldaps://moo.example.com:1300/" />
  <property name="userDn" value="CN=foo,OU=baz,DC=bar,DC=blat,DC=org" />
  <property name="password" value="*******" />
</bean>

Ich würde mich sehr freuen, wenn jemand darauf hinweisen könnte, warum funktioniert das nicht auf Websphere. Ich bin mir nicht sicher über die class-loading-Regeln, die in Websphere und würde schätzen jede Beratung.

InformationsquelleAutor sigint | 2010-12-15

Schreibe einen Kommentar