JBoss AS not starting up on Mac OS? - java

I downloaded the JBoss AS 7.1.1 from here.
Set up the JBOSS_HOME and other variables as mentioned.
After that when I run ./standalone.sh, it gets stuck on the following:
./standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/pbane3/Desktop/Servers/jboss-as-7.1.1.Final
JAVA: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
11:56:22,651 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
11:56:22,776 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
11:56:22,805 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
What can be the issue here?

Finally got the answer:
Had to download jdk 1.7
Run the following command:
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
Then in the installation bin folder:
./standalone.sh
Hope helps the future readers.
Taken help from the answer here.

Related

Error: JVM terminated. Exit code=4 in Ubuntu

Below is the JAVA version installed in my Ubuntu:-
openjdk version "1.8.0_312" OpenJDK Runtime Environment (build
1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
Eclipse Installed version:-
Eclipse IDE for Java Developers Version: 2019-12 (4.14.0) Build id: 20191212-1212
Steps which I followed to compile my code:-
source path of SDK
Run cMake command
make generate
I am getting below error at step3:-
JVM terminated. Exit code=4 /usr/bin/java
-jar /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
-os linux
-ws gtk
-arch x86_64
-launcher /home/xman/ELINALITE/elina
-name Elina
--launcher.library /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316/eclipse_1607.so
-startup /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.overrideVmargs
-exitdata 8027 ............ ............
-vm /usr/bin/java
-vmargs
-jar /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
Below is the content of my /snap/eclipse/48/eclipse.ini file?
-startup plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product org.eclipse.epp.package.java.product
-showsplash org.eclipse.epp.package.common
--launcher.defaultAction openFile
--launcher.defaultAction openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
Can somebody help me to resolve this error?

Why does Maven use the wrong JDK version when running from Fish?

I run macOS Sierra, and have installed the Fish shell (https://fishshell.com/).
When I try to build a Maven project, it now gives me
Fatal error compiling: invalid target release: 1.8 ->
... which means that it has picked up an older JDK which it tries to use to build my Java 8 project with.
This is made obvious by running mvn -version:
...
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
...
But I have JAVA_HOME set correctly, echo $JAVA_HOME in both shells give me:
/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
and java -version gives me
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
and javac -version:
javac 1.8.0_112
echo $PATHgives the same result in both shells (except that in Bash, the directories are separated by :; in Fish, a space ):
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
I have configured maven-compiler-plugin to for 1.8:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
Why does Maven insist on using the 1.6 JDK? The same project builds fine, with the correct 1.8 JDK, when running through Bash.
If you are running an old version of maven, please try updating to the latest version (3.5.0), e.g. via homebrew (brew install maven).

JBoss EAP 7.0 startup error

I've installed JBoss on a CentOS 7 virtual machine and Jboss tools on Eclipse Oxygen. I'm only trying to start server via Eclipse, without any project to deploy.
But i've received this error:
Exception in thread "main" org.jboss.modules.ModuleLoadException: Error loading module from /opt/jboss-eap-7.0/modules/system/layers/base/org/jboss/msc/main/module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:204)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:170)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$0(LocalModuleFinder.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:144)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
at org.jboss.modules.Module.addExportedPaths(Module.java:1229)
at org.jboss.modules.Module.addPaths(Module.java:1121)
at org.jboss.modules.Module.link(Module.java:1448)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.modules.Main.main(Main.java:396)
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add resource root 'jboss-msc-1.2.6.Final-redhat-1.jar' at path 'jboss-msc-1.2.6.Final-redhat-1.jar' (position: END_TAG seen ... <resource-root path="jboss-msc-1.2.6.Final-redhat-1.jar"/>... #34:67) caused by: java.util.zip.ZipException: zip file is empty
at org.jboss.modules.xml.ModuleXmlParser.parseResourceRoot(ModuleXmlParser.java:891)
at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:735)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:535)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
... 14 more
[1]+ Exit 1 java "-Dprogram.name=JBossTools: Red Hat JBoss EAP 7.0" -Xms64m -Xmx512m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true "-Dorg.jboss.boot.log.file=/opt/jboss-eap-7.0/standalone/log/boot.log" "-Dlogging.configuration=file:/opt/jboss-eap-7.0/standalone/configuration/logging.properties" "-Djboss.home.dir=/opt/jboss-eap-7.0" -Dorg.jboss.logmanager.nocolor=true -jar /opt/jboss-eap-7.0/jboss-modules.jar -mp "/opt/jboss-eap-7.0/modules" org.jboss.as.standalone -b 0.0.0.0 --server-config=standalone.xml -Djboss.server.base.dir=/opt/jboss-eap-7.0/standalone
JBTOOLS_SERVER_LAUNCH_TERMINATED_CMD:Red Hat JBoss EAP 7.01504388944983: 1

javac: invalid target release: 1.8 on Mac when executing Maven command

