Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP and fragments - e.g. used for branding
RAP and fragments - e.g. used for branding [message #139581] Tue, 07 July 2009 16:09 Go to next message
Eclipse UserFriend
Originally posted by: marco.waimer.uni-ulm.de

Dear RAP developers!

For an easier exchange of brandings, I want to use fragments. For example the
favicon.ico should come from the fragment. And there the first problem already
occurrs, a NullPointerException, since the favicon is searched for in the host
plugin (and not found).

java.lang.NullPointerException
at
org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
at
org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
at
org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
at
org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
at org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
at
org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)

I currently use M7, but Branding.java itself was not changed for 4 months.

By the way, the same fragment idea works well with RCP, both from Eclipse and
standalone after built.

Is there something I am missing together with RAP and fragments? The fragments
are checked in the launch configuration and resolved during runtime.

Maybe someone could give me a little hint.

Greetings,
Marco
Re: RAP and fragments - e.g. used for branding [message #139602 is a reply to message #139581] Tue, 07 July 2009 16:20 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
did you try that with 1.3 final? Resolving the favIcon isn't done in
the class Branding.

Marco Waimer wrote:
> Dear RAP developers!
>
> For an easier exchange of brandings, I want to use fragments. For
> example the favicon.ico should come from the fragment. And there the
> first problem already occurrs, a NullPointerException, since the favicon
> is searched for in the host plugin (and not found).
>
> java.lang.NullPointerException
> at
> org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
>
> at
> org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
>
> at
> org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
>
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
>
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
>
> at
> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
>
> at
> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
> at
> org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
>
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)
>
>
> I currently use M7, but Branding.java itself was not changed for 4 months.
>
> By the way, the same fragment idea works well with RCP, both from
> Eclipse and standalone after built.
>
> Is there something I am missing together with RAP and fragments? The
> fragments are checked in the launch configuration and resolved during
> runtime.
>
> Maybe someone could give me a little hint.
>
> Greetings,
> Marco
Re: RAP and fragments - e.g. used for branding [message #139687 is a reply to message #139602] Tue, 07 July 2009 20:25 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Rüdiger Herrmann wrote:
> did you try that with 1.3 final? Resolving the favIcon isn't done in the
> class Branding.

This does not work with current CVS. Filed bug 282744:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282744

Ralf

> Marco Waimer wrote:
>> Dear RAP developers!
>>
>> For an easier exchange of brandings, I want to use fragments. For
>> example the favicon.ico should come from the fragment. And there the
>> first problem already occurrs, a NullPointerException, since the
>> favicon is searched for in the host plugin (and not found).
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
>>
>> at
>> org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
>>
>> at
>> org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
>>
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
>>
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
>>
>> at
>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
>>
>> at
>> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
>>
>> at
>> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
>> at
>> org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at
>> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>>
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>>
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at
>> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
>>
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
>> at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
>> at org.mortbay.jetty.Server.handle(Server.java:324)
>> at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
>>
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
>> at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
>>
>> at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)
>>
>>
>> I currently use M7, but Branding.java itself was not changed for 4
>> months.
>>
>> By the way, the same fragment idea works well with RCP, both from
>> Eclipse and standalone after built.
>>
>> Is there something I am missing together with RAP and fragments? The
>> fragments are checked in the launch configuration and resolved during
>> runtime.
>>
>> Maybe someone could give me a little hint.
>>
>> Greetings,
>> Marco
Re: RAP and fragments - e.g. used for branding [message #139697 is a reply to message #139687] Tue, 07 July 2009 20:37 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Ralf Sternberg wrote:
> Rüdiger Herrmann wrote:
>> did you try that with 1.3 final? Resolving the favIcon isn't done in the
>> class Branding.
>
> This does not work with current CVS. Filed bug 282744:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=282744

It's fixed in CVS. Thanks for reporting this issue.

Ralf

> Ralf
>
>> Marco Waimer wrote:
>>> Dear RAP developers!
>>>
>>> For an easier exchange of brandings, I want to use fragments. For
>>> example the favicon.ico should come from the fragment. And there the
>>> first problem already occurrs, a NullPointerException, since the
>>> favicon is searched for in the host plugin (and not found).
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
>>>
>>> at
>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
>>>
>>> at
>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
>>>
>>> at
>>> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
>>>
>>> at
>>> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
>>> at
>>> org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>>>
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>>>
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
>>>
>>> at
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
>>> at
>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
>>> at
>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
>>> at
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
>>> at
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
>>> at org.mortbay.jetty.Server.handle(Server.java:324)
>>> at
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
>>> at
>>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
>>>
>>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
>>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
>>> at
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
>>>
>>> at
>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)
>>>
>>>
>>> I currently use M7, but Branding.java itself was not changed for 4
>>> months.
>>>
>>> By the way, the same fragment idea works well with RCP, both from
>>> Eclipse and standalone after built.
>>>
>>> Is there something I am missing together with RAP and fragments? The
>>> fragments are checked in the launch configuration and resolved during
>>> runtime.
>>>
>>> Maybe someone could give me a little hint.
>>>
>>> Greetings,
>>> Marco
Re: RAP and fragments - e.g. used for branding [message #139708 is a reply to message #139697] Wed, 08 July 2009 10:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marco.waimer.uni-ulm.de

Hello Ralf,

thank you for the fast response. Getting the favicon works now with a patched
Branding.java. But I think I found another problem with fragments. I have a .png
image that should come from the fragment. Therefor I use
ImageDescriptor.createFromURL(MyClass.class.getResource("myImage.png ")).createImage();

The problem seems to be the background mechanism for binary files like images.
Those were copied to the Eclipse installation directory into
\workspace\.metadata\.plugins\org.eclipse.rap.ui\context\ in a folder
representing the bundle. And the URL representing the folder name, which was
created in SecureAction.getURL (via
ClasspathManager#findLocalResourceImpl#findResourceImpl) contains a ':' (since
the port is 2), which leads to problems on my Windows machine, when trying to
register the image (see stacktrace).

When I use Graphics.getImage("somePath",
MyClass.class.getResourceAsStream("myImage.png")) directly, there are no
problems. So I have a workaround for me, but I thought you should know that.

java.io.IOException: Could not create directory structure:
C:\MyEclipseDirectory\workspace\.metadata\.plugins\org.eclip se.rap.ui\context\250.fwk23328673:2\the\package\of\my\image
at
org.eclipse.rwt.internal.resources.ResourceManagerImpl.creat eFile(ResourceManagerImpl.java:444)
at
org.eclipse.rwt.internal.resources.ResourceManagerImpl.doReg ister(ResourceManagerImpl.java:427)
at
org.eclipse.rwt.internal.resources.ResourceManagerImpl.regis ter(ResourceManagerImpl.java:233)
at
org.eclipse.rap.ui.internal.servlet.ResourceManagerFactory$R esourceManagerWrapper.register(ResourceManagerFactory.java:1 30)
at
org.eclipse.swt.internal.graphics.ResourceFactory.createImag e(ResourceFactory.java:320)
at
org.eclipse.swt.internal.graphics.ResourceFactory.findImage( ResourceFactory.java:147)
at org.eclipse.rwt.graphics.Graphics.getImage(Graphics.java:130 )
at
org.eclipse.jface.resource.URLImageDescriptor.createImage(UR LImageDescriptor.java:124)
at org.eclipse.jface.resource.ImageDescriptor.createImage(Image Descriptor.java:222)
at org.eclipse.jface.resource.ImageDescriptor.createImage(Image Descriptor.java:200)
at MyClass.createControl(MyClass:123)

Marco

Ralf Sternberg schrieb:
> Ralf Sternberg wrote:
>> Rüdiger Herrmann wrote:
>>> did you try that with 1.3 final? Resolving the favIcon isn't done in the
>>> class Branding.
>> This does not work with current CVS. Filed bug 282744:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=282744
>
> It's fixed in CVS. Thanks for reporting this issue.
>
> Ralf
>
>> Ralf
>>
>>> Marco Waimer wrote:
>>>> Dear RAP developers!
>>>>
>>>> For an easier exchange of brandings, I want to use fragments. For
>>>> example the favicon.ico should come from the fragment. And there the
>>>> first problem already occurrs, a NullPointerException, since the
>>>> favicon is searched for in the host plugin (and not found).
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
>>>>
>>>> at
>>>> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
>>>> at
>>>> org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>>>>
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>>>>
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>> at
>>>> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
>>>>
>>>> at
>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
>>>> at
>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
>>>> at
>>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
>>>> at
>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
>>>> at
>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
>>>> at org.mortbay.jetty.Server.handle(Server.java:324)
>>>> at
>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
>>>> at
>>>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
>>>>
>>>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>>>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
>>>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
>>>> at
>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
>>>>
>>>> at
>>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)
>>>>
>>>>
>>>> I currently use M7, but Branding.java itself was not changed for 4
>>>> months.
>>>>
>>>> By the way, the same fragment idea works well with RCP, both from
>>>> Eclipse and standalone after built.
>>>>
>>>> Is there something I am missing together with RAP and fragments? The
>>>> fragments are checked in the launch configuration and resolved during
>>>> runtime.
>>>>
>>>> Maybe someone could give me a little hint.
>>>>
>>>> Greetings,
>>>> Marco
Re: RAP and fragments - e.g. used for branding [message #139720 is a reply to message #139708] Wed, 08 July 2009 10:33 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Marko,

there is already a bug about this issue:

282367: Exception on windows XP on creating images out of URL containing
"host:port"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282367

Best,
Ivan

Marco Waimer wrote:
> Hello Ralf,
>
> thank you for the fast response. Getting the favicon works now with a
> patched Branding.java. But I think I found another problem with
> fragments. I have a .png image that should come from the fragment.
> Therefor I use
> ImageDescriptor.createFromURL(MyClass.class.getResource("myImage.png ")).createImage();
>
>
> The problem seems to be the background mechanism for binary files like
> images. Those were copied to the Eclipse installation directory into
> \workspace\.metadata\.plugins\org.eclipse.rap.ui\context\ in a folder
> representing the bundle. And the URL representing the folder name,
> which was created in SecureAction.getURL (via
> ClasspathManager#findLocalResourceImpl#findResourceImpl) contains a
> ':' (since the port is 2), which leads to problems on my Windows
> machine, when trying to register the image (see stacktrace).
>
> When I use Graphics.getImage("somePath",
> MyClass.class.getResourceAsStream("myImage.png")) directly, there are
> no problems. So I have a workaround for me, but I thought you should
> know that.
>
> java.io.IOException: Could not create directory structure:
> C:\MyEclipseDirectory\workspace\.metadata\.plugins\org.eclip se.rap.ui\context\250.fwk23328673:2\the\package\of\my\image
>
> at
> org.eclipse.rwt.internal.resources.ResourceManagerImpl.creat eFile(ResourceManagerImpl.java:444)
>
> at
> org.eclipse.rwt.internal.resources.ResourceManagerImpl.doReg ister(ResourceManagerImpl.java:427)
>
> at
> org.eclipse.rwt.internal.resources.ResourceManagerImpl.regis ter(ResourceManagerImpl.java:233)
>
> at
> org.eclipse.rap.ui.internal.servlet.ResourceManagerFactory$R esourceManagerWrapper.register(ResourceManagerFactory.java:1 30)
>
> at
> org.eclipse.swt.internal.graphics.ResourceFactory.createImag e(ResourceFactory.java:320)
>
> at
> org.eclipse.swt.internal.graphics.ResourceFactory.findImage( ResourceFactory.java:147)
>
> at org.eclipse.rwt.graphics.Graphics.getImage(Graphics.java:130 )
> at
> org.eclipse.jface.resource.URLImageDescriptor.createImage(UR LImageDescriptor.java:124)
>
> at
> org.eclipse.jface.resource.ImageDescriptor.createImage(Image Descriptor.java:222)
>
> at
> org.eclipse.jface.resource.ImageDescriptor.createImage(Image Descriptor.java:200)
>
> at MyClass.createControl(MyClass:123)
>
> Marco
>
> Ralf Sternberg schrieb:
>> Ralf Sternberg wrote:
>>> Rüdiger Herrmann wrote:
>>>> did you try that with 1.3 final? Resolving the favIcon isn't done
>>>> in the
>>>> class Branding.
>>> This does not work with current CVS. Filed bug 282744:
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=282744
>>
>> It's fixed in CVS. Thanks for reporting this issue.
>>
>> Ralf
>>
>>> Ralf
>>>
>>>> Marco Waimer wrote:
>>>>> Dear RAP developers!
>>>>>
>>>>> For an easier exchange of brandings, I want to use fragments. For
>>>>> example the favicon.ico should come from the fragment. And there the
>>>>> first problem already occurrs, a NullPointerException, since the
>>>>> favicon is searched for in the host plugin (and not found).
>>>>>
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.rap.ui.internal.branding.Branding.registerResour ces(Branding.java:171)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.registerBrandingResources(LifeCycleServiceHandlerConf igurer.java:258)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.applyBranding(LifeCycleServiceHandlerConfigurer.java: 221)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConf igurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfi gurer.java:63)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.BrowserSurvey.renderScript( BrowserSurvey.java:89)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSu rvey(BrowserSurvey.java:50)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:197)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:185)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:150)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48 )
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:36)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:157)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:101)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:63)
>>>>>
>>>>> at
>>>>> org.eclipse.rap.ui.internal.servlet.RequestHandler.service(R equestHandler.java:51)
>>>>>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>>> at
>>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>>>>>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>>> at
>>>>> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:311)
>>>>>
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:502)
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:380)
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl er.java:181)
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl er.java:765)
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp er.java:152)
>>>>>
>>>>> at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>> at
>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio n.java:535)
>>>>>
>>>>> at
>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te(HttpConnection.java:865)
>>>>>
>>>>>
>>>>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>>>>> at
>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212)
>>>>> at
>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404)
>>>>> at
>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn dPoint.java:409)
>>>>>
>>>>>
>>>>> at
>>>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThr eadPool.java:520)
>>>>>
>>>>>
>>>>>
>>>>> I currently use M7, but Branding.java itself was not changed for 4
>>>>> months.
>>>>>
>>>>> By the way, the same fragment idea works well with RCP, both from
>>>>> Eclipse and standalone after built.
>>>>>
>>>>> Is there something I am missing together with RAP and fragments? The
>>>>> fragments are checked in the launch configuration and resolved during
>>>>> runtime.
>>>>>
>>>>> Maybe someone could give me a little hint.
>>>>>
>>>>> Greetings,
>>>>> Marco
Previous Topic:RAP design in e4
Next Topic:Single sourcing and RAP
Goto Forum:
  


Current Time: Thu Apr 25 04:05:49 GMT 2024

Powered by FUDForum. Page generated in 0.03129 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top