java.lang.reflect.InvocationTargetException

Mirth Project | Brent Moen | 4 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    An exception occurs when attempting to export messages from the CLI. Possibly a build problem, because it works fine when running from eclipse. $exportmessages messages.xml e65665ce-cc68-4cb2-ab9d-5984b789864c xml 100 Exporting messages to file: messages.xml java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.mirth.connect.cli.launcher.CommandLineLauncher.main(CommandLineLauncher.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.exe4j.runtime.LauncherEngine.launch(Unknown Source) at com.install4j.runtime.launcher.Launcher.main(Unknown Source) Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider at com.mirth.connect.model.EncryptionSettings.<clinit>(EncryptionSettings.java:29) at sun.reflect.GeneratedSerializationConstructorAccessor18.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:75) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:428) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:233) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1058) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1030) at com.mirth.connect.model.converters.ObjectXMLSerializer.deserialize(ObjectXMLSerializer.java:158) at com.mirth.connect.client.core.Client.getEncryptionSettings(Client.java:520) at com.mirth.connect.client.core.Client.getEncryptor(Client.java:800) at com.mirth.connect.cli.CommandLineInterface.commandExportMessages(CommandLineInterface.java:903) at com.mirth.connect.cli.CommandLineInterface.executeStatement(CommandLineInterface.java:284) at com.mirth.connect.cli.CommandLineInterface.runConsole(CommandLineInterface.java:213) at com.mirth.connect.cli.CommandLineInterface.runShell(CommandLineInterface.java:178) at com.mirth.connect.cli.CommandLineInterface.run(CommandLineInterface.java:147) at com.mirth.connect.cli.CommandLineInterface.<init>(CommandLineInterface.java:90) ... 11 more Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 33 more

    Mirth Project | 4 years ago | Brent Moen
    java.lang.reflect.InvocationTargetException
  2. 0

    An exception occurs when attempting to export messages from the CLI. Possibly a build problem, because it works fine when running from eclipse. $exportmessages messages.xml e65665ce-cc68-4cb2-ab9d-5984b789864c xml 100 Exporting messages to file: messages.xml java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.mirth.connect.cli.launcher.CommandLineLauncher.main(CommandLineLauncher.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.exe4j.runtime.LauncherEngine.launch(Unknown Source) at com.install4j.runtime.launcher.Launcher.main(Unknown Source) Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider at com.mirth.connect.model.EncryptionSettings.<clinit>(EncryptionSettings.java:29) at sun.reflect.GeneratedSerializationConstructorAccessor18.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:75) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:428) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:233) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1058) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1030) at com.mirth.connect.model.converters.ObjectXMLSerializer.deserialize(ObjectXMLSerializer.java:158) at com.mirth.connect.client.core.Client.getEncryptionSettings(Client.java:520) at com.mirth.connect.client.core.Client.getEncryptor(Client.java:800) at com.mirth.connect.cli.CommandLineInterface.commandExportMessages(CommandLineInterface.java:903) at com.mirth.connect.cli.CommandLineInterface.executeStatement(CommandLineInterface.java:284) at com.mirth.connect.cli.CommandLineInterface.runConsole(CommandLineInterface.java:213) at com.mirth.connect.cli.CommandLineInterface.runShell(CommandLineInterface.java:178) at com.mirth.connect.cli.CommandLineInterface.run(CommandLineInterface.java:147) at com.mirth.connect.cli.CommandLineInterface.<init>(CommandLineInterface.java:90) ... 11 more Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 33 more

    Mirth Project | 4 years ago | Brent Moen
    java.lang.reflect.InvocationTargetException
  3. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.
  6. 0
    samebug tip
    Check if you didn't forget to instantiate your topic in the kafka broker.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.bouncycastle.jce.provider.BouncyCastleProvider

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    6 frames
  3. com.mirth.connect
    EncryptionSettings.<clinit>
    1. com.mirth.connect.model.EncryptionSettings.<clinit>(EncryptionSettings.java:29)
    1 frame
  4. Java RT
    Constructor.newInstance
    1. sun.reflect.GeneratedSerializationConstructorAccessor18.newInstance(Unknown Source)
    2. java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    2 frames
  5. XStream Core
    XStream.unmarshal
    1. com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:75)
    2. com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:428)
    3. com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:233)
    4. com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
    5. com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
    6. com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
    7. com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
    8. com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
    9. com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1058)
    10. com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1030)
    10 frames
  6. com.mirth.connect
    CommandLineInterface.<init>
    1. com.mirth.connect.model.converters.ObjectXMLSerializer.deserialize(ObjectXMLSerializer.java:158)
    2. com.mirth.connect.client.core.Client.getEncryptionSettings(Client.java:520)
    3. com.mirth.connect.client.core.Client.getEncryptor(Client.java:800)
    4. com.mirth.connect.cli.CommandLineInterface.commandExportMessages(CommandLineInterface.java:903)
    5. com.mirth.connect.cli.CommandLineInterface.executeStatement(CommandLineInterface.java:284)
    6. com.mirth.connect.cli.CommandLineInterface.runConsole(CommandLineInterface.java:213)
    7. com.mirth.connect.cli.CommandLineInterface.runShell(CommandLineInterface.java:178)
    8. com.mirth.connect.cli.CommandLineInterface.run(CommandLineInterface.java:147)
    9. com.mirth.connect.cli.CommandLineInterface.<init>(CommandLineInterface.java:90)
    9 frames
  7. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    4 frames
  8. com.mirth.connect
    CommandLineLauncher.main
    1. com.mirth.connect.cli.launcher.CommandLineLauncher.main(CommandLineLauncher.java:50)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  10. com.exe4j.runtime
    LauncherEngine.launch
    1. com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    1 frame
  11. com.install4j.runtime
    Launcher.main
    1. com.install4j.runtime.launcher.Launcher.main(Unknown Source)
    1 frame