[ https://issues.apache.org/jira/browse/OFBIZ-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15290647#comment-15290647 ] Jacques Le Roux commented on OFBIZ-6783: ---------------------------------------- And a Ctrl+C gave me that {code} 2016-05-19 09:46:43,169 |main |TestRunContainer |I| [JUNIT] Pass: true | # Tests: 5 | # Failed: 0 # Errors: 0 org.ofbiz.base.start.StartupException: Cannot start() org.ofbiz.testtools.TestRunContainer (Test run was unsuccessful) at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:239) at org.ofbiz.base.start.Start.startStartLoaders(Start.java:446) at org.ofbiz.base.start.Start.start(Start.java:191) at org.ofbiz.base.start.Start.main(Start.java:88) Caused by: org.ofbiz.base.container.ContainerException: Test run was unsuccessful at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:193) at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) ... 3 more Exception in thread "main" org.ofbiz.base.start.StartupException: java.lang.Exception: Error during start. (Error during start.) at org.ofbiz.base.start.Start.main(Start.java:91) Caused by: java.lang.Exception: Error during start. at org.ofbiz.base.start.Start.start(Start.java:195) at org.ofbiz.base.start.Start.main(Start.java:88) 2016-05-19 09:48:28,669 |Thread-0 |ContainerLoader |I| Shutting down containers 2016-05-19 09:48:28,669 |Thread-0 |ContainerLoader |I| Stopping container testtools-container 2016-05-19 09:48:28,669 |Thread-0 |ContainerLoader |I| Stopped container testtools-container 2016-05-19 09:48:28,669 |Thread-0 |ContainerLoader |I| Stopping container catalina-container-test 2016-05-19 09:48:28,893 FATAL Unable to register shutdown hook because JVM is shutting down. 2016-05-19 09:48:28,895 |0.0.0.0-startStop-2 |ServiceContainer |I| Removing from cache dispatcher: ebay 2016-05-19 09:48:28,895 |0.0.0.0-startStop-2 |ServiceDispatcher |I| De-Registering dispatcher: ebay {code} Note the bq. FATAL Unable to register shutdown hook because JVM is shutting down. ! Yours is far better! > Refactor the start component > ---------------------------- > > Key: OFBIZ-6783 > URL: https://issues.apache.org/jira/browse/OFBIZ-6783 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: Upcoming Branch > Reporter: Taher Alkhateeb > Assignee: Taher Alkhateeb > Labels: framework, main, refactoring, start > Attachments: OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, StartCommandUtil.java > > > Looking at the main method and design of Start.java and the start component overall looks ugly. The things I would like to fix so far are: > - the files are too long > - some variables are not even needed (loaderArgs?) > - the level of abstraction is wrong > - main throws an exception! > - the arguments processing logic is terrible, need to move it to commons-cli > It's just so messy and ugly to look at. So for me refactoring starts at Start! Given that this is an important component, I will provide a patch to be reviewed by the community before committing just to be on the safe side. -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |