Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360313

Summary: Resolving RWT/JFace resources fails on WAS 8 (OSGi Feature)
Product: [RT] RAP Reporter: Ralf Zahn <ralf.zahn>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: fr.appel, ralf.zahn
Version: 1.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ralf Zahn CLA 2011-10-08 05:24:30 EDT
Build Identifier: 1.5.0-N-20111004-0113

I try to run RWT with JFace on WAS8 using the OSGi Feature. I can run my demo app, but resources (JS, Images) are missing. I have found out that the resources are unpackaged into the web application's installation directory, but the resources are registered via HttpService#registerResource() with the OSGi Bundle Data directory, which is not the same on WAS8.

The web application's installation directory (that is fetched by org.eclipse.rwt.internal.engine.ApplicationContextConfigurator#setContextDirectory by invoking javax.servlet.ServletContext#getRealPath( String )) has the value

C:\Program Files (x86)\IBM\WebSphere\WAS8\AppServer\profiles\RWT\wstemp\WABS\ABSALOMNode05\server1_null\org.eclipse.rap.rwt.demo.eba..1.0.0.qualifier\org.eclipse.equinox.http.embedded.web..1.0.0.qualifier.war

whereas the OSGi Bundle Data directory (that is fetched by org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl#getLocation() by invoking org.osgi.framework.BundleContext#getDataFile( String )) is

C:\Program Files (x86)\IBM\WebSphere\WAS8\AppServer\profiles\RWT\temp\Aries\osgicache\server1\org.eclipse.osgi\bundles\66\data\store\org.eclipse.osgi\bundles\17\data\store\org.eclipse.osgi\bundles\2\data\rwtcontext_63613163_63451956


Unfortunately, the resources are unpackaged into the first directory, whereas the ResourceServlet searches within the second.
Copying the resources to the second directory directory would not be a good solution because the OS (win x64) does not allow such long filenames. :-/
I guess, the ResourcesServlet should be initialized with the first directory to work on WAS8.


Reproducible: Always

Steps to Reproduce:
1. Install an EBA containing the HTTP Service and RWT + RWT OSGi Integration
2. Open a resource URL, e.g. http://..../<httpServiceServlet>/rwt-resources/resource/static/image/blank.gif.
3.You'll get a 404 error from the ResourceServlet that was registered by RWT via HttpService#registerResource().
Comment 1 RĂ¼diger Herrmann CLA 2011-10-08 07:40:45 EDT
I think this was fixed on Oct 6th. Thugh I can't find the corresponding bug.
Could you retry with the latest nightly build?
Comment 2 Ralf Zahn CLA 2011-10-09 15:03:55 EDT
Yes, the nightly build now works correct. Thanks.