RAP app will not run from WAR file [message #1042612] |
Tue, 16 April 2013 12:52  |
Eclipse User |
|
|
|
I have a RAP app that works in the IDE but will not launch as a war file in tomcat. I've done everything suggested on the RAP wiki but it still doesn't work.
I telnet to the osgi console and show short status. My entrypoint and all dependent plugins are ACTIVE. org.eclipse.equinox.servletbridge.extensionbundle is RESOLVED. The plugin.xml and bundle.properties files have been exported in the entrypoint bundle, along with all the class files. And there are no library dependencies, just the bundles specified in MANIFEST.MF.
When I browse to http://host:port/myServlet/path I get a 404 error with the usual message I see when RAP is not able to run the entrypoint: "ProxyServlet: /myServlet/path is not available" The value of "myServlet" is what I entered for the servletName property in the branding extension contribution, and the value of "path" is what I entered for the path property in the entrypoint extension contribution.
The tomcat log shows no errors, and I see the context being deployed. The eclipse workspace log in the tomcat work directory shows no errors except a runtime exception thrown by org.eclipse.rap.ui.workbench, NoClassDefFound error on org.mozilla.javascript.ErrorReporter. I don't know how to resolve that (it doesn't happen when I launch with jetty in the IDE), but I assume it's not causing my problem because the entrypoint and other bundles have been resolved and started.
Permissions of the webapps directory are correct and it's owned by the proper user for tomcat. I tried opening up the permissions to 777 as well. I'm using RAP 1.5 and tomcat 6 on RHEL 5.8
What else can I try to make the app work in tomcat?
|
|
|
|
Re: RAP app will not run from WAR file [message #1043730 is a reply to message #1042699] |
Thu, 18 April 2013 00:00   |
Eclipse User |
|
|
|
Thanks for that, Ralf. But I don't think I'm running into that bug. I'm using WarProducts 0.2.2 from the Juno update site, and RAP 1.5. I believe the problem you referred to was introduced in Kepler M6.
I'm using the RAP demo as my reference implementation. I can run it as a WAR file on two home systems (OSX, CentOS), using tomcat 6 and tomcat 7. But on my development system (RHEL) at work, which is on a closed network using mirrors of the necessary eclipse sites, I cannot get the RAP demo to run as a WAR file in Tomcat. It does run in the IDE with Jetty.
I tried numerous Tomcat instances (including a fresh installation) on numerous systems, and none of them can run the RAP demo WAR file created on my development system. I compared everything in the OSGI console between a working and non-working instance. All plugins have the precise same version and qualifier, and they each show the same OSGI state. The servletBridge jar file is also the same version. And the WarProducts tool used to create the WAR file is also the same (0.2.2.201212132117). I get the same failing result when I copy the WAR file to other systems, so I don't think it's an OS problem. Also other web apps run fine in Tomcat while the RAP demo does not.
When I run the WAR file created on my development system, the Tomcat and eclipse logs show no problems, and the OSGI state of each plugin is exactly as expected. But the ServletBridge is unable to locate the entrypoint, as evidenced by the Proxy Servlet 404 response. I've verified permissions, and I can't see any reason why the web app is unreachable.
I saw a cryptic entry in a forum post saying that some people have had problems running RAP on some versions of Tomcat, but I couldn't find any specific info along these lines. Does anyone know of such problems? What else can I look at to see why this one particular WAR file of the RAP demo will not run properly on any system?
|
|
|
Re: RAP app will not run from WAR file [message #1044526 is a reply to message #1043730] |
Thu, 18 April 2013 22:42   |
Eclipse User |
|
|
|
This was not a RAP problem per se, but an eclipse build problem. I had patched org.eclipse.rwt and org.eclipse.jface to enable the Nebula widget XViewer to run in RAP with read-only StyledText widgets and CellLabelProviders replacing the StyledCellLabelProviders. The patched plugins, placed in my workspace with a later qualifier than the target version, were selected in lieu of the corresponding target plugins. They were properly deployed in the WAR file and shown in the OSGI console as ACTIVE. But for some reason, in the WAR file created on my work computer only, org.eclipse.rwt was failing to resolve gov.mozilla.javascript.ErrorReporter, although it was present in the "rhino" folder which was specified as a class library location. I don't know why the class could not be resolved, but some colleagues had similar build problems trying to patch SWT in an RCP app some time ago.
I resolved the problem by abandoning the rwt and jface patches, and patching XViewer instead. The WAR file ran properly after that. When I removed the patched plugins and selected the original plugins, the workspace launcher started blowing up because of a failure to resolve AbstractUIPlugin. It took (no exaggeration) over three hours and more than a dozen times re-setting the target, re-launching the IDE with -clean, cleaning the workspace, and invoking specialized language that I use when software tools become part of the problem and children are not present, but I finally got the workspace launcher to work properly again. If I ever voice plans to patch rwt or swt again, my colleagues have instructions to slap me on the back of the head.
[Updated on: Thu, 18 April 2013 22:44] by Moderator
|
|
|
|
Re: RAP app will not run from WAR file [message #1844823 is a reply to message #1042612] |
Mon, 27 September 2021 05:26  |
Eclipse User |
|
|
|
Hi all,
I have one old scout project in Kepler with scout 3.9.2 that I made some small adaptation and I deployed on my Tomcat, but to my sad surprise I found the following errors and it is the first time I run into them.
Any specific advice on how to fix them?
Thanks in advance for the help
Sep 27, 2021 10:22:04 AM org.apache.catalina.loader.WebappClassLoaderBase openJARs
WARNING: Failed to open JAR [null]
java.io.FileNotFoundException: D:\apache-tomcat-7.0.82-Test-realipr\webapps\MyProject\WEB-INF\lib\servletbridge.jar (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:154)
at java.util.jar.JarFile.<init>(JarFile.java:118)
at org.apache.catalina.loader.WebappClassLoaderBase.openJARs(WebappClassLoaderBase.java:3108)
at org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3397)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3140)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1373)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1861)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at java.sql.DriverManager.isDriverAllowed(DriverManager.java:463)
at java.sql.DriverManager.isDriverAllowed(DriverManager.java:455)
at java.sql.DriverManager.getDrivers(DriverManager.java:356)
at org.apache.catalina.loader.JdbcLeakPrevention.clearJdbcDriverRegistrations(JdbcLeakPrevention.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc(WebappClassLoaderBase.java:2305)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:2223)
at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:2123)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:663)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5875)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1135)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1598)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1506)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1784)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:366)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1500)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1671)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1681)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1649)
at java.lang.Thread.run(Thread.java:745)
Sep 27, 2021 10:22:04 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
Sep 27, 2021 10:22:54 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [EquinoxBridge] in context with path [/MyProject] threw exception
java.lang.SecurityException: Cannot initialize application
at org.eclipse.scout.rt.ui.rap.AbstractStandaloneRwtEnvironment.createApplicationContent(AbstractStandaloneRwtEnvironment.java:142)
at org.eclipse.scout.rt.ui.rap.AbstractStandaloneRwtEnvironment.createUI(AbstractStandaloneRwtEnvironment.java:99)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:186)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:298)
at java.lang.Thread.run(Thread.java:745)
at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:104)
|
|
|
Powered by
FUDForum. Page generated in 0.05086 seconds