I can't speak for the exception you're getting, but I believe the reason you're not getting any results from the query is because the equality comparison should take the form of a normal java expression -- that is, you should use '==' instead of '='... you're correct in that the single quotes are needed now to surround the string instead of double quotes (or \", actually), but I've submitted a patch to allow the double quotes, so hopefully that will be integrated in an upcoming release.
Should the use of '=' should throw an exception, since it's not actually a valid query, or are there times when a single equals sign is allowable that I'm not thinking of?
JBossDO DR2 uses =,|,& <>
Warning: if you download DR2 binaries from sf.net, be aware, that there are bugs in JDOQL implementation, i.e. instead of &&, ||, == and != it uses &, |, = and <> correspondingly. This is fixed in CVS version.
The problem is: Could not create an instance of PersistenceCapable: exo.content.persistent.POJO.
At the moment, I use Class.newInstance() (it'll be changed soon).
There could be two problems:
1. can you create an instance of the class with newInstance()?
2. if 1 is ok, then the class is not properly inhanced. I see you use some aop, maybe there are some clashes? How do you deploy?
Hi loubyansky ,
Thank for your reply. I cannot use (POJO.class).newInstance() in my interceptor. Probably that is the problem. I also wonder what happen to a serialized POJO . I check your code and I see you use AOP to introduce JBossPersistentCapable interface
14:56:56,340 INFO [STDOUT] request uri = /home
14:56:56,350 ERROR [STDERR] java.lang.InstantiationException: exo.content.persis
14:56:56,370 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:293)
14:56:56,380 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:261)
14:56:56,390 ERROR [STDERR] at exo.content.aop.interceptor.PersistentInterce
14:56:56,410 ERROR [STDERR] at exo.content.aop.interceptor.PersistentInterce
14:56:56,430 ERROR [STDERR] at org.jboss.aop.Invocation.invokeNext(Invocatio
14:56:56,450 ERROR [STDERR] at exo.content.aop.interceptor.CacheInterceptor.
14:56:56,470 ERROR [STDERR] at org.jboss.aop.Invocation.invokeNext(Invocatio
14:56:56,490 ERROR [STDERR] at org.jboss.aop.ClassAdvisor.invokeMethod(Class
14:56:56,510 ERROR [STDERR] at org.jboss.aop.ClassAdvisor.invokeMethod(Class
I forget to say that I have method save in POJO class and it is just an empty method . I use interceptor to intercept that method :-)
> I cannot use (POJO.class).newInstance() in my
You need to fix this problem with newInstance to work with JBossDO. As I mentioned, I'll get rid of using newInstance soon but at the moment it works this way.
> I check your code and I see you use AOP to
> introduce JBossPersistentCapable interface
Yes, the classes are enhanced at deployment time. I am working on making the enhancement closer to the JDO spec.