db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-523) Misleading error msg raised by JDOHelper.getPersistenceManagerFactory(arg) if the resource in arg does not exist
Date Wed, 12 Sep 2007 14:27:32 GMT

    [ https://issues.apache.org/jira/browse/JDO-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526806
] 

Matthew T. Adams commented on JDO-523:
--------------------------------------

Periods added.  I don't know why there's no space between "unit" & "named"; it's there
in the Bundle.properties file.

> Misleading error msg raised by JDOHelper.getPersistenceManagerFactory(arg) if the resource
in arg does not exist
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: JDO-523
>                 URL: https://issues.apache.org/jira/browse/JDO-523
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Erik Bengtson
>            Assignee: Matthew T. Adams
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-523.patch
>
>
> > Running the following code, and if the jpox.properties cannot be  
> > found, a
> > misleading message is raised that indicates a missing a EntityManager
> > persistence provider, but should actually tell me that my resource
> > jpox.properties cannot be found.
> >
> > PersistenceManagerFactory pmf =
> > JDOHelper.getPersistenceManagerFactory("jpox.properties");
> >
> > ------------------
> > Exception in thread "main" javax.jdo.JDOFatalUserException: Unable  
> > to invoke
> > javax.persistence.Persistence.createEntityManagerFactory(String)
> >         at javax.jdo.JDOHelper.getPMFFromEMF(JDOHelper.java:1210)
> >         at javax.jdo.JDOHelper.getPersistenceUnit(JDOHelper.java:952)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 894)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 836)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 814)
> >         at org.jpox.persistence.Main.main(Main.java:10)
> > NestedThrowablesStackTrace:
> > java.lang.reflect.InvocationTargetException
> >         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 javax.jdo.JDOHelper.getPMFFromEMF(JDOHelper.java:1194)
> >         at javax.jdo.JDOHelper.getPersistenceUnit(JDOHelper.java:952)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 894)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 836)
> >         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 814)
> >         at org.jpox.persistence.Main.main(Main.java:10)
> > Caused by: javax.persistence.PersistenceException: No Persistence  
> > provider for
> > EntityManager named jpox.properties
> >         at
> > javax.persistence.Persistence.createEntityManagerFactory
> > (Persistence.java:89)
> >         at
> > javax.persistence.Persistence.createEntityManagerFactory
> > (Persistence.java:60)
> >         ... 10 moreg

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message