Unable to start webui-api from eclipse

Hi,

i start the metasfresh swingui with de.metas.SwingUIApplication_mf15_with_embedded_server.launch config and set the database connection in order to create the metasfresh.properties

Then i copy the metasfresh.properties to the root folder of the webui-api and start the metasfresh backend server with de.metas.ServerBoot_mf15.launch

Then i run as java app the WebRestApiApplication which fails with:

Caused by: java.lang.IllegalArgumentException: No AD_Process_ID foudn for class de.metas.ui.web.pporder.process.WEBUI_PP_Order_Receipt
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:191)
at de.metas.ui.web.pporder.WebPPOrderConfig.lambda$0(WebPPOrderConfig.java:57)
at de.metas.ui.web.pporder.WebPPOrderConfig.(WebPPOrderConfig.java:66)
at de.metas.ui.web.pporder.WebPPOrderConfig$$EnhancerBySpringCGLIB$$fc5851f5.()
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
… 19 common frames omitted

What am i doing wrong?
Can the webui-api run without the metasfresh backend server?

Kind regards
davey

Hi davey,

I think your forgot to run some migration scripts (i.e. check https://github.com/metasfresh/metasfresh/search?utf8=✓&q=de.metas.ui.web.pporder.process.WEBUI_PP_Order_Receipt&type= ),
that’s why the process could not be found.

About running webui-api (backend) without metasfresh server: yes, sure, on my development workstation I usually run it without metasfresh server.
The metasfresh server is required for async processing, accounting, jasper server etc.

Best regards,
Teo

Hi Teo,

thanks for your answer. I thought that too, it could be coz of an outdated database and i installed the new one from here:
http://docs.metasfresh.org/developers_collection/en/getting_started_db_en.html

After that i got it running for one time, but after that not anymore… I go on trying to reproduce it.

What is the recommended way to produce the metasfresh.properties?

webui-api can do it also, right? no need to do the copy action?
(i have a feeling in my stomach that maybe this is the source of my issue)

Kind regards
davey

Hello,

What is the recommended way to produce the metasfresh.properties?

run the WebRestApiApplication with -Dwebui-api-run-headless=false.
In this case, if the metasfresh.properties was not found, a swing dialog will popup.

Best regards,
Teo

Thanks Teo for that hint. Also thanks for mention the migration scripts as it answers a question i not yet asked :slight_smile:

Thanks again, the missing row was the problem here.

FYI:
the second statement had no effect:

UPDATE AD_Process SET EntityType=‘de.metas.ui.web’,Updated=TO_TIMESTAMP(‘2017-04-02 16:33:57’,‘YYYY-MM-DD HH24:MI:SS’),UpdatedBy=100 WHERE AD_Process_ID=540775

Query returned successfully: 0 rows affected, 12 msec execution time.

Kind regards
davey

1 Like