Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Error with Chart Fields(no instance found for query: interface)
Error with Chart Fields [message #1823631] Mon, 30 March 2020 14:14 Go to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
Hello,
I am working with chart field and I am facing a problem with the sample in the widget site, the issue is about the instanciation of the
IDataObjectMapper
the pom file is updated in the client to include the
org.eclipse.scout.rt.dataobject
I tryied creating an interface that extend the IDataObjectMapper and create a class in the server that implemented the class but the same error occurs
in the IChartField Interface in the sample.
Any idea ?
Kind Regards

Re: Error with Chart Fields [message #1823634 is a reply to message #1823631] Mon, 30 March 2020 14:30 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hello,

This chart-field here? Can you please post a stacktrace of the error?
Do you simply try to run the Widgets-app with the chart-field (as in the link above) locally on your machine? Or did you make changes to the app?
Since IDataObjectMapper is only an interface you probably forgot to add the implementation to your POM too? Like JacksonDataObjectMapper in org.eclipse.scout.rt.jackson?

Cheers,
André


Eclipse Scout Homepage | Documentation | GitHub
Re: Error with Chart Fields [message #1823642 is a reply to message #1823634] Mon, 30 March 2020 15:42 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
Hello,
Here it is :

static ChartConfigDo readChartConfig(InputStream is) {
Assertions.assertNotNull(is);
IDataObjectMapper customDataObjectMapper = BEANS.get(IDataObjectMapper.class);
return customDataObjectMapper.readValue(is, ChartConfigDo.class);
}
The error stacj is ***

Quote:

-03-30 17:38:43,624 ERROR [scout-model-thread-25 Processing JSON request] org.eclipse.scout.rt.platform.exception.ExceptionHandler.handlePlatformException(ExceptionHandler.java:124) - - MDC[principal=emira, uiSession=1:8ffac0nn5ldv752vop85k8qj4qu76ag9q46sueqi22etclvng3l, scoutSession=1ddnvver8gi27atgtnmks910sp9uounb6jnl2pq2mds2ajteo99g, jobName=Processing JSON request, cid=DS2MU5FT3WD/3]
org.eclipse.scout.rt.platform.util.Assertions$AssertionException: Assertion error: no instance found for query: interface org.eclipse.scout.rt.dataobject.IDataObjectMapper [user=anis, innerClass=class com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox$CustomerBillsField, innerClass=class com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox, innerClass=class com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox, innerClass=class com.anis.recovery.app.recovery.customers.CustomerForm$MainBox]
at org.eclipse.scout.rt.platform.util.Assertions.fail(Assertions.java:629)
at org.eclipse.scout.rt.platform.util.Assertions.assertNotNull(Assertions.java:87)
at org.eclipse.scout.rt.platform.BEANS.get(BEANS.java:42)
at com.anis.recovery.app.recovery.custom.chartfields.IChartField.readChartConfig(IChartField.java:32)
at com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox$CustomerBillsField.getConfiguredChartConfig(CustomerForm.java:481)
at com.anis.recovery.app.recovery.custom.chartfields.AbstractChartField.initConfig(AbstractChartField.java:14)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.lambda$0(ObjectExtensions.java:84)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:100)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfigAndBackupExtensionContext(ObjectExtensions.java:62)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.initConfigInternal(AbstractFormField.java:178)
at org.eclipse.scout.rt.client.ui.AbstractWidget.callInitializer(AbstractWidget.java:69)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.<init>(AbstractFormField.java:145)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.<init>(AbstractFormField.java:134)
at com.anis.recovery.app.recovery.custom.chartfields.AbstractChartField.<init>(AbstractChartField.java:9)
at com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox$CustomerBillsField.<init>(CustomerForm.java:478)
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 org.eclipse.scout.rt.platform.reflect.ConfigurationUtility.newInnerInstance(ConfigurationUtility.java:198)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.initConfig(AbstractCompositeField.java:121)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.initConfig(AbstractGroupBox.java:371)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.lambda$0(ObjectExtensions.java:84)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:100)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfigAndBackupExtensionContext(ObjectExtensions.java:62)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.initConfigInternal(AbstractFormField.java:178)
at org.eclipse.scout.rt.client.ui.AbstractWidget.callInitializer(AbstractWidget.java:69)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.<init>(AbstractFormField.java:145)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.<init>(AbstractCompositeField.java:54)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.<init>(AbstractGroupBox.java:66)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.<init>(AbstractGroupBox.java:62)
at com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox.<init>(CustomerForm.java:428)
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 org.eclipse.scout.rt.platform.reflect.ConfigurationUtility.newInnerInstance(ConfigurationUtility.java:198)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.initConfig(AbstractCompositeField.java:121)
at org.eclipse.scout.rt.client.ui.form.fields.splitbox.AbstractSplitBox.initConfig(AbstractSplitBox.java:148)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.lambda$0(ObjectExtensions.java:84)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:100)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfigAndBackupExtensionContext(ObjectExtensions.java:62)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.initConfigInternal(AbstractFormField.java:178)
at org.eclipse.scout.rt.client.ui.AbstractWidget.callInitializer(AbstractWidget.java:69)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.<init>(AbstractFormField.java:145)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.<init>(AbstractCompositeField.java:54)
at org.eclipse.scout.rt.client.ui.form.fields.splitbox.AbstractSplitBox.<init>(AbstractSplitBox.java:42)
at org.eclipse.scout.rt.client.ui.form.fields.splitbox.AbstractSplitBox.<init>(AbstractSplitBox.java:38)
at com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox.<init>(CustomerForm.java:189)
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 org.eclipse.scout.rt.platform.reflect.ConfigurationUtility.newInnerInstance(ConfigurationUtility.java:198)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.initConfig(AbstractCompositeField.java:121)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.initConfig(AbstractGroupBox.java:371)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.lambda$0(ObjectExtensions.java:84)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:100)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfigAndBackupExtensionContext(ObjectExtensions.java:62)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.initConfigInternal(AbstractFormField.java:178)
at org.eclipse.scout.rt.client.ui.AbstractWidget.callInitializer(AbstractWidget.java:69)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractFormField.<init>(AbstractFormField.java:145)
at org.eclipse.scout.rt.client.ui.form.fields.AbstractCompositeField.<init>(AbstractCompositeField.java:54)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.<init>(AbstractGroupBox.java:66)
at org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox.<init>(AbstractGroupBox.java:62)
at com.anis.recovery.app.recovery.customers.CustomerForm$MainBox.<init>(CustomerForm.java:186)
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 org.eclipse.scout.rt.platform.reflect.ConfigurationUtility.newInnerInstance(ConfigurationUtility.java:198)
at org.eclipse.scout.rt.client.ui.form.AbstractForm.initConfig(AbstractForm.java:670)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.lambda$0(ObjectExtensions.java:84)
at org.eclipse.scout.rt.shared.extension.ExtensionRegistry.runInContext(ExtensionRegistry.java:740)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:97)
at org.eclipse.scout.rt.shared.extension.ObjectExtensions.initConfig(ObjectExtensions.java:58)
at org.eclipse.scout.rt.client.ui.form.AbstractForm.lambda$0(AbstractForm.java:272)
at org.eclipse.scout.rt.platform.util.concurrent.Callables.lambda$0(Callables.java:31)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxMandatory(TransactionProcessor.java:156)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequired(TransactionProcessor.java:139)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:78)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:139)
at org.eclipse.scout.rt.platform.context.RunContext.run(RunContext.java:110)
at org.eclipse.scout.rt.client.ui.form.AbstractForm.initConfigInternal(AbstractForm.java:272)
at org.eclipse.scout.rt.client.ui.AbstractWidget.callInitializer(AbstractWidget.java:69)
at org.eclipse.scout.rt.client.ui.form.AbstractForm.<init>(AbstractForm.java:231)
at org.eclipse.scout.rt.client.ui.form.AbstractForm.<init>(AbstractForm.java:215)
at com.anis.recovery.app.recovery.customers.CustomerForm.<init>(CustomerForm.java:58)
at com.anis.recovery.app.recovery.customers.CustomerNodePage.execPageActivated(CustomerNodePage.java:32)
at org.eclipse.scout.rt.client.ui.desktop.outline.pages.AbstractPage$LocalPageExtension.execPageActivated(AbstractPage.java:1242)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain$1.callMethod(PageChains.java:78)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain$1.callMethod(PageChains.java:1)
at org.eclipse.scout.rt.shared.extension.AbstractExtensionChain.callChain(AbstractExtensionChain.java:113)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain.execPageActivated(PageChains.java:81)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.AbstractPageExtension.execPageActivated(AbstractPageExtension.java:50)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain$1.callMethod(PageChains.java:78)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain$1.callMethod(PageChains.java:1)
at org.eclipse.scout.rt.shared.extension.AbstractExtensionChain.callChain(AbstractExtensionChain.java:113)
at org.eclipse.scout.rt.client.extension.ui.desktop.outline.pages.PageChains$PagePageActivatedChain.execPageActivated(PageChains.java:81)
at org.eclipse.scout.rt.client.ui.desktop.outline.pages.AbstractPage.interceptPageActivated(AbstractPage.java:1155)
at org.eclipse.scout.rt.client.ui.desktop.outline.pages.AbstractPage.pageActivatedNotify(AbstractPage.java:807)
at org.eclipse.scout.rt.client.ui.desktop.outline.AbstractOutline.makeActivePageToContextPage(AbstractOutline.java:653)
at org.eclipse.scout.rt.client.ui.desktop.outline.DefaultPageChangeStrategy.pageChanged(DefaultPageChangeStrategy.java:39)
at org.eclipse.scout.rt.client.ui.desktop.outline.AbstractOutline.handleActivePageChanged(AbstractOutline.java:743)
at org.eclipse.scout.rt.client.ui.desktop.outline.AbstractOutline.nodesSelectedInternal(AbstractOutline.java:733)
at org.eclipse.scout.rt.client.ui.basic.tree.AbstractTree.fireNodesSelected(AbstractTree.java:2315)
at org.eclipse.scout.rt.client.ui.basic.tree.AbstractTree.selectNodes(AbstractTree.java:1947)
at org.eclipse.scout.rt.client.ui.basic.tree.AbstractTree$P_UIFacade.setNodesSelectedFromUI(AbstractTree.java:2875)
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.scout.rt.client.ModelContextProxy.lambda$1(ModelContextProxy.java:49)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxMandatory(TransactionProcessor.java:156)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequired(TransactionProcessor.java:139)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:78)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
at org.eclipse.scout.rt.client.ModelContextProxy.lambda$0(ModelContextProxy.java:49)
at com.sun.proxy.$Proxy31.setNodesSelectedFromUI(Unknown Source)
at org.eclipse.scout.rt.ui.html.json.tree.JsonTree.handleUiNodesSelected(JsonTree.java:1065)
at org.eclipse.scout.rt.ui.html.json.tree.JsonTree.handleUiEvent(JsonTree.java:1011)
at org.eclipse.scout.rt.ui.html.json.JsonEventProcessor.processEvent(JsonEventProcessor.java:52)
at org.eclipse.scout.rt.ui.html.json.JsonEventProcessor.processEvents(JsonEventProcessor.java:37)
at org.eclipse.scout.rt.ui.html.UiSession.processJsonRequestInternal(UiSession.java:817)
at org.eclipse.scout.rt.platform.util.concurrent.Callables.lambda$0(Callables.java:31)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.job.internal.ExceptionProcessor.intercept(ExceptionProcessor.java:41)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxMandatory(TransactionProcessor.java:156)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequired(TransactionProcessor.java:139)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:78)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:38)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.job.internal.CallableChainExceptionHandler.intercept(CallableChainExceptionHandler.java:32)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.lambda$0(JobFutureTask.java:106)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:175)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:63)


