The file exists. I even tried C:\test.xml .
Here is the mostly the complete stack trace(below).
set JAVA_HOME=C:\jdk1.5.0_13 is used in _jrubyvars set.
Is there anything with encoding? UTF-8? Is it taking windows drive
letters
correctly.
Its just a simple Windows File read. Any alternatives?
Thanks for the response!
Rohit…
java/io/FileInputStream.java:-2:in open': java.io.FileNotFoundException: testng xmlparse.xml (The system cannot find the file specified) (NativeException) from java/io/FileInputStream.java:106:in
’
from java/io/FileInputStream.java:66:in <init>' from sun/reflect/NativeConstructorAccessorImpl.java:-2:in
newInstance0’
from sun/reflect/NativeConstructorAccessorImpl.java:39:in
newInstance' from sun/reflect/DelegatingConstructorAccessorImpl.java:27:in
newInstan
ce’
from java/lang/reflect/Constructor.java:494:in newInstance' from org/jruby/javasupport/JavaConstructor.java:226:in
new_instance’
from org/jruby/java/invokers/ConstructorInvoker.java:100:in
call' from org/jruby/java/invokers/ConstructorInvoker.java:180:in
call’
from org/jruby/RubyClass.java:362:in finvoke' from org/jruby/javasupport/util/RuntimeHelpers.java:326:in
invoke’
from org/jruby/java/proxies/ConcreteJavaProxy.java:48:in call' from org/jruby/runtime/CallSite.java:168:in
cacheAndCall’
from org/jruby/runtime/CallSite.java:406:in call' from org/jruby/RubyClass.java:545:in
call’
from
org/jruby/internal/runtime/methods/DynamicMethod.java:151:in
`call’
from org/jruby/java/proxies/ConcreteJavaProxy.java:191:in `call'
from org/jruby/runtime/CallSite.java:156:in `cacheAndCall'
from org/jruby/runtime/CallSite.java:394:in `call'
from C_3a_/mywork/trunk/jmdi.rb:37:in `__file__'
from C_3a_/mywork/trunk/jmdi.rb:-1:in `__file__'
from C_3a_/mywork/trunk/jmdi.rb:-1:in `load'
from org/jruby/Ruby.java:544:in `runScript'
from org/jruby/Ruby.java:457:in `runNormally'
from org/jruby/Ruby.java:330:in `runFromMain'
from org/jruby/Main.java:214:in `run'
from org/jruby/Main.java:100:in `run'
from org/jruby/Main.java:84:in `main'
Complete Java stackTrace
java.io.FileNotFoundException: testngxmlparse.xml (The system cannot
find
the fi
le specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.jruby.javasupport.JavaConstructor.new_instance(JavaConstructor.ja
va:226)
at
org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.ja
va:100)
at
org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.ja
va:180)
at org.jruby.RubyClass.finvoke(RubyClass.java:362)
at
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:
326)
at
org.jruby.java.proxies.ConcreteJavaProxy$2.call(ConcreteJavaProxy.jav
a:48)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSit
e.java:168)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:4
06)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:545)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.j
ava:151)
at
org.jruby.java.proxies.ConcreteJavaProxy$ConcreteNewMethod.call(Concr
eteJavaProxy.java:191)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSit
e.java:156)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:3
94)
at C_3a_.mywork.jruby_jmdi.jmdi.file
at org.jruby.Ruby.runScript(Ruby.java:544)
at org.jruby.Ruby.runNormally(Ruby.java:457)
at org.jruby.Ruby.runFromMain(Ruby.java:330)
at org.jruby.Main.run(Main.java:214)
at org.jruby.Main.run(Main.java:100)
at org.jruby.Main.main(Main.java:84)
Charles Oliver N.-2 wrote:
specified)
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
–
View this message in context:
http://www.nabble.com/FileInputStream.new-myfile-fails---tp20376265p20387118.html
Sent from the JRuby - User mailing list archive at Nabble.com.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email