[jboss-user] [JNDI and Naming] - Binding a SessionFactory

Lulseged Zerfu do-not-reply at jboss.com
Tue Apr 13 05:03:22 EDT 2010


Lulseged Zerfu [http://community.jboss.org/people/lulseged] replied to the discussion

"Binding a SessionFactory"

To view the discussion, visit: http://community.jboss.org/message/537092#537092

--------------------------------------------------------------
Hi

Yes I have removed it but there is an exception while creating a SessionFactory.

Lulseged


2010-04-13 11:00:18,795 INFO [org.hibernate.cfg.Environment] - <Hibernate 3.5.0-Final>
2010-04-13 11:00:18,800 INFO [org.hibernate.cfg.Environment] - <loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=1800, hibernate.use_sql_comments=true, hibernate.cache.provider_class=net.sf.ehcache.hibernate.SingletonEhCacheProvider, hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.cache.use_query_cache=true, hibernate.cache.use_second_level_cache=true, hibernate.cache.use_structured_entries=true, hibernate.c3p0.min_size=5, hibernate.generate_statistics=true, hibernate.bytecode.use_reflection_optimizer=false}>
2010-04-13 11:00:18,805 INFO [org.hibernate.cfg.Environment] - <Bytecode provider name : javassist>
2010-04-13 11:00:18,812 INFO [org.hibernate.cfg.Environment] - <using JDK 1.4 java.sql.Timestamp handling>
2010-04-13 11:00:18,971 INFO [org.hibernate.cfg.Configuration] - <configuring from resource: /hibernate.cfg.xml>
2010-04-13 11:00:18,971 INFO [org.hibernate.cfg.Configuration] - <Configuration resource: /hibernate.cfg.xml>
2010-04-13 11:00:19,082 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceListUser.hbm.xml>
2010-04-13 11:00:19,170 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListUser -> presentity>
2010-04-13 11:00:19,192 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceList.hbm.xml>
2010-04-13 11:00:19,216 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceList -> resourcelist>
2010-04-13 11:00:19,295 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceListType.hbm.xml>
2010-04-13 11:00:19,315 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListType -> resourcelisttype>
2010-04-13 11:00:19,319 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceListEntry.hbm.xml>
2010-04-13 11:00:19,331 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListEntry -> resourcelistentry>
2010-04-13 11:00:19,332 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceListEntryReference.hbm.xml>
2010-04-13 11:00:19,343 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListEntryReference -> resourcelistentryref>
2010-04-13 11:00:19,344 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/ResourceListExternal.hbm.xml>
2010-04-13 11:00:19,354 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListExternal -> resourcelistexternal>
2010-04-13 11:00:19,354 INFO [org.hibernate.cfg.Configuration] - <Reading mappings from resource : hbm/Subscription.hbm.xml>
2010-04-13 11:00:19,365 INFO [org.hibernate.cfg.HbmBinder] - <Mapping class: com.ericsson.ims.pag.common.domain.Subscription -> subscription>
2010-04-13 11:00:19,365 INFO [org.hibernate.cfg.Configuration] - <Configured SessionFactory: jdbc/resource-list>
2010-04-13 11:00:19,366 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListUser.subscriptions -> subscription>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListUser.resourceLists -> resourcelist>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceList.resourceListTypes -> resourcelisttype>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListType.resourceListTypes -> resourcelisttype>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListType.resourceListExternals -> resourcelistexternal>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListType.resourceListEntryReferences -> resourcelistentryref>
2010-04-13 11:00:19,367 INFO [org.hibernate.cfg.HbmBinder] - <Mapping collection: com.ericsson.ims.pag.xdms.resource.list.domain.ResourceListType.resourceListEntries -> resourcelistentry>
2010-04-13 11:00:19,377 INFO [org.hibernate.connection.DriverManagerConnectionProvider] - <Using Hibernate built-in connection pool (not for production use!)>
2010-04-13 11:00:19,377 INFO [org.hibernate.connection.DriverManagerConnectionProvider] - <Hibernate connection pool size: 10>
2010-04-13 11:00:19,377 INFO [org.hibernate.connection.DriverManagerConnectionProvider] - <autocommit mode: false>
2010-04-13 11:00:19,390 INFO [org.hibernate.connection.DriverManagerConnectionProvider] - <using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://127.0.0.1:3306/ddb>
2010-04-13 11:00:19,390 INFO [org.hibernate.connection.DriverManagerConnectionProvider] - <connection properties: {user=ddbuser, password=ddbuser}>
2010-04-13 11:00:19,390 TRACE [org.hibernate.connection.DriverManagerConnectionProvider] - <total checked-out connections: 0>
2010-04-13 11:00:19,390 DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] - <opening new JDBC connection>
2010-04-13 11:00:19,686 DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] - <created connection to: jdbc:mysql://127.0.0.1:3306/ddb, Isolation Level: 4>
2010-04-13 11:00:19,686 INFO [org.hibernate.cfg.SettingsFactory] - <RDBMS: MySQL, version: 5.1.45-community-log>
2010-04-13 11:00:19,687 INFO [org.hibernate.cfg.SettingsFactory] - <JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-commercial-5.1.12 ( Revision: ${bzr.revision-id} )>
2010-04-13 11:00:19,731 INFO [org.hibernate.dialect.Dialect] - <Using dialect: org.hibernate.dialect.MySQLInnoDBDialect>
2010-04-13 11:00:19,736 INFO [org.hibernate.engine.jdbc.JdbcSupportLoader] - <Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4>
2010-04-13 11:00:19,736 TRACE [org.hibernate.connection.DriverManagerConnectionProvider] - <returning connection to pool, pool size: 1>
2010-04-13 11:00:19,738 INFO [org.hibernate.transaction.TransactionFactoryFactory] - <Using default transaction strategy (direct JDBC transactions)>
2010-04-13 11:00:19,741 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] - <No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)>
2010-04-13 11:00:19,741 INFO [org.hibernate.cfg.SettingsFactory] - <Automatic flush during beforeCompletion(): disabled>
2010-04-13 11:00:19,741 INFO [org.hibernate.cfg.SettingsFactory] - <Automatic session close at end of transaction: disabled>
2010-04-13 11:00:19,742 INFO [org.hibernate.cfg.SettingsFactory] - <JDBC batch size: 15>
2010-04-13 11:00:19,742 INFO [org.hibernate.cfg.SettingsFactory] - <JDBC batch updates for versioned data: disabled>
2010-04-13 11:00:19,743 INFO [org.hibernate.cfg.SettingsFactory] - <Scrollable result sets: enabled>
2010-04-13 11:00:19,743 INFO [org.hibernate.cfg.SettingsFactory] - <JDBC3 getGeneratedKeys(): enabled>
2010-04-13 11:00:19,743 INFO [org.hibernate.cfg.SettingsFactory] - <Connection release mode: auto>
2010-04-13 11:00:19,744 INFO [org.hibernate.cfg.SettingsFactory] - <Default schema: ddb>
2010-04-13 11:00:19,745 INFO [org.hibernate.cfg.SettingsFactory] - <Maximum outer join fetch depth: 3>
2010-04-13 11:00:19,745 INFO [org.hibernate.cfg.SettingsFactory] - <Default batch fetch size: 1>
2010-04-13 11:00:19,745 INFO [org.hibernate.cfg.SettingsFactory] - <Generate SQL with comments: enabled>
2010-04-13 11:00:19,746 INFO [org.hibernate.cfg.SettingsFactory] - <Order SQL updates by primary key: disabled>
2010-04-13 11:00:19,746 INFO [org.hibernate.cfg.SettingsFactory] - <Order SQL inserts for batching: disabled>
2010-04-13 11:00:19,746 INFO [org.hibernate.cfg.SettingsFactory] - <Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory>
2010-04-13 11:00:19,748 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] - <Using ASTQueryTranslatorFactory>
2010-04-13 11:00:19,748 INFO [org.hibernate.cfg.SettingsFactory] - <Query language substitutions: {}>
2010-04-13 11:00:19,749 INFO [org.hibernate.cfg.SettingsFactory] - <JPA-QL strict compliance: disabled>
2010-04-13 11:00:19,749 INFO [org.hibernate.cfg.SettingsFactory] - <Second-level cache: enabled>
2010-04-13 11:00:19,749 INFO [org.hibernate.cfg.SettingsFactory] - <Query cache: enabled>
2010-04-13 11:00:19,755 INFO [org.hibernate.cfg.SettingsFactory] - <Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge>
2010-04-13 11:00:19,755 INFO [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] - <Cache provider: net.sf.ehcache.hibernate.SingletonEhCacheProvider>
2010-04-13 11:00:19,760 INFO [org.hibernate.cfg.SettingsFactory] - <Optimize cache for minimal puts: disabled>
2010-04-13 11:00:19,760 INFO [org.hibernate.cfg.SettingsFactory] - <Structured second-level cache entries: enabled>
2010-04-13 11:00:19,761 INFO [org.hibernate.cfg.SettingsFactory] - <Query cache factory: org.hibernate.cache.StandardQueryCacheFactory>
2010-04-13 11:00:19,768 INFO [org.hibernate.cfg.SettingsFactory] - <Echoing all SQL to stdout>
2010-04-13 11:00:19,769 INFO [org.hibernate.cfg.SettingsFactory] - <Statistics: enabled>
2010-04-13 11:00:19,769 INFO [org.hibernate.cfg.SettingsFactory] - <Deleted entity synthetic identifier rollback: disabled>
2010-04-13 11:00:19,769 INFO [org.hibernate.cfg.SettingsFactory] - <Default entity-mode: pojo>
2010-04-13 11:00:19,770 INFO [org.hibernate.cfg.SettingsFactory] - <Named query checking : enabled>
2010-04-13 11:00:19,770 INFO [org.hibernate.cfg.SettingsFactory] - <Check Nullability in Core (should be disabled when Bean Validation is on): enabled>
2010-04-13 11:00:19,814 INFO [org.hibernate.impl.SessionFactoryImpl] - <building session factory>
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.ORDERING)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.ORDERING)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.ORDERING)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.ORDERING)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
2010-04-13 11:00:20,393 INFO [org.hibernate.impl.SessionFactoryObjectFactory] - <Factory name: jdbc/resource-list>
2010-04-13 11:00:20,395 INFO [org.hibernate.util.NamingHelper] - <JNDI InitialContext properties:{}>
2010-04-13 11:00:20,401 WARN [org.hibernate.impl.SessionFactoryObjectFactory] - <Could not bind factory to JNDI>
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
    at javax.naming.InitialContext.getNameParser(InitialContext.java:480)
    at org.hibernate.util.NamingHelper.bind(NamingHelper.java:75)
    at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:113)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:376)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
    at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSession.<init>(ResourceListSession.java:14)
    at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSession.instance(ResourceListSession.java:30)
    at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSessionTest.setUp(ResourceListSessionTest.java:17)
    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
2010-04-13 11:00:20,418 INFO [org.hibernate.cache.UpdateTimestampsCache] - <starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache>
2010-04-13 11:00:20,424 INFO [org.hibernate.cache.StandardQueryCache] - <starting query cache at region: org.hibernate.cache.StandardQueryCache>
Collection counts = 0

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/537092#537092]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100413/6608a737/attachment.html 


More information about the jboss-user mailing list