2011-03-29 3 views
2

J'ai rencontré un comportement étrange avec une application de bureau Java qui utilise les éléments essentiels Toplink en tant que fournisseur de persistance.PersistenceException avec le tréma dans le chemin

J'ai un seul répertoire contenant tout ce dont j'ai besoin pour mon application: un pot, un dossier lib et une base de données JavaDB. Le répertoire entier est autonome (je l'ai copié plusieurs fois sans problèmes, même entre différents ordinateurs).

Aujourd'hui, je voulais copier une fois de plus, mais mon dossier cible contenait un tréma allemand ü (html: ü).

Démarrage de l'application a échoué, avec une exception qui a rendu difficile de trouver la raison (voir ci-dessous).

Bien sûr, je connais les anciennes conventions de nommage, mais je pensais que nous avions déjà laissé derrière nous. Donc ma question est, s'il y a un moyen de le faire fonctionner indépendamment du répertoire. C'est important car je veux donner l'application aux clients et avoir peu d'influence sur les répertoires d'installation.

Système: Windows 7, JavaDB 10.5.3

Merci d'avance pour votre aide!

SCHWERWIEGEND: Application class jlabps.JLabPSApp failed to launch 
javax.persistence.PersistenceException: No Persistence provider for EntityManage 
r named JLAPS_EMB: The following providers: 
oracle.toplink.essentials.PersistenceProvider 
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider 
Returned null to createEntityManagerFactory. 

     at javax.persistence.Persistence.createEntityManagerFactory(Persistence. 
java:154) 
     at jlabps.JLabPSView.initComponents(JLabPSView.java:401) 
     at jlabps.JLabPSView.<init>(JLabPSView.java:47) 
     at jlabps.JLabPSApp.startup(JLabPSApp.java:71) 
     at org.jdesktop.application.Application$1.run(Application.java:171) 
     at java.awt.event.InvocationEvent.dispatch(Unknown Source) 
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
     at java.awt.EventQueue.access$000(Unknown Source) 
     at java.awt.EventQueue$1.run(Unknown Source) 
     at java.awt.EventQueue$1.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.security.AccessControlContext$1.doIntersectionPrivilege(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) 
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class jlabps 
.JLabPSApp failed to launch 
     at org.jdesktop.application.Application$1.run(Application.java:177) 
     at java.awt.event.InvocationEvent.dispatch(Unknown Source) 
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
     at java.awt.EventQueue.access$000(Unknown Source) 
     at java.awt.EventQueue$1.run(Unknown Source) 
     at java.awt.EventQueue$1.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.security.AccessControlContext$1.doIntersectionPrivilege(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) 
Caused by: javax.persistence.PersistenceException: No Persistence provider for E 
ntityManager named JLAPS_EMB: The following providers: 
oracle.toplink.essentials.PersistenceProvider 
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider 
Returned null to createEntityManagerFactory. 

     at javax.persistence.Persistence.createEntityManagerFactory(Persistence. 
java:154) 
     at jlabps.JLabPSView.initComponents(JLabPSView.java:401) 
     at jlabps.JLabPSView.<init>(JLabPSView.java:47) 
     at jlabps.JLabPSApp.startup(JLabPSApp.java:71) 
     at org.jdesktop.application.Application$1.run(Application.java:171) 
     ... 14 more 

Répondre

2

Odd. Quelles JVM utilisez-vous?

Assurez-vous d'avoir le dernier patch TopLink Essentials, je me souviens d'un problème avec les espaces, mais pas Umlats.

Vous pouvez également essayer d'effectuer la mise à niveau vers EclipseLink et voir si le même problème se produit, si c'est le cas, veuillez enregistrer un bogue.

+0

Merci James. Je vais essayer d'obtenir les derniers correctifs. Ma machine virtuelle Java: «1.6.0_24» Environnement d'exécution Java (TM) SE (build 1.6.0_24-b07) VM client HotSpot (TM) (build 19.1-b02, mode mixte, partage) –

+0

Je pense avoir les dernières versions version de toplink. Vous ne savez pas à quel point il est compliqué de passer à EclipseLink ou est-ce juste de remplacer certains pots? –

Questions connexes