Announcement Announcement Module
Collapse
No announcement yet.
Getting the PropetiesLauncher to work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the PropetiesLauncher to work

    Its a bit disappointing how little support is being provided for answering questions on forums and the limited documentation on spring boot doesnt helps either. Mostly everything works with basic stuff but as soon as you hit a single road block its like there isnt a single piece of information out there to get around it. Anyways I am gonna post my question here I doubt that I will get the answer.

    I am trying to use the PropertiesLauncher added in boot-0.5.0M5 release and there isny any mention of how to use it in the release notes. Basically for my case I am overwriting the META-INF file to use the PropertiesLauncher as the main class instead of the JarLauncher. And that at least gets it started but i dont think its really loading files into class path from file system so e.g. I have all the jars in the lib folder at the same level as the application jar. I am letting the PropertiesLaucnher use lib as default for loader.path and it does indicates that lib is loader in classpath but then it fails in finding the SpringApplication.class which mean spring-boot jars arent loaded. So I am not sure how this launcher is supposed to be used

    Code:
    $ java -jar hdfspub-0.0.1-SNAPSHOT.jar
    Oct 28, 2013 2:46:20 PM org.springframework.boot.loader.PropertiesLauncher initializeProperties
    INFO: Found: application.properties
    Oct 28, 2013 2:46:20 PM org.springframework.boot.loader.PropertiesLauncher initializePaths
    INFO: Nested archive paths: [lib/]
    Oct 28, 2013 2:46:20 PM org.springframework.boot.loader.PropertiesLauncher getClassPathArchives
    INFO: Adding classpath entries from lib/
    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 org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
            at com.att.hadoop.hdfspub.config.AppJarStarter.main(AppJarStarter.java:15)
            ... 6 more
    Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            ... 7 more
    Any help would be appreciated

  • #2
    We are currently in the process of moving to stackoverflow.com for our forums. If you're still having this issue please consider asking it again at http://stackoverflow.com using the #spring-boot tag. If you do post it there, please reply here with the link. Thanks!



    Comment

    Working...
    X