添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
想表白的楼房  ·  MySQL :: MySQL 8.4 ...·  2 周前    · 
淡定的香烟  ·  Entity Framework Core ...·  2 周前    · 
憨厚的黑框眼镜  ·  MySQL :: MySQL 8.4 ...·  1 周前    · 
温暖的芒果  ·  Upgrade from containers·  1 周前    · 
近视的苦瓜  ·  Oracle、Teradata和MySQL语 ...·  1 周前    · 
完美的酱牛肉  ·  Monster Hunter Wilds ...·  10 月前    · 
烦恼的野马  ·  extensions/ffmpeg · ...·  1 年前    · 
长情的山羊  ·  R语言问题解决: ...·  2 年前    · 
独立的椰子  ·  maven: 解决 release to ...·  2 年前    · 
Hello,

I'm trying to restore data using mysql command.

Here is the code to take backup.


And finally here is the code for restore



Backup works perfect but restore hangs for ever....

Tried the same mysql command with < in command prompt which is working fine. But could not make it to work in Java . And in the logs there is no error or warning.

Please help me in this.

Regards,
Kiran
You have the classic deadlock associated with Runtime.exec() and ProcessBuilder. You are waiting for the process to complete but it can't complete because either the process stdout or stderr buffer becomes full. The process then suspends until there is room in the buffer to place more output but since you do not process either the stdout or stderr to make more room available until the process completes you have a deadlock.

You need to read ALL the sections of http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html and implement ALL the recommendations.
You showed up just in time for the waffles! And this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech contact us | advertise |