-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Problem when creating a SessionFactory
PostPosted: Sun Feb 11, 2007 4:28 pm 
Beginner
Beginner

Joined: Sat Feb 10, 2007 12:18 pm
Posts: 23
Hi (I was asking this question in the german part already and now I try it here)

I am building an Application with the Eclipse SDK and I am using Hibernate 3 with Derby (10.2.2).
I only have a Class Users and a apping user.hbm.xml which is pretty simple
Code:
<hibernate-mapping>
   <class name="werkstattverwaltung.datastructures.User" table="USERS">
        <id name="id" column="USER_ID">
            <generator class="native"/>
        </id>
        <property name="name"/>
        <property name="password"/>
    </class>
</hibernate-mapping>

I copied the configuration from a tutorial and modified it a little
Code:
<hibernate-configuration>

    <session-factory>

        <!-- Database connection settings -->
        <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
        <property name="connection.url">jdbc:derby:C:/Test/DB</property>
        <property name="connection.username"></property>
        <property name="connection.password"></property>

        <!-- JDBC connection pool (use the built-in) -->
        <property name="connection.pool_size">1</property>

        <!-- SQL dialect -->
        <property name="dialect">org.hibernate.dialect.DerbyDialect</property>

        <!-- Enable Hibernate's automatic session context management -->
        <property name="current_session_context_class">thread</property>

        <!-- Disable the second-level cache  -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">true</property>

        <!-- Drop and re-create the database schema on startup -->
        <property name="hbm2ddl.auto">create</property>

        <mapping resource="werkstattverwaltung/datastructures/User.hbm.xml"/>

    </session-factory>

</hibernate-configuration>



If I try to create a SessionFactory
Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

I always get an InvovationTargetException

