JBoss seems to hang on startup at the command line

…衆ロ難τιáo~ 提交于 2019-11-28 18:10:16

This is a known issue. See more discussion at:

https://community.jboss.org/message/808212

Quoting from the thread:

Yes it is normal.

There have been some changes in JDK8 that prevent AS7 and current version of EAP6 to start under JDK8. We have many JDK8 related fixes in WildFly so I would recommend you to use that.

As for EAP goes, the start up on JDK8 is fixed in upcoming 6.2 release.

Use WildFly 10, works like a charm even with Java 8.

Remember JBossAS changed name to WildFly.

I faced the same issue when starting JBoss 7 with Java version 8. All you need to do is change to Java version 7 or 6 and then try to start JBoss again. For ubuntu user use following command to change default Java JDK version:

sudo update-alternatives --config java 

This will give you a list output similar to this:

There are 2 choices for the alternative java (providing        
/usr/bin/java).
   Selection    Path                                               Priority   Status
  ------------------------------------------------------------    
  0            /usr/lib/jvm/java-6-oracle/jre/bin/java         1070          auto mode
  1            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1051          manual mode
* 2            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1069          manual mode
Press enter to keep the current choice[*], or type selection number: 

Select proper option and this will change default Java JDK version.

To verify type:

$java -version

Solution : This Issue comes when Java jdk1.8.0_40 is installed in your system and the same is mapped in JAVA_HOME system variable . This issue can be sorted out by installing Java 7 with its jdk jdk1.7.0_79 and mapping the same in JAVA_HOME as C:\Progra~1\Java\jdk1.7.0_79 . The JBOSS server will start successfully .

I too came across this issue. Firstly I downgraded to JDK 1.7 and it happened to work smoothly but as I wanted to work on JDK 1.8, I downloaded WildFly 10 former JBossAS.

It works smoothly without any compatibility issues.

If you really need to work with JBoss7.1, downgrade your java version from 1.8 to 1.7 or 1.6. (To check your current java version type java -version in command line). Otherwise, you can change your application server to Wildfly as stated in previous answers.

For those who're facing this issue while starting JBoss 7.1 in Eclipse:

  1. Navigate to Window --> Preferences --> Java --> Installed JREs
  2. Add/Select JDK/JRE 1.6/1.7
  3. Navigate to Window --> Preferences --> Server --> Runtime Environments
  4. Select JBoss 7.1 Runtime Environment and click 'Edit'
  5. Select JRE 1.6/1.7 as Runtime JRE

Instead of jdk 8 (it has old compatibility problem with jboss), use only version which your project required.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!