我在调试模式下有一个问题,但这个问题在运行项目中缺失。 我的项目基础在jboss-javaee-webapp-ear-blank-archetype。
我在eclipse中运行项目并使用
运行项目mvn clean install package jboss-as:deploy
但是运行项目接收:
09:54:55,262 INFO [org.jboss.modules] JBoss Modules version 1.1.3.GA
09:54:56,080 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
09:54:56,144 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.3.Final "Arges" starting
09:55:01,196 INFO [org.jboss.as.server.deployment.scanner] JBAS015003: Found Test-ear.ear in deployment directory. To trigger deployment create a file called Test-ear.ear.dodeploy
09:55:01,681 INFO [org.xnio] XNIO Version 3.0.6.GA
09:55:01,689 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.6.GA
09:55:01,695 INFO [org.jboss.remoting] JBoss Remoting version 3.2.8.SP1
09:55:01,734 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
09:55:01,807 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
09:55:01,810 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
09:55:01,809 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
09:55:01,814 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011906: Activating OSGi Subsystem
09:55:01,814 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
09:55:01,819 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013171: Activating Security Subsystem
09:55:01,984 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
09:55:02,060 INFO [org.jboss.as.naming] (MSC service thread 1-9) JBAS011802: Starting Naming Service
09:55:02,100 INFO [org.jboss.as.connector.logging] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.12.Final)
09:55:02,319 INFO [org.jboss.as.mail.extension] (MSC service thread 1-14) JBAS015400: Bound mail session [java:jboss/mail/Default]
09:55:02,358 INFO [org.jboss.as.security] (MSC service thread 1-16) JBAS013170: Current PicketBox version=4.0.13.Final
09:55:04,495 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
09:55:05,470 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-8) JBoss Web Services - Stack CXF Server 4.0.5.GA
09:55:06,115 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-10) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
09:55:06,160 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost/127.0.0.1:8080
09:55:06,226 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-15) JBAS015012: Started FileSystemDeploymentService for directory /home/aryana/Documents/Software-Portable/jboss-as-7.1.3.Final/standalone/deployments
09:55:06,285 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "Test-ear.ear"
09:55:06,285 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "ojdbc6.jar"
09:55:06,285 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015876: Starting deployment of "eclipselink-2.5.0.jar"
09:55:06,597 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on 127.0.0.1:4447
09:55:06,597 INFO [org.jboss.as.remoting] (MSC service thread 1-10) JBAS017100: Listening on 127.0.0.1:9999
09:55:07,501 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-13) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
09:55:07,507 INFO [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011907: Register module: Module "deployment.ojdbc6.jar:main" from Service Module Loader
09:55:07,510 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:/jboss/datasources/OracleDS]
09:55:07,565 INFO [org.jboss.as.osgi] (MSC service thread 1-6) JBAS011907: Register module: Module "deployment.eclipselink-2.5.0.jar:main" from Service Module Loader
09:55:08,030 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "Test-ejb.jar"
09:55:08,030 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "Test-web.war"
09:55:08,279 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for primaryTest
09:55:08,288 INFO [org.jboss.as.jpa] (MSC service thread 1-15) JBAS011401: Read persistence.xml for primaryTest
09:55:08,405 INFO [org.jboss.weld.deployer] (MSC service thread 1-13) JBAS016002: Processing weld deployment Test-ear.ear
09:55:08,466 INFO [org.jboss.weld.deployer] (MSC service thread 1-10) JBAS016002: Processing weld deployment Test-ejb.jar
09:55:08,468 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-10) JNDI bindings for session bean named GetOrSetDataBase in deployment unit subdeployment "Test-ejb.jar" of deployment "Test-ear.ear" are as follows:
java:global/Test-ear/Test-ejb/GetOrSetDataBase!business.GetOrSetDataBaseLocal
java:app/Test-ejb/GetOrSetDataBase!business.GetOrSetDataBaseLocal
java:module/GetOrSetDataBase!business.GetOrSetDataBaseLocal
java:global/Test-ear/Test-ejb/GetOrSetDataBase
java:app/Test-ejb/GetOrSetDataBase
java:module/GetOrSetDataBase
09:55:08,493 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."Test-ear.ear"."Test-web.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Test-ear.ear"."Test-web.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "Test-web.war" of deployment "Test-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java: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(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class manageBean.BeanForGetImageFromUser with ClassLoader ModuleClassLoader for Module "deployment.Test-ear.ear.Test-web.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: Lorg/primefaces/model/UploadedFile;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0]
at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0]
at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.primefaces.model.UploadedFile from [Module "deployment.Test-ear.ear.Test-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)
... 15 more
09:55:08,705 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "eclipselink-2.5.0.jar"
09:55:08,706 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "Test-ear.ear"
09:55:08,706 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "ojdbc6.jar"
09:55:08,707 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.comp.Test-ear.Test-ejb.GetOrSetDataBase (missing) dependents: [service jboss.naming.context.java.comp.Test-ear.Test-ejb.GetOrSetDataBase.Validator, service jboss.naming.context.java.comp.Test-ear.Test-ejb.GetOrSetDataBase.ValidatorFactory]
JBAS014777: Services which failed to start: service jboss.deployment.subunit."Test-ear.ear"."Test-web.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Test-ear.ear"."Test-web.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "Test-web.war" of deployment "Test-ear.ear"
09:55:08,865 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
09:55:08,866 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
09:55:08,866 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.3.Final "Arges" started (with errors) in 14164ms - Started 212 of 308 services (5 services failed or missing dependencies, 89 services are passive or on-demand)
我在调试模式下的方法是:mvn clean install package并右键单击项目并调试为&gt;在服务器上调试
请帮帮我。
答案 0 :(得分:0)
如果您想使用maven测试进行重复数据删除,请尝试使用cmd或类似方法:
mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test
并在eclipse中使用端口8000为远程Java应用程序准备调试。
我希望它有所帮助。
通用调试
在您要运行的代码中选择断点。
以调试模式运行Maven,例如mvn-debug install
通过选择上面创建的“Maven”调试配置,将调试器连接到正在运行的maven。
Eclipse现在将在您启用的断点处停止Maven。 设置Maven 2.0.8 +
注意:如果您使用的是Maven 2.0.8或更高版本,只需运行“mvnDebug
”命令代替“mvn”,然后跳到设置Eclipse。