mitchj
mitchj

Reputation: 623

JBoss seems to hang on startup at the command line

I am trying to run JBoss from the command prompt with the standalone.bat file. It starts the startup process but then just sits there. I couldn't really find any answers with Goolgle or on here.

Here is the output from my command line:

C:\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\bin>standalone
Calling "C:\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================

JBoss Bootstrap Environment

JBOSS_HOME: C:\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final

JAVA: C:\Program Files\Java\jre8\bin\java

JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51
2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se
rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c
onfig=standalone.xml

===============================================================================

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; sup
port was removed in 8.0
16:06:41,708 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
16:06:42,009 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:06:42,075 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" sta
rting

And it just sits right here. Any ideas of why it doesn't finish starting up?

This is added info... I took Omoro's suggestion and went back to Java 7. That got JBoss to not "hang" anymore at the command line. Now when I run standalone.bat it says

Calling "C:\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\bin\standalone.conf.bat"

and then just goes back to the command prompt without starting JBoss. I will open a new thread since the old problem has been cured and now a new problem has arisen.

Thanks for everyone's help especially Omoro.

Upvotes: 44

Views: 45029

Answers (8)

Yuwi
Yuwi

Reputation: 31

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

Upvotes: 0

Sanne
Sanne

Reputation: 6107

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

Remember JBossAS changed name to WildFly.

Upvotes: 16

RAS
RAS

Reputation: 8158

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

Upvotes: 0

Du-Lacoste
Du-Lacoste

Reputation: 12757

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.

Upvotes: 2

vinay
vinay

Reputation: 51

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 .

Upvotes: 5

Daniel Vilas-Boas
Daniel Vilas-Boas

Reputation: 896

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.

Upvotes: 1

Prashant_M
Prashant_M

Reputation: 3124

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

Upvotes: 10

Arun Gupta
Arun Gupta

Reputation: 4035

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.

Upvotes: 34

Related Questions