Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a custom
ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a custom [message #131205] Thu, 21 September 2006 12:42 Go to next message
Varun Balakrishnan is currently offline Varun BalakrishnanFriend
Messages: 17
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C6DDA9.6F5375F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Rich,

I have two classes with same name but in different jar =
files(javax.microedition.lcdui.Form),in my classpath.
First one represents the real lcdui class and is in midpapi.jar and the =
second one is my customwidget class
made using JLabel and JTextField in a JPanel. I will put these jar files =
into the=20
build path of a java project(here the first jar file will be midpapi.jar =
which contains the
real Form class), then I will prepend jar file containing customwidget =
to the classpath of remote VM.

My aim is to provide midpapi.jar classes to the user on the IDE side and =
customwidgets.jar for the=20
remote VM. I thought this would prevent the user from accessing unwanted =
methods in JPanel(containing=20
JLabel and JTextField) during code generation.


But I am getting some errors when I try to drag and drop my custom =
widget to the editor area.

I am very new to VE, I have not much idea what is happening behind the =
scene.=20

Please help me.

java.lang.IllegalStateException: IWAV0168E Improper nesting of mark =
statements in Expression. Tried to pop or endMark to before current =
mark. Tried to go past Mark# 0.
at =
org.eclipse.jem.internal.proxy.core.Expression.throwInvalidM arkNesting(Ex=
pression.java:469)
at =
org.eclipse.jem.internal.proxy.core.Expression.endMark(Expre ssion.java:20=
14)
at =
org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantia teBeanProxy(B=
eanProxyAdapter.java:357)
at =
org.eclipse.ve.internal.java.core.MemberContainerProxyAdapte r.initSetting=
(MemberContainerProxyAdapter.java:546)
at =
org.eclipse.ve.internal.java.core.CompositionProxyAdapter.su bInitBeanProx=
y(CompositionProxyAdapter.java:315)
at =
org.eclipse.ve.internal.java.core.MemberContainerProxyAdapte r.initBeanPro=
xy(MemberContainerProxyAdapter.java:565)
at =
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setu=
p.run(JavaVisualEditorPart.java:2089)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58).

and


