persistence@glassfish.java.net

Re: Anyone have success using Toplink with javawebstart?

From: Lance J. Andersen <Lance.Andersen_at_Sun.COM>
Date: Wed, 25 Apr 2007 09:02:34 -0400

Yes Netbeans does that by default. I have delete it and still see the
same issue.

downloading the latest build next. stay tuned :-)

Marina Vatkina wrote:
> I'll let Tim to try to solve this mystery, so I'm just helping him
> with asking questions ;).
>
> Do you package TLE jar into your app?
>
> thanks,
> -marina
>
> Lance J. Andersen wrote:
>>
>>
>> Marina Vatkina wrote:
>>
>>> Can you try nightly build? Are you using persistence.createEMF or
>>> are you injecting/looking EMF up?
>>
>>
>> I am doing
>>
>> emf = Persistence.createEntityManagerFactory("DJPU");
>> em = emf.createEntityManager();
>>
>>
>> its a standalone app so i cannot look up the EntityManagerFactory for
>> my scenario
>>
>> -lance
>>
>>>
>>> thanks,
>>> -marina
>>>
>>> Lance J. Andersen wrote:
>>>
>>>> Which Build would you suggest I try?
>>>>
>>>> The error is different as from the stack it looks like it is having
>>>> trouble finding:
>>>> oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
>>>>
>>>> Marina Vatkina wrote:
>>>>
>>>>> Lance,
>>>>>
>>>>> Are you getting "No suitable driver" error? If yes, it should've
>>>>> been fixed in the recent builds
>>>>> (https://glassfish.dev.java.net/issues/show_bug.cgi?id=2688).
>>>>>
>>>>> thanks,
>>>>> -marina
>>>>>
>>>>> Lance J. Andersen wrote:
>>>>>
>>>>>> This is pretty nasty issue then as java webstart is getting more
>>>>>> and more popular and if i cannot use Toplink that is not a good
>>>>>> thing.
>>>>>>
>>>>>> I know java webstart loads the toplink jar as you get an error it
>>>>>> it cannot load the jars in the resources.
>>>>>>
>>>>>>
>>>>>> I will log a bug in the morning.
>>>>>>
>>>>>>
>>>>>>
>>>>>> David Van Couvering wrote:
>>>>>>
>>>>>>> I had the exact same problem within an applet - even though the
>>>>>>> Toplink jars were there the auto-loader couldn't find the
>>>>>>> persistence provider.
>>>>>>> Marina and team tried for a long time to debug this but I
>>>>>>> finally had to give up and switched back to JDBC.
>>>>>>>
>>>>>>> I suspect some bug in the auto-loader that loads an SPI
>>>>>>> implementation (in this case a persistence provider)
>>>>
>>>>
>>>>
>>>> It looks like the failure is in emf =
>>>> provider.createEntityManagerFactory(persistenceUnitName, properties);
>>>>
>>>>
>>>> If you have a debug version which dumps out more info i can give it
>>>> a go as well.
>>>>
>>>>
>>>> -lance
>>>>
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> 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)
>>>>>>>>