|
|
Re: Beginner's Problem / strange behavior [message #1017045 is a reply to message #1017042] |
Fri, 08 March 2013 18:16 |
Daniel Flassak Messages: 3 Registered: March 2013 |
Junior Member |
|
|
I just let JPAcontainer handle everything:
JPAContainer<Problem> problemContainer = JPAContainerFactory.make(Problem.class, "it-status");
But I also tried this, and it doesn't make a difference:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("it-status");
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Problem p = new Problem();
p.setTitle("foo");
p.setDescription("bar");
em.persist(p);
em.getTransaction().commit();
Edit: Hibernate works just fine with the same persistence.xml and code. But I would really like to use Eclipselink because it is recommended over Hibernate by the Vaadin guys and others.
[Updated on: Fri, 08 March 2013 18:18] Report message to a moderator
|
|
|
|
|
Re: Beginner's Problem / strange behavior [message #1039760 is a reply to message #1021093] |
Fri, 12 April 2013 14:49 |
Daniel Flassak Messages: 3 Registered: March 2013 |
Junior Member |
|
|
OK. So for testing this again, I have set up a vanilla Eclipse/Tomcat/Project/everything.
The [EL Config] logging does not occur on initial app deployment.
The first two [EL Config] lines in the log after I choose "Debug on Server" show this:
[EL Config]: Connection(11615255)--connecting(DatabaseLogin(
platform=>HSQLPlatform
user name=> "ampel"
connector=>JNDIConnector datasource name=>null
))
[EL Config]: Connection(580142)--Connected: jdbc:hsqldb:file:data/hsqldb/hsqldb
User: SA
Database: HSQL Database Engine Version: 2.2.8
Driver: HSQL Database Engine Driver Version: 2.2.8
))
Which means that is is correctly reading javax.persistence.jdbc.user from the persistence.xml, but still ignoring javax.persistence.jdbc.url from the very same file.
I am not setting the datasource element and I am using EclipseLink 2.4.1
[Updated on: Fri, 12 April 2013 14:56] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03818 seconds