groovy.lang$run.call(Unknown Source) - groovy

What is the meaning of groovy.lang$run.call(Unknown Source) and on what circumstances it will throw, this is the error what i'm getting in my groovy program
at groovy.lang$run.call(Unknown Source)
at groovy.lang.run(groovy.lang.Two_Script:6)
...................................................
...................................................
at groovy.lang.run(groovy.lang.Two_Script:6)
at groovy.lang$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at one_script.run(level_one_script.groovy:5)
why it has not thrown at the compile time only # runtime it has thrown any Idea ?
attached the sample groovy these are very simple recursive calls;
level_one_script.groovy
new Two_Script(binding).run()
Two_Script.groovy
new Three_Script().run()
Three_Script.groovy
println "Anish"
the exception was thrown while evaluating Three_Script.groovy , it give me recurive call on Two_Script.groovy
Exception occurred while executing the script [level_one_script.groovy] - [java.lang.StackOverflowError].
try
{
compiledScript.eval(bindings)
//compiledScript is the type of CompiledScript
}
Surprising part is if i remove the call new Three_Script().run() from "Two_Script.groovy"
it shows me correct result
Surprising
If the Groovy scripts are all defined in a package, the error is not thrown.
If the scripts are moved to the default package (no package), the error is thrown.

What is the actual exception thrown (first few lines)
Looks like there's problem in your file level_one_script.groovy at line 5

Related

SoapUI Groovy script not running in Testcase

I'm trying to run a Groovy script in a soapUI Test case.
The script does nothing but take the response, extract a value and use it in the next request. The extracting works when I run my script standalone. But, as soon as I try to run my test case I get following error:
ERROR:
java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.log4j.Logger
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:125)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:128)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Even when I remove all code from my script I get the error. If I remove the whole script the test case runs without a problem. Anyone has an idea?
The syntax of your assert statement isn't correct. If you're testing for null, something like the following will work:
assert !context.response: "Response Empty or Null"
It's also looks like you're using the assertion to control your script logic, but this is not a good practice. An if-then-else clause would make your intent clearer.

adf internal error occured on executing a vo in taskflow

can any body tell me the actual reason causing the below error:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:7349)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1257)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1449)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1355)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1340)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7236)
at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingWithParams(DCJboDataControl.java:2987)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1541)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
...
...
..
.
Caused by: java.lang.NullPointerException
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15884)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName(Unknown Source)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22684)
From the stacktrace, it seems some bind variable that is required by your view object query is not being set correctly.
If it works intermittently, it could be that the bind variable is lost at some point. To debug/test, try it with a hard-coded value for your bind variable and see if that works first (if you have a ViewCriteria, try removing that first) - then run the task flow and see if it works consistently.
I would suggest running the application in JDeveloper with -Djbo.debugoutput=console argument. It gives you a lot if information of what your business components are doing and you could catch the error cause in console logs.

getRowCount() method on viewPanel control & database full text index error

I have simple code to count the rows in view panel control:
getComponent("viewPanel1").getRowCount()
Error calling method 'getRowCount()' on java class 'com.ibm.xsp.component.xp.XspViewPanel'
Stack trace shows the details as below:
Caused by: com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=64: Error calling method 'getRowCount()' on java class 'com.ibm.xsp.component.xp.XspViewPanel'
Caused by: com.ibm.xsp.FacesExceptionEx: Notes error: The full text index for this database is in use
Caused by: NotesException: Notes error: The full text index for this database is in use
at lotus.domino.local.View.FTSearchSorted(Unknown Source)
Any quick solution to avoid these errors on server?
This is, in fact, a server issue. Take a look here or google it to fine-tune your server.

unrecognised exception in windows C++ code

We have a number of sections of code in the format:
try
{
// code
}
catch(std::exception &e)
{
// log exception
}
catch(...)
{
// log unknown exception.
}
Every so often, the unknown exception code triggers, and logs an unknown exception.
I always thought that all exceptions were meant to derive from std::exception, and thus catching std::exception would catch all exceptions.
Is there some other exception that I should be catching?
If my code ends up in the unknown exception handler, is there any way that I can find out what exception was actually caught?
edit
We managed to locate the cause of the problem- despite saying that they had, the customer had not installed .NET 3.5, which our code depends on, and the system fell over when trying to use the XML parser.
Is there some other exception that I should be catching?
This depends on your code. Libraries you call can throw exceptions not derived from std::exception, examples are MFC's CException or Microsoft's _com_error. Also, an access violation might be catched by catch(...), which is the reason why I would not use catch(...) in my code - it's just to broad for me.
2.If my code ends up in the unknown exception handler, is there any way that I can find out what exception was actually caught?
You can run your code in the debugger and configure the debugger to break your program when the exception is thrown (first chance). Then you know exactly which line of code triggers the exception and should be able to see what exactly is thrown.

Cause of assertion failure

Any idea what would cause this assertion failure in a Groovy script?
Exception in thread "Thread-2" groovy.lang.GroovyRuntimeException: exception while dumping process stream
at org.codehaus.groovy.runtime.ProcessGroovyMethods$ByteDumper.run(ProcessGroovyMethods.java:488)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Bad file descriptor
at java.io.FileInputStream.available(Native Method)
at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.codehaus.groovy.runtime.ProcessGroovyMethods$ByteDumper.run(ProcessGroovyMethods.java:484)
... 1 more
I'm running Groovy 1.8.3 with JVM 1.6.0_14. I noticed an old bug report that was similar but I perform a waitFor() call after every process is started and it's reported to be fixed in 1.6.x.
I can't trap the exception apparently so I don't know exactly where it is happening. However, I'm guessing it occurs in this code segment:
def pipedOutputStream = new PipedOutputStream()
process.consumeProcessOutput(
new TeeOutputStream(System.out, pipedOutputStream),
new TeeOutputStream(System.err, pipedOutputStream))
new PipedInputStream(pipedOutputStream).eachLine {
(it =~ /condition/).find { process.destroy() }
}
System.exit(0)

Resources