Jboss部署BindException和ClassNotFound异常

时间:2015-06-23 01:52:12

标签: java jboss ejb

我是ejb的新手,我正在尝试创建一个简单的hello world应用程序,但我无法连接到服务器,无法确定问题所在。我也得到了类未找到异常,并且不知道它是否与连接错误有关。任何帮助将不胜感激。

03:35:52,321 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
03:35:52,490 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
03:35:52,526 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final "Thunder" starting
03:35:53,040 INFO  [org.xnio] XNIO Version 3.0.3.GA
03:35:53,040 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
03:35:53,047 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
03:35:53,053 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.2.GA
03:35:53,071 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
03:35:53,074 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
03:35:53,074 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
03:35:53,086 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
03:35:53,090 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
03:35:53,090 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
03:35:53,093 INFO  [org.jboss.as.connector] (MSC service thread 1-15) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.7.Final)
03:35:53,098 INFO  [org.jboss.as.security] (MSC service thread 1-11) JBAS013100: Current PicketBox version=4.0.6.final
03:35:53,101 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
03:35:53,129 INFO  [org.jboss.as.naming] (MSC service thread 1-15) JBAS011802: Starting Naming Service
03:35:53,137 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
03:35:53,178 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
03:35:53,224 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-16) JBoss Web Services - Stack CXF Server 4.0.1.GA
03:35:53,296 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
03:35:53,477 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-9) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\Marie\jboss-as-7.1.0.Final\standalone\deployments
03:35:53,478 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on localhost/127.0.0.1:4447
03:35:53,478 INFO  [org.jboss.as.remoting] (MSC service thread 1-11) JBAS017100: Listening on localhost/127.0.0.1:9999
03:35:53,481 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment HelloEJB2.jar
03:35:53,486 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found HelloEJB2.jar in deployment directory. To trigger deployment create a file called HelloEJB2.jar.dodeploy
03:35:53,483 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-13) MSC00001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use: bind localhost/127.0.0.1:9990
    at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:197) [jboss-as-server-7.1.0.Final.jar:7.1.0.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:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.7.0_79]
    at sun.nio.ch.Net.bind(Net.java:444) [rt.jar:1.7.0_79]
    at sun.nio.ch.Net.bind(Net.java:436) [rt.jar:1.7.0_79]
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) [rt.jar:1.7.0_79]
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.7.0_79]
    at org.jboss.sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:144)
    at org.jboss.sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:54)
    at org.jboss.sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:38)
    at org.jboss.com.sun.net.httpserver.HttpServer.create(HttpServer.java:147)
    at org.jboss.as.domain.http.server.ManagementHttpServer.create(ManagementHttpServer.java:143) [jboss-as-domain-http-interface-7.1.0.Final.jar:7.1.0.Final]
    at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:164) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
    ... 5 more

03:35:53,558 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-12) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
03:35:53,766 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use: bind localhost/127.0.0.1:9990

03:35:53,773 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 1651ms - Started 132 of 205 services (2 services failed or missing dependencies, 70 services are passive or on-demand)
03:35:53,782 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of "HelloEJB2.jar"
03:35:53,898 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class com.businnesslogic.HelloWorldBean in Module "deployment.HelloEJB2.jar:main" from Service Module Loader: java.lang.UnsupportedClassVersionError: com/businnesslogic/HelloWorldBean : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.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:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

03:35:53,914 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "HelloEJB2.jar"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.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:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class com.businnesslogic.HelloWorldBean
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
    ... 5 more
Caused by: java.lang.ClassNotFoundException: com.businnesslogic.HelloWorldBean from [Module "deployment.HelloEJB2.jar: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)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
    ... 7 more

03:35:53,926 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "HelloEJB2.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"HelloEJB2.jar\""}}
03:35:53,931 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment HelloEJB2.jar in 4ms
03:35:53,932 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "HelloEJB2.jar"

03:35:53,935 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"HelloEJB2.jar\""}}}}

2 个答案:

答案 0 :(得分:0)

根据日志,您有两个问题:

1)端口9990已在使用中:

Address already in use: bind localhost/127.0.0.1:9990 - 停止所有JBoss进程以及使用端口9990重启的任何其他进程,让我们知道它是如何运行的。

2)不支持的major.minor版本52.0     at java.lang.ClassLoader.defineClass1(Native Method)[rt.jar:1.7.0_79]     在java.lang.ClassLoader.defineClass(ClassLoader.java:800)[rt.jar:1.7.0_79]

您正在JVM上运行应用程序,该JVM不支持用于编译应用程序的JDK。检查您在开发环境中使用的Java编译器版本(取决于您的IDE,版本),并确保它是1.7.0_79或更低。

或者让JBoss在与开发JDK相同的jvm版本中运行。

答案 1 :(得分:0)

日志中有两个主要错误

1 - 地址已经

Address already in use: bind localhost/127.0.0.1:9990

此错误告诉您另一个进程正在使用端口9990。通常是另一个jboss实例。你必须停止其中一个。

2 - 不支持的major.minor版本

java.lang.UnsupportedClassVersionError: com/businnesslogic/HelloWorldBean : Unsupported major.minor version 52.0

这告诉您使用一个版本的java编译源代码,然后尝试使用另一个版本运行它。

由于此错误,您的应用程序未被部署。