Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two more packages in JVM args for Java 16+ compatibility #183

Merged

Conversation

labkey-jeckels
Copy link
Contributor

Rationale

Certain pipeline scenarios need access to java.util.Properties and java.awt.font.TextAttributes to be compatible with Java 16+

Changes

@labkey-jeckels labkey-jeckels requested a review from a team December 23, 2021 21:47
@labkey-jeckels labkey-jeckels merged commit a337ec0 into release21.11-SNAPSHOT Dec 24, 2021
@labkey-jeckels labkey-jeckels deleted the 21.11_fb_additionalReflectionJVMArgs branch December 24, 2021 00:38
@bbimber
Copy link
Contributor

bbimber commented Dec 24, 2021

@labkey-jeckels be aware, that change might not be quite right. see:

  • /home/exacloud/gscratch/prime-seq/java/current/bin/java -XX:HeapBaseMinAddress=4294967296 -Djava.io.tmpdir=/mnt/scratch/prime-seq/tmp.h4QZNQTfP4SequenceImport_20211224 --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.awt.font=ALL-UNNAMED ' '
    WARNING: package java.awt.font not in java.base
    Error: Could not find or load main class
    Caused by: java.lang.ClassNotFoundException:

I'll see if i have time today to look into this, but might not until after xmas

This seems on-point, but I only briefly scanned it

x-stream/xstream#101

@bbimber
Copy link
Contributor

bbimber commented Dec 24, 2021

Updating xstreamVersion=1.2.2 might also resolve this

@labkey-jeckels
Copy link
Contributor Author

Yes, looks like java.awt.font is in java.desktop, not java.base. Try this variant instead:

--add-opens=java.desktop/java.awt.font=ALL-UNNAMED

@labkey-jeckels
Copy link
Contributor Author

Looking a little closer, that's a warning, not the error. Is that output the full command-line? It looks like it's missing the name of the main class, for example, and other arguments.

@bbimber
Copy link
Contributor

bbimber commented Dec 24, 2021

Didnt I post one on the ONPRC issue tracker? See here:

https://prime-seq.ohsu.edu/_webdav/Labs/Bimber/708/%40files/sequenceOutputPipeline/SequenceOutput_2021-12-23_07-56-49/Single_Cell_Processing_2021-12-23_07-56-48.400959-17529355.java.log

INFO  2021-12-23 07:57:58,395 [UMOManager.3] org.mule.providers.jms.activemq.ActiveMqJmsConnector: Started: ActiveMqJmsConnector{this=14d513ca, started=true, initialised=true, name='jmsConnectorStatus', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides=null}
Starting to run task for job (NOT SUBMITTED) Single_Cell_Processing_2021-12-23_07-56-48.400959 on host: exanode-3-1
INFO  2021-12-23 07:57:58,688 [main] org.mule.extras.client.MuleClient: There is already a manager locally available to this client, no need to create a new one
INFO  2021-12-23 07:57:58,701 [main] org.mule.extras.client.MuleClient: There is already a manager locally available to this client, no need to create a new one
INFO  2021-12-23 07:57:58,701 [jmsConnectorStatus.dispatcher.1] org.mule.providers.jms.JmsMessageDispatcher: Connected: JmsMessageDispatcher{this=392acfa4, endpoint=jms://status.queue}
INFO  2021-12-23 07:57:58,702 [main] org.labkey.api.util.Job: Starting to run task 'org.labkey.sequenceanalysis.pipeline.SequenceOutputHandlerRemoteTask' for job '(NOT SUBMITTED) Single_Cell_Processing_2021-12-23_07-56-48.400959' with log file /home/groups/BimberLab/primeseq/708/@files/sequenceOutputPipeline/SequenceOutput_2021-12-23_07-56-49/Single_Cell_Processing_2021-12-23_07-56-48.400959.log
ERROR 2021-12-23 07:57:58,763 [jmsConnectorStatus.dispatcher.1] org.labkey.pipeline.mule.PipelineJobExceptionStrategy: 
********************************************************************************
Message               : Unable to initialize XStream
Type                  : org.mule.umo.transformer.TransformerException
Code                  : MULE_ERROR-64999
JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/umo/transformer/TransformerException.html
********************************************************************************
Exception stack is:
1. Unable to make field private static final java.util.Map java.awt.font.TextAttribute.instanceMap accessible: module java.desktop does not "opens java.awt.font" to unnamed module @88a8218 (java.lang.reflect.InaccessibleObjectException)
  java.lang.reflect.AccessibleObject:354 (null)
2. Unable to initialize XStream (org.mule.umo.transformer.TransformerException)
  org.mule.transformers.xml.AbstractXStreamTransformer:54 (http://mule.mulesource.org/docs/apidocs/org/mule/umo/transformer/TransformerException.html)
********************************************************************************
Root Exception stack trace:
java.lang.reflect.InaccessibleObjectException: Unable to make field private static final java.util.Map java.awt.font.TextAttribute.instanceMap accessible: module java.desktop does not "opens java.awt.font" to unnamed module @88a8218
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:84)
	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.serializableFieldsFor(FieldDictionary.java:38)
	at com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter.readResolve(AbstractAttributedCharacterIteratorAttributeConverter.java:73)
	at com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter.<init>(AbstractAttributedCharacterIteratorAttributeConverter.java:42)
	at com.thoughtworks.xstream.converters.extended.TextAttributeConverter.<init>(TextAttributeConverter.java:23)
	at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:599)
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:375)
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:320)
	at org.mule.transformers.xml.XStreamFactory.<init>(XStreamFactory.java:48)
	at org.mule.transformers.xml.AbstractXStreamTransformer.getXStream(AbstractXStreamTransformer.java:46)
	at org.mule.transformers.xml.ObjectToXml.transform(ObjectToXml.java:66)
	at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:40)
	at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:250)
	at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:324)
	at org.mule.providers.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:142)
	at org.mule.providers.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:65)
	at org.mule.providers.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:552)
	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.base/java.lang.Thread.run(Thread.java:833)

********************************************************************************

ERROR 2021-12-23 07:57:58,764 [jmsConnectorStatus.dispatcher.2] org.labkey.pipeline.mule.PipelineJobExceptionStrategy: 
********************************************************************************
Message               : Unable to initialize XStream
Type                  : org.mule.umo.transformer.TransformerException
Code                  : MULE_ERROR-64999
JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/umo/transformer/TransformerException.html
********************************************************************************

@bbimber
Copy link
Contributor

bbimber commented Dec 24, 2021

Also, when I tried:

--add-opens=java.desktop/java.awt.font=ALL-UNNAMED

It completely died with an error about not being able to find java.desktop. I can dig that up if you want me to try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants