users@glassfish.java.net

Re: When using _at_PersistenceContext deploying returns a string index out of rang

From: <glassfish_at_javadesktop.org>
Date: Thu, 13 Sep 2007 01:55:08 PDT

ok i don't know why it works... but I found where the bug is, and how to fix it.

I have this mapping
[code]
    @OneToMany(mappedBy = "parentBMultiOprnd")
    private Collection<BMultiItemOprnd> item;
[/code]

now if I change this mapping (and the mapped variable) into:

[code]
    @OneToMany(mappedBy = "parentMultiOprnd")
    private Collection<BMultiItemOprnd> item;
[/code]

then it does work. So i then did some testing so I used parentXYZMultiOprnd and that gave me a:
Deploying application in domain failed; Deployment Error -- String index out of range: -3

while first i got a -1 (2 chars longer) --> so i think there is a limit to the size of the variable name???

attached is the source code + config files of the working and the broken package
[Message sent by forum member 'johnnyvdlaar' (johnnyvdlaar)]

http://forums.java.net/jive/thread.jspa?messageID=235200