Hi, I made an
EJB application. This are the two exceptions I get. Can somebody tell me what they mean?
I deployed my application.
JBoss created one new table "StudentBean" instead of using the one I mapped to, which is an existing table named "Student". So I delete the table JBoss created, and change the existing table "Student" name to "StudentBean".
Load failed; CausedByException is: Unknown column 'studentName' in 'field list'; CausedByException is: Load failed; CausedByException is: Unknown column 'studentName' in 'field list'; nested exception is: javax.ejb.EJBException: Load failed; CausedByException is: Unknown column 'studentName' in 'field list'; - nested throwable: (javax.ejb.EJBException: Load failed; CausedByException is: Unknown column 'studentName' in 'field list')
then, I go into my ejb-jar.xml. And changed the field for tags <ejb-name> under both <entity> and <assembly-descriptor> from StudentBean to Student. Now this is the exception I get:
java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Could not instantiate bean; CausedByException is: null; CausedByException is: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.NullPointerException]
I can never seem to map my EJB application to exisitng tables (means not created by JBoss but by myself). The configuration I made to JBoss are the following:
1. add the
JDBC MySql driver into server/default/lib dir.
2. copy the mysql-ds.xml into server/deploy dir.
3. modify the mysql-ds.xml by changing the username and password. Also the <connection-url> tags.
Did I miss out any configurations I should do? Please advice.