You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mackie Mathew <mc...@gmail.com> on 2008/05/17 09:59:17 UTC
[harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Even though the tests and the source is in the same package, there's an
IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
cannot debug the tests cause when the EventDispatchThread takes over the
debugging process hangs. Is there a solution to this?
java.lang.IllegalAccessError:
javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
while resolving constant pool entry at index 85 in class
javax/swing/DefaultDesktopManagerTest
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
at java.lang.reflect.Method.invoke(Method.java:317)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at
javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
at
java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
--
Regards,
Tharindu
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Alexei Fedotov <al...@gmail.com>.
Yes, Alexey. I believe you are 100% correct. The IllegalAccessError
frequently happens if a test is run under Eclipse without a proper
configuration. Tharindu, please check that the path to the test and
junit are within the boot class path in your debugging environment.
On Mon, May 19, 2008 at 1:34 PM, Alexey Varlamov
<al...@gmail.com> wrote:
> I could not reproduce failures, all 20 testcases of
> DefaultDesktopManagerTest passed. Anyway, such error means test class
> appeared in different runtime package than DefaultDesktopManager
> class, i.e. was defined with different classloader - might be an
> environment issue if test is run manually?
>
> Regards,
> Alexey
>
> 2008/5/17, Mackie Mathew <mc...@gmail.com>:
>> Even though the tests and the source is in the same package, there's an
>> IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
>> cannot debug the tests cause when the EventDispatchThread takes over the
>> debugging process hangs. Is there a solution to this?
>>
>> java.lang.IllegalAccessError:
>> javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
>> while resolving constant pool entry at index 85 in class
>> javax/swing/DefaultDesktopManagerTest
>> at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>> at java.lang.reflect.Method.invoke(Method.java:317)
>> at junit.framework.TestCase.runTest(TestCase.java:164)
>> at junit.framework.TestCase.runBare(TestCase.java:130)
>> at
>> javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
>> at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
>> at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
>> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
>> at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
>> at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
>> at
>> java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
>> at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
>>
>>
>>
>>
>> --
>> Regards,
>>
>> Tharindu
>>
>
--
With best regards,
Alexei
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Alexei Fedotov <al...@gmail.com>.
Tharindu,
I believe updating instruction [1] and Eclipse project is a right
thing to do. The patch is welcome.
[1] http://harmony.apache.org/documentation/dev_eclipse.html
On Mon, May 19, 2008 at 8:27 PM, Mackie Mathew <mc...@gmail.com> wrote:
> Thanks for that tip. The boot class path entries were the problem again. Is
> it possible for me to make it so that any future users will automatically
> have these entries in the boot class path?
>
> On Mon, May 19, 2008 at 7:10 PM, Mackie Mathew <mc...@gmail.com> wrote:
>
>> This is strange. I'm running the tests in Eclipse and the testSetWasIcon,
>> testSetGetPreviousBounds, testGetBoundsForIconOf, testRemoveIconFor and
>> testIconifyDeiconifyFrame fail due to this error.
>>
>> On Mon, May 19, 2008 at 3:04 PM, Alexey Varlamov <
>> alexey.v.varlamov@gmail.com> wrote:
>>
>>> I could not reproduce failures, all 20 testcases of
>>> DefaultDesktopManagerTest passed. Anyway, such error means test class
>>> appeared in different runtime package than DefaultDesktopManager
>>> class, i.e. was defined with different classloader - might be an
>>> environment issue if test is run manually?
>>>
>>> Regards,
>>> Alexey
>>>
>>> 2008/5/17, Mackie Mathew <mc...@gmail.com>:
>>> > Even though the tests and the source is in the same package, there's an
>>> > IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
>>> > cannot debug the tests cause when the EventDispatchThread takes over the
>>> > debugging process hangs. Is there a solution to this?
>>> >
>>> > java.lang.IllegalAccessError:
>>> > javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
>>> > while resolving constant pool entry at index 85 in class
>>> > javax/swing/DefaultDesktopManagerTest
>>> > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>>> > at java.lang.reflect.Method.invoke(Method.java:317)
>>> > at junit.framework.TestCase.runTest(TestCase.java:164)
>>> > at junit.framework.TestCase.runBare(TestCase.java:130)
>>> > at
>>> > javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
>>> > at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
>>> > at
>>> java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
>>> > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
>>> > at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
>>> > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
>>> > at
>>> > java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
>>> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Regards,
>>> >
>>> > Tharindu
>>> >
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> Tharindu
>
>
>
>
> --
> Regards,
>
> Tharindu
>
--
With best regards,
Alexei
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Nathan Beyer <nd...@apache.org>.
You could write a custom Eclipse JUnit launcher that set things up this way.
-Nathan
On Mon, May 19, 2008 at 11:27 AM, Mackie Mathew <mc...@gmail.com> wrote:
> Thanks for that tip. The boot class path entries were the problem again. Is
> it possible for me to make it so that any future users will automatically
> have these entries in the boot class path?
>
> On Mon, May 19, 2008 at 7:10 PM, Mackie Mathew <mc...@gmail.com>
> wrote:
>
> > This is strange. I'm running the tests in Eclipse and the testSetWasIcon,
> > testSetGetPreviousBounds, testGetBoundsForIconOf, testRemoveIconFor and
> > testIconifyDeiconifyFrame fail due to this error.
> >
> > On Mon, May 19, 2008 at 3:04 PM, Alexey Varlamov <
> > alexey.v.varlamov@gmail.com> wrote:
> >
> >> I could not reproduce failures, all 20 testcases of
> >> DefaultDesktopManagerTest passed. Anyway, such error means test class
> >> appeared in different runtime package than DefaultDesktopManager
> >> class, i.e. was defined with different classloader - might be an
> >> environment issue if test is run manually?
> >>
> >> Regards,
> >> Alexey
> >>
> >> 2008/5/17, Mackie Mathew <mc...@gmail.com>:
> >> > Even though the tests and the source is in the same package, there's
> an
> >> > IllegalAccessError in some of the tests in DefaultDesktopManagerTest.
> I
> >> > cannot debug the tests cause when the EventDispatchThread takes over
> the
> >> > debugging process hangs. Is there a solution to this?
> >> >
> >> > java.lang.IllegalAccessError:
> >> >
> javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
> >> > while resolving constant pool entry at index 85 in class
> >> > javax/swing/DefaultDesktopManagerTest
> >> > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> >> > at java.lang.reflect.Method.invoke(Method.java:317)
> >> > at junit.framework.TestCase.runTest(TestCase.java:164)
> >> > at junit.framework.TestCase.runBare(TestCase.java:130)
> >> > at
> >> >
> javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
> >> > at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
> >> > at
> >> java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
> >> > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
> >> > at
> java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
> >> > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> >> > at
> >> > java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
> >> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Regards,
> >> >
> >> > Tharindu
> >> >
> >>
> >
> >
> >
> > --
> > Regards,
> >
> > Tharindu
>
>
>
>
> --
> Regards,
>
> Tharindu
>
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Mackie Mathew <mc...@gmail.com>.
Thanks for that tip. The boot class path entries were the problem again. Is
it possible for me to make it so that any future users will automatically
have these entries in the boot class path?
On Mon, May 19, 2008 at 7:10 PM, Mackie Mathew <mc...@gmail.com> wrote:
> This is strange. I'm running the tests in Eclipse and the testSetWasIcon,
> testSetGetPreviousBounds, testGetBoundsForIconOf, testRemoveIconFor and
> testIconifyDeiconifyFrame fail due to this error.
>
> On Mon, May 19, 2008 at 3:04 PM, Alexey Varlamov <
> alexey.v.varlamov@gmail.com> wrote:
>
>> I could not reproduce failures, all 20 testcases of
>> DefaultDesktopManagerTest passed. Anyway, such error means test class
>> appeared in different runtime package than DefaultDesktopManager
>> class, i.e. was defined with different classloader - might be an
>> environment issue if test is run manually?
>>
>> Regards,
>> Alexey
>>
>> 2008/5/17, Mackie Mathew <mc...@gmail.com>:
>> > Even though the tests and the source is in the same package, there's an
>> > IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
>> > cannot debug the tests cause when the EventDispatchThread takes over the
>> > debugging process hangs. Is there a solution to this?
>> >
>> > java.lang.IllegalAccessError:
>> > javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
>> > while resolving constant pool entry at index 85 in class
>> > javax/swing/DefaultDesktopManagerTest
>> > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>> > at java.lang.reflect.Method.invoke(Method.java:317)
>> > at junit.framework.TestCase.runTest(TestCase.java:164)
>> > at junit.framework.TestCase.runBare(TestCase.java:130)
>> > at
>> > javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
>> > at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
>> > at
>> java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
>> > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
>> > at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
>> > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
>> > at
>> > java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
>> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
>> >
>> >
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Tharindu
>> >
>>
>
>
>
> --
> Regards,
>
> Tharindu
--
Regards,
Tharindu
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Mackie Mathew <mc...@gmail.com>.
This is strange. I'm running the tests in Eclipse and the testSetWasIcon,
testSetGetPreviousBounds, testGetBoundsForIconOf, testRemoveIconFor and
testIconifyDeiconifyFrame fail due to this error.
On Mon, May 19, 2008 at 3:04 PM, Alexey Varlamov <
alexey.v.varlamov@gmail.com> wrote:
> I could not reproduce failures, all 20 testcases of
> DefaultDesktopManagerTest passed. Anyway, such error means test class
> appeared in different runtime package than DefaultDesktopManager
> class, i.e. was defined with different classloader - might be an
> environment issue if test is run manually?
>
> Regards,
> Alexey
>
> 2008/5/17, Mackie Mathew <mc...@gmail.com>:
> > Even though the tests and the source is in the same package, there's an
> > IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
> > cannot debug the tests cause when the EventDispatchThread takes over the
> > debugging process hangs. Is there a solution to this?
> >
> > java.lang.IllegalAccessError:
> > javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
> > while resolving constant pool entry at index 85 in class
> > javax/swing/DefaultDesktopManagerTest
> > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> > at java.lang.reflect.Method.invoke(Method.java:317)
> > at junit.framework.TestCase.runTest(TestCase.java:164)
> > at junit.framework.TestCase.runBare(TestCase.java:130)
> > at
> > javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
> > at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
> > at
> java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
> > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
> > at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
> > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> > at
> > java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
> >
> >
> >
> >
> > --
> > Regards,
> >
> > Tharindu
> >
>
--
Regards,
Tharindu
Re: [harmony-demo-1] IllegalAccessError in DefaultDesktopManagerTest
Posted by Alexey Varlamov <al...@gmail.com>.
I could not reproduce failures, all 20 testcases of
DefaultDesktopManagerTest passed. Anyway, such error means test class
appeared in different runtime package than DefaultDesktopManager
class, i.e. was defined with different classloader - might be an
environment issue if test is run manually?
Regards,
Alexey
2008/5/17, Mackie Mathew <mc...@gmail.com>:
> Even though the tests and the source is in the same package, there's an
> IllegalAccessError in some of the tests in DefaultDesktopManagerTest. I
> cannot debug the tests cause when the EventDispatchThread takes over the
> debugging process hangs. Is there a solution to this?
>
> java.lang.IllegalAccessError:
> javax/swing/DefaultDesktopManager.wasIcon(Ljavax/swing/JInternalFrame;)Z
> while resolving constant pool entry at index 85 in class
> javax/swing/DefaultDesktopManagerTest
> at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> at java.lang.reflect.Method.invoke(Method.java:317)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at
> javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117)
> at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45)
> at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
> at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> at
> java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
>
>
>
>
> --
> Regards,
>
> Tharindu
>