Сan't run truffle interpreter on GraalVM - truffle

When I run the program on graalvm-ce-17 I get an error
Error: Unable to initialize main class truffle.TruffleMain
Caused by: java.lang.IllegalAccessError: superclass access check failed: class truffle.TFRootNode (in unnamed module #0x76ed5528) cannot access class com.oracle.truffle.api.nodes.RootNode (in module org.graalvm.truffle) because module org.graalvm.truffle does not export com.oracle.truffle.api.nodes to unnamed module #0x76ed5528
Unable to initialize main class truffle.TruffleMain
Caused by: java.lang.IllegalAccessError: superclass access check failed: class truffle.TFRootNode (in unnamed module #0x76ed5528) cannot access class com.oracle.truffle.api.nodes.RootNode (in module org.graalvm.truffle) because module org.graalvm.truffle does not export com.oracle.truffle.api.nodes to unnamed module #0x76ed5528
Execution failed for task ':TruffleMain.main()'.
> Process 'command '/home/zzigor/.jdks/graalvm-ce-17/bin/java'' finished with non-zero exit value 1
TFRootNode:
package truffle;
import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.frame.FrameDescriptor;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.RootNode;
import truffle.nodes.ReadArgNode;
import truffle.nodes.TFNode;
import truffle.nodes.stmt.TFDefNodeGen;
public class TFRootNode extends RootNode {
...
}
Compiler parameters per-module:
--add-exports
org.graalvm.truffle/com.oracle.truffle.api.nodes=ALL-UNNAMED
--add-exports
org.graalvm.truffle/com.oracle.truffle.api=ALL-UNNAMED
--add-exports
org.graalvm.truffle/com.oracle.truffle.api.frame=ALL-UNNAMED
I don't understand what is wrong, please help!

Related

Kotlin - menuInflater cannot find reference of the xml file

I am trying to add create option menu to my activity, however the android-studio sent me this error
Unresolved reference: chat_app_menu
Here is my code in Kotlin
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.chat_app_menu)
return true
}
The line with menuInflater.inflate(R.menu.chat_app_menu) show me the error Unresolved reference: chat_app_menu
However, I have been create the resource file chat_app_menu.xml under res\menu\
Here are my import files
package com.example.chat_app
import android.R
import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.MenuInflater
import androidx.appcompat.app.AppCompatActivity
import com.google.firebase.auth.FirebaseAuth
My file directory:
What should I do to disable this error to make the app work?
Use your com.example.chat_app.R instead of android.R
import com.example.chat_app.R

groovy.lang.MissingPropertyException: No such property:

I am trying to get my head around groovy scripting to make some changes to a jenkins pipeline and I keep getting this error:
groovy.lang.MissingPropertyException: No such property: credentials for class:
I have tried declaring the variable with def but I still get the exception, eclipse does not recognise that the property exists.
What am I doing wrong?!
#!/usr/bin/groovy
package common.pipeline
import common.pipeline.Credentials
Credentials credentials = new Credentials()
def withCredentials(steps) {
credentials.productionPipeline(steps)
}
This script will be compiled by groovy into a Script class with the field definition inside the run method, and with another method withCredentials that is trying to access the field (kinda like this):
import common.pipeline.Credentials
class Script1 extends Script {
def withCredentials(steps) {
credentials.productionPipeline(steps)
}
def run(args) {
Credentials credentials = new Credentials()
}
}
As you can see, this won't work, as the credentials aren't at Field level in the class...
Groovy has an annotation to make this happen:
#!/usr/bin/groovy
package common.pipeline
import common.pipeline.Credentials
import groovy.transform.Field
#Field Credentials credentials = new Credentials()
def withCredentials(steps) {
credentials.productionPipeline(steps)
}

jenkins pipeline groovy.sql.Sql NotSerializableException

there is a problem with the class groovy.sql.Sql inside jenkinsfile.
We are using groovy.sql.Sql to call DB.
Try with simple import groovy.sql.Sql we are take error:
java.io.NotSerializableException: groovy.sql.Sql
Then, try to hide this class inside shell class in jenkins file, like this:
class Shell{
private groovy.sql.Sql sql
Shell(){
sql = Sql.newInstance("jdbc:oracle:thin:#$TNS", login, password, driver)
}
String callSql(String stmnt){
return sql.firstRow(stmnt).Variablename
}
}
But get another error "MissingPropertyException: No such property: Sql for class".
Can u help to fix this problem?

null pointer exception in soapui groovy script

I am receiving this null pointer exception and not sure how to resolve/debug it. The script contains a class with two methods. Code is doing what it is supposed to do. Any pointers on geeting started to resolve this?
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:154)
at com.eviware.soapui.model.testsuite.TestStep$run.call(Unknown Source)
at Script48.run(Script48.groovy:22)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:116)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:128)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:150)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest.assertResponse(WsdlTestRequest.java:176)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.propertyChange(WsdlTestRequestStep.java:339)
at com.eviware.soapui.impl.wsdl.support.assertions.AssertionsSupport.propertyChange(AssertionsSupport.java:79)
at java.beans.PropertyChangeSupport.fire(Unknown Source
Script looks like this.
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext
context.setProperty("searchChange", new searchChange())
class searchChange{
def search(a,b,TCRunner){
def search_TestCase = TCRunner.testCase.testSuite.getTestCaseByName("TestCaseName")
search_TestCase.setPropertyValue("a", a)
search_TestCase.setPropertyValue("b", b)
search_TestCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)
}
def runner(tCase,mExchange){
new WsdlTestCaseRunner( tCase, new StringToObjectMap() );
}
}
When using the above class,the line(groovy:22) in code that throws exception is
scripts.testCases["Library"].testSteps["Lib"].run(context.getTestRunner(),context)

ALL time groovy compilation error

All time am getting below error message in groovy...
Could not understand whats causing this " Unexpected token error" ????
I used to think only PERL give bad compilation error,now groovy outperforming it..
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
D:\Playground\groovy\release-b-work\cmd_line_soapui\trial.groovy: 12:
unexpected token: myrunner # line 12, column 1.
myrunner.setProjectFile("D:\soapui-release-B\try.xml");
^
1 error
Code taken from comment;
import com.eviware.soapui.SoapUIProTestCaseRunner;
import com.eviware.soapui.support.*;
import com.eviware.soapui.model.*;
import com.eviware.soapui.impl.wsdl.*;
import com.eviware.soapui.*;
class trial {
def myrunner = new com.eviware.soapui.SoapUIProTestCaseRunner();
myrunner.setProjectFile("D:\soapui-release-B\try.xml");
myrunner.setTestSuite("MediaAssetServiceTestSuite");
myrunner.setTestCase("createMediaAsset TestCase");
myrunner.run();
}
You need to put your code in a method
You can't just add code into a class at class level
Try:
import com.eviware.soapui.SoapUIProTestCaseRunner;
import com.eviware.soapui.support.*;
import com.eviware.soapui.model.*;
import com.eviware.soapui.impl.wsdl.*;
import com.eviware.soapui.*;
class trial {
def someMethod() {
def myrunner = new com.eviware.soapui.SoapUIProTestCaseRunner();
myrunner.setProjectFile("D:\soapui-release-B\try.xml");
myrunner.setTestSuite("MediaAssetServiceTestSuite");
myrunner.setTestCase("createMediaAsset TestCase");
myrunner.run();
}
}

Resources