Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Equinox WebStart
Equinox WebStart [message #76969] Tue, 14 November 2006 00:22 Go to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Hi I have writen an Equinox based application composed of around 20 bundles.
I now want to start it using WebStart but I am not quite sure how to go
about it.
I have not been able to find any documentation on this and am not sure if it
is possible. My bundles are generic (ie not equinox specific bundles).
Currently the
application is started using the standard java -jar
plugins/org.eclipse.osgi_3.2.0.v20060601.jar

The problems I think I will have are these.
Currently the app looks for the configuration file in plugins/configuration
directory. How can a webstarted application get hold of the configuration
since everything has
to be jarred up?
What would I need to specify in the jnpl file (ie how are the other bundles
specified)

Anyway tomorrow I will give it a try, but I was wondering if someone has
already done this and could shed some light.

Thanks,
Hani
Re: Equinox WebStart [message #76982 is a reply to message #76969] Tue, 14 November 2006 01:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Ok I made some head way I think.
I followed the instructions found here:
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/java_web_start.htm

When I tried to run it, the application seems to be downloaded properly but
I get a runtime exception below is what my log looks lile:

!SESSION Tue Nov 14 01:36:38 GMT
2006 ------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 2006-11-14 01:36:38.609
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at org.eclipse.core.launcher.WebStartMain.basicRun(WebStartMain .java:58)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.WebStartMain.main(WebStartMain.jav a:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Any ideas?

Thanks,
Hani





"Hani Naguib" <hani@naguib.info> wrote in message
news:ejb27e$ss8$1@utils.eclipse.org...
> Hi I have writen an Equinox based application composed of around 20
> bundles. I now want to start it using WebStart but I am not quite sure how
> to go about it.
> I have not been able to find any documentation on this and am not sure if
> it is possible. My bundles are generic (ie not equinox specific bundles).
> Currently the
> application is started using the standard java -jar
> plugins/org.eclipse.osgi_3.2.0.v20060601.jar
>
> The problems I think I will have are these.
> Currently the app looks for the configuration file in
> plugins/configuration directory. How can a webstarted application get hold
> of the configuration since everything has
> to be jarred up?
> What would I need to specify in the jnpl file (ie how are the other
> bundles specified)
>
> Anyway tomorrow I will give it a try, but I was wondering if someone has
> already done this and could shed some light.
>
> Thanks,
> Hani
>
Re: Equinox WebStart [message #76993 is a reply to message #76982] Tue, 14 November 2006 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Most likely, it's a missing system property, like osgi.ws or osgi.arch, that's causing the NPE. However, it really shouldn't result in an NPE if this is happening; you may want to consider filing a bug report. However, it might also be due to a duff entry in your JNLP file.

Alex.
Re: Equinox WebStart [message #77002 is a reply to message #76993] Tue, 14 November 2006 08:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Hi Alex, thanks for your reply. Where am I supposed to specify the
properties you mentioned?
I think I am probably doing something wrong. Here are my jnlp files

/mymedia.jnlp
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+" codebase="http://192.168.2.6:8080/mymedia"
href="mymedia.jnlp">

<information >

<vendor>XXX</vendor>

<title>MyMedia Client Application</title>

<homepage href="http://www.xxx.com" />

<description>This is the mymedia client</description>

<icon kind="splash" href="splash.png"/>

</information>


<!--request all permissions from the application. This does not change-->

<security>

<all-permissions/>

</security>


<!-- The name of the main class to execute. This does not change-->

<application-desc main-class="org.eclipse.core.launcher.WebStartMain">

<argument>-nosplash</argument>

</application-desc>


<resources>

<jar href="startup.jar"/>

<extension

name="Mymedia_feature Feature"

href="features/mymedia_feature_1.0.0.jnlp"/>

<property

name="osgi.instance.area"

value="/Temp"/>

<property

name="osgi.configuration.area"

value="/Temp"/>

<property

name="eclipse.product"

value="mymedia_feature"/>

</resources>


<resources os="Mac">

<j2se version="1.5+" java-vm-args="-XstartOnFirstThread"/>

</resources>

<resources os="Windows">

<j2se version="1.4+"/>

</resources>

<resources os="Linux">

<j2se version="1.4+"/>

</resources>

</jnlp>

---------------------------------
/features/mymedia_feature_1.0.0.jnlp
-------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+" codebase="http://192.168.2.6:8080/mymedia">

<information>

<title>Mymedia_feature Feature</title>

<vendor>XXX</vendor>

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<component-desc/>

<resources>

<j2se version="1.4+" />

</resources>

<resources>

<jar href="plugins/itunes_1.0.0.jar"/>

<jar href="plugins/jmdns_1.0.0.jar"/>

<jar href="plugins/kxml2_2.3.0.jar"/>

<jar href="plugins/mymedia_1.0.0.jar"/>

<jar href="plugins/mymedia_itunes2upnp_1.0.0.jar"/>

<jar href="plugins/mymedia_jzplayer_1.0.0.jar"/>

<jar href="plugins/mymedia_remoting_1.0.0.jar"/>

<jar href="plugins/mymedia_source_1.0.0.jar"/>

<jar href="plugins/mymedia_ui_1.0.0.jar"/>

<jar href="plugins/mymedia_upnp_1.0.0.jar"/>

<jar href="plugins/org.eclipse.equinox.http_1.0.0.v20060601a.jar "/>

<jar href=" plugins/org.eclipse.equinox.servlet.api_1.0.0.200608110849.j ar "/>

<jar href="plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"/>

<jar href="plugins/org.eclipse.osgi.services_3.1.100.v20060601.jar "/>

<jar href="plugins/commons_beanutils_1.7.0.jar"/>

<jar href="plugins/commons_logging_1.0.3.jar"/>

<jar href="plugins/cyberlink_1.0.0.jar"/>

<jar href="plugins/xxx_streamingserver_1.0.0.jar"/>

<jar href="plugins/xxx_util_1.0.0.jar"/>

</resources>

</jnlp>




"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:7684659.1163491891330.JavaMail.root@cp1.javalobby.org...
> Most likely, it's a missing system property, like osgi.ws or osgi.arch,
> that's causing the NPE. However, it really shouldn't result in an NPE if
> this is happening; you may want to consider filing a bug report. However,
> it might also be due to a duff entry in your JNLP file.
>
> Alex.
Re: Equinox WebStart [message #77010 is a reply to message #77002] Tue, 14 November 2006 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Unfortunately, the files don't come out well in the EclipseZone system:

http://www.eclipsezone.com/forums/post!reply.jspa?messageID= 92061655#reply3

Surrounding the XML with (xml) and (/xml) -- except change round brackets for square brackets -- will tell it to ignore XML markup. Or, I can wait until the newsgroup archive catches up no the web.

Alex.
Re: Equinox WebStart [message #77017 is a reply to message #77010] Tue, 14 November 2006 09:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

/mymedia.jnlp


<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+" codebase="http://192.168.2.6:8080/mymedia"
href="mymedia.jnlp">

<information >

<vendor>XXX</vendor>

<title>MyMedia Client Application</title>

<homepage href="http://www.xxx.com" />

<description>This is the mymedia client</description>

<icon kind="splash" href="splash.png"/>

</information>


<!--request all permissions from the application. This does not change-->

<security>

<all-permissions/>

</security>


<!-- The name of the main class to execute. This does not change-->

<application-desc main-class="org.eclipse.core.launcher.WebStartMain">

<argument>-nosplash</argument>

</application-desc>


<resources>

<jar href="startup.jar"/>

<extension

name="Mymedia_feature Feature"

href="features/mymedia_feature_1.0.0.jnlp"/>

<property

name="osgi.instance.area"

value="/Temp"/>

<property

name="osgi.configuration.area"

value="/Temp"/>

<property

name="eclipse.product"

value="mymedia_feature"/>

</resources>


<resources os="Mac">

<j2se version="1.5+" java-vm-args="-XstartOnFirstThread"/>

</resources>

<resources os="Windows">

<j2se version="1.4+"/>

</resources>

<resources os="Linux">

<j2se version="1.4+"/>

</resources>

</jnlp>

[/xml]

----------------------------------

/features/mymedia_feature_1.0.0.jnlp



<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+" codebase="http://192.168.2.6:8080/mymedia">

<information>

<title>Mymedia_feature Feature</title>

<vendor>XXX</vendor>

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<component-desc/>

<resources>

<j2se version="1.4+" />

</resources>

<resources>

<jar href="plugins/itunes_1.0.0.jar"/>

<jar href="plugins/jmdns_1.0.0.jar"/>

<jar href="plugins/kxml2_2.3.0.jar"/>

<jar href="plugins/mymedia_1.0.0.jar"/>

<jar href="plugins/mymedia_itunes2upnp_1.0.0.jar"/>

<jar href="plugins/mymedia_jzplayer_1.0.0.jar"/>

<jar href="plugins/mymedia_remoting_1.0.0.jar"/>

<jar href="plugins/mymedia_source_1.0.0.jar"/>

<jar href="plugins/mymedia_ui_1.0.0.jar"/>

<jar href="plugins/mymedia_upnp_1.0.0.jar"/>

<jar href="plugins/org.eclipse.equinox.http_1.0.0.v20060601a.jar "/>

<jar href=" plugins/org.eclipse.equinox.servlet.api_1.0.0.200608110849.j ar "/>

<jar href="plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"/>

<jar href="plugins/org.eclipse.osgi.services_3.1.100.v20060601.jar "/>

<jar href="plugins/commons_beanutils_1.7.0.jar"/>

<jar href="plugins/commons_logging_1.0.3.jar"/>

<jar href="plugins/cyberlink_1.0.0.jar"/>

<jar href="plugins/xxx_streamingserver_1.0.0.jar"/>

<jar href="plugins/xxx_util_1.0.0.jar"/>

</resources>

</jnlp>


[/xml]

"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:26125612.1163495188312.JavaMail.root@cp1.javalobby.org...
> Unfortunately, the files don't come out well in the EclipseZone system:
>
> http://www.eclipsezone.com/forums/post!reply.jspa?messageID= 92061655#reply3
>
> Surrounding the XML with (xml) and (/xml) -- except change round brackets
> for square brackets -- will tell it to ignore XML markup. Or, I can wait
> until the newsgroup archive catches up no the web.
>
> Alex.
Re: Equinox WebStart [message #77105 is a reply to message #77017] Tue, 14 November 2006 15:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Looking at the <a href=" http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.platfor m/src/org/eclipse/core/launcher/WebStartMain.java?rev=HEAD&a mp;only_with_tag=R3_2_1&content-type=text/vnd.viewcvs-ma rkup">source code</a>, it looks like it's failing to find the osgi.framework:

//Set the fwk location since the regular lookup would not find it
String fwkURL = searchFor(framework, null);
System.getProperties().put(PROP_FRAMEWORK, fwkURL);


I seem to recall a bug raised not so long ago about the new name for the OSGi bundle causing problems:

... href="plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"

because there were two _ in the title. Can you try renaming this to plugins/org.eclipse.osgi_3.2.1.v20060919.jar, and see if that fixes the problem? You should also check that it's been downloaded OK in the Java WebStart cache (which I think is in .javaws in your home directory, but I could be wrong)

Alex.
Re: Equinox WebStart [message #77144 is a reply to message #77105] Wed, 15 November 2006 00:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Hi Alex, that seems to have helped although renaming it caused the export
feature to fail, so I went back to an
older version of eclipse (still 3.2 but a little older). I would never have
figured that one out thanks alot.

Now the application downloads and starts but nothing happens and it exists
without leaving any logs (either in the
instance area nor under java webstart ).

Unfortunately my own bundles have underscores in there names, tomorrow I
will remove those and see if that helps.

One thing I would like to make sure is that it is in fact possible to run
osgi based applications through webstart?
My application is a set of 'generic' bundles and not specific to equinox, I
use equinox because I develop on Eclipse
but they can also be run on knoperfish for example.
Has anyone in this forum done this?

Also from what I gather the information which is normally stored in my
config.ini is moved into my jnpl file.
Specifically I define 'osgi.bundles' and 'eclipse.ignoreApp' properties with
the same values I have in my config.ini.
It also seems like I need to define 'eclipse.product' setting it to the name
of my wrapping feature id.

Thanks,
Hani



"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:29158246.1163516694479.JavaMail.root@cp1.javalobby.org...
> Looking at the <a
> href=" http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.platfor m/src/org/eclipse/core/launcher/WebStartMain.java?rev=HEAD&a mp;only_with_tag=R3_2_1&content-type=text/vnd.viewcvs-ma rkup">source
> code</a>, it looks like it's failing to find the osgi.framework:
>
>
> //Set the fwk location since the regular lookup would not find it
> String fwkURL = searchFor(framework, null);
> System.getProperties().put(PROP_FRAMEWORK, fwkURL);
> 

>
> I seem to recall a bug raised not so long ago about the new name for the
> OSGi bundle causing problems:
>
> ... href="plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"
>
> because there were two _ in the title. Can you try renaming this to
> plugins/org.eclipse.osgi_3.2.1.v20060919.jar, and see if that fixes the
> problem? You should also check that it's been downloaded OK in the Java
> WebStart cache (which I think is in .javaws in your home directory, but I
> could be wrong)
>
> Alex.
Re: Equinox WebStart [message #77160 is a reply to message #77144] Wed, 15 November 2006 00:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Seems like my current problem is related to this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=163312


"Hani Naguib" <hani@naguib.info> wrote in message
news:ejdmiv$hom$1@utils.eclipse.org...
> Hi Alex, that seems to have helped although renaming it caused the export
> feature to fail, so I went back to an
> older version of eclipse (still 3.2 but a little older). I would never
> have figured that one out thanks alot.
>
> Now the application downloads and starts but nothing happens and it exists
> without leaving any logs (either in the
> instance area nor under java webstart ).
>
> Unfortunately my own bundles have underscores in there names, tomorrow I
> will remove those and see if that helps.
>
> One thing I would like to make sure is that it is in fact possible to run
> osgi based applications through webstart?
> My application is a set of 'generic' bundles and not specific to equinox,
> I use equinox because I develop on Eclipse
> but they can also be run on knoperfish for example.
> Has anyone in this forum done this?
>
> Also from what I gather the information which is normally stored in my
> config.ini is moved into my jnpl file.
> Specifically I define 'osgi.bundles' and 'eclipse.ignoreApp' properties
> with the same values I have in my config.ini.
> It also seems like I need to define 'eclipse.product' setting it to the
> name of my wrapping feature id.
>
> Thanks,
> Hani
>
>
>
> "Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
> news:29158246.1163516694479.JavaMail.root@cp1.javalobby.org...
>> Looking at the <a
>> href=" http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.platfor m/src/org/eclipse/core/launcher/WebStartMain.java?rev=HEAD&a mp;only_with_tag=R3_2_1&content-type=text/vnd.viewcvs-ma rkup">source
>> code</a>, it looks like it's failing to find the osgi.framework:
>>
>>
>> //Set the fwk location since the regular lookup would not find it
>> String fwkURL = searchFor(framework, null);
>> System.getProperties().put(PROP_FRAMEWORK, fwkURL);
>> 

>>
>> I seem to recall a bug raised not so long ago about the new name for the
>> OSGi bundle causing problems:
>>
>> ... href="plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"
>>
>> because there were two _ in the title. Can you try renaming this to
>> plugins/org.eclipse.osgi_3.2.1.v20060919.jar, and see if that fixes the
>> problem? You should also check that it's been downloaded OK in the Java
>> WebStart cache (which I think is in .javaws in your home directory, but I
>> could be wrong)
>>
>> Alex.
>
>
Re: Equinox WebStart [message #77256 is a reply to message #77160] Wed, 15 November 2006 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Does it? That's a problem when specifying the -noExit flag, which you're not using. Did you try changing the name of the OSGi Jar?

Alex.
Re: Equinox WebStart [message #77272 is a reply to message #77256] Wed, 15 November 2006 14:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Hi Alex, I do think I need the -noExit flag.
By using a slightly older version of eclipse (ie where the
org.eclipse.osgi...jar file did not have 2 underscores in its name)
my initial problem disappeared.
Now what happens is that the application is downloaded correctly (ie all the
appropriate jars can be found under the webstart cache)
but nothing happens when I run the application. It is as if it is not being
run or the laucher is exiting before starting my application.

To make sure it had nothing to do with my bundle names I created a test
bundle, all this has is an activator whose start method
simply pops up a JDialogPane.

I then created a feature project and added my test bundle as well as the
org.eclipse.osgi bundle to it. It all seems to download but
nothing is run.

Perhaps I am not specifying something.
Inside the main jnlp file I specify the following properties
<property name="osgi.bundles" value="mediatest_1.0.0.jar" /> (my test
bundle)
<property name="eclipse.ignoreApp" value="true" />
aswell as osgi.instance.area and osgi.configuration.area

Do I need to specify eclipse.product and if so to what?


Thanks for all the help,
Hani

"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:13170110.1163582442962.JavaMail.root@cp1.javalobby.org...
> Does it? That's a problem when specifying the -noExit flag, which you're
> not using. Did you try changing the name of the OSGi Jar?
>
> Alex.
Re: Equinox WebStart [message #77287 is a reply to message #77272] Wed, 15 November 2006 17:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

> By using a slightly older version of eclipse (ie where the
> org.eclipse.osgi...jar file did not have 2 underscores in its
> name) my initial problem disappeared.

Yes, I thought it would, that's why I suggested it. Thanks for letting me (and others) know though.

You were specifying the name of the product in the properties already. It should be the same one that you have in the .product file, if you're using products to customise your eclipse runtime. If not, you might need to pass "-application" and "com.example.application.id" as arguments in via the JNLP.

Alex.
Re: Equinox WebStart [message #77333 is a reply to message #77287] Thu, 16 November 2006 14:29 Go to previous message
Eclipse UserFriend
Originally posted by: hani.naguib.info

Hi Alex,

Thanks for all the help, I have not managed to get my osgi application
started and will need to
revisit this at some later time since I can't afford to spend too much time
on it right now.

Although all the jar files get downloaded properly my test bundle does not
get started, I am not
sure why. As for product id's and application ids, I think those relate to
RCP applications mine is
not an RCP application it is an OSGI application there is no notion of
product id etc.

I will reply to this thread if I ever do get it going but for now I need to
move on to something else.

Thanks for all the help.

Hani


"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:28834907.1163613510137.JavaMail.root@cp1.javalobby.org...
>> By using a slightly older version of eclipse (ie where the
>> org.eclipse.osgi...jar file did not have 2 underscores in its
>> name) my initial problem disappeared.
>
> Yes, I thought it would, that's why I suggested it. Thanks for letting me
> (and others) know though.
>
> You were specifying the name of the product in the properties already. It
> should be the same one that you have in the .product file, if you're using
> products to customise your eclipse runtime. If not, you might need to pass
> "-application" and "com.example.application.id" as arguments in via the
> JNLP.
>
> Alex.
Previous Topic:configure server osgi to run on different port
Next Topic:org.eclipse.equinox.http.* and 3.3M3
Goto Forum:
  


Current Time: Fri Apr 26 23:17:20 GMT 2024

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

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

Back to the top