Using @Resource injection for Mongo db, inside Web Bundle inside OSGI, under Liberty Profile
- 阅读更多 关于 Using @Resource injection for Mongo db, inside Web Bundle inside OSGI, under Liberty Profile
问题 I want to inject Mongo database (com.mongodb.DB) into OSGI Web Bundle Project, using @Resource. The application is to deployed to WebSphere Liberty Profile V8.5.5.1. Is this possible to do it? I got an error message "....The annotations could not be obtained because of the exception : java.lang.NoClassDefFoundError" However, I can inject Mongo database into WAR, using @Resource, running on WebSphere Liberty Profile, if not using OSGI. Below is lookup return null. public static final DB