I am trying to run automation test on Mac. I installed Maven and java, jdk as following:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
and Maven:
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: /usr/local/Cellar/maven/3.2.5/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
When I executed Maven command, I got this error:
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: invalid target release: 1.8
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[ERROR] -> [Help 1]
I searched on here, there's one accepted solution is this:
sudo cp $JAVA_HOME/lib/tools.jar /Library/Java/Extensions/
I executed this command, but nothing happened! I don't know what's wrong.
First, figure out where 1.8 Java is installed by running the command:
/usr/libexec/java_home -v 1.8
Then, set your JAVA_HOME environment variable by running the command:
export JAVA_HOME=<whatever the output from the previous command was>
Maven should work afterwards, at least in that terminal window.
You'll have to set the JAVA_HOME environment variable in your profile if you don't want to have to run these commands every time you open a new terminal.
If you haven't done so already, use the maven-compiler-plugin to determine the Java version to use within Maven. Put this in your pom.xml file (change the <source/> and <target/> version to the JDK version you require):
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
(If you already have a <build/> and/or <plugins/> section, add the <plugin/> portion, only.)

Failed to load class "org.jboss.as.capedwarf.api.Logger" for handler "CAPEDWARF"

I'm getting this error from the JBoss logs when trying to run my GAE app with Openshift/Capedwarf:
Removing existing logging.properties
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/12c481204382ec16dc0003b3/jbossas
JAVA: /etc/alternatives/java_sdk_1.7.0/bin/java
JAVA_OPTS: -client -Xmx384m -XX:MaxPermSize=115m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=app-gwtgae.rhcloud.com -Djgroups.bind_addr=127.13.25.1 -Djboss.server.data.dir=/var/lib/openshift/12c481204382ec16dc0003b3/app-root/data/jboss-as7 -Dcom.google.appengine.runtime.environment=Production -Dorg.apache.tomcat.util.net.MAX_THREADS=20
=========================================================================
java.lang.IllegalArgumentException: Failed to load class "org.jboss.as.capedwarf.api.Logger" for handler "CAPEDWARF"
at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:75)
at org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:54)
at org.jboss.logmanager.config.LogContextConfigurationImpl.addHandlerConfiguration(LogContextConfigurationImpl.java:144)
at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:606)
at org.jboss.logmanager.PropertyConfigurator.configureLogger(PropertyConfigurator.java:541)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:480)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:96)
at org.jboss.as.logging.logmanager.ConfigurationPersistence.configure(ConfigurationPersistence.java:128)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
at java.util.logging.LogManager$2.run(LogManager.java:312)
at java.util.logging.LogManager$2.run(LogManager.java:310)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:310)
at java.util.logging.LogManager.getLogManager(LogManager.java:292)
at java.util.logging.Logger.<init>(Logger.java:265)
at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1430)
at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1428)
at java.util.logging.LogManager$1.run(LogManager.java:196)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:173)
at org.jboss.modules.Main.main(Main.java:275)
Caused by: java.lang.ClassNotFoundException: org.jboss.as.capedwarf.api.Logger from [Module "org.jboss.as.capedwarf:main" from local module loader #1bd56d0 (roots: /var/lib/openshift/12c481204382ec16dc0003b3/app-root/runtime/repo/.openshift/config/modules,/var/lib/openshift/12c481204382ec16dc0003b3/app-root/runtime/capedwarf/capedwarf-modules/jboss-as7-modules,/var/lib/openshift/12c481204382ec16dc0003b3/jbossas/modules)]
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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:73)
... 21 more
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/12c481204382ec16dc0003b3/jbossas
JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java
JAVA_OPTS: -server -XX:+TieredCompilation -XX:+UseSerialGC -Xms40m -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=12c481204382ec16dc0003b3 -Dorg.jboss.resolver.warning=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=app-gwtgae.rhcloud.com -Djgroups.bind_addr=127.13.25.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on
=========================================================================
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/12c481204382ec16dc0003b3/jbossas
JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java
JAVA_OPTS: -server -XX:+TieredCompilation -XX:+UseSerialGC -Xms40m -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=12c481204382ec16dc0003b3 -Dorg.jboss.resolver.warning=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=app-gwtgae.rhcloud.com -Djgroups.bind_addr=127.13.25.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on
=========================================================================
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/12c481204382ec16dc0003b3/jbossas
JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java
JAVA_OPTS: -server -XX:+TieredCompilation -XX:+UseSerialGC -Xms40m -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=12c481204382ec16dc0003b3 -Dorg.jboss.resolver.warning=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=app-gwtgae.rhcloud.com -Djgroups.bind_addr=127.13.25.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on
=========================================================================
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/12c481204382ec16dc0003b3/jbossas
JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java
JAVA_OPTS: -server -XX:+TieredCompilation -XX:+UseSerialGC -Xms40m -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=12c481204382ec16dc0003b3 -Dorg.jboss.resolver.warning=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=app-gwtgae.rhcloud.com -Djgroups.bind_addr=127.13.25.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on
=========================================================================
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
Initially, the template capedwarf app worked fine, but when I 'git push' my app its not working. I can assure that the same git repo worked fine as Cloudbees deploys this app with jenkins to GAE cloud (appspot).
Can you try this with the latest release, but locally?

Categories

Resources