spring boot problem

HemJ

Well-known member
  • Nov 13, 2017
    1,581
    178
    63
    migomu
    machan !

    spring boot project sample ekak karagena yanawa eke ban

    OK - Undeployed application at context path [/SurveyApp]
    In-place deployment at /Users/hemj/Desktop/Main Project 2/SurveyApp/target/SurveyApp-1.0-SNAPSHOT
    Deployment is in progress...
    deploy?config=file%3A%2Fvar%2Ffolders%2Fy3%2Fby_54y7x6p5bxbp4y73cqn_w0000gn%2FT%2Fcontext3160760221922930825.xml&path=/SurveyApp
    FAIL - Deployed application at context path [/SurveyApp] but context failed to start

    Tomcat log eka mehema enawa

    04-Jun-2019 19:50:25.505 INFO [http-nio-8080-exec-7] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
    04-Jun-2019 19:50:25.609 INFO [http-nio-8080-exec-7] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
    04-Jun-2019 19:50:26.324 SEVERE [http-nio-8080-exec-7] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'houseCheckingBo': Unsatisfied dependency expressed through field 'checkingDao': Error creating bean with name 'houseCheckingDao': Unsatisfied dependency expressed through field 'sessionFactory': Error creating bean with name 'sessionFactory' defined in class path resource [com/app/surveyapp/configuration/HibernateConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/app/surveyapp/configuration/HibernateConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'houseCheckingDao': Unsatisfied dependency expressed through field 'sessionFactory': Error creating bean with name 'sessionFactory' defined in class path resource [com/app/surveyapp/configuration/HibernateConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/app/surveyapp/configuration/HibernateConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)

    menna mehema enne mokada ban awula ? mata fix karanna therenne ne ban...
     

    Heshan Daminda

    Well-known member
  • Mar 13, 2009
    45,489
    1
    99,635
    113
    33
    Kalutara
    බූට් කිව්වම මම බලන්න ආවේ කෙල්ලෙක්ගෙන් බූට් කාපු එකෙක්ව :P
     

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,464
    98,397
    113
    මචන් ඔය එරර් එක ඔහොම දාපුවම කාට හරි රීඩ් කරන්න අමාරුයි මුලින්ම ඕක දාන්න ජිට්ස් වලට හරි එහෙම නැත්තන් ස්ක්‍රීන් ශොට් එකක් විදියට.

    එරර් එකෙ එන ස්ටැක් එක ඔක්කොම දාන්න කොටසක් දාන්නත් එපා.



    ඔය වගේ එකක් එන්නෙ නොර්මලි කන්ෆිග් අවුල් උනාම. මුලු කෝඩ් එක බලන්නෙ නැතුව හරියට කියන්න බෑ.

    ජේඩීබීසී දාල තියෙන එක කෝකටත් චෙක් කරල බලන්න.
     

    rrckguy

    Active member
  • Dec 10, 2008
    422
    40
    28
    Add JAXB library to the classpath

    JAXB APIs no longer available in default classpath in latest Java SE version. So you need to add JAXB APIs to the classpath yourself.

    Here is the dependency. You need to add to the build file.
    Maven
    Code:
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.4.0-b180830.0359</version>
    </dependency>

    Gradle
    Code:
    compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'