Hi, I wasn't sure which forum to select, I hope this one fits?
I try to establish a database connection using JPA. My Bean's method looks like this:
Unfortunately it crashes somewhere in the code. I wasn't able to start TomEE in debug mode yet, so I can't step through it. Also I have no real logging yet, still trying to get all the foundation together. Anyone an idea what it could be? If I use only "Contact" instead of "sa.Contact" it doesn't make a difference...
Dave Tolls wrote:If it crashes is there a stack trace?
Couldn't find one yet... As far as I know there is none in the server log. So I have to establish log4j first, than maybe I can see some exception logging...
Next thing is, that I wanted to debug using Eclipse, but I get a weird error message from the log / exception. I can post tomorrow, but google didn't help me yet...
Is there anyone who could imagine giving a hand in installation and configuration? I mean, I can't hire someone formally for a job as this is just hobby - ashame I am computer scientist myself, but the configuration really drives me nuts. So for a pocket money, some student who is deep in the topic anyway and could be happy to get some bucks this way...?
posted 11 months ago
Ok, just one step down the line... Yes, I found an exception in the "localhost" log...
There is more, but I think that's clear... But therer IS a contact table...
Ok, german doesn't matter, I think anyone can see there is some sample data... Alright, this is my dependency injection for the entity manager:
This is the persistence.xml:
And then there is the tomee.xml which I think relates to the "samples" data source. But that's something I am really unsure about if my expectations are correct?
It could be missing rights (grants) to the table, or a schema mismatch. The table's schema is app, but the user is sa. Can you try explicitly setting the schema using @Table(name = "Contact", schema = "app") on the entity class?