44

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.

mitchj
  • 623
  • 4
  • 9
  • 16
  • Have you checked what's logged in server.log? – Omoro Apr 06 '14 at 20:39
  • I'm still trying to figure this server log thing out. The server log that I see doesn't seem to get updated when I try to start and stop JBoss. There is a boot.log that gets written to every time I start and restart JBoss. Also, I'm not sure what I am looking for in the log. – mitchj Apr 06 '14 at 20:46
  • There should be a log folder inside the standalone where the server.log is written to and in the log you can see lines with exceptions /errors and their causes and from the causes you can figure out what the possible problem might be. See if you can find that or look also in the boot.log. – Omoro Apr 06 '14 at 20:52
  • Can you try using Java 7 instead of 8 and see if you get the same problem. Also try checking the standalone.xml (Iam assuming you are using standalone) if it doesn't contain errors if you have edited it or something like that. – Omoro Apr 06 '14 at 21:02
  • @omoro -- I do not see any errors in the boot.log. It tells me JBoss is starting then a whole bunch of stuff before it tells me that JBoss is stopping (I hit ctrl-c to stop it). Also, the reason I'm trying to start at the command line is because when I tried to start in Eclipse I get an error that a configuration file does not exist... namely standalone.xml. but that is not mentioned when I try to run from the command line. – mitchj Apr 06 '14 at 21:04
  • Try starting it by clicking the standalone.bat in the bin folder – Omoro Apr 06 '14 at 21:08
  • 1
    Ok, I will uninstall Java 8 and install Java 7 and see. I'll let you know what happens. – mitchj Apr 06 '14 at 21:09
  • I uninstalled Java 8 and installed Java 7. Now when I run standalone at the command line I get a single line of output as follows: 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" C:\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\bin> – mitchj Apr 06 '14 at 21:33

8 Answers8

34

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.

Arun Gupta
  • 3,965
  • 5
  • 31
  • 39
16

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

Remember JBossAS changed name to WildFly.

Sanne
  • 6,027
  • 19
  • 34
10

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
Prashant_M
  • 2,868
  • 1
  • 31
  • 24
5

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 .

vinay
  • 51
  • 1
  • 2
2

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.

Du-Lacoste
  • 11,530
  • 2
  • 71
  • 51
1

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.

0

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
RAS
  • 8,100
  • 16
  • 64
  • 86
0

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

Yuwi
  • 31
  • 1
  • 5