I tried the latest build of toplink and the error still occurs.
I have create a simple standalone netbeans project that you can
- run from within netbeans and via java -jar and it works fine
- if you try and run it via javawebstart (double click the jnlp in the
directory or install the javawebstart plugin for netbeans), you will see
that it fails.
I have not seen issues with other apps i have created via netbeans that
use javawebstart. Webstart defines the jars to load via the jnlp file.
It is also in the classpath manifest as well.
WebStartTest.java is the simple standalone test program. I also
included a simple swing program which encounters the same issue.
I will log an issue next for this.
-lance
Tim Quinn wrote:
> Until Marina referred me to this thread I had not subscribed to the
> persistence mailing list, which is why I'm joining this discussion
> only now.
>
> As Marina noted, GlassFish app clients could encounter a similar sort
> of problem. There, TopLinkEssentials could not load a driver other
> than the Derby driver that the developer had packaged with his/her
> application. This turned out to be because TLE and the Derby client
> JAR were both loaded by the system class loader, but the JAR
> containing the alternate driver that was packaged in the EAR was
> loaded by a different loader. Because TLE uses the class loader that
> loaded it and not the current thread's context class loader it could
> not find the alternate driver.
>
> Note that this happened for class appclient launches as well as Java
> Web Start.
>
> My guess would be that in your case there is something going on with
> class loading also. Is there any chance that in your environment the
> classic java command launch is using class loading techniques that
> will not work under Java Web Start - such as a Class-Path setting in a
> manifest or the CLASSPATH environment variable set?
> Something like that might account for your app working from the
> command line but not from Java Web Start.
>
> - Tim
>
> Sanjeeb Kumar Sahoo wrote:
>> It has worked for me in the past. See
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1562, which has
>> a working example.
>>
>> Thanks,
>> Sahoo
>> Lance J. Andersen wrote:
>>> I have attached the correct jnlp as the one i sent before i
>>> modified to see if it was having problems loading the
>>> toplink-essentials.jar (the difference between the 2 jnlp files is
>>> toplink-essentials.jarr vs toplink-essentials.jar)
>>>
>>> sorry for the typo in the earlier mail
>>>
>>> Lance J. Andersen wrote:
>>>> Hi,
>>>>
>>>> I am trying albeit unsuccessfully to get an application using
>>>> Toplink to fire up via Java Web Start.
>>>>
>>>> I can successfully launch the application via java -jar and have no
>>>> problems using it with netbeans.
>>>>
>>>> I believe the jnlp is correct(I have attached it). Has anyone used
>>>> Java Webstart with toplink before?
>>>>
>>>>
>>>> It looks like toplink-essentials.jar was not loaded.
>>>>
>>>> thanks in advance
>>>> -lance
>>>>
>>>> ----------------------------------------------------
>>>> starting DJ
>>>> Exception in thread "AWT-EventQueue-0"
>>>> javax.persistence.PersistenceException: No Persistence provider for
>>>> EntityManager named DJPU
>>>> at
>>>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
>>>>
>>>> at
>>>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
>>>>
>>>> at dj.bpm.SongDBImpl.<init>(SongDBImpl.java:29)
>>>> at dj.bpm.ui.DJTableModel.<init>(DJTableModel.java:29)
>>>> at dj.bpm.ui.DJUI.initComponents(DJUI.java:241)
>>>> at dj.bpm.ui.DJUI.<init>(DJUI.java:39)
>>>> at dj.bpm.ui.DJUI$13.run(DJUI.java:515)
>>>> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
>>>> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
>>>> Source)
>>>> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
>>>> Source)
>>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>> at java.awt.EventDispatchThread.run(Unknown Source)
>>>>
>>>