Glassfish 3.1.2.2 in IDEA 11.1.4: "PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required" - intellij-idea

I am trying to get our Mavenized web application up and running in a freshly installed IDEA 11.1.4 Ultimate (Windows 7) under a freshly unzipped Glassfish 3.1.2.2. I have done this many times in Eclipse, but am not familiar with IDEA.
I can build and deploy it just fine, but when I try to access pages with JSP-content I get:
PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
The Glassfish Application Servers entry adds the javax.ejb.jar, javax.servlet-api.jar and javax.servlet.jsp-api.jar as libraries.
I have set the project SDK to point to a full JDK resulting in:
(which does not seem to include a jar with javac)
The IntelliJ tutorials I've found so far, does not mention this problem. My guess would be that the "please start using this JDK" information is not passed on to Glassfish, so it just picks up the system JRE.
What configuration step have I missed? I do not want to edit configuration files - I expect the IntelliJ plugin to do this if I know how to tell it to.

I got the same notification and just changed in admin port -> Configurations -> server-config -> JVM Settings -> Java Home as "C:\Program Files\Java\jdk1.8.0_72", and it started working.

PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required.
I was getting same error after restarting my glassfish 4 server.When I am trying to access my deployed application it was saying to mention full JDK.
login to Glassfish admin console.(http://localhost:4848).
Go to Configuration---->server-config--->JVM Settings
Set the java home with your correct jdk home (ex:C:\Program Files (x86)\Java\jdk1.8.0_121).
Restart the server.
It will work fine.

Next solution helped me
source: http://alvinalexander.com/blog/post/java/fixing-glassfish-jdk-path-problem-solved
Find your asenv.bat file. C:\Program Files\glassfish-4.0\glassfish\config\asenv.bat
Open it in text editor and find strings like "set AS_ = blahblah"
Add this string there "set AS_JAVA=C:\Program Files\Java\jdk1.7.0_60" (print your own JDK path here). If string "set AS_JAVA= blahblah" already exists then just fix the path.

Add JDK_HOME\lib\tools.jar file to the JDK configuration Classpath.
However, the problem in your case may be different as Glassfish JDK is not taken from IntelliJ IDEA settings, this question may help:
How do I specify the jdk for a glassfish domain?

Related

TomEE and Intellij

I followed this tutorial but at the end I got an 404 Not Found.
http://localhost:8080/TomEE_war_exploded/
The requested resource [/TomEE_war_exploded/] is not available
In Intellij I don't see a mistake. The Apache Tomee runs under windows in ~/software/apache-tomee-plume-8.0.11 and the code in ~/playground/TomEE
Unfortuately I'm not able to understand how the war file will be copied to the ~/software/apache-tomee-plume-8.0.11/webapps directory or where the configuration error exists.
From the log file I'm not really sure that the deployment happend correct:
30-May-2022 16:49:53.486 WARNING [http-nio-8080-exec-4] org.apache.batchee.container.services.ServicesManager.init You didn't specify org.apache.batchee.jmx.application and JMX is already registered, skipping
30-May-2022 16:49:53.486 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=/home/maggus/playground/TomEE/target/TomEE-1.0-SNAPSHOT)
30-May-2022 16:49:53.664 INFO [http-nio-8080-exec-4] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2022-05-30 04:49:53,804] Artifact TomEE:war exploded: Artifact is deployed successfully
[2022-05-30 04:49:53,804] Artifact TomEE:war exploded: Deploy took 823 milliseconds
Does anybody see the mistake?
Thanks,
Markus
I ran into somewhat similar problem today and after sometime I was able to figure it out that it does not deploy at the following Application Context that is configured under Deployment tab in Run/Debug Configurations.
/TomEE_war_exploded
If you try to access http://localhost:8080/TomEE_war_exploded/, it gives 404.
Instead, (in my case) it is accessible at http://localhost:8080/TomEE-1.0-SNAPSHOT/
Where 1.0-SNAPSHOT is the version number defined in pom.xml.
Now in order to find the exact path where it is deployed, you need to go to Tomcat Web Application Manager at the following address:
http://localhost:8080/manager/html
Replace 8080 with the port number on which TomEE is running on your machine.
Default user & password is tomee.
Look under Path and you'll find it. Just click on it, it will be accessible.
I hope it helps.
EDIT: The Workaround
In order to define your own path, you need to update the path in the Artifact Output Directory. See the attached photo.

