You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/09 07:32:34 UTC

[GitHub] [dubbo] g0715158 opened a new pull request, #11104: SpringContainer does not print the exception stack when there is an exception during startup

g0715158 opened a new pull request, #11104:
URL: https://github.com/apache/dubbo/pull/11104

   SpringContainer does not print the exception stack when there is an exception during startup
   
   fix issues #11101 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #11104: SpringContainer does not print the exception stack when there is an exception during startup

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #11104:
URL: https://github.com/apache/dubbo/pull/11104#discussion_r1045431618


##########
dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java:
##########
@@ -48,8 +48,16 @@ public void start() {
             configPath = DEFAULT_SPRING_CONFIG;
         }
         context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+"), false);
-        context.refresh();
-        context.start();
+        try {
+            context.refresh();
+        } catch (Throwable e) {
+            logger.error("refresh spring container failed!", e);

Review Comment:
   If we swallow the exception, users could not know what happends.



##########
dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java:
##########
@@ -48,8 +48,16 @@ public void start() {
             configPath = DEFAULT_SPRING_CONFIG;
         }
         context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+"), false);
-        context.refresh();
-        context.start();
+        try {
+            context.refresh();
+        } catch (Throwable e) {
+            logger.error("refresh spring container failed!", e);

Review Comment:
   Should we throw the exception again?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] codecov-commenter commented on pull request #11104: SpringContainer does not print the exception stack when there is an exception during startup

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #11104:
URL: https://github.com/apache/dubbo/pull/11104#issuecomment-1344283512

   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/11104?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#11104](https://codecov.io/gh/apache/dubbo/pull/11104?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (725d4c2) into [3.1](https://codecov.io/gh/apache/dubbo/commit/031016ec600411f2ea9d7d5f07a37475a46f0519?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (031016e) will **decrease** coverage by `4.83%`.
   > The diff coverage is `50.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.1   #11104      +/-   ##
   ============================================
   - Coverage     69.37%   64.54%   -4.84%     
   + Complexity      125       14     -111     
   ============================================
     Files          1485     1420      -65     
     Lines         77575    59093   -18482     
     Branches      13588     8673    -4915     
   ============================================
   - Hits          53820    38140   -15680     
   + Misses        19036    16901    -2135     
   + Partials       4719     4052     -667     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/11104?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...apache/dubbo/container/spring/SpringContainer.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29udGFpbmVyL2R1YmJvLWNvbnRhaW5lci1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbnRhaW5lci9zcHJpbmcvU3ByaW5nQ29udGFpbmVyLmphdmE=) | `62.50% <50.00%> (-15.28%)` | :arrow_down: |
   | [...luster/router/script/ScriptStateRouterFactory.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL3NjcmlwdC9TY3JpcHRTdGF0ZVJvdXRlckZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...he/dubbo/test/common/impl/GreetingServiceImpl.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vdGVzdC9jb21tb24vaW1wbC9HcmVldGluZ1NlcnZpY2VJbXBsLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...zookeeper/curator/CuratorZookeeperTransporter.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3Rpbmctem9va2VlcGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy96b29rZWVwZXIvY3VyYXRvci9DdXJhdG9yWm9va2VlcGVyVHJhbnNwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...nfigure/DubboRelaxedBinding2AutoConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtYXV0b2NvbmZpZ3VyZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vc3ByaW5nL2Jvb3QvYXV0b2NvbmZpZ3VyZS9EdWJib1JlbGF4ZWRCaW5kaW5nMkF1dG9Db25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../apache/dubbo/test/spring/SpringXmlConfigTest.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LXNwcmluZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vdGVzdC9zcHJpbmcvU3ByaW5nWG1sQ29uZmlnVGVzdC5qYXZh) | `0.00% <0.00%> (-96.16%)` | :arrow_down: |
   | [...egistrycenter/context/ZookeeperWindowsContext.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL3JlZ2lzdHJ5Y2VudGVyL2NvbnRleHQvWm9va2VlcGVyV2luZG93c0NvbnRleHQuamF2YQ==) | `0.00% <0.00%> (-81.82%)` | :arrow_down: |
   | [...istrycenter/processor/FindPidWindowsProcessor.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL3JlZ2lzdHJ5Y2VudGVyL3Byb2Nlc3Nvci9GaW5kUGlkV2luZG93c1Byb2Nlc3Nvci5qYXZh) | `5.40% <0.00%> (-81.09%)` | :arrow_down: |
   | [...pc/cluster/router/file/FileStateRouterFactory.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL2ZpbGUvRmlsZVN0YXRlUm91dGVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-80.96%)` | :arrow_down: |
   | [...ycenter/processor/KillProcessWindowsProcessor.java](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL3JlZ2lzdHJ5Y2VudGVyL3Byb2Nlc3Nvci9LaWxsUHJvY2Vzc1dpbmRvd3NQcm9jZXNzb3IuamF2YQ==) | `10.00% <0.00%> (-80.00%)` | :arrow_down: |
   | ... and [466 more](https://codecov.io/gh/apache/dubbo/pull/11104/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] sonarcloud[bot] commented on pull request #11104: SpringContainer does not print the exception stack when there is an exception during startup

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #11104:
URL: https://github.com/apache/dubbo/pull/11104#issuecomment-1344278875

   SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=11104)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11104&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11104&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11104&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=CODE_SMELL) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11104&resolved=false&types=CODE_SMELL)
   
   [![33.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '33.3%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11104&metric=new_coverage&view=list) [33.3% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11104&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11104&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11104&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] SpringContainer does not print the exception stack when there is an exception during startup [dubbo]

Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed pull request #11104: SpringContainer does not print the exception stack when there is an exception during startup
URL: https://github.com/apache/dubbo/pull/11104


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org