eclipselink と mongodb を使用した jee6 アプリケーションがあります。nosql-extension org.eclipse.persistence.nosql を使用します
アプリケーションをローカルのグラスフィッシュ インスタンスにデプロイすると、すべて正常に動作します。
リモートグラスフィッシュでアプリケーションを実行すると、以下のエラーが表示されます
glassfish のバージョンは、mongodb ドライバー jar が WEB-INF/lib にある両方の場所で同じです
しかし、リモートサーバーで私は"java.lang.NoClassDefFoundError: com/mongodb/ServerAddress"
問題はどこだ ???
[#|2012-12-03T19:19:36.281+0000|CONFIG|glassfish3.1.2|org.eclipse.persistence.session.file:/usr/glassfish3/glassfish3/glassfish/domains/domain1/applications/ForecastWebApp-0.0.1-SNAPSHOT/WEB-INF/classes/_forecastMongoDB.connection|_ThreadID=1306;_ThreadName=Thread-2;|connecting(EISLogin(
platform=> MongoPlatform
user name=> ""
MongoConnectionSpec()
))|#]
[#|2012-12-03T19:19:36.288+0000|SEVERE|glassfish3.1.2|org.eclipse.persistence.session.file:/usr/glassfish3/glassfish3/glassfish/domains/domain1/applications/ForecastWebApp-0.0.1-SNAPSHOT/WEB-INF/classes/_forecastMongoDB.ejb|_ThreadID=1306;_ThreadName=Thread-2;|java.lang.NoClassDefFoundError: com/mongodb/ServerAddress
at org.eclipse.persistence.internal.nosql.adapters.mongo.MongoConnectionFactory.getConnection(MongoConnectionFactory.java:74)
at org.eclipse.persistence.eis.EISConnectionSpec.connectToDataSource(EISConnectionSpec.java:150)
at org.eclipse.persistence.nosql.adapters.mongo.MongoConnectionSpec.connectToDataSource(MongoConnectionSpec.java:150)
at org.eclipse.persistence.eis.EISLogin.connectToDatasource(EISLogin.java:73)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:418)
at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:216)
at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:504)
at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:484)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:734)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:217)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:542)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)