I have seen many solutions to this problem but none worked, the thing is i've deployed a simple hello world to google cloud and everything went fine with servlets and .html pages, but when it comes to .jsp pages the server can't load it and throw an exception (though .jsp pages works fine locally).
the solutions i've tried:
using JDK instead of JRE (i changed the JRE system library in the project build path).
tried to set the compiler level to 1.7 but found that app engine forces you to use 1.8.
tried to add .jsp files to web.xml file manually.
tried to put the index page as .jsp and also didn't work, currently the only .jsp file is called mua.jsp
finally i made my friend deploy a hello world project with basic jsp file (also named mua) on his macbook to the same project on the cloud and also didn't work.
what i mean by "didn't work" is that the page didn't load but instead shown error 500.
what makes the situation really weird is with last few deploys from my friend the error changed to 404 with no exception thrown ..
the exception:
javax.servlet.UnavailableException: Class loading error for holder
mua#1a7b9==org.apache.jsp.mua_jsp,jsp=/mua.jsp,order=-1,inst=false,
javax.servlet.UnavailableException: Class loading error for holder
org.apache.jsp.mua_jsp#918a9ac4==org.apache.jsp.mua_jsp,jsp=null,order=-1,inst=false,
javax.servlet.UnavailableException: Class loading error for holder
org.apache.jsp.mua_jsp#918a9ac4==org.apache.jsp.mua_jsp,jsp=null,order=-1,inst=false,
javax.servlet.UnavailableException: Class loading error for holder
mua#1a7b9==org.apache.jsp.mua_jsp,jsp=/mua.jsp,order=-1,inst=false] at
org.eclipse.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:863) at
org.eclipse.jetty.servlet.ServletContextHandler.startContext
(ServletContextHandler.java:349) at
org.eclipse.jetty.webapp.WebAppContext.startWebapp
(WebAppContext.java:1406) at
com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp
(AppEngineWebAppContext.java:159) at
org.eclipse.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1368) at
org.eclipse.jetty.server.handler.ContextHandler.doStart
(ContextHandler.java:778) at
org.eclipse.jetty.servlet.ServletContextHandler.doStart
(ServletContextHandler.java:262) at
org.eclipse.jetty.webapp.WebAppContext.doStart
(WebAppContext.java:522) at
com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart
(AppEngineWebAppContext.java:116) at
org.eclipse.jetty.util.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:68) at
com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler
(AppVersionHandlerMap.java:244) at
com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler
(AppVersionHandlerMap.java:182) at
com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:109) at
com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest
(JavaRuntime.java:693) at
com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest
(JavaRuntime.java:655) at
com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run
(JavaRuntime.java:625) at
com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run
(JavaRuntime.java:819) at
com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run
(ThreadGroupPool.java:274) at java.lang.Thread.run (Thread.java:745)
i got the solution, the problem was in using java 10 in eclipse as the default project system library, currently i'm using java 8 and the deploy and everything else went fine :).
Related
I'm tasked with integrating a collection of native libraries into a web application running in a Tomcat7 container.
I already found out that in order to be able to restart the application without restarting the whole server I must load the libs using the Tomcat "shared"-loader, outside the actual application.
For that I followed the accepted answer in this SO question: Shared JNI library (.so) in Tomcat - UnsatisfiedLinkError, but no luck so far.
As described I created a small "DLLBootstrapper" java class for loading the libs, compiled it and put it in "CATALINA_HOME/shared/lib" next to the libs I'm loading.
In the "catalina.properties" I set the path of the "shared.loader" to that folder.
However when I try to obtain the "DLLBootstrapper" in my application using Class.forName("msm.DLLBootstrapper"); I get a java.lang.ClassNotFoundException: msm.DLLBootstrapper.
What am I missing here?
Edit:
Sorry, forgot to mention java.library.path is set to the CATALINA_HOME/shared/lib folder.
We've recently been trying to use LibGDX to convert our LibGDX app into a web app. However, whenever we try to run the application we just get a HTML Error 404 and this error code in Eclipse:
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner'
could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/Steve/Desktop/adt-bundle
windows-x86_64
20140702/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-
2.6.0/gwt-dev.jar' to the web app classpath for this session
Despite seeing this a lot on various websites, there have been no useful answers yet.
PS - Please answer in plain English - we're pretty new to this!
Fixed it - turns out our installation of GWT was a bit broken. We found that following the steps here worked better!
This application is live. I previously used this project for php, now I am experimenting with Java and I cannot get the project to upload. Below is the error message I get:
com.google.appengine.tools.admin.HttpIoException: Error posting to
URL:
https://appengine.google.com/api/appversion/create?app_id=laraveltest2014&version=1&
404 Not Found This application does not exist
(app_id=u'laraveltest2014').
I tried adding the parameter below and it had no effect.
--no_cookies
If you logged in with different google account previously, try deleting these two files from home directory:
.appcfg_oauth2_tokens_java
.appcfg_cookies
I am stuck at really curious error.
I have a tapestry page in which I was trying to import a javascript file. Previously, I was importing extjs-version3.js file(which worked perfect) and then I wanted to import extjs-version4.js file. So, I removed the version3 file from file system, added version4 file to file system and changed my tapestry page's java code to import the version4 file. But I always got the error, "version3 file does not exist"!
While debugging, I changed the java code of page so that it does not import ANY file now.
So, now I have a page that does not import any javascript file and I still get the error, "version3 file does not exists".
Following are the exact details.
MyPage.java which imports the javascript file.
#Import(
library = {
//"context:js/lib/extjs3/adapter/ext/ext-base-debug.js",
//"context:js/lib/extjs3/ext-all-debug-w-comments-v4.js",
/*"context:js/lib/ext_compat_layer/ext3-compat.js",
"context:js/lib/ext_compat_layer/ext3-core-compat.js",*/
//"context:js/page/ActivitiesTab.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.grid.Search.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.IconMenu.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.Toast.js"
},
stylesheet = {
/*"context:js/lib/extjs3/resources/css/ext-all.css",
"context:js/lib/extjs3/resources/css/xtheme-gray.css",
"context:js/lib/extjs3/resources/css/theme-gray/core.css",*/
//"context:js/lib/extjs3/resources/css/icons.css",
//"context:js/lib/extjs3/resources/css/gridsearch.css"
}
)
The stack trace of error I receive.
An unexpected application exception has occurred.
org.apache.tapestry5.ioc.internal.OperationException
Unable to locate asset 'context:js/lib/extjs3/ext-all-debug-w-comments.js' (the file does not exist).
trace
Constructing instance of page class net.semandex.salsa.tapestry.pages.ActivitiesTab
java.lang.RuntimeException
Unable to locate asset 'context:js/lib/extjs3/ext-all-debug-w-comments.js' (the file does not exist).
Hide uninteresting stack frames Stack trace
org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:135)
org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:105)
org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:85)
org.apache.tapestry5.internal.transform.ImportWorker$5.map(ImportWorker.java:206)
org.apache.tapestry5.internal.transform.ImportWorker$5.map(ImportWorker.java:203)
org.apache.tapestry5.func.LazyMappedValue.get(LazyMappedValue.java:31)
org.apache.tapestry5.func.LazyFlow.first(LazyFlow.java:52)
org.apache.tapestry5.func.AbstractFlow$1.next(AbstractFlow.java:68)
org.apache.tapestry5.func.AbstractFlow.toMutableList(AbstractFlow.java:47)
org.apache.tapestry5.func.AbstractFlow.toMutableList(AbstractFlow.java:40)
org.apache.tapestry5.func.AbstractFlow.toList(AbstractFlow.java:205)
org.apache.tapestry5.internal.transform.ImportWorker.convertPathsToAssets(ImportWorker.java:202)
org.apache.tapestry5.internal.transform.ImportWorker.access$100(ImportWorker.java:40)
org.apache.tapestry5.internal.transform.ImportWorker$4.advise(ImportWorker.java:190)
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
net.semandex.salsa.tapestry.pages.ActivitiesTab.containingPageDidLoad(ActivitiesTab.java)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:120)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:977)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:829)
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:171)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:190)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174)
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173)
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81)
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74)
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326)
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
net.semandex.salsa.tapestry.services.AppModule$1.service(AppModule.java:164)
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
org.apache.tapestry5.internal.services.URLRewriterRequestFilter.service(URLRewriterRequestFilter.java:50)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
MyPage.tml file is very simple and has nothing suspicious but I can post the code if needed.
Why tapestry is trying to load a js file which is not included in any page?
Update:
Infact, irrespective of what I write in #Import annotation, the files are always imported according to the previous code. This is happening with all the pages.
This could be caused by some component in the template which fails to load the asset, or maybe a parent template that is extended by MyPage.
According to the stacktrace, the page net.semandex.salsa.tapestry.pages.ActivitiesTab is the cause of the problem. MyPage probably loads it somewhere.
Resolved now. The problem was with my production environment and not in Tapestry. Java class files were not updated by Eclipse when I changed them. Because of this, javascript files were imported based on the previous code in java file of the page.
Eclipse reported following problem.
"The project was not built due to "Could not delete '/someName/bin/". Fix the problem, then try refreshing this project and building it since it may be inconsistent"
I referred this question and solved my problem.
Simple refresh, clean/publish did not solve my problem. I had to close the Eclipse and restart the PC. This fixed my environment and now Eclipse is updating the java classes properly.
Possible duplicate of Google App Engine JDO enhancement is failing.
This is my first app engine app which I'm implementing based on "appengine-java-sdk-1.8.8" and Intellij Idea 13.0. Following image shows my application.
I have designed my application based on tutorial on Intellij Idea page.
In web.xml file if I clear lines 8-18 and remove mobilesoft.asia package from src folder then application works fine and when I click on Run button then I can see my "Hello world" message that I have written on index.jsp file.
However, with having of my package and lines 8-18 in web.xml then exception happens when I click on Run button.
Any suggestion would be appreciated.
==============
Edit: I downloaded 'datanucleus-appengine-2.0.0-final-dist' via this page. Seems it is latest release. Then I compared with what items I found under appengine-java-sdk-1.8.8\lib\opt\tools\datanucleus\v2 and realized that seems appengine has newer version of datanucleus. Therefore, app engine shouldn't have problem with compile, I'm confused....
finally I found the solution. I set 'Persistence' to "JPA 2" during creation of project. By set it to "JPA 1" problem solved (I don't know why) and I am able to compile the project.
So, select your project from Project panel. Then hit F4. Project structure opens. Select Google App Enfine from middle panel (under name of your project). Set Persistence to "JPA 1".