-->
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.  [ 1 post ] 
Author Message
 Post subject: Unterschied zwischen Windows und Linux?
PostPosted: Tue Nov 15, 2005 6:04 pm 
Newbie

Joined: Tue Nov 15, 2005 5:52 pm
Posts: 1
Hallo zusammen,

habe die neuesten Annotation Features on Hibernate 3.1 rc2 getestet und mir ist aufgefallen, dass der gleiche Code mit den gleichen Hibernate jars unter Linux zu einer Fehlermeldung führen (s. u.) und unter Windows problemlos durchlaufen.

Das Problem scheint der URLClassLoader zu sein, aber irgendwie komme ich bei der Suche nicht weiter.

Die jar hibernate3.jar (mit org.hibernate.stat.StatisticsImplementor) befindet sich auf jeden Fall im Classpath, wie gesagt unter Windows läuft es problemlos :-(

Hat jemand von euch das gleiche Problem gehabt?

Gruß
smilebase

P.S.: benutze Ubuntu Linux


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
Hibernate 3.1 rc2

Mapping documents:
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="connection.url">jdbc:derby:data;create=true</property>
<property name="connection.username">APP</property>
<property name="connection.password">APP</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>

<!-- 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>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/stat/StatisticsImplementor
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
at de.tse.boerse.dbinit.CreateStocks.main(CreateStocks.java:105)

Name and version of the database you are using:
Apache Derby 10.1

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.1 rc2
7 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
10 [main] INFO org.hibernate.cfg.Environment - using CGLIB reflection optimizer
14 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
122 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.xml
123 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.xml
231 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
232 [main] DEBUG org.hibernate.util.DTDEntityResolver - found http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
290 [main] DEBUG org.hibernate.cfg.Configuration - connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver
291 [main] DEBUG org.hibernate.cfg.Configuration - connection.url=jdbc:derby:data;create=true
291 [main] DEBUG org.hibernate.cfg.Configuration - connection.username=APP
292 [main] DEBUG org.hibernate.cfg.Configuration - connection.password=APP
292 [main] DEBUG org.hibernate.cfg.Configuration - connection.pool_size=1
293 [main] DEBUG org.hibernate.cfg.Configuration - dialect=org.hibernate.dialect.DerbyDialect
293 [main] DEBUG org.hibernate.cfg.Configuration - show_sql=true
293 [main] DEBUG org.hibernate.cfg.Configuration - hbm2ddl.auto=create
294 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - null<-org.dom4j.tree.DefaultAttribute@b1cc87 [Attribute: name class value "de.tse.boerse.bo.Stock"]
381 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - null<-org.dom4j.tree.DefaultAttribute@1a61172 [Attribute: name class value "de.tse.boerse.bo.Candle"]
382 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
383 [main] DEBUG org.hibernate.cfg.Configuration - properties: {hibernate.connection.password=APP, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/i386, java.vm.version=1.5.0_05-b05, hibernate.connection.username=APP, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=DE, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/chris/Projekte/workspace/tse-boerse, java.runtime.version=1.5.0_05-b05, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, hbm2ddl.auto=create, java.endorsed.dirs=/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/endorsed, os.arch=i386, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Linux, sun.jnu.encoding=ISO-8859-1, java.library.path=/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/i386/client:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/i386:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/../lib/i386, java.specification.name=Java Platform API Specification, java.class.version=49.0, hibernate.connection.pool_size=1, sun.management.compiler=HotSpot Client Compiler, os.version=2.6.8.1-4-386, connection.password=APP, user.home=/home/chris, user.timezone=, connection.username=APP, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=ISO-8859-1, java.specification.version=1.5, hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, show_sql=true, user.name=chris, java.class.path=/home/chris/Projekte/workspace/tse-boerse/bin:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/antlr-2.7.5H3.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/asm.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/asm-attrs.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/cglib-2.1.2.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/dom4j-1.6.1.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/ehcache-1.1.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/ejb3-persistence.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/hibernate3.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/hibernate-annotations.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/hibernate-entitymanager.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/javassist.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/jboss-archive-browsing.jar:/home/chris/Projekte/workspace/tse-boerse/lib/hibernate/jta.jar:/home/chris/Projekte/workspace/tse-boerse/lib/derby/derby.jar:/home/chris/Projekte/workspace/tse-boerse/lib/derby/derbyclient.jar:/home/chris/Projekte/workspace/tse-boerse/lib/derby/derbyLocale_de_DE.jar:/home/chris/Projekte/workspace/tse-boerse/lib/derby/derbynet.jar:/home/chris/Projekte/workspace/tse-boerse/lib/jakarta-commons/commons-collections-2.1.1.jar:/home/chris/Projekte/workspace/tse-boerse/lib/jakarta-commons/commons-logging-1.0.4.jar:/home/chris/Projekte/workspace/tse-boerse/lib/log4j/log4j-1.2.11.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=/home/chris/Projekte/runtime/jdk1.5.0_05/jre, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.DerbyDialect, hibernate.connection.url=jdbc:derby:data;create=true, connection.pool_size=1, user.language=de, java.specification.vendor=Sun Microsystems Inc., hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.5.0_05, java.ext.dirs=/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/ext, sun.boot.class.path=/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/rt.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/i18n.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/sunrsasign.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/jsse.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/jce.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/lib/charsets.jar:/home/chris/Projekte/runtime/jdk1.5.0_05/jre/classes, java.vendor=Sun Microsystems Inc., connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, file.separator=/, hibernate.hbm2ddl.auto=create, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=gnome, connection.url=jdbc:derby:data;create=true, dialect=org.hibernate.dialect.DerbyDialect, sun.cpu.isalist=}
388 [main] DEBUG org.hibernate.cfg.Configuration - Preparing to build session factory with filters : {}
388 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - Execute first pass mapping processing
389 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - Process hbm files
389 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - Process annotated classes
475 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column TYPE unique false
503 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Import with entity name=Stock
528 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing de.tse.boerse.bo.Stock per property access
582 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Stock.symbol
591 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column symbol unique false
594 [main] DEBUG org.hibernate.cfg.AnnotationBinder - symbol is an id
600 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for symbol
602 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property symbol
609 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading symbol with null
610 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Bind @EmbeddedId on symbol
611 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Stock.name
611 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column name unique false
615 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property name with lazy=false
616 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for name
616 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property name
617 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading name with null
617 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Stock.type
617 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column type unique false
618 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property type with lazy=false
621 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for type
621 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property type
622 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading type with null
633 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column TYPE unique false
633 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Import with entity name=Candle
634 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing de.tse.boerse.bo.Candle per property access
679 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.id
679 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column id unique false
679 [main] DEBUG org.hibernate.cfg.AnnotationBinder - id is an id
680 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for id
680 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property id
680 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading id with null
681 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Bind @EmbeddedId on id
681 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.date
681 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column DATE_ unique false
682 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property date with lazy=false
682 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for date
682 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property date
683 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading date with null
683 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.close
683 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column CLOSE_ unique false
684 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property close with lazy=false
684 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for close
684 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property close
685 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading close with null
685 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.high
685 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column HIGH_ unique false
686 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property high with lazy=false
686 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for high
686 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property high
687 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading high with null
687 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.low
687 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column LOW_ unique false
688 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property low with lazy=false
688 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for low
688 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property low
689 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading low with null
689 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.open
689 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column OPEN_ unique false
690 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - binding property open with lazy=false
690 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for open
690 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property open
691 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading open with null
691 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Processing annotations of de.tse.boerse.bo.Candle.stock
694 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column null unique false
694 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column stock unique false
701 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property stock
701 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Cascading stock with none
706 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration - processing manytoone fk mappings
853 [main] INFO org.hibernate.cfg.Configuration - processing extends queue
854 [main] INFO org.hibernate.cfg.Configuration - processing collection mappings
854 [main] INFO org.hibernate.cfg.Configuration - processing association property references
854 [main] INFO org.hibernate.cfg.Configuration - processing foreign key constraints
855 [main] DEBUG org.hibernate.cfg.Configuration - resolving reference to class: de.tse.boerse.bo.Stock
871 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
872 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 1
872 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
1286 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.apache.derby.jdbc.EmbeddedDriver at URL: jdbc:derby:data;create=true
1287 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=APP, password=APP}
1287 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
1288 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
1820 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:derby:data;create=true, Isolation Level: 2
1827 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Apache Derby, version: 10.1.1.0
1827 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Apache Derby Embedded JDBC Driver, version: 10.1.1.0
1829 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
1860 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.DerbyDialect
1868 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
1873 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
1873 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
1874 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
1875 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
1875 [main] DEBUG org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
1876 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
1876 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
1879 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
1880 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
1880 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
1881 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
1885 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
1886 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
1886 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
1886 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
1887 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
1918 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
1918 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
1920 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory - Using dialect defined converter
1931 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
1931 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
1932 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
1933 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: POJO
Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/stat/StatisticsImplementor
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
at de.tse.boerse.dbinit.CreateStocks.main(CreateStocks.java:105)


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

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.