Closed jonbartels closed 2 years ago
Where did you encounter that error message? 52.0 seems to be Java 8.
I cloned the repo and ran mvn clean install. My OS default is JDK 8. This could be maven, but other projects build fine on JDK 8.
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] mirthpluginsample [pom]
[INFO] shared [jar]
[INFO] server [jar]
[INFO] client [jar]
[INFO] distribution [pom]
[INFO]
[INFO] ------------------< com.kaurpalang:mirthpluginsample >------------------
[INFO] Building mirthpluginsample 1.0-SNAPSHOT [1/5]
[INFO] --------------------------------[ pom ]---------------------------------
Downloading from nexus: https://maven.kaurpalang.com/repository/maven-public/com/kaurpalang/mirth-plugin-maven-plugin/1.0.2-SNAPSHOT/maven-metadata.xml
Downloading from snapshots: https://mvn.zengemini.net/artifactory/libs-snapshot/com/kaurpalang/mirth-plugin-maven-plugin/1.0.2-SNAPSHOT/maven-metadata.xml
Downloaded from nexus: https://maven.kaurpalang.com/repository/maven-public/com/kaurpalang/mirth-plugin-maven-plugin/1.0.2-SNAPSHOT/maven-metadata.xml (789 B at 117 B/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ mirthpluginsample ---
[INFO]
[INFO] --- maven-processor-plugin:4.5:process (process) @ mirthpluginsample ---
[WARNING] Error injecting: org.bsc.maven.plugin.processor.MainAnnotationProcessorMojo
java.lang.TypeNotPresentException: Type org.bsc.maven.plugin.processor.MainAnnotationProcessorMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:147)
at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.UnsupportedClassVersionError: org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1 (Native Method)
at java.lang.ClassLoader.defineClass (ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass (URLClassLoader.java:467)
at java.net.URLClassLoader.access$100 (URLClassLoader.java:73)
at java.net.URLClassLoader$1.run (URLClassLoader.java:368)
at java.net.URLClassLoader$1.run (URLClassLoader.java:362)
at java.security.AccessController.doPrivileged (Native Method)
at java.net.URLClassLoader.findClass (URLClassLoader.java:361)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (ClassRealm.java:425)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:139)
at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for mirthpluginsample 1.0-SNAPSHOT:
[INFO]
[INFO] mirthpluginsample .................................. FAILURE [ 56.547 s]
[INFO] shared ............................................. SKIPPED
[INFO] server ............................................. SKIPPED
[INFO] client ............................................. SKIPPED
[INFO] distribution ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.902 s
[INFO] Finished at: 2022-04-27T09:22:09-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.bsc.maven:maven-processor-plugin:4.5:process (process) on project mirthpluginsample: Execution process of goal org.bsc.maven:maven-processor-plugin:4.5:process failed: Unable to load the mojo 'process' in the plugin 'org.bsc.maven:maven-processor-plugin:4.5' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.bsc.maven:maven-processor-plugin:4.5
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/jon.bartels/.m2/repository/org/bsc/maven/maven-processor-plugin/4.5/maven-processor-plugin-4.5.jar
[ERROR] urls[1] = file:/Users/jon.bartels/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[2] = file:/Users/jon.bartels/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[3] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.24/plexus-interpolation-1.24.jar
[ERROR] urls[4] = file:/Users/jon.bartels/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[5] = file:/Users/jon.bartels/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[6] = file:/Users/jon.bartels/.m2/repository/org/apache/maven/maven-builder-support/3.5.4/maven-builder-support-3.5.4.jar
[ERROR] urls[7] = file:/Users/jon.bartels/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.1.1/maven-resolver-util-1.1.1.jar
[ERROR] urls[8] = file:/Users/jon.bartels/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
[ERROR] urls[9] = file:/Users/jon.bartels/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
[ERROR] urls[10] = file:/Users/jon.bartels/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar
[ERROR] urls[11] = file:/Users/jon.bartels/.m2/repository/com/google/inject/guice/4.2.0/guice-4.2.0-no_aop.jar
[ERROR] urls[12] = file:/Users/jon.bartels/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[13] = file:/Users/jon.bartels/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar
[ERROR] urls[14] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
[ERROR] urls[15] = file:/Users/jon.bartels/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar
[ERROR] urls[16] = file:/Users/jon.bartels/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.6.0/maven-plugin-annotations-3.6.0.jar
[ERROR] urls[17] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.1/plexus-utils-3.1.1.jar
[ERROR] urls[18] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.8.3/plexus-compiler-api-2.8.3.jar
[ERROR] urls[19] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.8.3/plexus-compiler-manager-2.8.3.jar
[ERROR] urls[20] = file:/Users/jon.bartels/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.8.3/plexus-compiler-javac-2.8.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
For the Purgable
error I am working with a plugin that uses ChannelGroup
which implements Serializable, Migratable, Purgable, Cacheable<ChannelGroup>
. This may be a missing dependency rather than a build issue.
I'll leave a checklist of the suggested improvements for easier tracking:
-k
flagsgetSomething()
API callGood plan. I'll update my fork and send over a PR in... about a week I think?
Good plan. I'll update my fork and send over a PR in... about a week I think?
Sure, I'll be expecting it around Christmas time then :)
I submitted PRs. Plz approve them ASAP. :trollface:
I walked through this guide while implementing https://github.com/jonbartels/mirth-connect-dashboard-count
This issue serves to capture any issues I found so I can provide a PR to the guide. I promised this to Kaur in December 2021 and I am a bad friend for letting it sit for so long.
As I work through the task I will edit this issue with my findings. I will submit a PR with any major issues or additions.
Bugs/Issues
this version of the Java Runtime only recognizes class file versions up to 52.0
- I need to look up what 52.0 is but it failed on JDK 8 worked fine on JDK 12/Applications/Mirth Connect Administrator Launcher.app/Contents/java/app
and it needs to be launched withjava -jar the.jar -k
. I will add a Linux section also but it will say "you use linux, figure it out" in a funny/friendly way!-k -d
is very unsafe but will get past most signing issues (except expired certs, doh!)Caused by: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: NotAfter: Fri Feb 25 08:04:02 EST 2022
so even with the unsafe flags it doesnt like expired certs. Lame.donkey-server
. The user can browse dependencies athttps://maven.kaurpalang.com/#browse/browse:maven-public
getSomething
API is never called from client plugin code. A common usage for a plugin API is to service a client side plugin that calls that API. A good example would be to show how to use MCClient or code to call your own API from the plugins client code to do work on the serverIdeas
javaws -wait -Xnosplash -verbose -J-Xdebug -J-Xnoagent -J-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 webstart.jnlp
will let you debug the client, at least under whatever random JVM I happened to be using. This could be out of scope, it would have to assume some baseline experience debugging java apps. It'd be a whole guide in itself.