java.lang.ClassCastException: =
org.eclipse.ve.internal.java.core.BeanProxyAdapter
at =
org.eclipse.ve.internal.jfc.core.ComponentGraphicalEditPart. getComponentP=
roxy(ComponentGraphicalEditPart.java:379)
at =
org.eclipse.ve.internal.jfc.core.ContainerGraphicalEditPart. createLayoutE=
ditPolicy(ContainerGraphicalEditPart.java:80)
at =
org.eclipse.ve.internal.jfc.core.ContainerGraphicalEditPart. createEditPol=
icies(ContainerGraphicalEditPart.java:69)
at =
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.jav=
a:230)
at =
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGra=
phicalEditPart.java:212)
at =
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java=
:198)
at =
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPa=
rt.java:727)
at =
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:=
677)
at =
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraph=
icalEditPart.java:554)
at =
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setR=
ootModel(JavaVisualEditorPart.java:504)
at =
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.init=
ializeViewers(JavaVisualEditorPart.java:1121)
at =
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$13.r=
un(JavaVisualEditorPart.java:2098)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at =
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:1=
23)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at =
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:41=
9)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at =
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at =
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivat=
or.java:78)
at =
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplicati=
on(EclipseAppLauncher.java:92)
at =
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Eclips=
eAppLauncher.java:68)
at =
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:4=
00)
at =
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:1=
77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Thanks and Regards,
Varun
------=_NextPart_000_0006_01C6DDA9.6F5375F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi Rich,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have two classes with same name but =
in different=20
jar files(javax.microedition.lcdui.Form),in my classpath.<BR>First one=20
represents the real lcdui class and is in midpapi.jar and the second one =
is my=20
customwidget class<BR>made using JLabel and JTextField in a JPanel. I =
will put=20
these jar files into the <BR>build path of a java project(here the first =
jar=20
file will be midpapi.jar which contains the<BR>real Form class), then I =
will=20
prepend jar file containing customwidget to the classpath of remote=20
VM.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My aim is to provide midpapi.jar =
classes to the=20
user on the IDE side and customwidgets.jar for the <BR>remote VM. I =
thought this=20
would prevent the user from accessing unwanted methods in =
JPanel(containing=20
<BR>JLabel and JTextField) during code generation.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><BR><FONT face=3DArial size=3D2>But I am getting some errors when I =
try to drag=20
and drop my custom widget to the editor area.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am very new to VE, I have not much =
idea what is=20
happening behind the scene. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Please help me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#ff0000 =
size=3D2>java.lang.IllegalStateException:=20
IWAV0168E Improper nesting of mark statements in Expression. Tried to =
pop or=20
endMark to before current mark. Tried to go past Mark# 0.<BR>&nbsp;at=20
org.eclipse.jem.internal.proxy.core.Expression.throwInvalidM arkNesting(Ex=
pression.java:469)<BR>&nbsp;at=20
org.eclipse.jem.internal.proxy.core.Expression.endMark(Expre ssion.java:20=
14)<BR>&nbsp;at=20
org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantia teBeanProxy(B=
eanProxyAdapter.java:357)<BR>&nbsp;at=20
org.eclipse.ve.internal.java.core.MemberContainerProxyAdapte r.initSetting=
(MemberContainerProxyAdapter.java:546)<BR>&nbsp;at=20
org.eclipse.ve.internal.java.core.CompositionProxyAdapter.su bInitBeanProx=
y(CompositionProxyAdapter.java:315)<BR>&nbsp;at=20
org.eclipse.ve.internal.java.core.MemberContainerProxyAdapte r.initBeanPro=
xy(MemberContainerProxyAdapter.java:565)<BR>&nbsp;at=20
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setu=
p.run(JavaVisualEditorPart.java:2089)<BR>&nbsp;at=20
org.eclipse.core.internal.jobs.Worker.run(Worker.java:58).</FONT ></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>and</FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT>&nbsp;</DIV>
<DIV><BR><FONT face=3DArial color=3D#ff0000 =
size=3D2>java.lang.ClassCastException:=20
org.eclipse.ve.internal.java.core.BeanProxyAdapter<BR>at=20
org.eclipse.ve.internal.jfc.core.ComponentGraphicalEditPart. getComponentP=
roxy(ComponentGraphicalEditPart.java:379)<BR>at=20
org.eclipse.ve.internal.jfc.core.ContainerGraphicalEditPart. createLayoutE=
ditPolicy(ContainerGraphicalEditPart.java:80)<BR>at=20
org.eclipse.ve.internal.jfc.core.ContainerGraphicalEditPart. createEditPol=
icies(ContainerGraphicalEditPart.java:69)<BR>at=20
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.jav=
a:230)<BR>at=20
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGra=
phicalEditPart.java:212)<BR>at=20
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java=
:198)<BR>at=20
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPa=
rt.java:727)<BR>at=20
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:=
677)<BR>at=20
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraph=
icalEditPart.java:554)<BR>at=20
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setR=
ootModel(JavaVisualEditorPart.java:504)<BR>at=20
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.init=
ializeViewers(JavaVisualEditorPart.java:1121)<BR>at=20
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$13.r=
un(JavaVisualEditorPart.java:2098)<BR>at=20
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5) <BR>at=20
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:1=
23)<BR>at=20
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3325) <BR>at=
=20
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971) <BR>at =

org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914) <BR>at=
=20
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) <BR>at=20
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:41=
9)<BR>at=20
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149) <BR>a=
t=20
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95) <BR=
>at=20
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivat=
or.java:78)<BR>at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplicati=
on(EclipseAppLauncher.java:92)<BR>at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Eclips=
eAppLauncher.java:68)<BR>at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:4=
00)<BR>at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:1=
77)<BR>at=20
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<BR>at=20
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<BR>at=20
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<BR>at=20
java.lang.reflect.Method.invoke(Unknown Source)<BR>at=20
org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 ) <BR>at=20
org.eclipse.core.launcher.Main.basicRun(Main.java:280)<BR>at=20
org.eclipse.core.launcher.Main.run(Main.java:977)<BR>at=20
org.eclipse.core.launcher.Main.main(Main.java:952)<BR></FONT ></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><FONT =
color=3D#000000>Thanks and=20
Regards,</FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><FONT=20
color=3D#000000>Varun</FONT></DIV></FONT></BODY></HTML >

------=_NextPart_000_0006_01C6DDA9.6F5375F0--
Re: ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a cu [message #131275 is a reply to message #131205] Thu, 21 September 2006 14:29 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Basically don't do that. It is confusing to have the same class in the
classpath twice. Also the BeanProxyAdapter is a class which provides the
connection between the live object on the remote vm and the visual
representation of the object in the VE. It expects the live object to be
of exactly the same type, including super classes, as the type that is
in the java project's classpath.
Re: ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a cu [message #614645 is a reply to message #131205] Thu, 21 September 2006 14:29 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Basically don't do that. It is confusing to have the same class in the
classpath twice. Also the BeanProxyAdapter is a class which provides the
connection between the live object on the remote vm and the visual
representation of the object in the VE. It expects the live object to be
of exactly the same type, including super classes, as the type that is
in the java project's classpath.
Previous Topic:Working with custom Styles
Next Topic:remote jvms
Goto Forum:
  


Current Time: Thu Apr 25 20:24:24 GMT 2024

Powered by FUDForum. Page generated in 0.02741 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top