Java Web Start


C

carmelo

Hi everybody,
I need to run a Java app using Java Web Start.

I'm using the following launch.jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080/webstart/DesktopApplication_db/"
href="launch.jnlp">
<information>
<title>Database Application Example</title>
<vendor>Sun Microsystems Inc.</vendor>
</information>

<resources>
<jar href="DesktopApplication_db.jar" main="true"/>
<jar href="lib/appframework-1.0.3.jar"/>
<jar href="lib/swing-worker-1.1.jar"/>
<jar href="lib/beansbinding-1.2.1.jar"/>
<jar href="lib/toplink-essentials.jar"/>
<jar href="lib/toplink-essentials-agent.jar"/>
<jar href="lib/mysql-connector-java-5.1.6-bin.jar"/>
</resources>

<application-desc main-
class="desktopapplication_db.DesktopApplication_db">

</application-desc>
</jnlp>


Java Web Start seems to run, but my application is not showed.
Checking on Task Manager I saw that for each try I did there is a
javaw.exe process...

How can I do?


Thank you very much in advance for your help
 
Ad

Advertisements

C

carmelo

seehttp://mindprod.com/jgloss/javawebstart.htmlfor hints.
--
Roedy Green Canadian Mind Productshttp://mindprod.com

"Don’t worry about the world coming to an end today.
 It is already tomorrow in Australia."
~ Charles Schulz

Reading the Java console I read this error:

SEVERE: Application class desktopapplication_db.DesktopApplication_db
failed to launch.
javax.persistence.PersistenceException: No resource files named META-
INF/services/javax.persistence.spi.PersistenceProvider were found.
Please make sure that the persistence provider jar file is in your
classpath.

Do you know how can I solve it?


Thank you very much in advance for your help
 
R

Roedy Green

Do you know how can I solve it?

I repeat: follow the instructions at
http://mindprod.com/jgloss/javawebstart.html

to make sure JWS is installed properly and you can run some of my JWS
apps such as http://mindprod.com/webstart/setclock.html

That gets the complication of your app being malformed out of the
equation.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Danish studies of 10,000 birds killed revealed that almost all died in
collisions with buildings, cars and wires; only 10 were killed by windmills.
Alternative energy sources are absolutely necessary.
Global warming will kill birds and bats, as well as other species,
in much greater numbers than wind power."
~ Dr. David Suzuki
 
A

Andrew Thompson

I need to run a Java app using Java Web Start.

I'm using the following launch.jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080/webstart/DesktopApplication_db/"
href="launch.jnlp">
    <information>
        <title>Database Application Example</title>
        <vendor>Sun Microsystems Inc.</vendor>
    </information>

    <resources>
        <jar href="DesktopApplication_db.jar" main="true"/>
        <jar href="lib/appframework-1.0.3.jar"/>
        <jar href="lib/swing-worker-1.1.jar"/>
        <jar href="lib/beansbinding-1.2.1.jar"/>
        <jar href="lib/toplink-essentials.jar"/>
        <jar href="lib/toplink-essentials-agent.jar"/>
        <jar href="lib/mysql-connector-java-5.1.6-bin.jar"/>
    </resources>

    <application-desc main-
class="desktopapplication_db.DesktopApplication_db">

    </application-desc>
</jnlp>

That launch file appears invalid. It is probably not
the source of the immediate problem, but to be sure it
will work, it is best to validate it.

Try using JaNeLA* to identify the problems.

* <http://pscode.org/janela/>

As to the error you quoted later, it seems that
whatever .jar that SPI file is supposed to be
in, is not on the application's classpath.

JaNeLA will also warn of any resources mentioned
in the launch file, that are not found.
 
R

Roedy Green


I think there is a bug here. I tried feeding it an URL

http://mindprod.com/webstart/setclock.jnlp

It dies saying

sun.net.www.protocol.http.HttpURLConnection$HttpInputStream cannot be
cast to java.io.BufferedInputStream
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Think of the earth as a living organism that is being attacked by billions of bacteria whose numbers double every forty years. Either the host dies, or the virus dies, or both die."
~ Gore Vidal
 
Ad

Advertisements

R

Roedy Green


Even when you have <jnlp spec="1.5+" in the document, JaNeLA is
verifying to 1.6. e.g. insisting on java instead of j2se.

JaNeLA does not seem to know about <nativelib, which can live inside a
<resources>
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Think of the earth as a living organism that is being attacked by billions of bacteria whose numbers double every forty years. Either the host dies, or the virus dies, or both die."
~ Gore Vidal
 
A

Andrew Thompson

I think there is a bug here.  

You are right again.
..I tried feeding it an URL

http://mindprod.com/webstart/setclock.jnlp

It dies saying

sun.net.www.protocol.http.HttpURLConnection$HttpInputStreamcannot be
cast to java.io.BufferedInputStream

Thanks for the report.

I'll fix that, I can already see where I went wrong.

I'll also look into your other points more closely,
once JaNeLA is working for *any* URL!

(sheepishly - I wrote it at a time I had no internet at
home, and forgot to check it once the internet back was
on again!)
 
A

Andrew Thompson

I think there is a bug here.  

The CCE should be fixed now in the 09.04.04 build.

JaNeLA still shows problems for setclock.jnlp, some
are obviously faults in the XSD (it does not allow
for multiple resources sections, is a major part
of it).

As soon as I tweak the XSD a bit, I'll issue another
build.
 
Ad

Advertisements

C

carmelo

The CCE should be fixed now in the 09.04.04 build.

JaNeLA still shows problems for setclock.jnlp, some
are obviously faults in the XSD (it does not allow
for multiple resources sections, is a major part
of it).

As soon as I tweak the XSD a bit, I'll issue another
build.

Thank you, however I solved it. It was a problem with the
persistence.xml file, which should be properly configured to allow
data access. Besides, being behind a proxy, I added an exception for
the database IP on the Windows connections configuration.


-
http://carmelosaffioti.blogspot.com
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top