Christopher, I'm sorry. I do read too much of walkthroughs and tutorials messing with tomcat configuration which ended badly, that I got myself into some mindless frenzy mode. I check everything once again in setup with resource-local transaction and found out, that I've overlooked misconfigured oracle dialect.
I'm really sorry that I did waste your time in vain. Thank you for your effort in helping me, everything is ok now. martin. 2011/2/22 Christopher Schultz <ch...@christopherschultz.net>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Martin, > > On 2/20/2011 1:51 PM, Martin Mucha wrote: >> Yes, I know I cannot use container managed EntityManager. Tomcat does >> not support JTA, ok. But I should be able, also the article points it >> out, to use application managed EntityManager with RESOURCE_LOCAL >> transaction type. Just like in SE java. >> >> In SE java everything works just fine for me. > > Good to know. > >> Actually the code looks just as in that article: >> >> EntityManagerFactory emf = >> Persistence.createEntityManagerFactory("insolvencePU"); >> EntityManager em = emf.createEntityManager(); >> em.getTransaction().begin(); >> >> //and the rest of transaction. >> >> my persistence.xml looks like: > > So, this persistence.xml file works fine in a standalone Java SE > program? You should be able to get it to work under Tomcat then. Where > is your persistence.xml file when you run your standalone Java SE test > program, and what is the effective CLASSPATH? > > Where is your persistence.xml file when you deploy it along with your > webapp? I would expect that it should be in WEB-INF/classes (or at the > root of a JAR file found in WEB-INF/lib). > >> Line >> EntityManagerFactory emf = >> Persistence.createEntityManagerFactory("insolvencePU"); >> fires an Exception complaining about unability to build >> EntityManagerFactory. That leads me to suspicion that either the >> persistence.xml, the data source or "something-else" is wrong. But I'm >> quite to unable to find out what. > > I'm guessing that the Persistence framework just can't find your > configuration file. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk1kFHoACgkQ9CaO5/Lv0PBbBACgi5UegxQ/aplal11hRHnGI2z0 > BjYAnRCl4gFqH8H1DqmwXlB1mwzUO5YJ > =6EHI > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org