When trying to build a test app for iOS, I ran into the exception included below. There seems to be a fix for this here https://github.com/MobiVM/robovm/issues/188, but I guess that fix somehow didn't make it into the fork I am using (excerpt from my gradle.build):
buildscript {
repositories {
jcenter()
}
dependencies {
//cc_init_javafxports check version:
// https://bitbucket.org/javafxports/javafxmobile-plugin
classpath 'org.javafxports:jfxmobile-plugin:1.3.8'
}
}
I cloned the source of javafxmobile-plugin. 2 weeks ago, version 1.3.9 was committed:
changeset: 472:8491a50f2b76
tag: 1.3.9
user: Gluon Jenkins <jenkins#gluonhq.com>
date: Thu Oct 19 16:05:18 2017 +0200
summary: new release: 1.3.9
But it has not yet been published.
Does somebody know if this javafxmobile-plugin v1.3.9 resolves the issue shown below? If not, is there a workaround, e.g. by renaming certain classes?
Caused by: org.robovm.compiler.CompilerException: java.lang.ArrayIndexOutOfBoundsException: -1
at org.robovm.compiler.plugin.lambda.LambdaPlugin.transformMethod(LambdaPlugin.java:242)
at org.robovm.compiler.plugin.lambda.LambdaPlugin.beforeClass(LambdaPlugin.java:89)
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.robovm.compiler.plugin.lambda.LambdaClassGenerator.pushArguments(LambdaClassGenerator.java:203)
at org.robovm.compiler.plugin.lambda.LambdaClassGenerator.createForwardingMethod(LambdaClassGenerator.java:134)
at org.robovm.compiler.plugin.lambda.LambdaClassGenerator.generate(LambdaClassGenerator.java:79)
at org.robovm.compiler.plugin.lambda.LambdaPlugin.transformMethod(LambdaPlugin.java:180)
... 85 more
Related
My question is about a groovy script that fails.
I tried to run it from a freestyle job with a Build Step "Execute system Groovy script" and 'Groovy command' where I have pasted the script from this source and I also tried running the scripts directly from the script console.
(Another script I tried which gives a different error: this one)
I found this article already here and some other ones, but it hasn't helped me out so far so I would like to run it by the community here.
I understand that there's likely more to it than described here, but I have hope.
I am admin of a couple of old (v1.580.13) Cloudbees Jenkins servers I need to support and can't yet decommission and I used to run a cleanup script which clears out workspaces on slaves.
Environment (masters and agents)
OLD = RHEL 6.x physical - there the script worked
NEW = CentOS 7.x VM - here it doesn't
For some reason that is beyond me it is not working on my new environment and produces an error that refers to the Folders plugin which I don't understand since the plugin is installed and was not changed as far as I know.
Both "Folders Plugin" (4.7) and "CloudBees Folders Plus Plugin" (2.10) are installed and I can see the related files in:
$JENKINS_HOME/plugins/cloudbees-folder
$JENKINS_HOME/plugins/cloudbees-folder.jpi
../cache/war/WEB-INF/plugins/cloudbees-folder.hpi
Groovy plugin v1.14 is also installed as is Groovy runtime (Groovy Version: 1.8.9 JVM: 1.8.0_191 Vendor: Oracle Corporation as OS package as well as having 'Groovy installations' in Jenkins configuration: Groovy 2.5.4 & 2.1.9 from http://groovy.codehaus.org - install automatically) for master and agents.
The exact error output in the console is:
FATAL: startup failed:
Script1.groovy: 19: unable to resolve class com.cloudbees.hudson.plugins.folder.AbstractFolder
# line 19, column 24.
if(item instanceof com.cloudbees.hudson.plugins.folder.AbstractFolder) {
^
1 error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 19: unable to resolve class com.cloudbees.hudson.plugins.folder.AbstractFolder
# line 19, column 24.
if(item instanceof com.cloudbees.hudson.plugins.folder.AbstractFolder) {
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:861)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:499)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:723)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:680)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:666)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
at hudson.model.Run.execute(Run.java:1745)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Help is greatly appreciated!
Creating a completely new MultiView FXML Project and then adding the Java9 necessities in Gradle:
buildscript {
repositories {
jcenter()
google()
maven{
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.5'
}
}
...
sourceCompatibility = 1.8
targetCompatibility = 1.8
...
dependencies {
compile 'com.gluonhq:charm:4.4.0-jdk9'
androidRuntime 'com.gluonhq:charm:4.4.1'
compile 'com.airhacks:afterburner.mfx:1.6.3'
// Added because of javax.annotation.PostConstruct Java9 issues
compile group: 'javax.xml.ws', name: 'jaxws-api', version: '2.2.6'
}
leads to [SUB] Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: Stage must be showing before making the Dialog visible.
full console log
The project runs as expected on Desktop and Android, but not on iOS simulator and device. I have tried many things, but since this error comes on newly created projects leads me to believe that it's something caused by the interplay of gluon-mobile and Java9.
Bonus: Changing only the jfxmobile-plugin to 2.0.18 fails even compiling with:
[15:08:15:141] com.gluonhq.higgs.Higgs: Still compiling... 8823
classes left.
[15:08:25:143] com.gluonhq.higgs.Higgs: Still
compiling... 4152 classes left.
[15:08:34:389] com.gluonhq.higgs.Compiler: halfway done round 0
java.lang.StackOverflowError
at java.base/java.util.HashMap.putVal(HashMap.java:642)
at java.base/java.util.HashMap.put(HashMap.java:612)
at java.base/java.util.HashSet.add(HashSet.java:220)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:170)
These steps work for me:
Using Java 9, and NetBeans 9 (beta version) with Gluon IDE plugin 2.6.2, I've created a Gluon project (multi view with FXML). Of course, this will work with other IDEs as well.
I've checked that the gradle wrapper was using 4.3.1 (or superior).
I've modified the build.gradle file to use Gluon VM with jfxmobile 2.0.18:
build.gradle file:
buildscript {
repositories {
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.18'
}
}
and updated the dependencies:
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.gluonhq:charm:4.4.0-jdk9'
compile 'com.airhacks:afterburner.mfx:1.6.3'
compile 'javax.annotation:javax.annotation-api:1.3.2'
androidRuntime 'com.gluonhq:charm:4.4.1'
}
Then I just deployed the project to my iOS device without any issue.
Note that it may be convenient to clean your ~/.gvm cache, as it might contain classes from older versions that shouldn't be used anymore. Of course, you should also clean your project ./gradle and /build folders.
When I create a new project with my android studio 3.0.1 build.gradle (module:app) is configured automatically as bellow:
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.android.myapplication"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
and build.gradle (project:my application) is configured automatically as bellow:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I've done nothing unless creating a new project but at this point an error appears with red line under appcompat implementation saying:
When using a compileSdkVersion android-O revision 2 or higher, the support library version should be 26.0.0-beta1 or higher (was 26.0.0-alpha1)
Also test:runner implementation is highlighted with following hint:
A newer version of com.android.support.test:runner than 0.5 is available: 1.0.1
and espresso-core implementation is highlighted with following hint:
A newer version of com.android.support.test.espresso:espresso-core than 2.2.2 is available: 3.0.1
QUESTION 1- I have SDK tools versions 27.0.0 and 27.0.1 and 27.0.3 installed on my system. Why android studio uses 26.0.0-alpha1 as a default which causes error?
QUESTION 2- How can I change this default to proper 27 version?
When I try changing compileSdkVersion and targetSdkVersion to 27 and changing appcompat version to v7:27.0.0 then I come up with following errors after syncing:
image description
QUESTION 3- Why this error is happening and how to rectify it?
I revert back to SDK 26 and try to upgrade test:runner and test.espresso:espresso-core to what android studio suggests. It ends up with this error:
image description
QUESTION 4- Why android studio cannot resolve the upgrading which it suggests?
QUESTION 5- What is a sample working gradle build configuration using latest SDK version (27)?
After too many investigations, I regretfully found that all errors were due to unfair sanctions by Google against my country's people (not against the government as they claim!).
My Android Studio was not able to contact jcenter and maven repositories.
After using a VPN program everything was settled and all errors were vanished!!
I am running application on grails 1.3.4 but I am getting this error while running applicaton.
Base Directory: /projects/upwork/jhon/jbilling-community-3.1.0_2
WARNING: Configurational method [inherits] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
Resolving dependencies...
Dependencies resolved in 804ms.
Running script /apps/grails-1.3.4/scripts/RunApp.groovy
Environment set to development
Plugin [release-2.2.1] not installed. ...
Plugin [release-1.0.0] not installed. ...
Plugin [rest-client-builder-1.0.3] not installed. ...
Resolving new plugins. Please wait... ...
Installing zip /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip... ...
[mkdir] Created dir: /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
[unzip] Expanding: /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip into /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Installed plugin release-2.2.1 to location /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1. ...
Plugin release-2.2.1 requires version [2.0 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
[delete] Deleting directory /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Process finished with exit code 1
I haven't mentioned any plugin named above in my application.properties file. Here it is:
#Grails Metadata file
#Wed Jun 15 19:34:11 PKT 2016
app.grails.version=1.3.4
app.name=jbilling
app.servlet.version=2.4
app.version=community-3.1.0
plugins.cookie=0.2
plugins.cxf=0.5.1
plugins.hibernate=1.3.4
plugins.include=0.3
plugins.jquery=1.11.1
plugins.jquery-ui=1.8.7
plugins.log4j-xml=0.2
plugins.remote-pagination=0.2.4
plugins.remoting=1.1
plugins.spring-security-core=1.0.1
plugins.tomcat=1.3.4
plugins.webflow=1.3.8
Can anyone let me know why it is happening and its solution.
I'm trying to develop a new Jenkins plugin that has a jar dependency to something from my Nexus repo.
When I try to launch the plugin in a debug mode to attach my IDE
mvnDebug hpi:run
I get the following error message:
Apr 25, 2016 11:04:37 AM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Inspecting plugin C:\dev\Eclipse\vsync\work\plugins\vsync.hpl
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:230)
at java.util.zip.ZipFile.<init>(ZipFile.java:160)
at java.util.jar.JarFile.<init>(JarFile.java:168)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at jenkins.util.AntClassLoader.addPathFile(AntClassLoader.java:502)
at hudson.ClassicPluginStrategy$AntClassLoader2.addPathFiles(ClassicPluginStrategy.java:768)
at hudson.ClassicPluginStrategy.createClassLoader(ClassicPluginStrategy.java:278)
at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:253)
at hudson.PluginManager$1$3$1.run(PluginManager.java:254)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:905)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:795)
I've checked my vsync.hpl file and see that it was properly generated, but the Libraries list is quite long due to all the dependencies that my jar has pulled in with it.
I suspect that Jenkins is failing trying to access/open one of those dependencies, but I have no idea which one it is. Is there a way to get additional debug information out, to know which jar/zip file is failing?
Or baring that, is there a way I can put Jenkins itself (ie the Jetty container) in a debug mode and attach a debugger to that so I can step through the plugin load process and see what is failing?
I have encountered the same Exception and in my case, it was caused by having a pom dependency in pom.xml, like below:
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>cli</artifactId>
<version>1.596.1</version>
<type>pom</type>
</dependency>
Which cause Jenkins try to extract pom file, which fails.