i using spring boot application 1.5.6 in eclipse oxygen hibernate 5. created project using spring starter project. have input data source values in application.properties file.
i trying run application getting error:
[info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building brokerswing 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info] [info] >>> spring-boot-maven-plugin:1.5.6.release:run (default-cli) > test-compile @ brokerswing >>> [info] [info] --- maven-resources-plugin:2.6:resources (default-resources) @ brokerswing --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 1 resource [info] copying 1 resource [info] [info] --- maven-compiler-plugin:3.1:compile (default-compile) @ brokerswing --- [info] changes detected - recompiling module! [info] compiling 19 source files f:\1 eclipse oxygen\oxygen_workspace\brokerswing\target\classes [info] [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ brokerswing --- [info] using 'utf-8' encoding copy filtered resources. [info] skip non existing resourcedirectory f:\1 eclipse oxygen\oxygen_workspace\brokerswing\src\test\resources [info] [info] --- maven-compiler-plugin:3.1:testcompile (default-testcompile) @ brokerswing --- [info] nothing compile - classes date [info] [info] <<< spring-boot-maven-plugin:1.5.6.release:run (default-cli) < test-compile @ brokerswing <<< [info] [info] --- spring-boot-maven-plugin:1.5.6.release:run (default-cli) @ brokerswing --- . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: spring boot :: (v1.5.6.release) 2017-09-10 20:57:51.484 info 3968 --- [ main] com.brokerswing.demoapplication : starting demoapplication on nishant-lenovo pid 3968 (started nisha in f:\1 eclipse oxygen\oxygen_workspace\brokerswing) 2017-09-10 20:57:51.487 info 3968 --- [ main] com.brokerswing.demoapplication : no active profile set, falling default profiles: default 2017-09-10 20:57:51.561 info 3968 --- [ main] ationconfigembeddedwebapplicationcontext : refreshing org.springframework.boot.context.embedded.annotationconfigembeddedwebapplicationcontext@2788d0eb: startup date [sun sep 10 20:57:51 ist 2017]; root of context hierarchy 2017-09-10 20:57:54.175 info 3968 --- [ main] s.b.c.e.t.tomcatembeddedservletcontainer : tomcat initialized port(s): 8080 (http) 2017-09-10 20:57:54.196 info 3968 --- [ main] o.apache.catalina.core.standardservice : starting service [tomcat] 2017-09-10 20:57:54.198 info 3968 --- [ main] org.apache.catalina.core.standardengine : starting servlet engine: apache tomcat/8.5.16 2017-09-10 20:57:54.332 info 3968 --- [ost-startstop-1] o.a.c.c.c.[tomcat].[localhost].[/] : initializing spring embedded webapplicationcontext 2017-09-10 20:57:54.333 info 3968 --- [ost-startstop-1] o.s.web.context.contextloader : root webapplicationcontext: initialization completed in 2777 ms 2017-09-10 20:57:54.580 info 3968 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'characterencodingfilter' to: [/*] 2017-09-10 20:57:54.580 info 3968 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'hiddenhttpmethodfilter' to: [/*] 2017-09-10 20:57:54.580 info 3968 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'httpputformcontentfilter' to: [/*] 2017-09-10 20:57:54.580 info 3968 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'requestcontextfilter' to: [/*] 2017-09-10 20:57:54.582 info 3968 --- [ost-startstop-1] .s.delegatingfilterproxyregistrationbean : mapping filter: 'springsecurityfilterchain' to: [/*] 2017-09-10 20:57:54.582 info 3968 --- [ost-startstop-1] o.s.b.w.servlet.servletregistrationbean : mapping servlet: 'dispatcherservlet' [/] 2017-09-10 20:57:54.643 info 3968 --- [ main] o.s.j.d.drivermanagerdatasource : loaded jdbc driver: com.mysql.jdbc.driver 2017-09-10 20:57:55.123 info 3968 --- [ main] j.localcontainerentitymanagerfactorybean : building jpa container entitymanagerfactory persistence unit 'default' 2017-09-10 20:57:55.159 info 3968 --- [ main] o.hibernate.jpa.internal.util.loghelper : hhh000204: processing persistenceunitinfo [ name: default ...] 2017-09-10 20:57:55.277 info 3968 --- [ main] org.hibernate.version : hhh000412: hibernate core {5.0.12.final} 2017-09-10 20:57:55.278 info 3968 --- [ main] org.hibernate.cfg.environment : hhh000206: hibernate.properties not found 2017-09-10 20:57:55.281 info 3968 --- [ main] org.hibernate.cfg.environment : hhh000021: bytecode provider name : javassist 2017-09-10 20:57:55.343 info 3968 --- [ main] o.hibernate.annotations.common.version : hcann000001: hibernate commons annotations {5.0.1.final} 2017-09-10 20:57:55.523 info 3968 --- [ main] org.hibernate.dialect.dialect : hhh000400: using dialect: org.hibernate.dialect.mysql5dialect 2017-09-10 20:57:55.776 warn 3968 --- [ main] ationconfigembeddedwebapplicationcontext : exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.beancreationexception: error creating bean name 'entitymanagerfactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/hibernatejpaautoconfiguration.class]: invocation of init method failed; nested exception java.lang.nullpointerexception 2017-09-10 20:57:55.779 info 3968 --- [ main] o.apache.catalina.core.standardservice : stopping service [tomcat] 2017-09-10 20:57:55.793 info 3968 --- [ main] utoconfigurationreportlogginginitializer : error starting applicationcontext. display auto-configuration report re-run application 'debug' enabled. 2017-09-10 20:57:55.803 error 3968 --- [ main] o.s.boot.springapplication : application startup failed org.springframework.beans.factory.beancreationexception: error creating bean name 'entitymanagerfactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/hibernatejpaautoconfiguration.class]: invocation of init method failed; nested exception java.lang.nullpointerexception @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1628) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:555) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:483) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:306) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:302) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:197) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:1078) ~[spring-context-4.3.10.release.jar:4.3.10.release] @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:857) ~[spring-context-4.3.10.release.jar:4.3.10.release] @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:543) ~[spring-context-4.3.10.release.jar:4.3.10.release] @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.refresh(embeddedwebapplicationcontext.java:122) ~[spring-boot-1.5.6.release.jar:1.5.6.release] @ org.springframework.boot.springapplication.refresh(springapplication.java:693) [spring-boot-1.5.6.release.jar:1.5.6.release] @ org.springframework.boot.springapplication.refreshcontext(springapplication.java:360) [spring-boot-1.5.6.release.jar:1.5.6.release] @ org.springframework.boot.springapplication.run(springapplication.java:303) [spring-boot-1.5.6.release.jar:1.5.6.release] @ org.springframework.boot.springapplication.run(springapplication.java:1118) [spring-boot-1.5.6.release.jar:1.5.6.release] @ org.springframework.boot.springapplication.run(springapplication.java:1107) [spring-boot-1.5.6.release.jar:1.5.6.release] @ com.brokerswing.demoapplication.main(demoapplication.java:12) [classes/:na] @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_144] @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) ~[na:1.8.0_144] @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_144] @ java.lang.reflect.method.invoke(method.java:498) ~[na:1.8.0_144] @ org.springframework.boot.maven.abstractrunmojo$launchrunner.run(abstractrunmojo.java:527) [spring-boot-maven-plugin-1.5.6.release.jar:1.5.6.release] @ java.lang.thread.run(thread.java:748) [na:1.8.0_144] caused by: java.lang.nullpointerexception: null @ org.hibernate.mapping.persistentclass.createprimarykey(persistentclass.java:363) ~[hibernate-core-5.0.12.final.jar:5.0.12.final] @ org.hibernate.cfg.createkeysecondpass.dosecondpass(createkeysecondpass.java:31) ~[hibernate-core-5.0.12.final.jar:5.0.12.final] @ org.hibernate.boot.internal.inflightmetadatacollectorimpl.processsecondpasses(inflightmetadatacollectorimpl.java:1655) ~[hibernate-core-5.0.12.final.jar:5.0.12.final] @ org.hibernate.boot.internal.inflightmetadatacollectorimpl.processsecondpasses(inflightmetadatacollectorimpl.java:1619) ~[hibernate-core-5.0.12.final.jar:5.0.12.final] @ org.hibernate.boot.model.process.spi.metadatabuildingprocess.complete(metadatabuildingprocess.java:278) ~[hibernate-core-5.0.12.final.jar:5.0.12.final] @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.metadata(entitymanagerfactorybuilderimpl.java:847) ~[hibernate-entitymanager-5.0.12.final.jar:5.0.12.final] @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.build(entitymanagerfactorybuilderimpl.java:874) ~[hibernate-entitymanager-5.0.12.final.jar:5.0.12.final] @ org.springframework.orm.jpa.vendor.springhibernatejpapersistenceprovider.createcontainerentitymanagerfactory(springhibernatejpapersistenceprovider.java:60) ~[spring-orm-4.3.10.release.jar:4.3.10.release] @ org.springframework.orm.jpa.localcontainerentitymanagerfactorybean.createnativeentitymanagerfactory(localcontainerentitymanagerfactorybean.java:353) ~[spring-orm-4.3.10.release.jar:4.3.10.release] @ org.springframework.orm.jpa.abstractentitymanagerfactorybean.buildnativeentitymanagerfactory(abstractentitymanagerfactorybean.java:370) ~[spring-orm-4.3.10.release.jar:4.3.10.release] @ org.springframework.orm.jpa.abstractentitymanagerfactorybean.afterpropertiesset(abstractentitymanagerfactorybean.java:359) ~[spring-orm-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1687) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1624) ~[spring-beans-4.3.10.release.jar:4.3.10.release] ... 22 common frames omitted [warning] java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:498) @ org.springframework.boot.maven.abstractrunmojo$launchrunner.run(abstractrunmojo.java:527) @ java.lang.thread.run(thread.java:748) caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'entitymanagerfactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/hibernatejpaautoconfiguration.class]: invocation of init method failed; nested exception java.lang.nullpointerexception @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1628) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:555) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:483) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:306) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:197) @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:1078) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:857) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:543) @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.refresh(embeddedwebapplicationcontext.java:122) @ org.springframework.boot.springapplication.refresh(springapplication.java:693) @ org.springframework.boot.springapplication.refreshcontext(springapplication.java:360) @ org.springframework.boot.springapplication.run(springapplication.java:303) @ org.springframework.boot.springapplication.run(springapplication.java:1118) @ org.springframework.boot.springapplication.run(springapplication.java:1107) @ com.brokerswing.demoapplication.main(demoapplication.java:12) ... 6 more caused by: java.lang.nullpointerexception @ org.hibernate.mapping.persistentclass.createprimarykey(persistentclass.java:363) @ org.hibernate.cfg.createkeysecondpass.dosecondpass(createkeysecondpass.java:31) @ org.hibernate.boot.internal.inflightmetadatacollectorimpl.processsecondpasses(inflightmetadatacollectorimpl.java:1655) @ org.hibernate.boot.internal.inflightmetadatacollectorimpl.processsecondpasses(inflightmetadatacollectorimpl.java:1619) @ org.hibernate.boot.model.process.spi.metadatabuildingprocess.complete(metadatabuildingprocess.java:278) @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.metadata(entitymanagerfactorybuilderimpl.java:847) @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.build(entitymanagerfactorybuilderimpl.java:874) @ org.springframework.orm.jpa.vendor.springhibernatejpapersistenceprovider.createcontainerentitymanagerfactory(springhibernatejpapersistenceprovider.java:60) @ org.springframework.orm.jpa.localcontainerentitymanagerfactorybean.createnativeentitymanagerfactory(localcontainerentitymanagerfactorybean.java:353) @ org.springframework.orm.jpa.abstractentitymanagerfactorybean.buildnativeentitymanagerfactory(abstractentitymanagerfactorybean.java:370) @ org.springframework.orm.jpa.abstractentitymanagerfactorybean.afterpropertiesset(abstractentitymanagerfactorybean.java:359) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1687) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1624) ... 22 more [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 10.307 s [info] finished at: 2017-09-10t20:57:55+05:30 [info] final memory: 47m/392m [info] ------------------------------------------------------------------------ [error] failed execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.6.release:run (default-cli) on project brokerswing: exception occurred while running. null: invocationtargetexception: error creating bean name 'entitymanagerfactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/hibernatejpaautoconfiguration.class]: invocation of init method failed; nested exception java.lang.nullpointerexception -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception
i trying since whole day. please suggest me root cause.
Comments
Post a Comment