bobobear / lambdaj

Automatically exported from code.google.com/p/lambdaj
Apache License 2.0
0 stars 0 forks source link

lambdaj can't work fine on the Google Apps Engine #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I found lots function like select(..), selectFirst(..) can't work fine on the 
GAE

What is the expected output? What do you see instead?

We got following exception message:

java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a restricted 
class. 
Please see the Google  App Engine developer's guide for more details.

at 
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java
:51)
at 
org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflec
tionFactoryInstantiator.java:40)
at 
org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiator
Strategy.java:85)
at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:90)
at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
at ch.lambdaj.proxy.ClassImposterizer.createProxy(ClassImposterizer.java:134)
at ch.lambdaj.proxy.ClassImposterizer.imposterise(ClassImposterizer.java:101)
at ch.lambdaj.proxy.ProxyUtil.createArgumentProxy(ProxyUtil.java:60)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory
.java:52)
at 
ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFacto
ry.java:45)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.ja
va:39)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.ja
va:31)
at ch.lambdaj.Lambda.on(Lambda.java:43)
...

What version of the product are you using? On what operating system?

Google Apps Engine for Java 1.3.4

Please provide any additional information below.

Original issue reported on code.google.com by sosocial...@gmail.com on 2 Sep 2010 at 8:06

GoogleCodeExporter commented 9 years ago
This problem is caused by objenesis as reported here:
http://code.google.com/p/objenesis/issues/detail?id=12

I will try to mitigate it but I cannot remove it.

Original comment by mario.fu...@gmail.com on 20 Dec 2010 at 9:44

GoogleCodeExporter commented 9 years ago
Lambdaj will work on GAE starting from the release 2.3.2
In order to make it work the classes used with lambdaj methods MUST have a 
zero-args non private constructor (or the default one if no constructor at all 
is provided).

Original comment by mario.fu...@gmail.com on 5 Jan 2011 at 10:50