Post

1 follower Follow
0
Avatar

Migrating plugin to gradle

Hi,

I have been trying to refactor my plugin to use use gradle as a build tool using the https://github.com/Biomatters/geneious-eupathdb repository as a reference. 
It is working and I am able to run my plugin except whenever I try to open a nucleotide sequence list document it will give the following errors:
 
10:53:22.310 WARNING: Exception: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

at com.biomatters.core.documents.AnnotatedDocumentImplementation.a(AnnotatedDocumentImplementation.java:1253)

at com.biomatters.core.documents.AnnotatedDocumentImplementation.c(AnnotatedDocumentImplementation.java:1202)

at com.biomatters.core.documents.AnnotatedDocumentImplementation.b(AnnotatedDocumentImplementation.java:995)

at com.biomatters.core.documents.AnnotatedDocumentImplementation.getDocumentOrThrow(AnnotatedDocumentImplementation.java:977)

at com.biomatters.core.documents.w.a(DocumentCache.java:113)

at com.biomatters.iseek.gui.bv.run(ViewersPanel.java:279)

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Caused by: java.lang.reflect.InvocationTargetException




at com.biomatters.core.documents.AnnotatedDocumentImplementation.a(AnnotatedDocumentImplementation.java:1240)

... 6 more

Caused by: java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Object jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) throws java.lang.InstantiationException,java.lang.IllegalArgumentException,java.lang.reflect.InvocationTargetException accessible: module java.base does not "opens jdk.internal.reflect" to unnamed module @3c0ee776

at com.biomatters.geneious.publicapi.documents.sequence.ConstructorWrapper.a(ConstructorWrapper.java:58)

at com.biomatters.geneious.publicapi.documents.sequence.ConstructorWrapper.<init>(ConstructorWrapper.java:17)

Caused by: java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Object jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) throws java.lang.InstantiationException,java.lang.IllegalArgumentException,java.lang.reflect.InvocationTargetException accessible: module java.base does not "opens jdk.internal.reflect" to unnamed module @3c0ee776




at com.biomatters.geneious.publicapi.documents.sequence.ImmutableSequenceManager.c(ImmutableSequenceManager.java:261)

at com.biomatters.geneious.publicapi.documents.sequence.ImmutableSequenceManager.a(ImmutableSequenceManager.java:227)

at com.biomatters.geneious.publicapi.documents.sequence.DataInputStreamWithAuxiliaryDataStream.a(DataInputStreamWithAuxiliaryDataStream.java:57)

at com.biomatters.geneious.publicapi.documents.sequence.ImmutableSequenceImplementation.readObject(ImmutableSequenceImplementation.java:999)

at com.biomatters.geneious.publicapi.utilities.DataInputOutputUtilities.readSequence(DataInputOutputUtilities.java:71)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskStandard$SequenceData.a(SequenceListOnDiskStandard.java:76)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskStandard$SequenceData.a(SequenceListOnDiskStandard.java:227)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskStandard$SequenceData.get(SequenceListOnDiskStandard.java:134)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskStandard.get(SequenceListOnDiskStandard.java:626)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskStandard.<init>(SequenceListOnDiskStandard.java:428)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDisk.fromXml(SequenceListOnDisk.java:58)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDiskInterlaced.<init>(SequenceListOnDiskInterlaced.java:48)

at com.biomatters.geneious.publicapi.documents.sequence.SequenceListOnDisk.fromXml(SequenceListOnDisk.java:55)

at com.biomatters.geneious.publicapi.documents.sequence.DefaultSequenceListDocument.fromXML(DefaultSequenceListDocument.java:588)

... 11 more

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Object jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) throws java.lang.InstantiationException,java.lang.IllegalArgumentException,java.lang.reflect.InvocationTargetException accessible: module java.base does not "opens jdk.internal.reflect" to unnamed module @3c0ee776

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)

at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)

at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)

at com.biomatters.geneious.publicapi.documents.sequence.ConstructorWrapper.a(ConstructorWrapper.java:55)

... 26 more




Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Object jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) throws java.lang.InstantiationException,java.lang.IllegalArgumentException,java.lang.reflect.InvocationTargetException accessible: module java.base does not "opens jdk.internal.reflect" to unnamed module @3c0ee776
 
 
Building my plugin into a .gplugin file and importing it into the standalone Geneious Prime installation works fine, so I think it is an issue with my project setup.
 
My initial thought is that this is an issue with the java version I am using to compile/run the plugin. My project SDK is set to adopt-openjdk-11 and this is the JVM that gradle is using as well.
I have tried this with adopt-openjdk-1.8 and geneious will not open due to it requiring Java 11. Perhaps I am missing a setting somewhere to specify the compile SDK version to be 1.8?
 
Do you have any clue what could be happening here or what I could do to solve this problem?
Lucas Sherlock

Please sign in to leave a comment.