Jump to content
Chinese-Forums
  • Sign Up

ZDT: Category View Woes


zwxue

Recommended Posts

I'm running ZDT 0.5.2 with JRE 1.5.0-09. When I select the Categories tab, I get the following error message: Unable to create view: Plug-in "net.sourceforge.zdt.flashcard" was unable to instantiate class "net.sourceforge.zdt.flashcard.views.CategoryView". Please note that I had not installed any previous version of ZDT prior to 0.5.2. Any suggestions, anyone?

Link to comment
Share on other sites

Is this the first time you've run the program? Are you running the Windows version? Try running again and when you see the message, click on the 'Details >>' button. Then please use copy/paste and PM the resulting error message that appears.

Usually this message occurs when you run two copies of the program at the same time and they try to share the same database file.

Thanks!

Chris

Link to comment
Share on other sites

Thanks for looking into this. Yes, I'm running this on Windows XP. Here's what I clipped from "Details":

org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [sELECT category_name FROM category] in task 'executing StatementCallback'; nested exception is java.sql.SQLException: Table not found in statement [sELECT category_name FROM category]

java.sql.SQLException: Table not found in statement [sELECT category_name FROM category]

at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)

at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)

at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:250)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:203)

at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:265)

at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:277)

at net.sourceforge.zdt.core.dao.UserEntryDao.getAllCategories(UserEntryDao.java:152)

at net.sourceforge.zdt.flashcard.views.CategoryViewModel.initialize(CategoryViewModel.java:31)

at net.sourceforge.zdt.flashcard.views.CategoryViewController.(CategoryViewController.java:54)

at net.sourceforge.zdt.flashcard.views.CategoryView.(CategoryView.java:122)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:157)

at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)

at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)

at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)

at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:234)

at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)

at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:292)

at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)

at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)

at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)

at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)

at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)

at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)

at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)

at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)

at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)

at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)

at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:795)

at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)

at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)

at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)

at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)

at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)

at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)

at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)

at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)

at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)

at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)

at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at net.sourceforge.zdt.core.ZDTApplication.run(ZDTApplication.java:29)

at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)

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)

Link to comment
Share on other sites

Just uninstalled 0.5.2 & installed ZDT 0.6.0. Unfortunately, Category view is still broken. Here are the "Details":

org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [sELECT category_name FROM category] in task 'executing StatementCallback'; nested exception is java.sql.SQLException: Table not found in statement [sELECT category_name FROM category]

java.sql.SQLException: Table not found in statement [sELECT category_name FROM category]

at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)

at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)

at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:250)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:203)

at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:265)

at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:277)

at net.sourceforge.zdt.core.dao.UserEntryDao.getAllCategories(UserEntryDao.java:152)

at net.sourceforge.zdt.flashcard.views.CategoryViewModel.initialize(CategoryViewModel.java:31)

at net.sourceforge.zdt.flashcard.views.CategoryViewController.(CategoryViewController.java:54)

at net.sourceforge.zdt.flashcard.views.CategoryView.(CategoryView.java:122)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:157)

at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)

at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)

at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)

at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:234)

at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)

at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:292)

at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)

at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)

at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)

at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)

at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)

at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)

at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)

at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)

at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)

at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)

at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:795)

at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)

at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)

at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)

at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)

at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)

at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)

at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)

at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)

at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)

at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)

at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at net.sourceforge.zdt.core.ZDTApplication.run(ZDTApplication.java:29)

at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)

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)

Link to comment
Share on other sites

Actually the error message means that it can't find your user database file. In the program, go to Window > Preferences... > Database, and you should see the directory it's trying to look for your database file. Go to that directory (via windows explorer) and see if you have the files user.script and user.properties in there. I suspect maybe you don't have permissions so the installer could not copy the files to that location? If that's the case, let me know and i'll send you the files you need.

Chris

Link to comment
Share on other sites

Chris,

Both files you mentioned, user.script and user.properties are in C:Documents and Settingszdt, just as it is indicated in Window>Preferences>Database. The files are obviously there, but Categories view still does not work. Also, I am on a stand alone machine. There is no administrator, and the folder system pretty much have all the Windows XP default settings. Thanks again for checking this out. Let me know if you have any more ideas what it may be.

Taren

Link to comment
Share on other sites

Thanks, Bogleg, for figuring out why Categories View was not working. I am posting this brief description just in case someone else has a similar problem:

I installed ZDT 0.6.0 and JRE 1.5.0_09 on a Windows XP / SP2 Tablet PC version OS. For some reason the required file user.script was installed on my system, but it was empty. To see if you have the correct user.script file, check the following:

In ZDT, goto Window>Preferences. Highlight Database. You should see the sub-directory or folder where your user.script file is kept. Using Windows, go to that folder. (eg. mine is at: C:Documents and Settingszdt) Highlight the file user.script. Right click and select Properties. If the Size is 1 KB, you have an empty user.script file, and this is possibly why Categories View is not working on your system. Drop Bobleg a line. I am sure he'll gladly send you the correct one. (The correct file size for user.script should be around 108 KB)

Link to comment
Share on other sites

same problem here. I just "upgraded" to 0.60. I get the message:

Unable to create view: Plug-in "com.digitbit.chinese.rcp.flashcard" was unable to instantiate class "com.digitbit.chinese.rcp.flashcard.views.CategoryView".

My user.script is 154Kb

Help is appreciated!

>>>>>>>>>>>>>>>

(10 Minutes later, playing with ZDT in utter frustration.............)

Whoops, now THAT was fast!

After I did: windows>open perspective>others... ..and chosing "ZDT" it was OK and seem to work fine now.

I will not delete my question since it may help others, hopefully. BTW, Great program!

Link to comment
Share on other sites

Just a remark on this issue: Windows users usually don't have r/w permission on directory "Documents and Settings", this may be part of the problem. zdt should have placed the reqired files in folder "Documents and Settings", where is your XP account name. It would be even more elegant if zdt would place its files in a folder named "Documents and Settings,username>zdt" which is the desired convention used by almost any modern Windows application.

Btw: I'm using zdt under Windows Vista RC2 5744 without any problems - and I am very happy that I have found this program ...

_____________

drahnier

Link to comment
Share on other sites

Drahnier -

Thanks for pointing that out. Actually, the installer does try to put the files in the c:Documents and Settingszdt directory. Are you saying it didn't on your system? How does the program look on Vista? Could you send me a screenshot?

Thanks

Chris

Link to comment
Share on other sites

Ah, sorry my fault. I misse part of the D&S string: The correct directory for XP should be "Documents and SettingsApplication Datazdt", which on a Vista system will be automatically mapped to "UsesAppDatazdt".

zdt uses "Documents and Settingszdt" which is non-standard for up to date XP apps.

I added a screenshot of zdt running under Vista RC2 buld 5744.

717_thumb.attach

Link to comment
Share on other sites

Thanks for the screenshot. Glad it works without having to make any modifications. You are probably right about putting stuff in the Application Data folder. Although a quick glance at my current computer shows that there are a lot of Java apps stuff their data where I do including Dimsum, Netbeans, Intellij Idea. I think it's a cross-platform issue. On Windows the built-in user.home Java system property points to the "documents and settings" directory.

Chris

Link to comment
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...