This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am using weblogic 8.1 and MyEclipse 5.1.1. I am deploying my ear application through MyEclipse 5.1.1 as an ear file. When I ran the following EJB QL: SELECT OBJECT(p) FROM Product p.category = ?1 I get the following error: n relation Category-Product, a cmr-field and a cmp-field on the bean are using the same name. The names of cmr and cmp fields must be unique.
It is basically complaining that I have a field <cmr-field> <cmr-field-name>category</cmr-field-name> </cmr-field>
in my ejb-jar.xml and also the same category in the <cmp-field><field-name>category</field-name></cmp-field>
field. The problem is that if I changed the value of the cmr-field, I have to add a get and set in my productLocal.java and when you do that you have to do the same in the ejb-jar.xml.
Here is my ejb-jar.xml: <?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
Here is my weblogic-cmp-rdbms-jar.xml: <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'> <weblogic-rdbms-jar>