I got this error while running the demo through a Docker container:
'''
=========== Setting gate parts according to assigned gate names
=========== Setting gate parts according to assigned gate names
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.cellocad.MIT.dnacompiler.PlasmidUtil.setTxnUnits(PlasmidUtil.java:520)
at org.cellocad.MIT.dnacompiler.DNACompiler.generatePlasmids(DNACompiler.java:1136)
at org.cellocad.MIT.dnacompiler.DNACompiler.run(DNACompiler.java:1068)
at org.cellocad.MIT.dnacompiler.CelloMain.main(CelloMain.java:15)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.077 s
[INFO] Finished at: 2019-11-15T00:01:12+00:00
[INFO] Final Memory: 39M/271M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default) on project cellocad: An exception occured while executing the Java class. null: InvocationTargetException: Index: 1, Size: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default) on project cellocad: An exception occured while executing the Java class. null '''
A possible fix is to replace the code in org.cellocad.MIT.dnacompiler.PlasmidUtil.setTxnUnits to the following:
I got this error while running the demo through a Docker container:
''' =========== Setting gate parts according to assigned gate names =========== Setting gate parts according to assigned gate names [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at org.cellocad.MIT.dnacompiler.PlasmidUtil.setTxnUnits(PlasmidUtil.java:520) at org.cellocad.MIT.dnacompiler.DNACompiler.generatePlasmids(DNACompiler.java:1136) at org.cellocad.MIT.dnacompiler.DNACompiler.run(DNACompiler.java:1068) at org.cellocad.MIT.dnacompiler.CelloMain.main(CelloMain.java:15) ... 6 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.077 s [INFO] Finished at: 2019-11-15T00:01:12+00:00 [INFO] Final Memory: 39M/271M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default) on project cellocad: An exception occured while executing the Java class. null: InvocationTargetException: Index: 1, Size: 1 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default) on project cellocad: An exception occured while executing the Java class. null '''
A possible fix is to replace the code in org.cellocad.MIT.dnacompiler.PlasmidUtil.setTxnUnits to the following:
The original conditional statement is commented out but left there to show where the change occurs.