jackrabbit - There is an error in invoking javac. A full JDK (not just JRE) is required

I'm learning Jackrabbit and following the documentation to run a standalone server. When I run the command java -jar jackrabbit-standalone-2.16.2.jar and access localhost:8080 on my browser, I get a 500 error saying:
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
What am I doing wrong?
Note: I have set my jdk/bin path in my environment variables.Also, my javac command is working properly. I've jdk version 1.8.0_74 and Jackrabbit version 2.16.2
Edit: According to this answer, I tried setting my jdk to my installed jres in eclipse but that didn't solve my problem.
Running the latest jackarabit standalone jar(2.17.3) in my machine(windows 10 and java home pointing in java8 jdk) produced the same errors.
I then executed the rar with java -Djava.home="%JAVA_HOME%" -jar jackrabbit-standalone-2.17.3.jar. Although I got the same error in browser I was able to see errors in the console where I invoked the running command.
One of these error was
can't open C:\Progra~1\Java\jdk1.8.0_144\lib\tzmappings.
Searching my java installation I found that the missing files, are located under jre's installation folder.
So I eventually made the standalone jar to work with:
java -Djava.home="%JAVA_HOME%\jre" -jar jackrabbit-standalone-2.17.3.jar
The initial error is a bit misleading as it refers to javac and not to the missing files.
The whole thing seems to be a bug for me. Please give a try to my workaround and if it works for you consider filing a bug in Jackrabbit's issue tracker platform.
jackrabbit-standalone uses JSP. JSP needs compilation. Compilation needs JDK.
Before running java -jar jackrabbit-standalone-2.16.2.jar do you check your JAVA_HOME, and make sure it refers to a fully-fledged JDK? In short, the bin directory should have javac.
I found that there was another variable in the Path environment System variable preceding my %JAVA_HOME%\bin variable.
You don't have to delete the other variable, but move it down (or move %JAVA_HOME\bin up) to correct the load order.

Lucee Express on local Dev

