Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 1.3 application as WAR archive
RAP 1.3 application as WAR archive [message #508795] Wed, 20 January 2010 10:58 Go to next message
dumi  is currently offline dumi Friend
Messages: 5
Registered: January 2010
Junior Member
Hi guys

I'm quite new on this forum, so "Hi to all" Smile

I have a problem when I try to create a WAR archive for deploy it into a Tomcat/JBoss server (separate servlet container) with RAP 1.3.

In RAP 1.2 (Eclipse 3.4 Ganymede) I have created an archive with the following structure inside the WEB-INF folder:
1. eclipse (folder) with:
1.1 configuration, holding the config.ini file
1.2 plugins, having the following plugins: com.ibm.icu.base_4*, org.eclipse.core (commands*, contenttype*, databinding*, expressions*, jobs & runtime), org.eclipse.equinox (app, common, http*, preferences, registry), org.eclipse.osgi (core & services), org.eclipse.rap (jface*, rwt*, ui*) and my application as a jar. Also the org.eclipse.update.configurator bundle expanded.
1.3 launch.ini file

2. lib folder, having only the servletbridge.jar
3.web.xml, with mapping for the birdgeservlet with (/*) on my app context.

This archive was created with an Ant script, not with pdeExport (which doesn't work properly with RAP 1.3 and Eclipse 3.5)

Trying to create the same kind of archive with RAP 1.3 and Eclipse 3.5 Galileo (of course, with the proper version of the above bundles) fail to work when deployed under Tomcat 6, i.e. the link http://my_host:9090/my_context/rap?startup=my_app exited with:

BridgeServlet: resource /my_context/rap not found.

I have checked in the OSGi console inside Tomcat and all the bundles were active, except org.eclipse.equinox.http.servletbridge, which was RESOLVED.

I have tried all the tutorials for RAP deployment, but no results so far.

If someone succeeded in having a WAR file which works under a separate servlet container, can please give me a hint?

Regards,
Dumi
Re: RAP 1.3 application as WAR archive [message #508876 is a reply to message #508795] Wed, 20 January 2010 15:38 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
On 20.01.2010 11:58, dumi wrote:
> Hi guys
>
> I'm quite new on this forum, so "Hi to all" :)
Welcome Dumi :)

>
> I have a problem when I try to create a WAR archive for deploy it into a
> Tomcat/JBoss server (separate servlet container) with RAP 1.3.
>
> In RAP 1.2 (Eclipse 3.4 Ganymede) I have created an archive with the
> following structure inside the WEB-INF folder:
> 1. eclipse (folder) with:
> 1.1 configuration, holding the config.ini file
> 1.2 plugins, having the following plugins: com.ibm.icu.base_4*,
> org.eclipse.core (commands*, contenttype*, databinding*, expressions*,
> jobs & runtime), org.eclipse.equinox (app, common, http*, preferences,
> registry), org.eclipse.osgi (core & services), org.eclipse.rap (jface*,
> rwt*, ui*) and my application as a jar. Also the
> org.eclipse.update.configurator bundle expanded.
> 1.3 launch.ini file
>
> 2. lib folder, having only the servletbridge.jar
> 3.web.xml, with mapping for the birdgeservlet with (/*) on my app context.
>
> This archive was created with an Ant script, not with pdeExport (which
> doesn't work properly with RAP 1.3 and Eclipse 3.5)
The deployment tutorial that comes with the latest RAP tooling (e.g. 1.3
M4) works for me.
What exactly are the problems you are experiencing?

>
> Trying to create the same kind of archive with RAP 1.3 and Eclipse 3.5
> Galileo (of course, with the proper version of the above bundles) fail
> to work when deployed under Tomcat 6, i.e. the link
> http://my_host:9090/my_context/rap?startup=my_app exited with:
>
> BridgeServlet: resource /my_context/rap not found.
>
> I have checked in the OSGi console inside Tomcat and all the bundles
> were active, except org.eclipse.equinox.http.servletbridge, which was
> RESOLVED.
If I'm not mistaken, this is a fragment and therefore being in RESOLVED
state is ok.

>
> I have tried all the tutorials for RAP deployment, but no results so far.
Can you find the extensionbundle when typing ss?
Did you check the FAQ (http://wiki.eclipse.org/RAP/FAQ)?
Do you see any exceptions when configuring the -consolelog commandline
in the web.xml?

>
> If someone succeeded in having a WAR file which works under a separate
> servlet container, can please give me a hint?
>
> Regards,
> Dumi


--
Rüdiger Herrmann
http://eclipsesource.com
Re: RAP 1.3 application as WAR archive [message #509023 is a reply to message #508876] Thu, 21 January 2010 08:19 Go to previous messageGo to next message
dumi  is currently offline dumi Friend
Messages: 5
Registered: January 2010
Junior Member
Hi Rüdiger

Thank you for your reply.

> The deployment tutorial that comes with the latest RAP tooling (e.g. 1.3
> M4) works for me.
> What exactly are the problems you are experiencing?

First of not all the required bundles are exported using pde.export. For example the
or.eclipse.rap.equinox.registry is not exported as expanded bundle. Then the org.eclipse.equinox.servletbridge.extensionbundle is not present.

I have removed manually the org.eclise.update.configurator * and javax.servlet bundles.

Btw: do you use Eclipse 3.6 ?


> If I'm not mistaken, this is a fragment and therefore being in RESOLVED
> state is ok.

Great then.

> Can you find the extensionbundle when typing ss?

Nope. But I add it manually.

>Did you check the FAQ (http://wiki.eclipse.org/RAP/FAQ)?

Yes. This was the first thing I did.
Anyway, last evening I dropped all off and started with rapdemo.war I found there and i inserted my jar file in it. Also completed the config.ini file with my.plugin.id@start.
It started, but I have some problems when trying to write some attributes into the session store object:


14:19:36,914 ERROR [[equinoxbridgeservlet]] Servlet.service() for servlet equinoxbridgeservlet threw exception
java.lang.NoSuchMethodError: org.eclipse.rwt.service.ISessionStore.setAttribute(Ljava/lan g/String;Ljava/lang/Object;)V

The jars/bundles shipped with rapdemo.war seems to be from Eclipse 3.6 (together with a newer version of RAP 1.3 M4 tooling/runtime), so maybe this could be the reason, but it shouldn't.

I have checked out the latest CVS sources for org.eclipse.rwt.service.ISessionStore and this method was there.

This is really confusing for me Sad


>Do you see any exceptions when configuring the -consolelog commandline
> in the web.xml?

Only the error above.

regards,
Dumi
Re: RAP 1.3 application as WAR archive [message #509078 is a reply to message #509023] Thu, 21 January 2010 10:58 Go to previous messageGo to next message
dumi  is currently offline dumi Friend
Messages: 5
Registered: January 2010
Junior Member
Finally I got it working.

Here are the plugins/jars for having a RAP 1.3M4 & Eclipse 3.5 Galileo application running with JBoss 4.2.3 GA

1. In the WEB-INF/eclipse/configuration folder: only the config.ini file, with all the bundles from archive marked with ...@start, including yours. You can have it as model from http://rap.eclipsesource.com/download/rapdemo.war, is a good start.

2. In the WEB-INF/eclipse/plugins folder:
- org.eclipse.rap.equinox.registry_1.3.0* fragment unpacked
- com.ibm.icu.base_4.0.1
- org.eclipse.core (commands_3.5.0*, contenttype_3.4.100*, expressions_3.4.100*, jobs_3.5.0*, runtime_3.6.0*)
- org.eclipse.core.databinding (beans_1.2.0*, observable_1.3.0*, property_1.2.100*, org.eclipse.core.databinding_1.3.0)
- org.eclipse.equinox (app_1.2.100*, common_3.6.0*, preferences_3.3.0, registry_3.5.0)
- org.eclipse.equinox.http (registry_1.0.2, servlet_1.1.0, servletbridge_1.0.200)
- org.eclipse.help_3.5.0
- org.eclipse.osgi_3.6.0, org.eclipse.osgi.services_3.2.0
- org.eclipse.rap.jface_1.3.0
- org.eclipse.rap.jface.databinding_1.3.0
- org.eclipse.rap.rwt_1.3.0 & q07_1.3.0
- org.eclipse.rap.ui.views, worbench & forms (I used FormEditor) version 1.3.0
- my_plugin

.. and launch.ini

3. In the WEB-INF/lib folder: org.eclipse.equiox.servletbridge_1.2.0

.. web.xml

I rebuilt my WAR starting from the rapdemo.war example, I still don't know why my plugin threw that NoSuchMethodError when used with rapdemo.war

dumi
Re: RAP 1.3 application as WAR archive [message #509083 is a reply to message #509023] Thu, 21 January 2010 10:49 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
On 21.01.2010 09:19, dumi wrote:
> Hi Rüdiger
>
> Thank you for your reply.
>
>> The deployment tutorial that comes with the latest RAP tooling (e.g. 1.3
>> M4) works for me.
>> What exactly are the problems you are experiencing?
>
> First of not all the required bundles are exported using pde.export. For
> example the or.eclipse.rap.equinox.registry is not exported as expanded
> bundle. Then the org.eclipse.equinox.servletbridge.extensionbundle is
> not present.
Regarding the o.e.rap.equinox.registry bundle: this isn't exported at
all if you follow the tutorial (deploy the o.e.rap.demo.feature). This
fragment was used for internationalization in RAP 1.2 and was never part
of the tutorial. Moreover it will become obsolete in 1.3M5.
The extensionbundle is generated by the servletbridge and must not be
present at deploy-time, except that is has to be listed in the
config.ini. The ConfigIniCreator does that for you.
Please make sure that you understand the underlying technologies
(Equinox in a servlet container and the ServletBridge). The tutorial has
links to the relevant meterial.

>
> I have removed manually the org.eclise.update.configurator * and
> javax.servlet bundles.
There shouldn't be an o.e.update.configurator bundle. Are you using
o.e.rap.demo.feature from CVS HEAD?

>
> Btw: do you use Eclipse 3.6 ?
I am using Eclipse 3.5

>
>
>> If I'm not mistaken, this is a fragment and therefore being in RESOLVED
>> state is ok.
>
> Great then.
>
>> Can you find the extensionbundle when typing ss?
>
> Nope. But I add it manually.
>
>> Did you check the FAQ (http://wiki.eclipse.org/RAP/FAQ)?
>
> Yes. This was the first thing I did.
> Anyway, last evening I dropped all off and started with rapdemo.war I
> found there and i inserted my jar file in it. Also completed the
> config.ini file with mailto:my.plugin.id@start.
I assume, the "mailto:" is a typo...

> It started, but I have some problems when trying to write some
> attributes into the session store object:
The rapdemo.war contains version 1.3-2009-12-17, so your code must also
compile againts this version. This is probably the reason for the
exception below.

>
>
> 14:19:36,914 ERROR [[equinoxbridgeservlet]] Servlet.service() for
> servlet equinoxbridgeservlet threw exception
> java.lang.NoSuchMethodError:
> org.eclipse.rwt.service.ISessionStore.setAttribute(Ljava/lan
> g/String;Ljava/lang/Object;)V
>
> The jars/bundles shipped with rapdemo.war seems to be from Eclipse 3.6
> (together with a newer version of RAP 1.3 M4 tooling/runtime), so maybe
> this could be the reason, but it shouldn't.
>
> I have checked out the latest CVS sources for
> org.eclipse.rwt.service.ISessionStore and this method was there.
Does your code compilie against RAP from CVS HEAD?

>
> This is really confusing for me :(
>
>
>> Do you see any exceptions when configuring the -consolelog commandline
>> in the web.xml?
>
> Only the error above.
>
> regards,
> Dumi
Re: RAP 1.3 application as WAR archive [message #509136 is a reply to message #509083] Thu, 21 January 2010 13:37 Go to previous messageGo to next message
dumi  is currently offline dumi Friend
Messages: 5
Registered: January 2010
Junior Member
Hi

> Regarding the o.e.rap.equinox.registry bundle: this isn't exported at
> all if you follow the tutorial (deploy the o.e.rap.demo.feature).
> This fragment was used for internationalization in RAP 1.2 and was never part
> of the tutorial.

Then I suppose that the rapdemo.war is not created with that tutorial, because this one is there, and this war contains in the actual form the latest RAP 1.3 build (2009-12-17).

> Moreover it will become obsolete in 1.3M5.

OK

> The extensionbundle is generated by the servletbridge and must not be
> present at deploy-time, except that is has to be listed in the
> config.ini. The ConfigIniCreator does that for you.

I took the org.eclipse.rap.demo.feature project from CVS and still it didn't wok for me, the pde.Export task crashed with the error that it couldn't find the org.eclipse.help plugin, although I found on the forums that is not needed for 1.3M4.

Neither the help plugin is installed when downloading and creating the target platform through update site http://download.eclipse.org/rt/rap/1.3/runtime, so this is one of the reasons the export feature didn't succeed on my local machine.

> There shouldn't be an o.e.update.configurator bundle. Are you using
> o.e.rap.demo.feature from CVS HEAD?

Yep, as stated above.

In these conditions (and because I was lacking time) I decided to use an Ant task that created the WAR archive starting from rapdemo.war

I'll investigate more my configuration and I'll come back with news, maybe someone else has the same problems.

> The rapdemo.war contains version 1.3-2009-12-17, so your code must also
> compile againts this version. This is probably the reason for the
> exception below.

So i guess that method is also in this version, since i had a look on the CVS repository and ISessionStore still had it. Smile

>Does your code compilie against RAP from CVS HEAD?

I didn't try that, because I imagine you're still working on it. I just tried on only on releases you announce on the eclipse.org/rap page

dumi
Re: RAP 1.3 application as WAR archive [message #509372 is a reply to message #509136] Fri, 22 January 2010 09:17 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
On 21.01.2010 14:37, dumi wrote:
> Hi
>
>> Regarding the o.e.rap.equinox.registry bundle: this isn't exported at
>> all if you follow the tutorial (deploy the o.e.rap.demo.feature). This
>> fragment was used for internationalization in RAP 1.2 and was never part
>> of the tutorial.
>
> Then I suppose that the rapdemo.war is not created with that tutorial,
> because this one is there, and this war contains in the actual form the
> latest RAP 1.3 build (2009-12-17).
The o.e.rap.demo.feature is inteded to be used with the tutorial and as
a template/starting point for your own deployments.
The rapdemo.war is not the same as the demo.feature. It is "based" on
the demo.feature but as it comes with the RAP demo applications that
also showcase internationalization, it has a dependency on
o.e.rap.equinox.registry.

>
>> Moreover it will become obsolete in 1.3M5.
>
> OK
>
>> The extensionbundle is generated by the servletbridge and must not be
>> present at deploy-time, except that is has to be listed in the
>> config.ini. The ConfigIniCreator does that for you.
>
> I took the org.eclipse.rap.demo.feature project from CVS and still it
> didn't wok for me, the pde.Export task crashed with the error that it
> couldn't find the org.eclipse.help plugin, although I found on the
> forums that is not needed for 1.3M4.
>
> Neither the help plugin is installed when downloading and creating the
> target platform through update site
> http://download.eclipse.org/rt/rap/1.3/runtime, so this is one of the
> reasons the export feature didn't succeed on my local machine.
I just installed from the URL mentioned above and it contains the
necessary o.e.help bundle (and even o.e.help.source;). The version I
selected was RAP Runtime SDK 1.3.0.20091214.
Which version did you use?

>
>> There shouldn't be an o.e.update.configurator bundle. Are you using
>> o.e.rap.demo.feature from CVS HEAD?
>
> Yep, as stated above.
And it did reference the o.e.update.configurator bundle from
feature.xml? That is strange...

>
> In these conditions (and because I was lacking time) I decided to use an
> Ant task that created the WAR archive starting from rapdemo.war
>
> I'll investigate more my configuration and I'll come back with news,
> maybe someone else has the same problems.
Thanks therefore.

>
>> The rapdemo.war contains version 1.3-2009-12-17, so your code must also
>> compile againts this version. This is probably the reason for the
>> exception below.
>
> So i guess that method is also in this version, since i had a look on
> the CVS repository and ISessionStore still had it. :)
>
>> Does your code compilie against RAP from CVS HEAD?
>
> I didn't try that, because I imagine you're still working on it. I just
> tried on only on releases you announce on the eclipse.org/rap page
You can safely develop against HEAD. We only commit complete
features/fixes to CVS, though naturally they aren't as stable as
milestone builds.

However if you prefer to work against milestones that will will also
work. The above stated is also valid for the 1.3 M4 milestone.

>
> dumi


--
Rüdiger Herrmann
http://eclipsesource.com
Previous Topic:Plugin version
Next Topic:problem with firefox 3.5.7
Goto Forum:
  


Current Time: Wed Dec 01 22:20:21 GMT 2021

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

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

Back to the top