I install jdk1.8.0 and i set the environment variable JAVA-HOME and PATH
I download the jboss-eap-6.1.0.GA(AS 7.2.Final)
I set environment variable JBOSS-HOME.
i located jboss-eap-6.1 in 'D' drive so i set JBOSS-HOME=D:\jboss-eap-6.1.
After all these run standalone.bat file. but i'm not able to install jboss server.
it gives a black screen and giving like
JBoss EAP 6.1.0.GA(AS 7.2.0.Final-read hat-8) starting. ..
After 1 hr also it giving like this only.
Not able to start the Jboss server
please give me a Solution for this.
Thank you
According to RedHat's "Supported Configurations" document, Java 8 isn't supported.
There are some plans to add support of Java 8 to a 6.3.x or 6.4 version. (see https://developer.jboss.org/message/906154)
Related
I am using Tomcat 9 and Java 11 on my windows server.
In my system there are total 3 JDKs present (two Java 1.8.x and one JDK 11 )
JAVA_HOME environment varibable points to JDK11
Also registry keys current version points to JDK11
I cannot uninstall older version of java 1.8 from my system as some of the apps are still using java 8.
Now when I am running Tomcat 9 service , it is picking older version of Java 1.8.x & not Java 11.
In catalina.bat file I have also added following explicitly
set JAVA_HOME=D:\Java\jdk 11.0.8
But still it picks older version of java. In the tomcat configuration java tab also points to Java 11 dll file.
When I run the tomcat locally using startup.bat file & not start the service through services app then in catalina logs I get correct version of Java.
Please suggest why tomcat service is not picking latest java 11 version.
Try uninstalling your Tomcat service and installing it again using service.bat in tomcat folder.
service.bat remove
service.bat install
If that doesn't work ,check the appropriate registry key. Here is mine:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\Tomcat7.55\Parameters\Java
change the Jvm key value .
Note :To open regedit ,
In the search box on the taskbar, type regedit, then select Registry Editor (Desktop app) from the results.
Right-click Start , then select Run. Type regedit in the Open: box, and then select OK.
I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.
asadmin start-domain
problem:
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.
Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???
OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:
Just set the AS_JAVA variable in your asenv.bat file located here: C:\DEVENV\glassfish5\glassfish\config.
File to edit: add last line
Relaunch your server....enjoy :
This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.
GlassFish 5 does not work on JDK9, however GlassFish 6 works on JDK 11.
For me it didn't work what #Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.
AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"
GlassFish 5.1 also not working with Java 9 or later versions.
glassfish 5.1 also needs java 8 with the AS_JAVA hack in asenv.conf/bat file.
Edit asenv.bat put set AS_JAVA=/usr/lib/jvm/java-8-oracle
and asenv.conf AS_JAVA="/usr/lib/jvm/java-8-oracle"
It works
When you download the glassfish zip file from the internet and extract it.
Its a good practice to read the the readme file.
In my case the under the "prerequisites" title in the readme file, it specified: GlassFish 5.0 requires Oracle JDK 8 Update 144.
I downloaded and installed the JDK 8 update 144 as demanded. It worked instantly. I initially had JDK 14.0.2 and it was displaying the error #Aleksandr posted.
I made the same mistake as the OP, because the release notes said specifically "GlassFish Server Open Source Edition Release 5.0 requires Oracle JDK 8 Update 144 or later" under heading Required JDK Versions in release notes.
However what you can do is drop down each version to see which is the latest jdk version that glassfish 5 will be compatible with Or Just download Java SE Development Kit 8 from https://www.oracle.com/in/java/technologies/javase/javase8-archive-downloads.html.
You also have to add the java variable in asenv.bat as kindly commented by Vifier Lockla. Thanks to Vifier for the suggestion.
for me I changed to the directory where glassfish is
cd /opt
then
sudo glassfish5/bin/asadmin start-domain
I am sure this works
I am new to Intellij ide and i'm having issues running Glassfish 5 or any previous version on Intellij 2017 2.4.
After selecting New Project > Java Enterprise > Web Application i had to specify the application server, to which i selected the folder of glassfish 5, jdk is set to 1.8 and java ee to 7. So far so good, no errors and the project gets created. Then i have a greyed "play" icon next to GlassFish 5.0.0 in the upper right of the corner that says that i have to configure it, i click Edit Configurations and the Run/Debug Configurations opens up
Everything seems fine and when i click the "play" green button to start the server and run the project i have projectName:war exploded under Deployment and
[2017-09-26 08:47:57,836] Artifact testfornew:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
Under output. Coming from Netbeans setting glassfish up was pretty straightforward, i've checked a couple of solutions online including this but they don't seem to work for me.
I was having the same problem and I found that it is caused by an issue with the JDK software. So the NullPointerException thrown at AsadminMain.java:57 can be solved by checking your system variables (PATH, JAVA_HOME). Be sure that they reference to an acceptable JDK supported by your GlassFish version. GlassFish 5.0 is certified to work with java sdk 8u144 as mentioned HERE: https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf.
Be aware, the path may also contain a reference to an old SDK directory.
If you need more help, please post the results of calling echo %PATH% on your cmd.
In my case JDK 1.8.0_152 must be installed, path and java_home variables have to be configured AND JDK 9.X must be uninstalled. Without uninstall, the error persist.
Uninstall Java 9, stay with the version 8 update 162 and the jdk8. When you unistall the Java 9 your system variables (PATH, JAVA_HOME=C:\ProgramData\Oracle\Java\javapath) will update the 3 jar (java, javaw, javaws) in this path to Java version 8.
war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
....
Assuming that you are certain that JDK has set well in your environment variables and you are using jdk 8 or lower-Well I read somewhere that java9 has issues with such configurations, maybe the issue has been solve but for my case I chose to avoid for now.
Download and extract GlassFish of your version. For my case I'm
using GlassFish 5.181.O on Intellij 2018.1 ultimate version
Start Intellij, and before opening any project, or rather close all projects that are open.
Click on configure, then settings. A new window will appear as shown below. I have marked the steps you need to follow in the image. I will also add some explanation here.
Under Application Servers, click on the + shown as step 2 on the image, here you need to specify you glassfish server, the folder where you extracted to.
Next, click on + shown in step 3 on the image to add the server modules.
Assuming all is a success upto this point, select all choices of as shown in step 4 on the image, apply changes and Ok.
I will explain about creating a new project because I'm not sure how you would handle an existing project but I guess you can use concepts here to figure out what you need to tweak.Create your new java ee or whatever application you are working on,
As shown on figure 2, assuming you are creating a Java EE app, Click on Java Enterprise, then check/tick Web Application and JSF
Under libraries, use library from Glassfish ... Installation didn't help much because I got null pointer exceptions., so I used Download as shown in figure 2. Click next and finish.
Automatically you will see GlassFish added to the project, run it from the IDE.
Edit
If you had done all of the above and still get some error like Null Pointer Exceptions. Do what #Jailson Evora says: Clear your systems from java 9 and install java 8 and make sure when you issue java -version on command line, the output is java 8
I had to uninstall both jdk9 and jdk10 and set my java_home back to jdk8_181
Unable to start tomcat based app with java 9 because of default "java.endorsed.dirs" option in catalina.sh.
-Djava.endorsed.dirs=/usr/local/share/tomcat/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is there a work around for this?
You'll have to hack the script bin/catalina.sh to get this to work.
There are a bunch of lines like this in bin/catalina.sh:
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
...
Just remove the second of those lines (the one with -Djava.endorsed.dirs) in each case and you should be back in business.
I'm looking at improving those scripts so that -Djava.endorsed.dirs is not provided to the JVM when the value is empty (which should be the case if you are using Java 9).
UPDATE 2017-11-06
Looks like r1810284 should fix the endorsed.dirs problem. Expect this fix to be included in Tomcat 7.0.83 (or whatever the next 7.0.x version passes voting).
UPDATE 2018-03-07
The first official release of Apache tomcat 7.0.x that includes this fix is Apache Tomcat 7.0.84, voted stable on 2018-01-24.
The above issue was fixed with the later releases of Eclipse but Unfortunately, it appeared again with the release of Java 10. Here is my research :
Initially, I installed Java 10 and Eclipse Oxygen 3 which gave me the same error you mentioned in your question. But, at the moment I installed Java 9 and pointed my Apache tomcat runtime server to it, the error was gone.
In my case, what I did to answer the problem of Tomcat not running was to set Tomcat (version 7) with a lower Java version (e.g. Java 8).
Then, in startup.sh, shutdown.sh and catalina.sh I added the following:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`;
This symptom can come about if you have a Tomcat Runtime using a JRE earlier than Java 9 and create and run a server with that runtime. Then edit the Tomcat Runtime to use Java 9 and try to start the server. What happens is that a "-Djava.endorsed.dirs" argument gets added to the launch configuration when the server was run with the earlier JRE. When running the server after the switch to Java 9, the "-Djava.endorsed.dirs" argument is seen as a user added VM argument and kept, resulting in the error.
The simplest way to fix is to recreate the server. You can also right click on the server in the servers view and select Open. In the window that opens, click the "Open launch configuration" link at the bottom of the General section. In the dialog that opens, switch to the Arguments tab and in the "VM arguments" section, edit out the "-Djava.endorsed.dirs" argument and click OK. You should be able to start the server now.
To fix this bug, you need to install/update the Eclipse Web Tools Platform (WTP) to version 3.9.4 or later.
Select Help > Install new Software...
Select or add following URL: http://download.eclipse.org/webtools/repository/oxygen
Check Web Tools Platform (WTP) 3.9.4
Select "Next" and follow instructions
Reconfigure the tomcat in eclipse.
In Run configurations -> Arguments -> VM arguments
try removing
-Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed"
You have to remove -
"-Djava.endorsed.dirs="/home/ttlaptop/Downloads/apache-tomcat-7.0.105/endorsed"
from run configurations, and then tomcat will start
I can't be sure but ..
Step 1 -- >
it worked for me, I just remove servers from eclipse
Step 2 -->
restarted and add server again (tomcat 7)
Tomcat v7.0 Server at localhost
I have a web Application and i need to upgrade java jre version from 6 to 7 .I am using Eclipse as IDE.I tried to update the Jre from eclipse .I have even updated the JAVA_HOME environment variable but i am getting following error
C:\Program Files\Java\jdk1.7.0_55\jre..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
Thanks
Download java hereand install it as a common application.
Then in Eclipse use Window->Prefrences->Java->Installed JREs
#Roman Bondar I guesss OP wanted to know more than just the setting.
Basically, JREs are meant to be downwards compatible, so that you are able to execute java classes compiled with version 6 with a runtime from java 7.
But as always, there may be special cases when things have to be changed, e.g. container or libraries. I remember a case back when I migrated to java 6 that it required a special version of JBoss.
Check out this Oracle blog as a starting point.