-->
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.  [ 2 posts ] 
Author Message
 Post subject: [OT] Probleme mit Packages [gelöst]
PostPosted: Mon Feb 11, 2008 8:08 pm 
Newbie

Joined: Sat Jan 26, 2008 7:19 am
Posts: 11
Location: Germany, Huerth
Ich habe gestern mein Projekt nochmal neu strukturiert und die Dateien allesamt neu angelegt. Die Konfiguration etc. ist geblieben und nun bekomme ich beim Kompilieren meiner Testanwendung, welche nichts anderes enthält wie:

Code:
package de.flabben.application;

import org.hibernate.Session;
import org.hibernate.Transaction;
import de.flabben.database.InitSessionFactory;
import de.flabben.database.table.*;

public class FlabbenApp
{
    public static void main(String[] argv)
    {
        Transaction tx = null;
        Session session = InitSessionFactory.getInstance().getCurrentSession();
    }
}


Wenn ich nun im NetBeans auf F6 drücke (kompilieren), bekomme ich nun folgenden Trace:

Code:
init:
deps-jar:
compile:
run:
00:59:08,271  INFO Environment:514 - Hibernate 3.2.5
00:59:08,282  INFO Environment:547 - hibernate.properties not found
00:59:08,285  INFO Environment:681 - Bytecode provider name : cglib
00:59:08,354  INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
00:59:08,445  INFO Configuration:1426 - configuring from resource: /hibernate.cfg.xml
00:59:08,446  INFO Configuration:1403 - Configuration resource: /hibernate.cfg.xml
00:59:08,625  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/article.hbm.xml
00:59:08,788  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Article -> article
00:59:08,807  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/article_tag.hbm.xml
00:59:08,852  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.ArticleTag -> article_tag
00:59:08,856  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/author.hbm.xml
00:59:08,908  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Author -> author
00:59:08,936  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/category.hbm.xml
00:59:08,958  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Category -> category
00:59:08,959  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/comment.hbm.xml
00:59:09,013  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Comment -> comment
00:59:09,037  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/language.hbm.xml
00:59:09,085  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Language -> language
00:59:09,086  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/option.hbm.xml
00:59:09,107  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Option -> option
00:59:09,108  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/option_type.hbm.xml
00:59:09,168  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.OptionType -> option_type
00:59:09,171  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/option_type_data.hbm.xml
00:59:09,196  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.OptionTypeData -> option_type_data
00:59:09,197  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/phrase.hbm.xml
00:59:09,241  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Phrase -> phrase
00:59:09,243  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/phrase_content.hbm.xml
00:59:09,266  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.PhraseContent -> phrase_content
00:59:09,268  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/referer.hbm.xml
00:59:09,291  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Referer -> referer
00:59:09,292  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/route.hbm.xml
00:59:09,317  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Route -> route
00:59:09,319  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/route_default.hbm.xml
00:59:09,340  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.RouteDefault -> route_Default
00:59:09,382  INFO Configuration:553 - Reading mappings from resource : de/flabben/database/table/definition/tag.hbm.xml
00:59:09,438  INFO HbmBinder:300 - Mapping class: de.flabben.database.table.Tag -> tag
00:59:09,440  INFO Configuration:1541 - Configured SessionFactory: null
00:59:09,441 DEBUG InitSessionFactory:78 - classic factory
00:59:09,520  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
00:59:09,521  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
00:59:09,522  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
00:59:09,548  INFO DriverManagerConnectionProvider:80 - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/flabben
00:59:09,549  INFO DriverManagerConnectionProvider:86 - connection properties: {user=jpieper, password=****}
00:59:09,731  INFO SettingsFactory:89 - RDBMS: PostgreSQL, version: 8.3.0
00:59:09,735  INFO SettingsFactory:90 - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.2 JDBC4 with SSL (build 507)
00:59:09,762  INFO Dialect:152 - Using dialect: org.hibernate.dialect.PostgreSQLDialect
00:59:09,774  INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
00:59:09,777  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
00:59:09,778  INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
00:59:09,779  INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
00:59:09,779  INFO SettingsFactory:154 - JDBC batch size: 15
00:59:09,780  INFO SettingsFactory:157 - JDBC batch updates for versioned data: disabled
00:59:09,782  INFO SettingsFactory:162 - Scrollable result sets: enabled
00:59:09,783  INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): disabled
00:59:09,783  INFO SettingsFactory:178 - Connection release mode: auto
00:59:09,785  INFO SettingsFactory:205 - Default batch fetch size: 1
00:59:09,786  INFO SettingsFactory:209 - Generate SQL with comments: disabled
00:59:09,787  INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
00:59:09,788  INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
00:59:09,789  INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
00:59:09,795  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
00:59:09,796  INFO SettingsFactory:225 - Query language substitutions: {}
00:59:09,797  INFO SettingsFactory:230 - JPA-QL strict compliance: disabled
00:59:09,799  INFO SettingsFactory:235 - Second-level cache: enabled
00:59:09,799  INFO SettingsFactory:239 - Query cache: disabled
00:59:09,800  INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
        at net.sf.cglib.core.DebuggingClassWriter.<init>(DebuggingClassWriter.java:47)
        at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
        at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
        at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
00:59:09,800  INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
00:59:09,801  INFO SettingsFactory:263 - Structured second-level cache entries: disabled
00:59:09,807  INFO SettingsFactory:290 - Statistics: disabled
00:59:09,808  INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
00:59:09,811  INFO SettingsFactory:309 - Default entity-mode: pojo
00:59:09,811  INFO SettingsFactory:313 - Named query checking : enabled
00:59:09,853  INFO SessionFactoryImpl:161 - building session factory
        at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
        at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
        at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
        at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
        at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
        at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
        at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
        at de.flabben.database.InitSessionFactory.initSessionFactory(InitSessionFactory.java:79)
        at de.flabben.database.InitSessionFactory.getInstance(InitSessionFactory.java:46)
        at de.flabben.application.FlabbenApp.main(FlabbenApp.java:37)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)


Aktueller CLASSPATH:
Code:
.;C:\Program Files\Java\libs\postgresql-8.2-507.jdbc4.jar;C:\Program Files\Java\libs\mysql-connector-java-5.1.5-bin.jar;
C:\Program Files\Java\jre1.6.0_04\lib\ext\QTJava.zip


Das fiese ist, dass komischerweise neuerdings die meisten Packages fehlen. Ich habe mein NetBeans auch schon neu installiert, jedoch hat das auch nicht geholfen. Packages wie dom4j, cglib, commons-collections, asm musste ich schon explizit einbinden.

Jemand ne Ahnung, woran das liegen könnte? Oder wie ich das aktuelle Problem (s. Trace) wieder hinbekomme? Ich versteh wirklich nicht wieso das nun ist. Ich habe auch kein Systemupdate oder so gemacht. Ich hoffe ihr könnt mir helfen :(


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 13, 2008 3:55 am 
Newbie

Joined: Sat Jan 26, 2008 7:19 am
Posts: 11
Location: Germany, Huerth
So, habe den Fehler gefunden. Ich hatte von Hibernate lediglich die hibernate.jar geladen und nicht die JAR-Dateien aus dem lib-Verzeichnis wo Sachen wie dom4j, commons-collections etc. drin sind.

Funktioniert nun wieder wunderbar.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.