如何在Windows中启动jboss?

时间:2014-07-24 02:15:34

标签: logging jboss

我刚刚在windows上下载了jboss文件夹。我正忙着启动jboss。我能够在没有任何参数的情况下启动jboss,并且工作正常。

问题: 问题是,当我在参数中添加端口时,我得到的错误。我不确定是否需要更改某些xml文件或其他内容....我不知道如何解决这个问题。

我想用以下参数启动jboss。

-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djava.rmi.server.hostname=127.0.0.1
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=8080
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk1.7\jre\lib\management\jmxremote.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk1.7\jre\lib\management\jmxremote.access

这是我得到的错误。

Calling "C:\jboss-eap-6.1\bin\standalone.conf.bat" 
===============================================================================
  JBoss Bootstrap Environment

  JBOSS_HOME: C:\jboss-eap-6.1
  JAVA_HOME: C:\Java\jdk1.7
  JAVA: C:\Java\jdk1.7\bin\java


  JAVA_OPTS: -XX:+TieredCompilation -XX:+UseCompressedOops -Dprogram.name=standalone.bat -Xms1303M -Xmx1303M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=8080 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:\Java\jdk1.7.0_60_X64\jre\lib\management\jmxremote.password -Dcom.sun.management.jmxremote.access.file=C:\Java\jdk1.7.0_60_X64\jre\lib\management\jmxremote.access
===============================================================================


Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.util.logging.LogManager$1.run(LogManager.java:191)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:181)
        at java.util.logging.Logger.demandLogger(Logger.java:339)
        at java.util.logging.Logger.getLogger(Logger.java:393)
        at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
        at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:823)
        at sun.management.Agent.startAgent(Agent.java:260)
        at sun.management.Agent.startAgent(Agent.java:456)


WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
Jul 23, 2014 2:18:50 PM org.jboss.msc.service.ServiceContainerImpl <clinit> INFO: JBoss MSC version 1.0.4.GA-redhat-1
Jul 23, 2014 2:18:50 PM org.jboss.as.server.ApplicationServerService start INFO: JBAS015899: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) starting
Jul 23, 2014 2:18:51 PM org.jboss.as.controller.AbstractOperationContext executeStep



ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([])
java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging
        at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:99)
        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440)
        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322)
        at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229)
        at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224)
        at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:232)
        at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:225)
        at org.jboss.as.server.ServerService.boot(ServerService.java:333)
        at org.jboss.as.server.ServerService.boot(ServerService.java:308)
            at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:188)
            at java.lang.Thread.run(Thread.java:745)


Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:91)
    ... 10 more


Caused by: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
         at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:103)
        at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:97)
        at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
        at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:113)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)


Jul 23, 2014 2:18:51 PM org.jboss.as.server.ServerService boot
FATAL: JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
Press any key to continue . . .

4 个答案:

答案 0 :(得分:1)

打开命令提示符 转到JBOSS_HOME \ bin 像这样运行standalone.bat

standalone.bat -Djava.util.logging.manager=org.jboss.logmanager.LogManager

OR 在standalone.conf.bat

中添加以下行
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

现在您只需点击standalone.bat

即可

答案 1 :(得分:1)

要解决此问题,请执行以下操作:

  1. 转到文件系统上的JBOSS_HOME位置,例如c:\ jboss \ appserver \ jboss-eap-6.3,查看bin文件夹,在文本编辑器中打开名为standalone.conf的配置文件。

  2. 在文件顶部添加以下行 - JBOSS_MODULES_SYSTEM_PKGS =“org.jboss.logmanager”。

  3. 将文件向下滚动到指定JVM选项的位置,并添加以下两个选项:

    JAVA_OPTS =“$ JAVA_OPTS -Djava.util.logging.manager = org.jboss.logmanager.LogManager” JAVA_OPTS =“$ JAVA_OPTS -Xbootclasspath / p:$ JBOSS_HOME / modules / system / layers / base / org / jboss / logmanager / main / jboss-logmanager-1.5.2.Final-redhat-1.jar”

    < / LI>

    注意:您可能需要修改logmanager jar文件的确切路径,因为jboss安装上的文件可能与此处的内容不同。在这种情况下使用的JBoss EAP版本是6.3.0GA。不同的版本可能具有与logmanager jar文件不同的路径。

    1. 只需保存修改后的'standalone.conf'文件,并进行这些更改,然后重新尝试启动JBoss App服务器(在CLI或Eclipse中)。
    2. 注意:要解决在Eclipse中运行的JBoss EAP appserver实例的问题,只需打开服务器的启动配置,并将2个JVM选项添加到启动配置的VM参数中,如下面的屏幕截图所示:

      1. 瞧!关于无法加载LogManager的启动问题已得到解决。
      2. 查看此博客帖子了解详情和屏幕截图 - http://obinnakalu.blogspot.com/2014/10/jboss-enterprise-application-platform.html

答案 2 :(得分:0)

尝试在执行-logmodule org.jboss.logmanager时添加standalone.bat参数。根据这个post,这解决了这个问题。

答案 3 :(得分:0)

当我尝试通过运行maven测试启动嵌入式WildFly AS服务器时,会发生同样的错误。 从堆栈跟踪中,我们可以看到我们需要添加“java.util.logging.manager = org.jboss.logmanager.LogManager”作为系统属性,但是如何以及在哪里?我尝试了很多种方式,但都失败了。 最后,我发现pom.xml文件的工作原理如下:

  ...
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
            </systemPropertyVariables>
         </configuration>
  ...

希望这也可以帮助你。