The error message is not descriptive enough without having access to the web.ui.autosync.version.AutoSyncVersion and web.ui.autosync.version.VersionInfo classes. It might be a problem with unsigned jars, or might simply be what the message states - an issue with trying to set the web.ui.autosync.version.AutoSyncVersion.versionInfo field to a org.apache.pivot.wtk.TablePane.
web.ui.autosync.version.AutoSyncVersion.versionInfo appears to be an instance of web.ui.autosync.version.VersionInfo so it would make sense that you would not be able to set it to a TablePane instance, as TablePane does not extend web.ui.autosync.version.VersionInfo My guess is that the web.ui.autosync.version.AutoSyncVersion.versionInfo field is annotated with @WTKX, which causes WTKXSerializer to try to set its value to the included WTKX file due to it having a matching WTKX ID. (wtkx:id="versionInfo") The line in WTKXSerializer which is referenced in the stack trace (1337) relates to binding to a Pivot WTKX annotation. This uses reflection which will run fine under normal circumstances in a desktop app, but will fail with a web app unless all jars are signed. This is a problem which has come up a number of times on the mailing list before. I'll try to dig up some references later if need be, but you should be able to find some yourself if you search for 'trusted code', 'signed applet', 'jar signing' etc. You should be able to rule this out by running the same code fragment as a desktop app (Just serializing the autoSyncVersion.wtkx file) Chris On 30 November 2011 21:45, Jason Dorsey <[email protected]> wrote: > This is a web app that uses 1.5. > > > > Jason Dorsey | Engineering Intern > > 1233 West Loop South > > Houston, TX 77027 USA > > [email protected] > > www.attachmate.com | www.netiq.com > > > > From: Chris Bartlett [mailto:[email protected]] > Sent: Wednesday, November 30, 2011 3:15 PM > To: [email protected] > Subject: Re: TablePane Question > > > > Jason, > > Can you confirm the exact Pivot version please? > > 1.5, 1.5.1, 1.5.2? > > Also, is this a web or desktop app? > > Chris > > On Nov 30, 2011 8:42 PM, "Jason Dorsey" <[email protected]> wrote: > > Hey, > > > > I want to apologize up front for the length of this email… > > > > I have taken over an old Pivot 1.5 app, and I am trying to take examples > from an existing process and create a similar one. There is an existing > wizard that takes input from the user (sets up a card pane and includes src > from several wtkx files) and then processes the information at the end. > > > > All I am trying to do is get one screen to show server/UI/middle tier > version information. I have the logic in place that probes for the latest > versions and lets the UI know when it needs to be updated and locks out > certain functionality. What I am having the hardest time doing is simply > getting a table pane created. > > > > Here is what I have… > > > > CODE > > > > private class ViewVersionAction extends Action > > { > > @Override > > public void perform() > > { > > try > > { > > //AutoSyncTemplateWarning astw = > (AutoSyncTemplateWarning) > AutoSyncView.readObject("xml/autosync/version/versionInfo.wtkx"); > > AutoSyncVersion asv = (AutoSyncVersion) > AutoSyncView.readObject("xml/autosync/version/autoSyncVersion.wtkx"); > > asv.setPreferredSize(600, 350); > > asv.setLocation(getWidth() / 2 - > asv.getPreferredWidth() / 2, getHeight() / 2 - asv.getPreferredHeight() / > 2); > > asv.open(AutoSyncView.display, AutoSyncView.window); > > asv.register(selfReference); > > > > } > > catch(Exception e) > > { > > e.printStackTrace(log.getPrintStream()); > > e.printStackTrace(); > > } > > } > > } > > > > autoSyncVersion.wtkx > > > > <siu.autosync.version:AutoSyncVersion > > xmlns:wtkx="http://pivot.apache.org/wtkx" > > xmlns="org.apache.pivot.wtk" > > xmlns:content="org.apache.pivot.wtk.content" > > xmlns:siu.autosync.version="web.ui.autosync.version" > title="AutoSync Version"> > > <content> > > <TablePane styles="{padding:8, > horizontalSpacing:5, verticalSpacing:5}"> > > <columns> > > > <TablePane.Column width="1*" /> > > </columns> > > <rows> > > > <TablePane.Row height="1*"> > > > <CardPane width="100"> > > > <wtkx:include src="versionInfo.wtkx" wtkx:id="versionInfo"/> > > > </CardPane> > > > </TablePane.Row> > > </rows> > > </TablePane> > > </content> > > </siu.autosync.version:AutoSyncVersion> > > > > > > > > versionInfo.wktx > > > > <TablePane > > xmlns:wtkx="http://pivot.apache.org/wtkx" > > xmlns="org.apache.pivot.wtk" > > xmlns:content="org.apache.pivot.wtk.content"> > > <columns> > > <TablePane.Column width="600" /> > > </columns> > > <rows> > > <TablePane.Row height="230"> > > <TextArea enabled="false" > editable="false" wtkx:id="info" /> > > </TablePane.Row> > > <TablePane.Row height="50"> > > <Separator/> > > </TablePane.Row> > > <TablePane.Row height="70"> > > <BoxPane > styles="{horizontalAlignment:'center'}"> > > <PushButton > wtkx:id="okButton" buttonData="OK"/> > > </BoxPane> > > </TablePane.Row> > > </rows> > > </TablePane> > > > > I have all the variables defined correctly in the classes, but I get this > error: > > > > java.lang.IllegalArgumentException: Can not set > web.ui.autosync.version.VersionInfo field > web.ui.autosync.version.AutoSyncVersion.versionInfo to > org.apache.pivot.wtk.TablePane > > at > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown > Source) > > at > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown > Source) > > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source) > > at java.lang.reflect.Field.set(Unknown Source) > > at org.apache.pivot.wtkx.WTKXSerializer.bind(WTKXSerializer.java:1337) > > at org.apache.pivot.wtkx.WTKXSerializer.bind(WTKXSerializer.java:1281) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:481) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:411) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:366) > > at web.ui.autosync.AutoSyncView.readObject(AutoSyncView.java:294) > > at > web.ui.autosync.AutoSyncView$ViewVersionAction.perform(AutoSyncView.java:838) > > at org.apache.pivot.wtk.Button.press(Button.java:367) > > at org.apache.pivot.wtk.Menu$Item.press(Menu.java:214) > > at > org.apache.pivot.wtk.skin.MenuItemSkin.mouseUp(MenuItemSkin.java:142) > > at > org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseUp(Component.java:462) > > at org.apache.pivot.wtk.Component.mouseUp(Component.java:2610) > > at org.apache.pivot.wtk.Container.mouseUp(Container.java:742) > > at org.apache.pivot.wtk.Container.mouseUp(Container.java:742) > > at org.apache.pivot.wtk.Container.mouseUp(Container.java:742) > > at org.apache.pivot.wtk.Container.mouseUp(Container.java:742) > > at org.apache.pivot.wtk.Container.mouseUp(Container.java:742) > > at > org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:874) > > at java.awt.Component.processEvent(Unknown Source) > > at > org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:655) > > at java.awt.Component.dispatchEventImpl(Unknown Source) > > at java.awt.Component.dispatchEvent(Unknown Source) > > at java.awt.EventQueue.dispatchEvent(Unknown Source) > > at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) > > at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) > > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > at java.awt.EventDispatchThread.run(Unknown Source) > > > > Any help is greatly appreaciated! > > > > Jason Dorsey | Engineering Intern > >
