jrubyでAstah APIを使いER図を作るプログラムを作ろうとしています。
以下のコードを動かしたところ、ERモデルと作るところで以下のエラーが起きてしまいます。
何故でしょう?
# -*- encoding: utf-8 -*-
include Java
require "C:/Program Files/astah-professional/astah-pro.jar"
prjAccessor = com.change_vision.jude.api.inf.AstahAPI.getAstahAPI.getProjectAccessor
prjAccessor.create("newermodel.asta")
project = prjAccessor.getProject
com.change_vision.jude.api.inf.editor.TransactionManager.beginTransaction
modeleditor = prjAccessor.getModelEditorFactory.getERModelEditor
modeleditor.createERModel(project,"ERモデル")
com.change_vision.jude.api.inf.editor.TransactionManager.endTransaction
prjAccessor.save()
prjAccessor.close()
java.io.FileNotFoundException: C:\Users\xxxx\.astah\professional\jude_er_domain.properties (指定されたファイルが見つかりません。)
at java.io.FileInputStream.open(Native Method) ~[na:1.7.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:146) ~[na:1.7.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:101) ~[na:1.7.0_45]
at JP.co.esm.caddies.er.ERDomainProperty.load(X:147) [astah-pro.jar:na]
at JP.co.esm.caddies.er.ERDomainProperty.<init>(X:57) [astah-pro.jar:na]
at JP.co.esm.caddies.er.ERDomainProperty.<clinit>(X:32) [astah-pro.jar:na]
at JP.co.esm.caddies.jomt.jcontrol.CreateERModelCommand.c(X:215) [astah-pro.jar:na]
at JP.co.esm.caddies.jomt.jcontrol.CreateERModelCommand.d(X:107) [astah-pro.jar:na]
at JP.co.esm.caddies.jomt.jcontrol.CreateERModelCommand.a(X:92) [astah-pro.jar:na]
at tK.createERModel(X:98) [astah-pro.jar:na]
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:599) ~[na:1.7.0_45]
at org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(InvocationLinker.java:183) ~[na:na]
at test_new_ermodel.__file__(test_new_ermodel.rb:15) ~[na:na]
at test_new_ermodel.load(test_new_ermodel.rb) ~[na:na]
at org.jruby.Ruby.runScript(Ruby.java:778) ~[na:na]
at org.jruby.Ruby.runScript(Ruby.java:771) ~[na:na]
at org.jruby.Ruby.runNormally(Ruby.java:648) ~[na:na]
at org.jruby.Ruby.runFromMain(Ruby.java:497) ~[na:na]
at org.jruby.Main.doRunFromMain(Main.java:375) ~[na:na]
at org.jruby.Main.internalRun(Main.java:264) ~[na:na]
at org.jruby.Main.run(Main.java:230) ~[na:na]
at org.jruby.Main.run(Main.java:214) ~[na:na]
at org.jruby.Main.main(Main.java:194) ~[na:na]