I've looked over and tried everything I can find about an inability to successfully compile .jsp files prior to deployment to GAE.
I've uninstalled and reinstalled Eclipse (Kepler)
I've uninstalled and reinstalled the GAE Eclipse Plugin (1.8.8) for Eclipse 4.3
I've uninstalled and reinstalled JDK1.7.0_45 (both 32-bit and 64-bit)
I've removed all JREs from my system.
The "Deploy to App Engine..." menu-item in the 'g' tool apparently does not use the appcfg.cmd file because modifying it has no effect at all.
I've added specific JDK VMs to eclipse.ini
I've copied tools.java from the JDK into the appengine SDK (1.8.8)
I've tried running appcfg.cmd from a cmd shell
I can run in the dev server just fine, but I can't find a way to deploy because I cannot compile my one .jsp file. Apparently there is no java compiler found no matter what I do.
I know this has been discussed over and over again. I've tried what I've found online over and over again to no avail. I find the error logs less than useful.
The deploy command executed is (which uses my JDK):
Error while executing: C:\jdk1.7.0_45_32\bin\javaw.exe -classpath /C:/eclipse-kepler32/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/impl/appengine-api-labs.jar;/C:/eclipse-kepler32/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/impl/appengine-api-stubs.jar;/C:/eclipse-kepler32/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/impl/appengine-api.jar;/C:/eclipse-kepler32/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/impl/appengine-local-runtime.jar;/C:/eclipse-kepler32/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/impl/google_sql.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\appengine-local-runtime-shared.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\el-api.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp\repackaged-appengine-ant-1.7.1.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp\repackaged-appengine-ant-launcher-1.7.1.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp\repackaged-appengine-jasper-6.0.29.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp\repackaged-appengine-jasper-el-6.0.29.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp\repackaged-appengine-tomcat-juli-6.0.29.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\jsp-api.jar;C:\eclipse-kepler32\plugins\com.google.appengine.eclipse.sdkbundle_1.8.8\appengine-java-sdk-1.8.8\lib\shared\servlet-api.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\classes;C:\Users\tmcadmin\AppData\Local\Temp\1384945950039-0;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\appengine-api-labs.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\appengine-endpoints-deps.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\appengine-endpoints.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\appengine-jsr107cache-1.8.8.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\appengine-testing.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\asm-4.0.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\commons-beanutils.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\commons-collections.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\commons-logging.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\datanucleus-api-jdo-3.1.3.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\datanucleus-api-jpa-3.1.3.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\datanucleus-appengine-2.1.2.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\datanucleus-core-3.1.3.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\geronimo-jpa_2.0_spec-1.0.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\geronimo-stax-api_1.0_spec-1.0.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-api-client-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-api-client-appengine-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-api-client-servlet-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-api-services-oauth2-v2-rev50-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-http-client-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-http-client-appengine-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-http-client-gson-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-http-client-jackson-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-http-client-jackson2-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-oauth-client-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-oauth-client-appengine-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-oauth-client-java7-1.15.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-oauth-client-jetty-1.11.0-beta.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\google-oauth-client-servlet-1.16.0-rc.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\gson-2.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\guava-14.0.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\gwt-servlet.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\iText-2.1.7.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\itext-pdfa-5.4.4.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\iText-rtf-2.1.7.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\itext-xtra-5.4.4.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\itextpdf-5.4.4.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jackson-core-2.1.3.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jackson-core-asl-1.9.11.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jdo-api-3.0.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jdo2-api-2.3-eb.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jetty-6.1.11.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jetty-util-6.1.11.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jfreechart-client.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jide-common-client.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jnlp-servlet.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jsr107cache-1.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jsr305-1.3.9.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jstl.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\jta-1.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\objectify-4.0rc2.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\poi-3.6-20091214.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\poi-contrib-3.6-20091214.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\poi-ooxml-3.6-20091214.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\poi-ooxml-schemas-3.6-20091214.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\poi-scratchpad-3.6-20091214.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-ant-1.7.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-ant-launcher-1.7.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-jakarta-jstl-1.1.2.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-jakarta-standard-1.1.2.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-jasper-6.0.29.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-jasper-el-6.0.29.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-jasper-jdt-6.0.29.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\repackaged-appengine-tomcat-juli-6.0.29.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\standard.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\tools.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\transaction-api-1.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\ulc-core-server.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\ulc-deployment-key.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\ULCOfficeIntegration-server-1.1.1.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\xmlbeans-2.3.0.jar;C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\lib\xpp3-1.1.4c.jar; com.google.appengine.tools.development.LocalJspC -uriroot C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp -p org.apache.jsp -l -v -webinc C:\Users\tmcadmin\AppData\Local\Temp\appcfg7613380766126120775.tmp\WEB-INF\generated_web.xml -d C:\Users\tmcadmin\AppData\Local\Temp\1384945950039-0 -javaEncoding UTF-8
Can someone from Google give me any other suggestions?
Thanks in advance.
Tony Carter
(tmcarter54#gmail.com or tony.m.carter#tmcarter-engg.com)
Three suggestions:
Try using the command-line tools (i.e., appfcfg). They'll give you a better error message than Error while executing.
Post a small .jsp that demonstrates the problem.
If for some reason you can't do #2, set up a test app. Starting with the simplest possible .jsp, extend it in the direction of your current .jsps until you see the problem occur. Alternatively you could trim back your current .jsps until they work, but starting from something simple and working forward might be a quick way of uncovering the problem.
Related
I have an AEM jar file AEM_6.5_Quickstart. I am trying to get it running but facing issues.
First thing is my jar is not identified as normal on my system like other jars, as you can see there is no icon associated with my jar file.
Second is when i double click on it to run it i get the below prompt to choose the program to run it with, which ideally should not appear. I was getting errors when i was running maven command to generate project using zulu jdk so i had installed jdk from oracle website, now that is removed from my system and when i double click on jar file i still get the option to run it using oracle jdk
Third problem which i am facing is that when i run the jar using zulu x64 Architecture as in above image it starts the jar but i get the below error when i go to localhost:4502
i google searched for solutions and found that indexing might be the problem so i deleted the file at crx-quickstart/repository/index after stopping the jar. When i restart it it gets stuck and doesnt start for some reason as in below picture, the progress bar doesnt move even though i waited for hours. I also made sure that sling authenticator service was running.
This is the output in case it helps for the java version being used and the path is setup as C:\Program Files\Zulu\zulu-11\bin. I am unable to fix this issue, any help is much appreciated.
First, delete the whole crx-quickstart directory (since this is a local environment being set up for the first time), and this way you will have a clean start. After that, maybe the .jar extension is missing from the filename, please add it. Finally, it is easier to use a .bat or .sh script (you can customize parameters and runmodes for AEM). But for a first run, quick setup with the default sample content, just try java -jar AEM_6.5_Quickstart.jar
It seems like windows messed up with your java versions, you can go and fix your windows JDK references from the registry, you can do that by pressing win + R then type "regedit", once open look for the next value:
"HKEY_CLASSES_ROOT\jarfile\shell\open\command" then open the "default" value and check that your path is correct, mine for example is :
"C:\Program Files\Java\jdk1.8.0_202\bin\javaw.exe" -jar "%1" %*
use mine as reference only change the first part between quotes for your path to the JDK.
Usually that should fix it, but some times there are some other registry references that ruin your jar files association, if you can open PowerShell/cmd or bash terminal type java -version and get the proper version of your Java installation, another workaround can be opening terminal, navigate in terminal where your jar lives and then type
java -jar yourJarFile.jar
i developed a java console application with the help of maven for my dependency management.
The application is a pure console application, which means the user has to call it via the comandline and has to give parameters with it.
I need to bundle the finiheD jar (with dependencies produced by maven-assembly-plugin) with an complete JRE, because the application has to be able to work on machines without java pre installed.
I tried to use the java packager -deploy command on the finished jar, but it doesnt really work:
https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
C:\jdk-9.0.4\bin>javapackager.exe -deploy -srcdir C:\folderwithjarinside -outdir C:\outdir -name Toolname -native -appclass [..].core.Main
After that i get a bundle with the jar, the complete jre and an exe to start the whole thing:
When i now start the exe nothing happens and when i start it from an command line again nothing happens and i dont even get console output which SHOULD happen.
When i start the jar allone i get console output even when i dont give parameters and it crashes cause of it.
How do i package my java console application with the JRE and are still able to start it as commandline application provide arguments and see console output?
Thanks in advance
Multiple tools exist for packaging the JRE with your application:
install4j
If you need a specific JRE, you will need access to the target platform, install the JRE there, and call a tool to package it. I recommend to do this just once, push the resulting JRE bundle as a non-Maven artifact to your repository, and use maven-download-plugin to pull it into your installer build.
I can testify that EJ Technologies has great support, typical duration from question to answer is 24-48 hours, depending on how many follow-up questions you have, and I have yet to see a case where their answer was incomplete, mistaken, or misleading.
launch4j (see https://stackoverflow.com/a/7582064/6944068)
I just know that it exists, I never tried it.
The JDK actually comes with a way to do that since 1.7
Rumour has it that is badly designed and frustrating to use, but I don't really know.
I am pretty sure that neither launch4j nor the JDK support cross-platform builds for the installer, i.e. in your deployment toolchain, you need a machine with each target OS for each platform that you wish to have an installer for.
install4j isn't ideal in this respect, but at least you need the other-platform machines just once to create the JRE bundle.
I have a code snippet that is part of my eclipse plugin. When testing it in a runtime eclipse version (That means it is not packed into a jar afaik) it runs just fine.
However if I pack my plugin into a jar and then run the respective code snippet it results in a complete crash of eclipse without any error logs (I'm assuming that it even crashes the JVM).
I'm running this on Linux Mint.
According to this post the Desktop API is broken in older Java versions but it should be fixed in Java 8.
Has anyone an idea why this is still happening?
Although this is not an answer to the question why the Desktop API breaks down when used inside a jar file, I want to point out an alternative that I have found (thanks to #Holger) for my case (working with the eclipse APIs):
You can simply use PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(<YourURL>); in order to open the given URL in the system's default browser.
This is my first question, so apologies for any mistakes. I'll try and give all the info I can. Basically I've written a simple swing application which just loads in image into a JPanel and displays it. I'm using Netbeans 7.1 and I have the latest version of the Java SDK.
Anyway, I've used the "Build" feature in NetBeans 7.1 to deploy my application into a Jar file. When I double click the Jar File on my PC, it runs without a problem. However when I put it on other computers (Tested on 2 others so far, both with the most current JRE) it fails to open, citing the following error:
could not find the main class: swong.Startup. Program will exit
swong is my package name, and Startup is the location of my main method. I have checked the manifest file which is created with Netbeans' build, and it[the manifest] does indeed contain the location of my main method class.
From searching, I've come across similar issues in which the classpath is set wrongly, but I don't understand how this could cause my particular error.
If someone could help me, I would be over the moon. I've been studying java for a year or so, and I've got a good handle down, but I've NEVER been able to make a Jar that runs on a computer which wasn't my own. So, 10 points and thanks in advance.
xo.
EDIT: Thank you for the responses. I'm doing shift work and swamped, but I will test and poke with these responses tomorrow and provide more information. Thanks again. xo
I had d same problem while distributing my app. There is 1 solution that you create a batch file with 'java -jar AppName.jar' and asking user to double click on this batch file to execute your app. What i did was to provide a JRE installation exe(eg: jre_1.7.0) with your app.
Now create a Batch file (install.bat) in which write following commands
jre_1.7.0 -> this will install jre on user's pc
set path="C\Program Files\Java\jre_1.7.0\bin"
java -jar yourAppName.jar
Why i installed JRE because different people have different JRE versions installed. So this makes it difficult to set path to the installed JRE's bin folder & calling the 'java -jar' command. Hence as you know which folders your JRE installation will create hence it is easy to set path and execute your jar file with 'java-jar' command.
Check that your jar file has the following structure (at least)
jarfile.jar
|---------- swong
|---------- Startup.class
|---------- META-INF
|---------- MANIFEST.MF
It seems like the class "Startup" is missing. Maybe your jar only contains the .java files, not the compiled classes.
This error message can be a mistakable java7 error, when you try to start java7 compiled classes with a different Java Runtime Environment then java7. Have you validated, that your .jar is started within a Java7 environment on those other test machines? Sometimes it happens, that you have installed different versions of JREs and you might not be sure which one is actually started.
To check which enviroment is used, you can check in your registry for the following value:
HKEY_CLASSES_ROOT\jarfile\shell\open\command
this should point to your latest JRE. Or if you'd like to stay compatible to java6 as well, define the appropiate compile level in your build environment.
Using Maven M2 Plugin from Sonatype on a Mac. Unfortunately every time I run Maven to "Update Project Configuration" it modifies my-app-hosted.launch file by putting "-d32 -XstartOnFirstThread" in VM_ARGUMENTS. This messes up the .launch file and makes it unusable for anyone on Windows who needs to run the app.
I'd like to figure out a way to disable putting of both options in VM_ARGS. Having spent numerous hours online I've failed to find the answer.
I am running 64-bit Eclipse on a Mac. startOnFirstThread option should not even be used now, since hosted GWT no longer uses SWT but Swing.
Probably not the answer you are looking for, but have you considered not adding to version control / sharing the launch files between developers? Just adding them to svn:ignore or .gitignore instead?