spring - Java JPA/Hibernate generates database schema twice -


i tried switching application hibernate's sessionfactory jpa's entitymanager spring mvc project.

when run application jetty, database schema created twice. (i have hbm2ddl.auto set 'create').

more specifically, see output twice:

info: building jpa entitymanagerfactory persistence unit 'default' info: initialized jpa entitymanagerfactory persistence unit 'default' 

the generated sql hibernate shows exact same sql statements repeated twice.

somehow entitymanagerfactory being created twice.

i using hibernate version 5.2.9.final, spring version 4.3.5.release

unfortunately project not belong me, not think can release code samples. wondering if else has encountered issue, , appreciate if point me in general direction of problem might be.

i have tried switching between localentitymanagerfactorybean , localcontainerentitymanagerfactorybean

i have switched between using datasource , persistence.xml

i have tried filtering <context:component-scan> in dispatcher-servlet.xml exclude scanning @component (to avoid potentially having beans scanned twice), none of these have worked!

any appreciated.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -