シンプルな .war ファイルを karaf/servicemix にデプロイすると、次のエラーが発生します。何か不足している場合はお知らせください。
エラー:
java.lang.ClassNotFoundException: app.web.servlet.ConnectServlet not found by JDBCWebDemo [207]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)[org.apache.felix.framework-3.0.9.jar:]
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)[org.apache.felix.framework-3.0.9.jar:]
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)[org.apache.felix.framework-3.0.9.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)[org.apache.felix.framework-3.0.9.jar:]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1619)[org.apache.felix.framework-3.0.9.jar:]
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:900)[org.apache.felix.framework-3.0.9.jar:]
at org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)[122:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
at org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194)[122:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorHS.newInstance(RegisterWebAppVisitorHS.java:221)[122:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
コードを以下に示します。
マニフェスト.MF:
Manifest-Version: 2
Bundle-SymbolicName: JDBCWebDemo
Bundle-Version: 2.3
Bundle-ClassPath: WEB-INF/classes
Import-Package: javax.servlet,javax.servlet.http
web.xml:
<web-app ...>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>ConnectServlet</display-name>
<servlet-name>ConnectServlet</servlet-name>
<servlet-class>app.web.servlet.ConnectServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ConnectServlet</servlet-name>
<url-pattern>/ConnectServlet</url-pattern>
</servlet-mapping>
</web-app>