Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » "DateTimeBrowseActionHandler" is not a valid Java type name
"DateTimeBrowseActionHandler" is not a valid Java type name [message #1673741] Sat, 14 March 2015 12:54 Go to next message
Uli B is currently offline Uli BFriend
Messages: 36
Registered: January 2012
Member
Hello,

I have a Sapphire (8.1.2) application running fine with Eclipse Luna. With Eclipse 3.8.2 (unfortunately I need it there), I get a runtime error when opening a file:

Sapphire user interface definition has failed validation. "DateTimeBrowseActionHandler" is not a valid Java type name
	at org.eclipse.sapphire.ui.def.DefinitionLoader$Reference.resolve(DefinitionLoader.java:355)
	at org.eclipse.sapphire.ui.SapphireEditor.createPage(SapphireEditor.java:691)
	at org.eclipse.sapphire.ui.swt.xml.editor.SapphireEditorForXml.createFormPages(SapphireEditorForXml.java:196)
	at org.eclipse.sapphire.ui.swt.xml.editor.SapphireEditorForXml.createEditorPages(SapphireEditorForXml.java:163)
	at org.eclipse.sapphire.ui.SapphireEditor.addPages(SapphireEditor.java:599)
	at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:315)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2955)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2855)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2806)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2802)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2786)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2777)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
	at org.bricks.etml.wizards.SampleNewWizard$2.run(SampleNewWizard.java:118)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
	at org.bricks.etml.wizards.SampleNewWizard.performFinish(SampleNewWizard.java:70)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:259)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	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.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)



In the sdef file I have:

<action-handler>
  <action>Sapphire.Browse</action>
  <impl>DateTimeBrowseActionHandler</impl>
</action-handler>


and DateTimeBrowseActionHandler extends BrowseActionHandler.

What's wrong?
Re: "DateTimeBrowseActionHandler" is not a valid Java type name [message #1679764 is a reply to message #1673741] Mon, 16 March 2015 19:05 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I am not certain what's going on here. Could you try debugging this a bit? Place a breakpoint on the constructor of JavaTypeName and see what happens when it gets to this class.
Re: "DateTimeBrowseActionHandler" is not a valid Java type name [message #1680043 is a reply to message #1679764] Mon, 16 March 2015 21:35 Go to previous messageGo to next message
Uli B is currently offline Uli BFriend
Messages: 36
Registered: January 2012
Member
Seems after adding the org.eclipse.sapphire.osgi.fragment plugin to the dependencies of the feature project, the error is gone.

Strange enough, in the feature.xml file the plugin could not be resolved (error 'Plug-in reference cannot be resolved').

Anyway, many thanks for having a look.
Re: "DateTimeBrowseActionHandler" is not a valid Java type name [message #1692147 is a reply to message #1673741] Mon, 13 April 2015 23:42 Go to previous messageGo to next message
Ralf S. is currently offline Ralf S.Friend
Messages: 5
Registered: April 2015
Junior Member
I had the same problem when I install my feature onto a freshly unpacked Luna SR2.

As I checked the installation, I saw that all the expected Sapphire plug-ins were available, but no Sapphire feature. After I installed a Sapphire feature from the update site everything works OK.

I finally fixed it by adding the required Sapphire features to my feature.xml:

   <requires>
      <import feature="org.eclipse.sapphire" version="8.1.0.201411041306" match="greaterOrEqual"/>
      <import feature="org.eclipse.sapphire.osgi" version="8.1.0.201411041306" match="greaterOrEqual"/>
      <import feature="org.eclipse.sapphire.modeling.xml" version="8.1.0.201411041306" match="greaterOrEqual"/>
      <import feature="org.eclipse.sapphire.ui.swt.xml.editor" version="8.1.0.201411041306" match="greaterOrEqual"/>
      <import feature="org.eclipse.sapphire.ui" version="8.1.0.201411041306" match="greaterOrEqual"/>
   </requires>


This solves it for me, but I don't understand why this is needed.

Ralf
Re: "DateTimeBrowseActionHandler" is not a valid Java type name [message #1692265 is a reply to message #1692147] Tue, 14 April 2015 16:01 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
The core Sapphire framework doesn't understand OSGi. It expects all Sapphire jars and all client jars in the same system classloader as you would in a traditional Java app. To load components in an OSGi environment, where different bundles have their own classloaders, the org.eclipse.sapphire.osgi.fragment is required. It's included in org.eclipse.sapphire.osgi feature.
Re: "DateTimeBrowseActionHandler" is not a valid Java type name [message #1692272 is a reply to message #1692265] Tue, 14 April 2015 16:51 Go to previous message
Ralf S. is currently offline Ralf S.Friend
Messages: 5
Registered: April 2015
Junior Member
Yes, the following addition to feature.xml does it:

   <requires>
      <import feature="org.eclipse.sapphire.osgi" version="8.1.0" match="greaterOrEqual"/>
   </requires>
Previous Topic:Tree-like property editor
Next Topic:Fact not displayed on empty field
Goto Forum:
  


Current Time: Sun Oct 06 17:22:43 GMT 2024

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

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

Back to the top