toplink « EntityManager « JPA Q&A





1. No Persistence provider for EntityManager named     stackoverflow.com

I have my persistence.xml with the same name, using toplink, under META-INF directory. Then I have my code calling it with...

EntityManagerFactory emfdb = Persistence.createEntityManagerFactory("agisdb");
Yet, I got the following error message
2009-07-21 09:22:41,018 [main] ...

2. JPA toplink: Impossible to override User/Pass in new EntityManager    java.net

Another try I made was to delete user/pass properties from persistence.xml, and add them on runtime, but it obviously doesn't work for the same reason. It seems... it is nothing implemented to do it. I had seen an example of OpenJPA doint exactly that, and it works, but... not in my case, becacuse:

3. JPA(toplink(): EntityManager can't create any query    java.net

TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008)) Server: unknown file:/C:/Develop/NetBeansProjects/Bamboo/BlogWeb/build/web/WEB-INF/classes/-BlogWebPU login successful java.lang.IllegalArgumentException: null source at java.util.EventObject.(EventObject.java:38) at javax.sql.StatementEvent.(StatementEvent.java:39) at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeStatement(DatabaseAccessor.java:318) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.releaseStatement(DatabaseAccessor.java:1209) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:581) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452) at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473) at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214) at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:285) at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:615) at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2416) at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2382) at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:802) at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628) at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692) at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746) at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233) at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952) at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924) at ...