Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » NPE on 0.2 (and some general info)
NPE on 0.2 (and some general info) [message #659074] Thu, 10 March 2011 21:36 Go to next message
Pietro Bonanno is currently offline Pietro BonannoFriend
Messages: 13
Registered: July 2009
Junior Member
I installed last version of Eclipse, then installed 0.2 version of Sapphire. When trying the demo project, a NPE occurs:
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=it_IT
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -product org.eclipse.epp.package.rcp.product -data /home/pbonanno/dev/java/eclipse/workspace-sapphire/../runtime-EclipseApplication(1) -dev file:/home/pbonanno/dev/java/eclipse/workspace-sapphire/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application (1)/dev.properties -os linux -ws gtk -arch x86 -consoleLog

!ENTRY org.eclipse.ui.workbench 4 0 2011-03-10 22:21:00.243
!MESSAGE Unable to create view ID org.eclipse.sapphire.samples.fileBugReportView: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.sapphire.modeling.localization.ClassLocalizationService.load(ClassLocalizationService.java:64)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.load(StandardLocalizationService.java:71)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.init(StandardLocalizationService.java:47)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.text(StandardLocalizationService.java:150)
	at org.eclipse.sapphire.modeling.ModelMetadataItem.getLabel(ModelMetadataItem.java:97)
	at org.eclipse.sapphire.modeling.ValueProperty.createValidators(ValueProperty.java:146)
	at org.eclipse.sapphire.modeling.ModelProperty.getValidator(ModelProperty.java:286)
	at org.eclipse.sapphire.modeling.Value.initValidation(Value.java:73)
	at org.eclipse.sapphire.modeling.Value.init(Value.java:63)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.refreshProperty(BugReport.java:275)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:385)
	at org.eclipse.sapphire.modelingeclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=it_IT
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -product org.eclipse.epp.package.rcp.product -data /home/pbonanno/dev/java/eclipse/workspace-sapphire/../runtime-EclipseApplication(1) -dev file:/home/pbonanno/dev/java/eclipse/workspace-sapphire/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application (1)/dev.properties -os linux -ws gtk -arch x86 -consoleLog

!ENTRY org.eclipse.ui.workbench 4 0 2011-03-10 22:21:00.243
!MESSAGE Unable to create view ID org.eclipse.sapphire.samples.fileBugReportView: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.sapphire.modeling.localization.ClassLocalizationService.load(ClassLocalizationService.java:64)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.load(StandardLocalizationService.java:71)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.init(StandardLocalizationService.java:47)
	at org.eclipse.sapphire.modeling.localization.StandardLocalizationService.text(StandardLocalizationService.java:150)
	at org.eclipse.sapphire.modeling.ModelMetadataItem.getLabel(ModelMetadataItem.java:97)
	at org.eclipse.sapphire.modeling.ValueProperty.createValidators(ValueProperty.java:146)
	at org.eclipse.sapphire.modeling.ModelProperty.getValidator(ModelProperty.java:286)
	at org.eclipse.sapphire.modeling.Value.initValidation(Value.java:73)
	at org.eclipse.sapphire.modeling.Value.init(Value.java:63)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.refreshProperty(BugReport.java:275)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:385)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:378)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.getDetails(BugReport.java:80)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.read(BugReport.java:410)
	at org.eclipse.sapphire.modeling.ModelElement.read(ModelElement.java:161)
	at org.eclipse.sapphire.modeling.ModelElement.refreshValidationResult(ModelElement.java:521)
	at org.eclipse.sapphire.modeling.ModelElement.validate(ModelElement.java:503)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshValidationState(ModelElementHandle.java:258)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshInternal(ModelElementHandle.java:224)
	at org.eclipse.sapphire.modeling.ModelElementHandle.init(ModelElementHandle.java:42)
	at org.eclipse.sapphire.samples.ezbug.internal.FileBugReportOp.refreshProperty(FileBugReportOp.java:65)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:385)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:378)
	at org.eclipse.sapphire.samples.ezbug.internal.FileBugReportOp.getBugReport(FileBugReportOp.java:37)
	at org.eclipse.sapphire.samples.ezbug.ui.FileBugReportView.createPartControl(FileBugReportView.java:40)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1071)
	at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3822)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3819)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3795)
	at org.eclipse.sapphire.samples.ezbug.ui.FileBugReportHandler4.execute(FileBugReportHandler4.java:38)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	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.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
.ModelElement.refresh(ModelElement.java:378)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.getDetails(BugReport.java:80)
	at org.eclipse.sapphire.samples.ezbug.internal.BugReport.read(BugReport.java:410)
	at org.eclipse.sapphire.modeling.ModelElement.read(ModelElement.java:161)
	at org.eclipse.sapphire.modeling.ModelElement.refreshValidationResult(ModelElement.java:521)
	at org.eclipse.sapphire.modeling.ModelElement.validate(ModelElement.java:503)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshValidationState(ModelElementHandle.java:258)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshInternal(ModelElementHandle.java:224)
	at org.eclipse.sapphire.modeling.ModelElementHandle.init(ModelElementHandle.java:42)
	at org.eclipse.sapphire.samples.ezbug.internal.FileBugReportOp.refreshProperty(FileBugReportOp.java:65)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:385)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:378)
	at org.eclipse.sapphire.samples.ezbug.internal.FileBugReportOp.getBugReport(FileBugReportOp.java:37)
	at org.eclipse.sapphire.samples.ezbug.ui.FileBugReportView.createPartControl(FileBugReportView.java:40)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1071)
	at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3822)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3819)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3795)
	at org.eclipse.sapphire.samples.ezbug.ui.FileBugReportHandler4.execute(FileBugReportHandler4.java:38)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	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.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)


