Can't find mc_local when Debugging in Eclipse
-
I'm trying to debug StartApp in eclipse. Here's a snap of the config
Cannot find mc_locale stuff. If I build a distribution and run from there, it works OK. Where are the mc_locale items? Can I add a configuration property to point to them?
It fails with
12:25:58.669 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.tmp.location-->c:/tmp/
12:25:58.674 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.resources.location-->../conf/resources/
12:25:58.674 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.db.type-->H2DB_EMBEDDED
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.db.backup.include-->true
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.db.url-->jdbc:h2:file:../conf/mycontroller;MVCC=TRUE
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.db.username-->mycontroller
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.db.password-->mycontroller
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.web.file.location-->../www/
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.web.http.port-->9080
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.web.enable.https-->false
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.web.bind.address-->0.0.0.0
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.persistent.stores.location-->../conf/persistent_stores/
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.clear.message.queue.on.start-->true
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.clear.smart.sleep.msg.queue.on.start-->true
12:25:58.676 [main] DEBUG org.mycontroller.standalone.AppProperties - Key:mcc.mdns.service.enable-->false
12:25:58.676 [main] DEBUG org.mycontroller.standalone.StartApp - Properties are loaded successfuly...
12:25:58.677 [main] DEBUG org.mycontroller.standalone.StartApp - App Properties: AppProperties(tmpLocation=c:/tmp/, resourcesLocation=../conf/resources/, appDirectory=C:\Users\csl04r\git\mycontroller\modules, dbType=H2DB_EMBEDDED, dbBackupInclude=true, dbUrl=jdbc:h2:file:../conf/mycontroller;MVCC=TRUE, dbUsername=mycontroller, dbPassword=mycontroller, webFileLocation=../www/, isWebHttpsEnabled=false, webHttpPort=9080, webSslKeystoreFile=null, webSslKeystorePassword=null, webSslKeystoreType=null, webBindAddress=0.0.0.0, mqttBrokerPersistentStore=../conf/persistent_stores//moquette/moquette_store.mapdb, mcPersistentStoresLocation=../conf/persistent_stores/, clearMessagesQueueOnStart=true, clearSmartSleepMsgQueueOnStart=true, mDNSserviceEnabled=false, controllerSettings=null, emailSettings=null, mySensorsSettings=null, smsSettings=null, pushbulletSettings=null, locationSettings=null, metricsGraphSettings=null, metricsDataRetentionSettings=null, backupSettings=null, mqttBrokerSettings=null, mqttRepublisherSettings=null)
12:25:58.677 [main] DEBUG org.mycontroller.standalone.StartApp - Operating System detail:[os:Windows 7,arch:amd64,version:6.1]
12:25:58.681 [main] ERROR org.mycontroller.standalone.StartApp - Unable to start application, refer error log,
java.util.MissingResourceException: Can't find bundle for base name mc_locale/mc_locale_java, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at org.mycontroller.standalone.utils.McUtils.updateLocale(McUtils.java:291)
at org.mycontroller.standalone.StartApp.startServices(StartApp.java:246)
at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:109)
at org.mycontroller.standalone.StartApp.main(StartApp.java:96)
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle" -
@cslauritsen MyController is not a single module. it is two different module. You have to run
mvn package
on the command line. to get the final package. We can not simply run fromStartApp
, As it depends ondist
module too.Change code on IDE,
ON Command line:
cd tomycontroller
and executemvn package
you can see bundle onmycontroller/dist/target
-
it seems that adding the dist project to the list of project dependencies cleared the problem with loading mc_locale:
-
@cslauritsen Yes, when we use
mvn package
, it will create different package structure. Which might not be done by IDE.