可能重复:
找不到 db4o 数据库文件
我正在尝试使用 DB4O 和 JSF 创建一个简单的 CRUD 应用程序。在我的网络项目中,我有两个包:
com.crud.bean
包含CRUDClient.java
com.crud.entities
包含 DB4O 实体Client.java
webContent 包含一个 JSP 文件addClient.jsp
,其中包含一个带有客户端必需字段的表单。我将在 JSP 文件中声明CRUDClient.java
为托管 beanfaces-config.xml
以使用其功能和属性。
但是当我运行项目时,出现以下错误
15:44:32,444 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001:Failed to start service jboss.deployment.unit."DB_WEB.war".POST_MODULE:org.jboss.msc.service.StartException in service jboss.deployment.unit."DB_WEB.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "DB_WEB.war"atorg.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.ja va:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]
Caused by: java.lang.NoClassDefFoundError: com/db4o/ObjectContainer
at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_01]
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) [rt.jar:1.7.0_01]
at java.lang.Class.getConstructor0(Unknown Source) [rt.jar:1.7.0_01]
at java.lang.Class.getConstructor(Unknown Source) [rt.jar:1.7.0_01]
at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:108)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService. java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: com.db4o.ObjectContainer from [Module "deployment.DB_WEB.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 11 more
这是如何引起的,我该如何解决?