Jan_Stepan
16 years agoOccasional Contributor
Any ideas why loading properties file results in "Access is denied"
I posted this question in a properties thread, but may be this should be a new topic. I'm using soapUI 2.5.1.
I've tried to use a groovy script to load test suite properties. The same code in a groovy step and in the test suite startup script results in ERROR:java.io.FileNotFoundException "Access is denied".
I'm running XP and have admin rights on the PC.
The code I've tried is
The error log is
I've tried to use a groovy script to load test suite properties. The same code in a groovy step and in the test suite startup script results in ERROR:java.io.FileNotFoundException "Access is denied".
I'm running XP and have admin rights on the PC.
The code I've tried is
def findwindowsProperties = new java.util.Properties();
findwindowsProperties.load( new java.io.FileInputStream( "C:/Temp" + context.expand('${#TestSuite#Properties.txt}' ) ));
The error log is
Wed Mar 11 14:45:12 PDT Wed Mar 11 15:14:52 PDT 2009:ERROR:java.io.FileNotFoundException: C:\Temp (Access is denied)
java.io.FileNotFoundException: C:\Temp (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.reflect.GeneratedConstructorAccessor33.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:595)
at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2359)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1255)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1185)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:809)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
at Script21.run(Script21.groovy:2)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:59)
at com.eviware.soapui.impl.wsdl.WsdlTestSuite.runSetupScript(WsdlTestSuite.java:461)
at com.eviware.soapui.impl.wsdl.panels.testsuite.WsdlTestSuiteDesktopPanel$SetupScriptGroovyEditorModel$1.actionPerformed(WsdlTestSuiteDesktopPanel.java:502)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)