I got the same problem once with 3.00, I checked the code and
it comes from the fact that the JBossCMP can't do the
work because of distincts class definitions. Once your application
is reloaded your classes are not compatible with what see cmp engine.

 At this time I was not very aware about thread context classloader so I
didn't
check about that . But imho that could be solved by jbosscmp using it ? am I
right ?

 Lot of people will tell you not to use serializable custom class because of
serialization
issues, but for short term storage I think it's good and worth to be used.

 Nevertheless, I dropped using custom serializable class because of that.

Julien

----- Original Message -----
From: "Oisin Kim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 8:49 AM
Subject: [JBoss-user] Serializable inner classes as CMP fields


> Hi All,
>
> Just a short question about something thast seems a bit weird to me,
> about CMP fields in Jboss.
>
> My setup is JBoss-3.0.1RC1 Tomcat,  Win 2000, JDK 1.3.1_01.
>
> I have a CMP field which is a serializable object, the object is an
> inner class PNF.States (it's a public inner class).
>
> It looks something like this then:
>
> Public PNF{
> public static class States implements Serializable
> {
> file://some stuff here
> }
> }
>
> Once I've deployed an application, run it and then make changes to the
> code, I do a redeploy which looks fine. But when I try to use the bean I
> get the exception below,  and I have to reboot Jboss to get it to be
> able to use this class correctly after that initial first run( which
> goes perfectly ), its as if Jboss thinks there are two versions of the
> PNF.States class, and that the one in the DB is different to the one in
> code.
>
> The exception I get looks like this:
>
> 11:42:11,687 ERROR [LogInterceptor.error]
> TransactionRolledbackException, causedBy:
> java.sql.SQLException: Got a
> net.aurium.components.context.interfaces.PNF$States: 'PNF' while looking
> for a net.aurium.components.context.interfaces.PNF$States
>         at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.coerceToJavaType(JDBCUtil.java:4
> 57)
>         at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.getResult(JDBCUtil.java:327)
>         at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArg
> umentResults(JDBCAbstractCMPFieldBridge.java:350)
> <cut rest of exception>
>
>
> Is this a bug or a problem with my code?
>
> I have tried to make the outer class implement serializable too but that
> makes no difference.
>
>
> Any help is greatly appreciated!
>
> Many thanks,
>
> Oisin
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to