java.lang.reflect.InvocationTargetException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by Andy Wilkinson,
  • 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
    via by Andy Wilkinson,
  • 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.
    via by Steve Powell,
  • 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.
    via by Steve Powell,
    • 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
    No Bugmate found.