Issue 11 in objenesis: Support Apache Harmony

15 views
Skip to first unread message

obje...@googlecode.com

unread,
Jul 29, 2010, 5:51:56 PM7/29/10
to objene...@googlegroups.com
Status: New
Owner: ----

New issue 11 by nik...@protocol7.com: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

What steps will reproduce the problem?
1. Use Objenesis in Apache Harmony, e.g. using Easymock.

What is the expected output? What do you see instead?
Expect to be able to create mocks. Instead, the following stacktrace is
provided:
java.lang.NoClassDefFoundError: sun/reflect/ReflectionFactory
at
org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflectionFactoryInstantiator.java:40)
at
org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:85)
at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:90)
at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
at org.objenesis.ObjenesisHelper.newInstance(ObjenesisHelper.java:43)
at
org.easymock.internal.ObjenesisClassInstantiator.newInstance(ObjenesisClassInstantiator.java:27)
at
org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:233)
at org.easymock.internal.MocksControl.createMock(MocksControl.java:60)


What version of the product are you using? On what operating system?
Objenesis 1.2
Harmony rev 713673
Easymock 3.0

Please provide any additional information below.
Looking at StdInstantiatorStrategy, using Harmony it would fall back on
SunReflectionFactoryInstantiator which will not be supported as Harmony
does not contain any com.sun classes.

obje...@googlecode.com

unread,
Nov 7, 2010, 9:50:11 AM11/7/10
to objene...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 11 by henri.tremblay: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

We'll look into it. A specific implementation is required for Harmony. As
you said, the fallback doesn't work.

If someone could provide a patch for it, that would be of great help.

obje...@googlecode.com

unread,
Nov 7, 2010, 10:02:15 AM11/7/10
to objene...@googlegroups.com
Updates:
Labels: Milestone-1.3

Comment #2 on issue 11 by henri.tremblay: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

(No comment was entered for this change.)

obje...@googlecode.com

unread,
Nov 7, 2010, 12:03:11 PM11/7/10
to objene...@googlegroups.com

Comment #4 on issue 11 by joerg.sc...@gmx.de: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

Harmony has a class ObjectAccessor that can be used:
http://svn.xstream.codehaus.org/browse/xstream/trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/HarmonyReflectionProvider.java?r=HEAD
However, as stated, XStream fails to run all ~1000 unit tests, because at
some point the JVM gets corrupt. Hard to say if its caused by one of the
deserialized objects or only because of using this class.

obje...@googlecode.com

unread,
Nov 7, 2010, 12:11:24 PM11/7/10
to objene...@googlegroups.com

Comment #5 on issue 11 by rdama...@gmail.com: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

Thought I'd mention that this should be looked at together with issue 13,
since Harmony is the library usually used on top of Dalvik.

obje...@googlecode.com

unread,
Sep 30, 2012, 12:10:26 PM9/30/12
to objene...@googlegroups.com
Updates:
Status: WontFix

Comment #6 on issue 11 by henri.tr...@gmail.com: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

Since Apache Harmony is now retired, there's no need to support it as of now

obje...@googlecode.com

unread,
Aug 14, 2013, 8:03:19 PM8/14/13
to objene...@googlegroups.com
Updates:
Owner: henri.tr...@gmail.com

Comment #7 on issue 11 by henri.tr...@gmail.com: Support Apache Harmony
http://code.google.com/p/objenesis/issues/detail?id=11

(No comment was entered for this change.)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages