java.lang.reflect.InvocationTargetException

SpringSource Issue Tracker | Andy Wilkinson | 8 years ago
  1. 0

    Including the following config in repository.config: "watched" : { "type" : "watched", "watchDirectory" : "${user.home}/my-repo", "watchInterval" : 5 } Results in the following startup failure: ./startup.sh Launch failed: caught exception. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: org.osgi.framework.BundleException: Exception in com.springsource.kernel.repository.internal.RepositoryActivator.start() of bundle com.springsource.kernel.repository. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:830) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:779) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) ... 5 more Caused by: java.lang.IllegalArgumentException: Check directory '/Users/wilkinsona/Desktop/springsource-dm-server-2.0.0.CI-R265-B218/${user.home}/my-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:127) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:126) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:91) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:83) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:56) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:116) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:70) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:807) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:798) ... 12 more expandProperties() should be used on the configured watchDirectory

    SpringSource Issue Tracker | 8 years ago | Andy Wilkinson
    java.lang.reflect.InvocationTargetException
  2. 0

    Including the following config in repository.config: "watched" : { "type" : "watched", "watchDirectory" : "${user.home}/my-repo", "watchInterval" : 5 } Results in the following startup failure: ./startup.sh Launch failed: caught exception. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: org.osgi.framework.BundleException: Exception in com.springsource.kernel.repository.internal.RepositoryActivator.start() of bundle com.springsource.kernel.repository. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:830) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:779) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) ... 5 more Caused by: java.lang.IllegalArgumentException: Check directory '/Users/wilkinsona/Desktop/springsource-dm-server-2.0.0.CI-R265-B218/${user.home}/my-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:127) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:126) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:91) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:83) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:56) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:116) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:70) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:807) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:798) ... 12 more expandProperties() should be used on the configured watchDirectory

    SpringSource Issue Tracker | 8 years ago | Andy Wilkinson
    java.lang.reflect.InvocationTargetException
  3. 0

    Start with watched repository deinfed in chain, and watchInterval set, but no directory >in fact<. we get: [2009-08-07 16:11:41.231] main <RP0100W> The repository 'watched-repo' is not available. com.springsource.repository.RepositoryCreationException: Failed to create watched repository 'watched-repo' at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:134) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:101) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:73) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:89) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:57) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: java.lang.IllegalArgumentException: Check directory '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20090806084740/watched-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:164) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:163) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:84) at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:132) ... 19 common frames omitted Launch failed: caught exception. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: org.osgi.framework.BundleException: Exception in com.springsource.kernel.repository.internal.RepositoryActivator.start() of bundle com.springsource.kernel.repository. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) ... 5 more Caused by: com.springsource.repository.RepositoryCreationException: Failed to create watched repository 'watched-repo' at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:134) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:101) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:73) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:89) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:57) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773) ... 12 more Caused by: java.lang.IllegalArgumentException: Check directory '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20090806084740/watched-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:164) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:163) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:84) at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:132) ... 19 more Which is a warning (reasonable) followed by an exception stack (unreasonable) followed by a failure to start the server (bad). We should warn (with problem) and then continue. Discussion point: Should we recognise the directory when it >does< exist later?? At the moment we cannot do this.

    SpringSource Issue Tracker | 7 years ago | Steve Powell
    java.lang.reflect.InvocationTargetException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Start with watched repository deinfed in chain, and watchInterval set, but no directory >in fact<. we get: [2009-08-07 16:11:41.231] main <RP0100W> The repository 'watched-repo' is not available. com.springsource.repository.RepositoryCreationException: Failed to create watched repository 'watched-repo' at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:134) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:101) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:73) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:89) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:57) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: java.lang.IllegalArgumentException: Check directory '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20090806084740/watched-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:164) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:163) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:84) at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:132) ... 19 common frames omitted Launch failed: caught exception. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63) Caused by: org.osgi.framework.BundleException: Exception in com.springsource.kernel.repository.internal.RepositoryActivator.start() of bundle com.springsource.kernel.repository. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272) at com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177) at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160) at com.springsource.osgi.launcher.Launcher.main(Launcher.java:45) ... 5 more Caused by: com.springsource.repository.RepositoryCreationException: Failed to create watched repository 'watched-repo' at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:134) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:101) at com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:73) at com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:89) at com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:57) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773) ... 12 more Caused by: java.lang.IllegalArgumentException: Check directory '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20090806084740/watched-repo' must exist and must be a directory. at com.springsource.util.common.Assert.isTrue(Assert.java:49) at com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:164) at com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:163) at com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:84) at com.springsource.repository.internal.StandardRepositoryFactory.createWatchedRepository(StandardRepositoryFactory.java:132) ... 19 more Which is a warning (reasonable) followed by an exception stack (unreasonable) followed by a failure to start the server (bad). We should warn (with problem) and then continue. Discussion point: Should we recognise the directory when it >does< exist later?? At the moment we cannot do this.

    SpringSource Issue Tracker | 7 years ago | Steve Powell
    com.springsource.repository.RepositoryCreationException: Failed to create watched repository 'watched-repo'

    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.IllegalArgumentException

      Check directory '/Users/wilkinsona/Desktop/springsource-dm-server-2.0.0.CI-R265-B218/${user.home}/my-repo' must exist and must be a directory.

      at com.springsource.util.common.Assert.isTrue()
    2. com.springsource.util
      FileSystemChecker.<init>
      1. com.springsource.util.common.Assert.isTrue(Assert.java:49)
      2. com.springsource.util.io.FileSystemChecker.<init>(FileSystemChecker.java:88)
      2 frames
    3. com.springsource.repository
      StandardRepositoryFactory.createRepository
      1. com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:127)
      2. com.springsource.repository.internal.WatchedStorageRepository$DirectoryWatcher.<init>(WatchedStorageRepository.java:126)
      3. com.springsource.repository.internal.WatchedStorageRepository.<init>(WatchedStorageRepository.java:91)
      4. com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:83)
      5. com.springsource.repository.internal.StandardRepositoryFactory.createRepository(StandardRepositoryFactory.java:56)
      5 frames
    4. com.springsource.kernel
      RepositoryActivator.start
      1. com.springsource.kernel.repository.internal.RepositoryActivator.createAndPublishBundleRepository(RepositoryActivator.java:116)
      2. com.springsource.kernel.repository.internal.RepositoryActivator.start(RepositoryActivator.java:70)
      2 frames
    5. Eclipse OSGi
      BundleContextImpl$1.run
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:807)
      1 frame
    6. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    7. Eclipse OSGi
      AbstractBundle.start
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:798)
      2. org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:779)
      3. org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
      4. org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
      5. org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
      5 frames
    8. com.springsource.osgi
      Launcher.main
      1. com.springsource.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:177)
      2. com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:160)
      3. com.springsource.osgi.launcher.Launcher.main(Launcher.java:45)
      3 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    10. com.springsource.server
      LaunchHarness.main
      1. com.springsource.server.launch.harness.LaunchHarness.main(LaunchHarness.java:63)
      1 frame