EJB3: Irrational behaviour

Given a stateless Session Bean.

Return type List works fine like in following example

public List getFilmTypes() {

Query q = em.createNamedQuery("Film.all");

List l = q.getResultList();

return l;

}

Next example

public Film getFilm(String id) {

Film film = em.find(Film.class, id);

return film;

}

generates following Exception:

com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value

WARNING: "IOP00810257: (MARSHAL) Could not find class"

org.omg.CORBA.MARSHAL:vmcid: SUN minor code: 257 completed: Maybe ..........

The same method, same code,

but returning a string with some values from Film properties works fine again.

In short: standard class types works as return type,

custom classes as return type fail, resulting in the same error.

I'm using Sun App server 9.0,

and EJB3 generated by Netbeans5.5 for database access and persistency.

[984 byte] By [Pelgrima] at [2007-11-26 16:49:44]
# 1
Does the client have the Film class available on its classpath?
ejpa at 2007-7-8 23:17:16 > top of Java-index,Core,Core APIs...
# 2

Ofcourse ...

After more testing I find out that when I program my "Film" class without

the new annotations it all works fine ...

The EJB3 annotations cause me much trouble,

well, to put it simple, they simply don't work op my server.

Is this because of my db tool (postgresql) or has it another reason ?

Programming db access "the old fashioned way" but using the defined

database pool works ...

Pelgrima at 2007-7-8 23:17:16 > top of Java-index,Core,Core APIs...
# 3
are you talking about SQL annotations? If so yes, some versions of postgresql do not like SQL comments or whatever they are called. I think MySQL also has this issue. So maybe annotations is causing comments to appear in the SQL.
_dnoyeBa at 2007-7-8 23:17:16 > top of Java-index,Core,Core APIs...
# 4
is there a list available with compatible databases ?Message was edited by: Pelgrim
Pelgrima at 2007-7-8 23:17:16 > top of Java-index,Core,Core APIs...