-
1. Re: weird cmp error, any ideas?
julien1 Apr 28, 2004 9:47 AM (in response to jae77)how is called your CMP persistent field in ejb-jar.xml
what are your accessor names get/set ? -
2. Re: weird cmp error, any ideas?
jae77 Apr 28, 2004 10:02 AM (in response to jae77)the getter/setter were
setIPAddr(String ip)
getIPAddr()
they were correctly mapped to the "ip" column.
i'd have to revert the changes i made to get it working to see what the ejb-jar.xml file looks like. i did check it and it looked correct. i wonder if something didn't like the "ip" column name. -
3. Re: weird cmp error, any ideas?
triathlon98 Apr 28, 2004 10:09 AM (in response to jae77)In any case, I would strongly suggest to use some kind of prefix for table and field names, eg "t_" for tables and "f_" for fields.
This may be completely unrelated to your problem, but it is essential for cross db compatibility. Most DB systems have reserved words and they can differ. For consistency and o avoid problems, the prefixes can help.
As far as table names are concerned, JBoss can (and will) automatically change them (avoid reserved words and limit to the maximum length). However, for fields, this is currently not the case.
Joachim -
4. Re: weird cmp error, any ideas?
aloubyansky Apr 28, 2004 3:53 PM (in response to jae77)This also might occur when these accessors are inherited from some other class. It was fixed today in Branch_3_2.
-
5. Re: weird cmp error, any ideas?
hxp Apr 28, 2004 4:44 PM (in response to jae77)Alex --
Thanks for comin and slummin with us Nukes guys ;)
As CMP guru, you could be mighty helpful as we move Nukes to pure-CMP. When you get a chance, please take a look at these threads:
MySQL & Pure-CMP --- issues w News & FAQ modules
http://jboss.org/index.html?module=bb&op=viewtopic&t=49132
Pure-CMP & FAQ Module revamp
http://jboss.org/index.html?module=bb&op=viewtopic&t=49034
Hope you'll check in with us more over the next few weeks.
-- Howard -
6. Re: weird cmp error, any ideas?
jae77 May 4, 2004 3:27 PM (in response to jae77)"loubyansky" wrote:
This also might occur when these accessors are inherited from some other class. It was fixed today in Branch_3_2.
any chance you could provide a bit more explination on what would cause this? (or point me somewhere that i can read about it?)
thx!!! -
7. Re: weird cmp error, any ideas?
aloubyansky May 4, 2004 4:14 PM (in response to jae77)I meant that the ejb-class you specify in ejb-jar.xml might extend some other class, inherit its abstract setters and getters that you declare as cmp and cmr fields in the ejb-jar.xml and at the same time override these same inherited abstract setters and getters.
Earlier we mapped CMP/CMR field and ejbSelect invocation handlers (more accurately bridges) to Method objects (one to one). In the iheritance case like above, doing casting tricks in some JVMs it could occur that we invoked a getter or setter defined in the super class that was not mapped to its bridge resulting in the mentioned error.