You might have better luck with posting this question to the Geronimo users forum (I'll copy them). OpenJPA definitely supports the use of <jta-data-source> and <non-jta-data-source> elements. As long as the specified datasource is available at the jndi location, then OpenJPA should be able to resolve to it.
As those referenced instructions indicate, you can always just use the more "direct" route and specify the datasource url and various properties. But, when running in a managed environment, accessing via jndi is a better way to go.
As far as mis-spelling one of the elements in persistence.xml... You are kind of at the mercy of the xsd validation of the persistence.xml. Maybe the validation errors can be caught and a more descriptive error message can be output. In this scenario, I can't tell which component is detecting the error.
Hello again, for some reason my post is still in Pending Alert: This post has
NOT been accepted by the mailing list yet. I tried to subscribe but this
does not seem to be working for me either.
Anyway, I continued to search on the Internet to find a potential solution
and I cam across the following;
Here there is written the following;
"persistence.xml will specify the name of the PersistenceUnit. This name is
used when referencing for the EntityManagerFactory. I have denoted it as
PhonePU. For some reason I could not get it to reference with
jta-data-source. So the alternative method is to explicitly specify the
ConnectionURL, ConnectionDriverName, and ConnectionUserName. I added an
extra property called SynchronizeMappings so that the data in the database
will not be overwritten."
This seems very similar to the problem I am having. Does this mean that
using JPA it is impossible to use data sources with Geronimo? Also what is
the alternative solution. I tried to download the code and this is exactly
as in the tutorial. Additionally using jta-datasource (no dash) rather then
jta-data-source make maven fail the compilation!
View this message in context: http://openjpa.208410.n2.nabble.com/Problems-when-setting-jta-data-source-value-tp5845073p5855939.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.