This is the Console-Output:
Code:
17:13:51,281  INFO Environment:500 - Hibernate 3.2.1
17:13:51,296  INFO Environment:533 - hibernate.properties not found
17:13:51,296  INFO Environment:667 - Bytecode provider name : cglib
17:13:51,296  INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
17:13:51,375  INFO Configuration:1423 - configuring from resource: /hibernate.cfg.xml
17:13:51,375  INFO Configuration:1400 - Configuration resource: /hibernate.cfg.xml
17:13:51,437 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
17:13:51,453 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
17:13:51,453 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
17:13:51,468 DEBUG Configuration:1384 - connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver
17:13:51,484 DEBUG Configuration:1384 - connection.url=jdbc:derby:C:/Test/DB
17:13:51,484 DEBUG Configuration:1384 - connection.username=
17:13:51,484 DEBUG Configuration:1384 - connection.password=
17:13:51,484 DEBUG Configuration:1384 - connection.pool_size=1
17:13:51,484 DEBUG Configuration:1384 - dialect=org.hibernate.dialect.DerbyDialect
17:13:51,484 DEBUG Configuration:1384 - current_session_context_class=thread
17:13:51,484 DEBUG Configuration:1384 - cache.provider_class=org.hibernate.cache.NoCacheProvider
17:13:51,484 DEBUG Configuration:1384 - show_sql=true
17:13:51,484 DEBUG Configuration:1384 - hbm2ddl.auto=create
17:13:51,484 DEBUG Configuration:1583 - null<-org.dom4j.tree.DefaultAttribute@d22462 [Attribute: name resource value "werkstattverwaltung/datastructures/User.hbm.xml"]
17:13:51,484  INFO Configuration:553 - Reading mappings from resource : werkstattverwaltung/datastructures/User.hbm.xml
17:13:51,484 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
17:13:51,484 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
17:13:51,484 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
17:13:51,562  INFO HbmBinder:300 - Mapping class: werkstattverwaltung.datastructures.User -> USERS
17:13:51,609 DEBUG HbmBinder:1270 - Mapped property: id -> USER_ID
17:13:51,609 DEBUG HbmBinder:1270 - Mapped property: name -> name
17:13:51,609 DEBUG HbmBinder:1270 - Mapped property: password -> password
17:13:51,609  INFO Configuration:1538 - Configured SessionFactory: null
17:13:51,609 DEBUG Configuration:1539 - properties: {show_sql=true, java.vendor=Sun Microsystems Inc., osgi.bundles.defaultStartLevel=4, sun.java.launcher=SUN_STANDARD, org.osgi.supports.framework.extension=true, hibernate.connection.url=jdbc:derby:C:/Test/DB, sun.management.compiler=HotSpot Client Compiler, osgi.framework.beginningstartlevel=1, hbm2ddl.auto=create, os.name=Windows XP, sun.boot.class.path=C:\Programme\Java\jre1.6.0\lib\resources.jar;C:\Programme\Java\jre1.6.0\lib\rt.jar;C:\Programme\Java\jre1.6.0\lib\sunrsasign.jar;C:\Programme\Java\jre1.6.0\lib\jsse.jar;C:\Programme\Java\jre1.6.0\lib\jce.jar;C:\Programme\Java\jre1.6.0\lib\charsets.jar;C:\Programme\Java\jre1.6.0\classes, hibernate.current_session_context_class=thread, osgi.ws=win32, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0-b105, osgi.instance.area=file:/C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/runtime-rcp.product/, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, user.name=Marc, org.osgi.framework.system.packages=javax.accessibility,javax.activity,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.events,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers, connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, current_session_context_class=thread, org.osgi.framework.language=de, user.language=de, org.osgi.framework.processor=x86, osgi.syspath=c:\Programme\eclipse\plugins, sun.boot.library.path=C:\Programme\Java\jre1.6.0\bin, osgi.manifest.cache=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\org.eclipse.osgi\manifests, dialect=org.hibernate.dialect.DerbyDialect, org.osgi.framework.bootdelegation=*, java.version=1.6.0, org.osgi.framework.os.name=WindowsXP, user.timezone=Europe/Berlin, sun.arch.data.model=32, osgi.bundles=reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar@2:start,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar@start,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.DerbyWrapper,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.HibernateWrapper,reference:file:C:/Programme/eclipse/plugins/com.ibm.icu_3.4.5.jar,reference:file:C:/Programme/eclipse/plugins/org.apache.xerces_2.8.0.v200606131651,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907,reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.help_3.2.1.R321_v20060920.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.jface_3.2.1.M20060908-1000.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.swt_3.2.2.v3235h.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.swt.win32.win32.x86_3.2.2.v3235a.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.ui_3.2.1.M20060913-0800.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.ui.workbench_3.2.1.M20060906-0800.jar,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.RCP,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.dataStructures, java.endorsed.dirs=C:\Programme\Java\jre1.6.0\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, org.osgi.framework.vendor=Eclipse, file.separator=\, java.specification.name=Java Platform API Specification, osgi.checkConfiguration=true, java.class.version=50.0, user.country=DE, osgi.configuration.cascaded=false, connection.url=jdbc:derby:C:/Test/DB, java.home=C:\Programme\Java\jre1.6.0, osgi.os=win32, eclipse.commands=-launcher
C:\Programme\eclipse\eclipse
-name
Eclipse
-showsplash
600
-product
werkstattverwaltung.RCP.product
-data
C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni/../runtime-rcp.product
-configuration
file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/
-dev
file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/dev.properties
-os
win32
-ws
win32
-arch
x86
, java.vm.info=mixed mode, sharing, os.version=5.1, osgi.arch=x86, path.separator=;, connection.password=, java.vm.version=1.6.0-b105, hibernate.connection.password=, user.variant=, osgi.framework.shape=jar, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, org.osgi.framework.version=1.3.0, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=, osgi.dev=file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/dev.properties, osgi.install.area=file:/C:/Programme/eclipse/, osgi.framework=file:/C:/Programme/eclipse/plugins/org.eclipse.osgi_3.2.2.R32x_v20061101.jar, user.home=C:\Dokumente und Einstellungen\Marc, osgi.bundlestore=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\org.eclipse.osgi\bundles, osgi.splashPath=file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.RCP, java.specification.vendor=Sun Microsystems Inc., osgi.nl=de_DE, hibernate.hbm2ddl.auto=create, java.library.path=C:\Programme\Java\jre1.6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Intel\Wireless\Bin\;C:\Programme\Diskeeper Corporation\Diskeeper\;C:\Programme\ThinkPad\ConnectUtilities;C:\Programme\Gemeinsame Dateien\Lenovo;C:\Programme\Lenovo\Client Security Solution;C:\Programme\Gemeinsame Dateien\Adobe\AGL;C:\Programme\ATI Technologies\Fire GL 3D Studio Max;C:\Programme\Gemeinsame Dateien\Autodesk Shared\;C:\Programme\Autodesk\Backburner\, java.vendor.url=http://java.sun.com/, eclipse.startTime=1171124027984, org.osgi.framework.os.version=5.1, hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, connection.username=, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=org.hibernate.dialect.DerbyDialect, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=C:\Programme\eclipse\startup.jar, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=Service Pack 2, connection.pool_size=1, java.io.tmpdir=C:\DOKUME~1\Marc\LOKALE~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Programme\Java\jre1.6.0\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, user.dir=C:\Programme\eclipse, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, eclipse.ee.install.verify=false, cache.provider_class=org.hibernate.cache.NoCacheProvider, file.encoding=Cp1252, osgi.framework.version=3.2.2.R32x_v20061101, java.specification.version=1.6, org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6, hibernate.show_sql=true, hibernate.connection.pool_size=1, osgi.logfile=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\1171124028234.log, osgi.configuration.area=file:/C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/}
17:13:51,609 DEBUG Configuration:1282 - Preparing to build session factory with filters : {}
17:13:51,609 DEBUG Configuration:1117 - processing extends queue
17:13:51,609 DEBUG Configuration:1121 - processing collection mappings
17:13:51,609 DEBUG Configuration:1132 - processing native query and ResultSetMapping mappings
17:13:51,625 DEBUG Configuration:1140 - processing association property references
17:13:51,625 DEBUG Configuration:1162 - processing foreign key constraints
17:13:51,687  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
17:13:51,687  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
17:13:51,687  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
17:13:51,687  INFO DriverManagerConnectionProvider:80 - using driver: org.apache.derby.jdbc.EmbeddedDriver at URL: jdbc:derby:C:/Test/DB
17:13:51,687  INFO DriverManagerConnectionProvider:83 - connection properties: {user=, password=}
17:13:51,687 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
17:13:51,687 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
17:13:51,687 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:derby:C:/Test/DB, Isolation Level: 2
17:13:51,703  INFO SettingsFactory:81 - RDBMS: Apache Derby, version: 10.2.2.0 - (485682)
17:13:51,703  INFO SettingsFactory:82 - JDBC driver: Apache Derby Embedded JDBC Driver, version: 10.2.2.0 - (485682)
17:13:51,718 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
17:13:51,734  INFO Dialect:151 - Using dialect: org.hibernate.dialect.DerbyDialect
17:13:51,734  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
17:13:51,765  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
17:13:51,765  INFO SettingsFactory:134 - Automatic flush during beforeCompletion(): disabled
17:13:51,765  INFO SettingsFactory:138 - Automatic session close at end of transaction: disabled
17:13:51,765  INFO SettingsFactory:153 - Scrollable result sets: enabled
17:13:51,765 DEBUG SettingsFactory:157 - Wrap result sets: disabled
17:13:51,765  INFO SettingsFactory:161 - JDBC3 getGeneratedKeys(): disabled
17:13:51,765  INFO SettingsFactory:169 - Connection release mode: auto
17:13:51,765  INFO SettingsFactory:196 - Default batch fetch size: 1
17:13:51,765  INFO SettingsFactory:200 - Generate SQL with comments: disabled
17:13:51,765  INFO SettingsFactory:204 - Order SQL updates by primary key: disabled
17:13:51,765  INFO SettingsFactory:369 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
17:13:51,765  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
17:13:51,781  INFO SettingsFactory:212 - Query language substitutions: {}
17:13:51,781  INFO SettingsFactory:217 - JPA-QL strict compliance: disabled
17:13:51,781  INFO SettingsFactory:222 - Second-level cache: enabled
17:13:51,781  INFO SettingsFactory:226 - Query cache: disabled
17:13:51,781  INFO SettingsFactory:356 - Cache provider: org.hibernate.cache.NoCacheProvider
17:13:51,781  INFO SettingsFactory:241 - Optimize cache for minimal puts: disabled
17:13:51,781  INFO SettingsFactory:250 - Structured second-level cache entries: disabled
17:13:51,781 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
17:13:51,781  INFO SettingsFactory:270 - Echoing all SQL to stdout
17:13:51,781  INFO SettingsFactory:277 - Statistics: disabled
17:13:51,781  INFO SettingsFactory:281 - Deleted entity synthetic identifier rollback: disabled
17:13:51,781  INFO SettingsFactory:296 - Default entity-mode: pojo
17:13:51,921  INFO SessionFactoryImpl:161 - building session factory
17:13:51,921 DEBUG SessionFactoryImpl:173 - Session factory constructed with filter configurations : {}
17:13:51,921 DEBUG SessionFactoryImpl:177 - instantiating session factory with properties: {java.vendor=Sun Microsystems Inc., show_sql=true, osgi.bundles.defaultStartLevel=4, sun.java.launcher=SUN_STANDARD, org.osgi.supports.framework.extension=true, hibernate.connection.url=jdbc:derby:C:/Test/DB, sun.management.compiler=HotSpot Client Compiler, osgi.framework.beginningstartlevel=1, os.name=Windows XP, hbm2ddl.auto=create, sun.boot.class.path=C:\Programme\Java\jre1.6.0\lib\resources.jar;C:\Programme\Java\jre1.6.0\lib\rt.jar;C:\Programme\Java\jre1.6.0\lib\sunrsasign.jar;C:\Programme\Java\jre1.6.0\lib\jsse.jar;C:\Programme\Java\jre1.6.0\lib\jce.jar;C:\Programme\Java\jre1.6.0\lib\charsets.jar;C:\Programme\Java\jre1.6.0\classes, hibernate.current_session_context_class=thread, osgi.ws=win32, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0-b105, osgi.instance.area=file:/C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/runtime-rcp.product/, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, user.name=Marc, org.osgi.framework.system.packages=javax.accessibility,javax.activity,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.events,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers, connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, current_session_context_class=thread, org.osgi.framework.language=de, user.language=de, org.osgi.framework.processor=x86, osgi.syspath=c:\Programme\eclipse\plugins, sun.boot.library.path=C:\Programme\Java\jre1.6.0\bin, osgi.manifest.cache=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\org.eclipse.osgi\manifests, dialect=org.hibernate.dialect.DerbyDialect, org.osgi.framework.bootdelegation=*, java.version=1.6.0, org.osgi.framework.os.name=WindowsXP, user.timezone=Europe/Berlin, sun.arch.data.model=32, osgi.bundles=reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar@2:start,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar@start,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.DerbyWrapper,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.HibernateWrapper,reference:file:C:/Programme/eclipse/plugins/com.ibm.icu_3.4.5.jar,reference:file:C:/Programme/eclipse/plugins/org.apache.xerces_2.8.0.v200606131651,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907,reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.help_3.2.1.R321_v20060920.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.jface_3.2.1.M20060908-1000.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.swt_3.2.2.v3235h.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.swt.win32.win32.x86_3.2.2.v3235a.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.ui_3.2.1.M20060913-0800.jar,reference:file:C:/Programme/eclipse/plugins/org.eclipse.ui.workbench_3.2.1.M20060906-0800.jar,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.RCP,reference:file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.dataStructures, java.endorsed.dirs=C:\Programme\Java\jre1.6.0\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, org.osgi.framework.vendor=Eclipse, file.separator=\, java.specification.name=Java Platform API Specification, osgi.checkConfiguration=true, java.class.version=50.0, user.country=DE, osgi.configuration.cascaded=false, connection.url=jdbc:derby:C:/Test/DB, java.home=C:\Programme\Java\jre1.6.0, osgi.os=win32, eclipse.commands=-launcher
C:\Programme\eclipse\eclipse
-name
Eclipse
-showsplash
600
-product
werkstattverwaltung.RCP.product
-data
C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni/../runtime-rcp.product
-configuration
file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/
-dev
file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/dev.properties
-os
win32
-ws
win32
-arch
x86
, java.vm.info=mixed mode, sharing, os.version=5.1, osgi.arch=x86, path.separator=;, connection.password=, java.vm.version=1.6.0-b105, hibernate.connection.password=, user.variant=, osgi.framework.shape=jar, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, org.osgi.framework.version=1.3.0, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=, osgi.dev=file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/dev.properties, osgi.install.area=file:/C:/Programme/eclipse/, osgi.framework=file:/C:/Programme/eclipse/plugins/org.eclipse.osgi_3.2.2.R32x_v20061101.jar, user.home=C:\Dokumente und Einstellungen\Marc, osgi.bundlestore=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\org.eclipse.osgi\bundles, osgi.splashPath=file:C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/werkstattverwaltung.RCP, osgi.nl=de_DE, java.specification.vendor=Sun Microsystems Inc., hibernate.hbm2ddl.auto=create, java.vendor.url=http://java.sun.com/, java.library.path=C:\Programme\Java\jre1.6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Intel\Wireless\Bin\;C:\Programme\Diskeeper Corporation\Diskeeper\;C:\Programme\ThinkPad\ConnectUtilities;C:\Programme\Gemeinsame Dateien\Lenovo;C:\Programme\Lenovo\Client Security Solution;C:\Programme\Gemeinsame Dateien\Adobe\AGL;C:\Programme\ATI Technologies\Fire GL 3D Studio Max;C:\Programme\Gemeinsame Dateien\Autodesk Shared\;C:\Programme\Autodesk\Backburner\, org.osgi.framework.os.version=5.1, eclipse.startTime=1171124027984, hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, java.vm.vendor=Sun Microsystems Inc., connection.username=, hibernate.dialect=org.hibernate.dialect.DerbyDialect, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=C:\Programme\eclipse\startup.jar, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.os.patch.level=Service Pack 2, sun.cpu.endian=little, java.io.tmpdir=C:\DOKUME~1\Marc\LOKALE~1\Temp\, connection.pool_size=1, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, os.arch=x86, java.ext.dirs=C:\Programme\Java\jre1.6.0\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, user.dir=C:\Programme\eclipse, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, eclipse.ee.install.verify=false, cache.provider_class=org.hibernate.cache.NoCacheProvider, file.encoding=Cp1252, osgi.framework.version=3.2.2.R32x_v20061101, java.specification.version=1.6, org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6, osgi.configuration.area=file:/C:/Dokumente und Einstellungen/Marc/Eigene Dateien/Programmieren/Workspace Planni/.metadata/.plugins/org.eclipse.pde.core/rcp.product/, osgi.logfile=C:\Dokumente und Einstellungen\Marc\Eigene Dateien\Programmieren\Workspace Planni\.metadata\.plugins\org.eclipse.pde.core\rcp.product\1171124028234.log, hibernate.connection.pool_size=1, hibernate.show_sql=true}
Initial SessionFactory creation failed.net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null



I checked all that came in my mind (source, configuration) but I couldn't find an mistake


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 11, 2007 11:34 pm 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi Macro,

are you able to login in DB with out user and password


<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="connection.url">jdbc:derby:C:/Test/DB</property>
<property name="connection.username"></property>
<property name="connection.password"></property>

_________________
Dharmendra Pandey


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 4:55 am 
Beginner
Beginner

Joined: Mon Sep 04, 2006 7:18 am
Posts: 45
Doesnt seem like hibernate is finding your hibernate.properties file.

17:13:51,296 INFO Environment:533 - hibernate.properties not found

Try creating this, and remember to put your hibernate.cfg.xml and hibernate.properties under the src folder.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:19 am 
Beginner
Beginner

Joined: Sat Feb 10, 2007 12:18 pm
Posts: 23
Thx for the help.

Well, I can connect to my Database when I am using the same properties in Quantum DB (Eclipse Plugin).

The hibernate.properties file only provides the database information which I also have in my hibernate.cfg.xml. The configuration is read because the Console Output is telling about my User-mapping. The official hibernate.org tutorial says also, that I only have to set the log4j.properties and the hibernate.cfg.xml withing the classpath (and the mapping files of course).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:52 am 
Beginner
Beginner

Joined: Mon Sep 04, 2006 7:18 am
Posts: 45
It would be helpful if you also would have printed out the stack trace of the exception.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.