Contributions
Re: Groovy custom vmoptions not loaded
I did a small test log.info(System.properties['java.security.manager']); ==> com.smartbear.ready.ReadyApiSecurityManager log.info(System.properties['jmx.address']); ==> null For all -Dvariablesthat I added I get null when I run that in groovy. I did restartReadyAPI after modifying the vmoptionfile.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes2CommentsGroovy custom vmoptions not loaded
I'm importing an external jar that requires some runtime options so I added them to the .vmoptionsfile (and I didhave an extra white line at the end) -Denv=dev -Djmx.address=0.0.0.0 -Djavaro_udp_port=7000 -Djmx.registerPort=7777 -Djmx.serverPort=7778 But it doesn't seem to be taken... ==> ERROR [UDPServiceImpl] init(); 0; Can't start because of error: Invalid UDP port: -1 (should be 7000) When I run that jar from IntelliJwith those VM options I see port = 7000. Is there a way in groovy to print the value of JAVA_OPTS (vmoptions) to validate the arguments used at runtime? Am I doing something wrong? ThanksSolved1.9KViews0likes3CommentsRe: Error jz00l when Connecting to sybase database via groovy
Turns out I was just missing some parameters! def sql = Sql.newInstance(ConObj.getConnectionString() ,userName, PAssword, driver); Didn't think of it as this information was already in the ConnectionString!! When I read the connection string variable it showed the username and pass in it as expected...strange!6 years agoPlace ReadyAPI QuestionsReadyAPI Questions5KViews1like0CommentsError jz00l when Connecting to sybase database via groovy
Hi, when I connect using the JDBC Request Test Step to my Sybase DBit works (or when I use the "test connection" button). When I do the same via groovy it doesn't here is the code and the logs: I'm not sure if it's a driver problem (I have jconn4.jar in the bin\ext folder), it's not a credential problem. I'm usingReadyAPi 2.5.0 Pro import groovy.sql.Sql def ConObj = context.testCase.testSuite.project.databaseConnectionContainer.getResourceByName('TestAutomation'); def sql = Sql.newInstance(ConObj.getConnectionString()); Logs: ERROR: java.sql.SQLException: JZ00L: Connection failed. Examine the SQLWarnings associated with this exception for the following reason (s): java.sql.SQLException: JZ00L: Connection failed. Examine the SQLWarnings associated with this exception for the following reason (s) at com.sybase.jdbc4.jdbc.ErrorMessage.raiseError(ErrorMessage.java:768) at com.sybase.jdbc4.tds.Tds.processLoginAckToken(Tds.java:5356) at com.sybase.jdbc4.tds.Tds.doLogin(Tds.java:725) at com.sybase.jdbc4.tds.Tds.login(Tds.java:579) at com.sybase.jdbc4.jdbc.SybConnection.tryLogin(SybConnection.java:422) at com.sybase.jdbc4.jdbc.SybConnection.handleHAFailover(SybConnection.java:3335) at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:348) at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:253) at com.sybase.jdbc4.jdbc.SybDriver.connect(SybDriver.java:232) at com.eviware.soapui.support.GroovyUtils$DriverProxy.connect(GroovyUtils.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:270) at groovy.sql.Sql.newInstance(Sql.java:279) at groovy.sql.Sql$newInstance.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Script7.run(Script7.groovy:10) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:158) at com.eviware.soapui.impl.wsdl.panels.teststeps.DebuggableProGroovyScriptStepDesktopPanel$RunDebugAction$1.run(DebuggableProGroovyScriptStepDesktopPanel.java:177) at java.lang.Thread.run(Thread.java:748)Solved6 years agoPlace ReadyAPI QuestionsReadyAPI Questions5KViews0likes1Comment