I'm running Helios on Ubuntu 10.04.

Some more generic question:

- Is 0.2 stable enough to write a small business client? Several CRUD views, a local DB, no need for complex tasks.

- The XML markup for views is giant, but I can live with that. What it seems to be missing is a schema. Do you plan to release it soon? Even a simple manual could be enough.

Thank you

Regards
Re: NPE on 0.2 (and some general info) [message #659278 is a reply to message #659074] Fri, 11 March 2011 19:18 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Hi Pietro,

I was not able to reproduce the NPE using the 0.2 release. How did you install Sapphire? In particular, did you make sure to install the SDK feature into your dev eclipse. Sapphire requires build time support (aka the SDK) to be present in your dev eclipse.

If you are using the update site, I recommend you install "Sapphire" and "Sapphire SDK" features into your dev eclipse. In your target platform, you will want at least "Sapphire" feature, which is the runtime portion, but most likely you will want "Sapphire Source" as well. If you want to keep it simple and use dev eclipse as the target platform, just install all three of these features.

Another thing that I've seen happen is that Eclipse gets a bit confused post project import. I recommend refreshing the imported project and invoking a clean build a time or two to work the confusion out of the system.

To see if the Sapphire build is working properly, look at your project in your file system browser. The .resources and .apt_generated directories should be present and have content in them.

> Is 0.2 stable enough to write a small business client? Several
> CRUD views, a local DB, no need for complex tasks.

I would recommend 0.2.1 at this point. From our perspective, 0.2.1 release is very stable. We are using it as part of the upcoming release of Oracle Enterprise Pack for Eclipse.

In terms of using Sapphire as a DB front-end, we don't have any specific support for database integration, but you should be able to use in-memory model and move data in/out on database load/save (as opposed to on property change).

I imagine you are building an RCP app as opposed to a plugin for Eclipse IDE. We haven't tested Sapphire in the context of an RCP app as our own usecases focus on extending Eclipse IDE. I certainly don't know of any reason that RCP wouldn't work, but if you run into problems, you can report them on this forum or via bugzilla. We try to be very responsive to adopter issues.

> The XML markup for views is giant, but I can live with that. What it
> seems to be missing is a schema. Do you plan to release it soon?
> Even a simple manual could be enough.

We are not planning to create an XML Schema for sdef files as the language is meant to be extensible (a third party can define new parts). XML Schema doesn't handle such usecases. We used to have a schema, but it had so many wildcards to render it useless.

We do know that the documention is not complete. We are working on filling it out. What we do have can be found under Help Content if you install the SDK.

For the 0.3 release (due out concurrently with Indigo in June 2011) we are working on a form-based editor for sdef files that will go a long way towards making UI definitions easier to author. We also plan to focus on other SDK improvements, such as the documentation.

In the meantime, for the 0.2.1 release, I would recommend studying the samples and reviewing the documentation that we do have. If something is unclear or you run into issues, don't hesitate to ask on this forum. Knowing which areas new adopters find confusing will help us focus our documentation and tooling efforts.

Thanks,

- Konstantin
Re: NPE on 0.2 (and some general info) [message #659294 is a reply to message #659278] Fri, 11 March 2011 21:40 Go to previous message
Pietro Bonanno is currently offline Pietro BonannoFriend
Messages: 13
Registered: July 2009
Junior Member
Konstantin Komissarchik wrote on Fri, 11 March 2011 14:18
Hi Pietro,

I was not able to reproduce the NPE using the 0.2 release. How did you install Sapphire? In particular, did you make sure to install the SDK feature into your dev eclipse. Sapphire requires build time support (aka the SDK) to be present in your dev eclipse.
...cut...


I'll try your suggestions on next week. Hope to post some useful info there.

Quote:
In terms of using Sapphire as a DB front-end, we don't have any specific support for database integration, but you should be able to use in-memory model and move data in/out on database load/save (as opposed to on property change).

yeah, this is what I would like to do, possibly with an automatic mapping with a DB (db4o?)

Quote:
I imagine you are building an RCP app as opposed to a plugin for Eclipse IDE. We haven't tested Sapphire in the context of an RCP app as our own usecases focus on extending Eclipse IDE. I certainly don't know of any reason that RCP wouldn't work, but if you run into problems, you can report them on this forum or via bugzilla. We try to be very responsive to adopter issues.


I'm trying to remove, as much is possible, the manual work for business apps definition.
I'm currently evaluating Sapphire, Redview and Scout (and Wazaabi, but it seems abandoned). I like the Sapphire approach (domain driven, right?) and Redview. Scout is a client/server, it seems over my scopes.


Quote:
In the meantime, for the 0.2.1 release, I would recommend studying the samples and reviewing the documentation that we do have. If something is unclear or you run into issues, don't hesitate to ask on this forum. Knowing which areas new adopters find confusing will help us focus our documentation and tooling efforts.

Thanks,

- Konstantin

Thanks for your kindly reply, Konstantin, and best wishes for your project
Previous Topic:Announcing Sapphire 0.2.1
Next Topic:State of Sapphire for Spring 2011
Goto Forum:
  


Current Time: Tue Sep 24 16:55:59 GMT 2024

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

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

Back to the top