Re: Error with Chart Fields [message #1823685 is a reply to message #1823642] Tue, 31 March 2020 07:10 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
As I thought: the BeanManager can't find an instance for the IDataObjectMapper. Try to add a maven-dependecy to "org.eclipse.scout.rt.jackson" in the pom.xml of your Scout client app.

Eclipse Scout Homepage | Documentation | GitHub

[Updated on: Tue, 31 March 2020 07:10]

Report message to a moderator

Re: Error with Chart Fields [message #1823719 is a reply to message #1823685] Tue, 31 March 2020 15:39 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
I added the jackson project as a dependency and now I am getting an other problem regarding the js file in ui.html files,
I added the js file ( Chart and ChartAdapter ) and imported them in index.js like this

export {default as ChartField} from './custom/chartfields/ChartField';
export {default as ChartFieldAdapter} from './custom/chartfields/ChartFieldAdapter';

but when I run the project it stuck in the initial load, nothing happing, not even the login window is accessible, If I remove the import it loads but generate error when accessing the chart form

:

lang.IllegalArgumentException: No factory found for model null/ChartField (com.anis.recovery.app.recovery.customers.CustomerForm$MainBox$ContainerBox$CustomerDetailBox$ChartField)
	at org.eclipse.scout.rt.ui.html.json.MainJsonObjectFactory.createJsonAdapter(MainJsonObjectFactory.java:59)
	at org.eclipse.scout.rt.ui.html.UiSession.newJsonAdapter(UiSession.java:1056)
	at org.eclipse.scout.rt.ui.html.UiSession.createJsonAdapter(UiSession.java:1042)
	at org.eclipse.scout.rt.ui.html.UiSession.getOrCreateJsonAdapter(UiSession.java:1037)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:207)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapter(JsonAdapterProperty.java:110)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapters(JsonAdapterProperty.java:94)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapters(JsonAdapterProperty.java:85)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.attachChildAdapters(JsonAdapterProperty.java:150)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.attachChildAdapters(AbstractJsonPropertyObserver.java:95)
	at org.eclipse.scout.rt.ui.html.json.form.fields.groupbox.JsonGroupBox.attachChildAdapters(JsonGroupBox.java:47)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.init(AbstractJsonAdapter.java:103)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.init(AbstractJsonPropertyObserver.java:48)
	at org.eclipse.scout.rt.ui.html.UiSession.newJsonAdapter(UiSession.java:1057)
	at org.eclipse.scout.rt.ui.html.UiSession.createJsonAdapter(UiSession.java:1042)
	at org.eclipse.scout.rt.ui.html.UiSession.getOrCreateJsonAdapter(UiSession.java:1037)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:207)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:196)
	at org.eclipse.scout.rt.ui.html.json.form.fields.splitbox.JsonSplitBox.attachChildAdapters(JsonSplitBox.java:151)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.init(AbstractJsonAdapter.java:103)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.init(AbstractJsonPropertyObserver.java:48)
	at org.eclipse.scout.rt.ui.html.UiSession.newJsonAdapter(UiSession.java:1057)
	at org.eclipse.scout.rt.ui.html.UiSession.createJsonAdapter(UiSession.java:1042)
	at org.eclipse.scout.rt.ui.html.UiSession.getOrCreateJsonAdapter(UiSession.java:1037)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:207)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapter(JsonAdapterProperty.java:110)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapters(JsonAdapterProperty.java:94)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.createAdapters(JsonAdapterProperty.java:85)
	at org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterProperty.attachChildAdapters(JsonAdapterProperty.java:150)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.attachChildAdapters(AbstractJsonPropertyObserver.java:95)
	at org.eclipse.scout.rt.ui.html.json.form.fields.groupbox.JsonGroupBox.attachChildAdapters(JsonGroupBox.java:47)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.init(AbstractJsonAdapter.java:103)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.init(AbstractJsonPropertyObserver.java:48)
	at org.eclipse.scout.rt.ui.html.UiSession.newJsonAdapter(UiSession.java:1057)
	at org.eclipse.scout.rt.ui.html.UiSession.createJsonAdapter(UiSession.java:1042)
	at org.eclipse.scout.rt.ui.html.UiSession.getOrCreateJsonAdapter(UiSession.java:1037)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:207)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachAdapter(AbstractJsonAdapter.java:196)
	at org.eclipse.scout.rt.ui.html.json.form.JsonForm.attachChildAdapters(JsonForm.java:144)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.init(AbstractJsonAdapter.java:103)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver.init(AbstractJsonPropertyObserver.java:48)
	at org.eclipse.scout.rt.ui.html.json.form.JsonForm.init(JsonForm.java:72)
	at org.eclipse.scout.rt.ui.html.UiSession.newJsonAdapter(UiSession.java:1057)
	at org.eclipse.scout.rt.ui.html.UiSession.createJsonAdapter(UiSession.java:1042)
	at org.eclipse.scout.rt.ui.html.UiSession.getOrCreateJsonAdapter(UiSession.java:1037)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachGlobalAdapter(AbstractJsonAdapter.java:312)
	at org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter.attachGlobalAdapter(AbstractJsonAdapter.java:302)
	at org.eclipse.scout.rt.ui.html.json.desktop.JsonOutline.attachNode(JsonOutline.java:129)
	at org.eclipse.scout.rt.ui.html.json.desktop.JsonOutline.handleModelPageChanged(JsonOutline.java:275)
	at org.eclipse.scout.rt.ui.html.json.desktop.JsonOutline.handleModelOtherTreeEvent(JsonOutline.java:260)
	at org.eclipse.scout.rt.ui.html.json.tree.JsonTree.processBufferedEvent(JsonTree.java:572)
	at org.eclipse.scout.rt.ui.html.json.tree.JsonTree.processBufferedEvents(JsonTree.java:515)
	at org.eclipse.scout.rt.ui.html.json.JsonResponse.fireProcessBufferedEvents(JsonResponse.java:353)
	at org.eclipse.scout.rt.ui.html.json.JsonResponse.toJson(JsonResponse.java:286)
	at org.eclipse.scout.rt.ui.html.UiSession.responseToJsonInternal(UiSession.java:827)
	at org.eclipse.scout.rt.ui.html.UiSession.lambda$6(UiSession.java:845)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
	at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxMandatory(TransactionProcessor.java:156)
	at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequired(TransactionProcessor.java:139)
	at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:78)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
	at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
	at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:38)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
	at org.eclipse.scout.rt.platform.job.internal.CallableChainExceptionHandler.intercept(CallableChainExceptionHandler.java:32)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
	at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.lambda$0(JobFutureTask.java:106)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:175)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
	at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:63)