I’m currently running window 7, ACF 11, and IIS 7 and would like to install Lucee express to try.
I’m having the hardest time getting Lucee to work on my local desktop. I followed this article http://www.gpickin.com/index.cfm/blog/setting-up-lucee-in-my-dev-environment-changing-ports I can’t get the Lucee welcome page to work.
I download the Lucee Express from here http://lucee.org/downloads.html
I extract the file to C:\lucee
Ran the C:\lucee\bin\startup.bat
Navigated to 127.0.0.1:8888
I get the follow message: Firefox can't establish a connection to the server at 127.0.0.1:8888
Can someone tell me what am I doing wrong? Thank you in advance for your insights.
As identified in the comments on the question: you are missing the environment variable pointing to your Java runtime (you need one of JAVA_HOME or JRE_HOME.
This can be achieved in one of a coupla ways.
Set it globally:
Control Panel > System > Advanced system settings > Environment Variables > System Variables > New...
Or set it for just that environment by editing the startup.bat file you've already been using:
SET JAVA_HOME=[path]
In both situations you need a path to either a JRE or a JDK. You say you have CF11 already installed, so you can simply point to its one, which will be a subdirectory of your CF install, as Leigh points out above. So something like:
SET JRE_HOME=D:\apps\Adobe\ColdFusion\11\express\jre
If you have a Java JDK installed instead and want to use that, use JAVA_HOME instead of JRE_HOME, eg:
SET JAVA_HOME=D:\apps\Oracle\Java\jdk\1.8.0_60
As these things can be installed anywhere, you'll just need to locate 'em and use the path accordingly. You want to point it to the top level directory of your JRE or JDK, which contains the bin subdirectory.

An internal error occurred during: "Start Ruble bundle manager"

I've install the Aptana3 Eclipse plugin, I am using eclipse Version: Juno Service Release 1
Build id: 20121004-1855.
Each time I launch eclipse I see an error dialog that says:
An internal error occurred during: "Start Ruble bundle manager".
java.lang.NullPointerException
How can I fix this error?
I was having the same problem after a fresh install of Eclipse and Aptana.
What fixed it for me was very close to what Jason mentioned in his Answer. I checked the available software sites in Eclipse --> Preferences --> Install/Update --> Available Software Sites.
In this window there was an option for Aptana that was checked. I had given it a name of "Aptana" previously and the location was "http://download.aptana.com/studio3/plugin/install".
There was a second location listed for Aptana at "http://download.aptana.com/studio3/plugin/update/" but this option was not checked nor did it have a name. I gave it the name "Aptana Update" and I put a check in the box. I then restarted Eclipse and the error went away.
Let me note that I am using:
Eclipse Standard/SDK
Version: Kepler Service Release 1
Build id: 20130919-0819
AND
Aptana Studio 3
Version: 3.4.2.201308081736-7W7I57boG98RAi489ctbvKi7VXbq
Try checking the available software sites in Eclipse --> preferences. Use the search field in preferences to get there quickly. I noticed there was an entry for:
www.apanta.com
The above address isn't the location of the package. Once I unchecked that box and selected the one for:
Apanta http://download.aptana.com/studio3/plugin/install
it started without the error. Not sure if this is the full solution, but it seems to work.
Look at your .log to find which bundle has an issue.
Then uncheck, remove or change wrong url in the install/update available software sites : Eclipse -> Preferences -> Install/update -> Available Sofware Sites
(to check this url, just copy/paste and look in browser..)
Aptana update site (at current time...) : http://update.aptana.com/update/studio/3.2
Install the support file for Windows
http://gnuwin32.sourceforge.net/downlinks/zlib.php
this solved my problem in Windows. As by Linux it comes as default.
I solved this by using rvm to install zlib. I looked through my log file (Eclipse: Help > Aptana > View Log File) and saw a zlib error message right before the NullPointerException. If zlib isn't in your log, this probably won't fix your problem ;-)
My system (Ubuntu) already had zlib1g and zlib1g-dev installed.
rvm pkg install zlib
rvm reinstall 1.9.3
Find the Folder bundles in your installation.
<apptanaFolder>/configuration/org.eclipse.osgi/bundles
do a chmod to allow the user read and write to this folder:
chmod 775 <apptanaFolder>/configuration/org.eclipse.osgi/bundles -R
Be Happy, cause you solve your problem!
Here in German Language:
http://wiki.xstable.de/doku.php/entwicklungsumgebung:eclipse:troubleshooting#ruble_manager
There is a patch for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122#c51
I confirm it solves the problem.
I tried the solution of Jonathan to no avail, although one of the adresses for Aptana was indeed unchecked and unmarked.
What worked for me was simply updating the plugins though Help --> Check for Updates.

Tomcat - The system cannot find the file specified

I downloaded Tomcat 6 from Tomcat Website and try to install. I found the .exe file in C:\apache-tomcat-6.0.35\bin but when i run the exe file the command prompt disappeared after show "The system cannot find the file specified". I already installed JDK 6 update 29 in my system. Please advice
I had a simmilar problem after installing a java update, but JAVA_HOME was set correctly. If you run tomcat as a service, you might have to right click on the tomcat icon and open java tab and change java virtual machine path or just set "use default".
If I were to "guess" I would say that the JAVA_HOME is not set. But to confirm :
Can you go the command line, make sure that JAVA_HOME is set correctly, startup tomcat (from command line) ? If you run into errors, please send the text output.
Try to run "startup.bat" to start a tomcat instance.
Go to your/path/tomcat and execute script catalina_start.bat .I had the same issue and this worked for me (though I installed Tomcat as a part of XAMPP package)