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

Bug 500674

Summary: RichTextEditor in RAP runs only in development mode
Product: [RT] RAP Reporter: Frank Jakop <frank.jakop>
Component: OtherAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Demo project to reproduce the error
none
Full error message none

Description Frank Jakop CLA 2016-09-01 10:11:31 EDT
Created attachment 263897 [details]
Demo project to reproduce the error

I'm using the new RichTextEditor feature in RAP 3.1. I've built a simple demo project which consists only of an EntryPoint adding a RichTextEditor-Widget.
When I access the webapp's url it works fine when I set CATALINA_OPTS=-Dorg.eclipse.rap.rwt.developmentMode=true.
Without this option the webapp produces a strange error


> Error: Error: Operation "call" on target "rwt.client.ClientFileLoader" of type "null" failed:
> Cannot read property 'handler' of undefined
> Properties: 
> file = rwt-resources/ckeditor/ckeditor.js
> type = js
> 
>   Script: {"head":{"cid":"03fb7d47"},"operations":[["call","rwt.client.ClientFileLoader","load",{"file":"rwt-

The full error is attached as error.txt

I've attached a demo maven project, just unzip and run mvn package, then deploy the War in your Tomcat.
Accessing "/webtest/start" yields the error. 
Now set your CATALINA_OPTS to -Dorg.eclipse.rap.rwt.developmentMode=true and restart the Tomcat, everything is fine.
Comment 1 Frank Jakop CLA 2016-09-01 10:12:09 EDT
Created attachment 263898 [details]
Full error message
Comment 2 Ivan Furnadjiev CLA 2016-09-02 08:20:51 EDT
The "rwt.client.ClientFileLoader" type is missing in client.js file in rwt-3.1.0.20160527-1719.jar, but it is available in the released bundle org.eclipse.rap.rwt_3.1.0.20160527-1719.jar. How did you create rwt-3.1.0.20160527-1719.jar? Did you get it from somewhere? All files inside rwt-3.1.0.20160527-1719.jar have a date 01.07.2016 09:36, but the original released files have 01.06.2016 06:46. I think that client.js file is from RAP 3.0 not 3.1.
Comment 3 Frank Jakop CLA 2016-09-02 08:56:36 EDT
Well maybe we built/patched it ourselves because of [493870] or the corresponding gerit patchset https://git.eclipse.org/r/#/c/75630/ and something went wrong.
Thanks a lot for the hint.