What I am missing ?
Re: Error with Chart Fields [message #1823748 is a reply to message #1823719] Wed, 01 April 2020 09:20 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
I still don't understand what exactly you're trying to do. Do you try to run the open source Widgets app as cloned from GitHub? Or do you try to copy the ChartField from the Widgets app and use it in your own Scout application? In the first case, I don't understand why you're getting all these errors. In the second case you must register a JsonObjectFactory which provides a JsonAdapter for the model class ChartField, as you can see here. The object factory belongs to the "ui.html" module, which translates the state of the model into JSON and sends it to the browser.

Eclipse Scout Homepage | Documentation | GitHub
Re: Error with Chart Fields [message #1823753 is a reply to message #1823748] Wed, 01 April 2020 10:34 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
Hello;
I would like to implement the ChartField in my own project following the sample provided in the widgets project from GitHub.
These are the steps I have done :



  1. Implementation of ChartField in the Form
  2. Adding the Jackson in the POM (in Client )
  3. In ui.html add custom js files related to Chartfield
  4. Adding the Adapter and the JsonObjectFactory
  5. importing the Chat js files in index.js

My problem is that when I keep the import in index.js the project does not load any more, I can't load my outline and I am not finding any error in browser ( nothing happen ) and when I remove the import from the index.js the project load, I can see my outline in browser, but when I access the form where the chart is defined I am getting the previous error.
Am I missing any think ?
Kind Regards.
Re: Error with Chart Fields [message #1823754 is a reply to message #1823753] Wed, 01 April 2020 10:57 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
this is where the application is stucking, view image

[Updated on: Wed, 01 April 2020 10:57]

Report message to a moderator

Re: Error with Chart Fields [message #1823756 is a reply to message #1823754] Wed, 01 April 2020 11:15 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
When you see an empty screen and no errors (in the browser) on start-up most likely something with your JS-modules is wrong. ChartField.js requires the library chart.js. How did you include that library in your project? You need to add a dependency to the package.json in the ui.html module. Then call npm install (or pnpm if you use that). Make sure chart.js exists in your node_modules folder. Does your index.html loads the "vendors.js"? Webpack puts the external libraries in this chunk when the build runs. If your index.html does not request it, the library is never loaded and the module loader in your application will wait forever for that library to be loaded --> empty screen. Check the links in this post, to see the examples.

One more thing: make sure the namespace in the JsonChartField#getObjectType() method is correct, and matches the namespace your project uses. In our Widgets application it is "widgets.ChartField". Most likely the namespace of your project will be different. So you need to adjust that.


Eclipse Scout Homepage | Documentation | GitHub

[Updated on: Wed, 01 April 2020 11:15]

Report message to a moderator

Re: Error with Chart Fields [message #1823763 is a reply to message #1823756] Wed, 01 April 2020 11:48 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
great, I have an error about namespace, but I do not know how to determine the namespace in my project, how to do it ?
Re: Error with Chart Fields [message #1823764 is a reply to message #1823763] Wed, 01 April 2020 12:21 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
This happens in the index.js of your project (which defines the "module" of the project).

The example here is from the Widget app index.js:

...
import * as self from './index.js';
export default self;
window.widgets = Object.assign(window.widgets || {}, self);


The last line defines the namespace "widgets" (which is available at runtime in your browser, and contains all objects that belong to that namespace, like the ChartField or other classes exported by that module).


Eclipse Scout Homepage | Documentation | GitHub

[Updated on: Wed, 01 April 2020 12:22]

Report message to a moderator

Re: Error with Chart Fields [message #1823765 is a reply to message #1823764] Wed, 01 April 2020 12:27 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
great! it works perfectly, thanks :)
Re: Error with Chart Fields [message #1823766 is a reply to message #1823765] Wed, 01 April 2020 12:35 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Nice. Congrats! ;-)

Eclipse Scout Homepage | Documentation | GitHub
Re: Error with Chart Fields [message #1823768 is a reply to message #1823766] Wed, 01 April 2020 14:42 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
One other question, in case I would like to use an other js lib for charts, I do have only to change all the js files that are related to Chart.js and keep tha Json adapters or also redo the jason adapter ?
Re: Error with Chart Fields [message #1823783 is a reply to message #1823768] Thu, 02 April 2020 06:01 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Sure, you can use another chart library in place of chart.js. Whether or not you need to make changes to JsonChartField class depends on this library, I guess. Since chart.js accepts a JSON/JavaScript object to configure the chart, we decided to simply pass that object from Java directly to the browser (this is the "chartConfig" property in the ChartField). If your new chart library works the same way, you don't need to change a lot.

I'd start in the JS-layer with the new library. Look what changes are required to the ChartField.js, then decide what API or getConfigured* methods the _Java_-Programmer needs, to work with the field and then make changes to the JsonChartField class, since this is the interface between the Java- and the JavaScript-Layer.


Eclipse Scout Homepage | Documentation | GitHub

[Updated on: Thu, 02 April 2020 09:30]

Report message to a moderator

Previous Topic:DataSourceCredentialVerifier
Next Topic:Slow responsiveness with more than 8-10 users logged in
Goto Forum:
  


Current Time: Thu Apr 25 08:01:31 GMT 2024

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

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

Back to the top