Ok, I'm in a bit of a mess right now. I have a Postgres 8.4 DB, 250 tables + stored procedures, triggers, etc. Stored procedures are mainly for the large transactions, as I plan to build the rest of the business logic via session and message-driven beans. I have built
EJB Projects before on Netbeans, but as I planned to use WindowBuilder to develop the front end (GWT and Swing), switched to Eclipse. I hit a massive problem on the first hurdle ... generating my Entity Beans from the database. A more detailed explanation can be found here:
http://www.eclipse.org/forums/index.php/m/832479/#msg_832479
Basically, not all tables were being generated, and I was getting some association errors. The generator (Dali, as I've now come to know) seems to have a bug ... though I'm not too sure about it.
So, as a last resort, I decided to give Netbeans a shot. Everything seemed to be working well until I added a simple Session Bean for a user login (calling a stored function only because of data encryption) and get this error when deploying the project. I should note that the error is raised only when I add the EntityManager:
@PersistenceContext
EntityManager em;
This is the error raised by Netbeans:
And this is raised by glassfish 3.1.1:
This is my Session Bean:
Please, any help would be more than welcome. At this rate, I'm planning to just dump EJB and go for a direct connection to my DB. I've been stuck at this first hurdle for a week now. So any help would be greatly appreciated.
Thanks.