Preface: Windows 7 64bit, Eclipse Juno, JRE 7, Maven m2e 1.3.1, jboss as 7.1.1, Hibernate 4.3beta (built from git with Gradle)
I tried to use the StandardServiceRegistry and the MetaDataSource as the Docs suggest;
Code:
standardServiceReg= new StandardServiceRegistryBuilder();
serviceReg= standardServiceReg.configure("hibernate.cfg.xml").build();
MetadataSources metaSource= new MetadataSources( serviceReg.getParentServiceRegistry());
sessionFactory = metaSource.buildMetadata().buildSessionFactory();
In an effort to get the sessionFactory; I updated my .cfg.xml headers to match the 4.3 docs of example 1.2 hibernate.cfg.xml
http://docs.jboss.org/hibernate/orm/4.3/devguide/en-US/html_single/
As well as the property attribute name="hibernate.dialect" and name="dialect" (I tried both as the error indicates i do not set the dialect)
Errors:
Code:
11:28:03,353 WARN [org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator] (http-localhost-127.0.0.1-8080-3) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
11:28:03,362 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
11:28:03,364 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:98)
11:28:03,365 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:66)
11:28:03,367 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:193)
11:28:03,368 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:89)
11:28:03,369 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:160)
11:28:03,371 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:132)
11:28:03,372 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:147)
11:28:03,374 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:198)
11:28:03,375 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:157)
11:28:03,376 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:132)
11:28:03,378 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.metamodel.source.internal.MetadataImpl.<init>(MetadataImpl.java:119)
11:28:03,379 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.metamodel.source.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:122)
11:28:03,380 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.hibernate.metamodel.MetadataSources.buildMetadata(MetadataSources.java:149)
11:28:03,382 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at dal.DAL.configureSessionFactory(DAL.java:84)
11:28:03,382 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at dal.DAL.sessionManager(DAL.java:96)
11:28:03,383 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at dal.DAL.loginUser(DAL.java:338)
11:28:03,384 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at login.login.executeLogin(login.java:108)
Any guidance is appreciated.