Hi all, I am developing my first CMP Entity Bean here.
after developing a BMP bean, I want to develop a CMP.
I have developed a CMP, and create my database, then add this database to the server datasources.
In this CMP, I have findByName( ) method, and the EJB-QL for it is:
SELECT OBJECT(a) FROM ProductBean As a WHERE a.name = ?1
when trying to invoke create( ) mehtod, I got the following exception:
java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"PersonBeanTable" WHERE "num" = '89'' at line 1"
(note I am using
J2EE RI 1.3 and my database server is MySQL4.0.4)
1. should I create the database manually, or the server will create it?
2. Can I force the server to use MySQL or it will use Cloudscape by default?
3. The files that are specific to RI that will use it to map the fields to the database fields, will the server create these files to me(during deployment),or should I wrote it?
4. should I named the table ProductBeanTable or let the server create it?
Please, you will help me very much if you teach me how to perform this step-by-step,because I note CMP is easier than BMP but requires more config.