I am developing a small enterprise application using EJB3.0 and JSF, and I plan to use JBoss as my AS. I use Oracle's JDeveloper as my IDE at the moment and my DB is Oracle DB. When deploying my application with JDev's embedded OC4J AS, everything works fine, there is not any problem.
I tried to pack and deploy my application to JBoss but faced with problems. First, I got the "$ProxyXX ClassCastException" when looking up remote stateless EJBs from JNDI. I solved this problem by changing "CallByValue" sections to "true" in the "jboss-service.xml" and "ear-deployer.xml" configurations.
Now I do not get that ClassCastExceptionError but this time I get an SQL Error from Oracle which I suppose stems from JBoss's naming the remote entity beans such as "ENTITYBEAN0_"."PROPERTY". In my case the exception is like this one:
"10:04:32,096 WARN [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
10:04:32,096 ERROR [JDBCExceptionReporter] ORA-00904: "MYENTITY0_"."TYPE": invalid identifier
10:04:32,189 ERROR [STDERR] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query..."
I do not know why there is a 0 (zero) at the end of the entity name "MYENTITY", and I suspect this exception is related to that.
I would be very pleased if you can give your opinions on this problem...
I discovered that it is not related to JBoss, but it is related to the version of my database tables.
I updated my database and the problem disappeared.