java.lang.reflect.InvocationTargetException

Atlassian JIRA | Felipe Kraemer | 1 year 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

    The upgrade to FishEye to 4.0.0 fails with the following message: {noformat} ERROR: problem running command 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:497) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) Caused by: java.lang.NoClassDefFoundError: com/atlassian/ip/Subnet at com.atlassian.security.auth.trustedapps.AtlassianIPMatcher.parsePatternString(AtlassianIPMatcher.java:56) at com.atlassian.security.auth.trustedapps.RequestConditions$RulesBuilder.addIPPattern(RequestConditions.java:45) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.createTrustedApplication(DefaultFisheyeTrustedApplicationsManager.java:120) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplicationsMap(DefaultFisheyeTrustedApplicationsManager.java:98) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplications(DefaultFisheyeTrustedApplicationsManager.java:83) at com.cenqua.fisheye.ctl.SystemInfoMessage.addTrustedApps(SystemInfoMessage.java:183) at com.cenqua.fisheye.ctl.SystemInfoMessage.getMessage(SystemInfoMessage.java:101) at com.cenqua.fisheye.ctl.Run.printSystemInfo(Run.java:338) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:249) at com.cenqua.fisheye.ctl.Run.main(Run.java:56) ... 6 more Caused by: java.lang.ClassNotFoundException: com.atlassian.ip.Subnet at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 16 more {noformat} *Cause:* This is happening due to a missing library {{atlassian-ip-2.0.jar}}. *Workaround:* # Download [{{atlassian-ip-2.0.jar}}|https://maven.atlassian.com/service/local/repositories/atlassian-public/content/com/atlassian/ip/atlassian-ip/2.0/atlassian-ip-2.0.jar]. # Move it to {{FISHEYE_4.0.0_HOME\lib}} # Restart FishEye 4.0.0

    Atlassian JIRA | 1 year ago | Felipe Kraemer
    java.lang.reflect.InvocationTargetException
  2. 0

    The upgrade to FishEye to 4.0.0 fails with the following message: {noformat} ERROR: problem running command 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:497) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) Caused by: java.lang.NoClassDefFoundError: com/atlassian/ip/Subnet at com.atlassian.security.auth.trustedapps.AtlassianIPMatcher.parsePatternString(AtlassianIPMatcher.java:56) at com.atlassian.security.auth.trustedapps.RequestConditions$RulesBuilder.addIPPattern(RequestConditions.java:45) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.createTrustedApplication(DefaultFisheyeTrustedApplicationsManager.java:120) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplicationsMap(DefaultFisheyeTrustedApplicationsManager.java:98) at com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplications(DefaultFisheyeTrustedApplicationsManager.java:83) at com.cenqua.fisheye.ctl.SystemInfoMessage.addTrustedApps(SystemInfoMessage.java:183) at com.cenqua.fisheye.ctl.SystemInfoMessage.getMessage(SystemInfoMessage.java:101) at com.cenqua.fisheye.ctl.Run.printSystemInfo(Run.java:338) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:249) at com.cenqua.fisheye.ctl.Run.main(Run.java:56) ... 6 more Caused by: java.lang.ClassNotFoundException: com.atlassian.ip.Subnet at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 16 more {noformat} *Cause:* This is happening due to a missing library {{atlassian-ip-2.0.jar}}. *Workaround:* # Download [{{atlassian-ip-2.0.jar}}|https://maven.atlassian.com/service/local/repositories/atlassian-public/content/com/atlassian/ip/atlassian-ip/2.0/atlassian-ip-2.0.jar]. # Move it to {{FISHEYE_4.0.0_HOME\lib}} # Restart FishEye 4.0.0

    Atlassian JIRA | 1 year ago | Felipe Kraemer
    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 with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  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

    com.atlassian.ip.Subnet

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    3. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    3 frames
  3. com.atlassian.security
    RequestConditions$RulesBuilder.addIPPattern
    1. com.atlassian.security.auth.trustedapps.AtlassianIPMatcher.parsePatternString(AtlassianIPMatcher.java:56)
    2. com.atlassian.security.auth.trustedapps.RequestConditions$RulesBuilder.addIPPattern(RequestConditions.java:45)
    2 frames
  4. com.atlassian.fisheye
    DefaultFisheyeTrustedApplicationsManager.getTrustedApplications
    1. com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.createTrustedApplication(DefaultFisheyeTrustedApplicationsManager.java:120)
    2. com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplicationsMap(DefaultFisheyeTrustedApplicationsManager.java:98)
    3. com.atlassian.fisheye.trustedapplications.DefaultFisheyeTrustedApplicationsManager.getTrustedApplications(DefaultFisheyeTrustedApplicationsManager.java:83)
    3 frames
  5. com.cenqua.fisheye
    Run.main
    1. com.cenqua.fisheye.ctl.SystemInfoMessage.addTrustedApps(SystemInfoMessage.java:183)
    2. com.cenqua.fisheye.ctl.SystemInfoMessage.getMessage(SystemInfoMessage.java:101)
    3. com.cenqua.fisheye.ctl.Run.printSystemInfo(Run.java:338)
    4. com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:249)
    5. com.cenqua.fisheye.ctl.Run.main(Run.java:56)
    5 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  7. com.cenqua.fisheye
    FishEyeCtl.main
    1. com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101)
    2. com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44)
    2 frames