IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Hibernate Java Discussion :

[HibernateTools]Impossible de faire du reverse engineering d'une base


Sujet :

Hibernate Java

  1. #1
    Expert éminent
    Avatar de elitost
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Septembre 2003
    Messages
    1 985
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2003
    Messages : 1 985
    Points : 6 566
    Points
    6 566
    Par défaut [HibernateTools]Impossible de faire du reverse engineering d'une base
    Bonjour

    J'essaie d'utiliser Hibernate Tools pour générer des beans d'un table d'un base Oracle mais je renontre des pbs.


    Ma target ANT :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    	<path id="toolslib">
    		<path location="${test.dir}/hibernate-tools.jar" />
    		<path location="${test.dir}/hibernate3.jar" />
    		<path location="${test.dir}/freemarker.jar" />
    		<path location="${test.dir}/ojdbc14.jar" />
    		<path location="${test.dir}/commons-collections-3.2.jar" />
    		<path location="${test.dir}/commons-logging.jar" />
    		<path location="${test.dir}/dom4j-1.6.1.jar" />
    		<path location="${test.dir}/cglib-2.1.3.jar" />
    		<path location="${test.dir}/hibernate-annotations.jar" />
    	</path>
     
    	<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="toolslib" />
    	<target name="testHibernate">
     
    		<hibernatetool destdir="${test.dir}/generated">
    		 <jdbcconfiguration configurationfile="${test.dir}/hibernate.cfg.xml"/>
    		 <hbm2java/>
    		</hibernatetool>
    	</target>
    Et mon fichier de config :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC
    		"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    		"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory name="test">
            <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
            <property name="hibernate.connection.password">xxx</property>
            <property name="hibernate.connection.url">jdbc:oracle:thin:@monip:1521:XE</property>
            <property name="hibernate.connection.username">xxx</property>
            <property name="hibernate.default_schema">exxe</property>
            <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
        </session-factory>
    </hibernate-configuration>
     
    Merci d'avance
    Et mon répertoire de destination est toujours vide.

    Aurais je oublié qqch ?

    Merci d'avance

  2. #2
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Vérifie dans l'onglet exporters du wizard Hibernate code generation que tu as bien choisi l'option generate domlain code
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  3. #3
    Expert éminent
    Avatar de elitost
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Septembre 2003
    Messages
    1 985
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2003
    Messages : 1 985
    Points : 6 566
    Points
    6 566
    Par défaut
    Quand je lance ma tâche ANT j'ai cette trace en console :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    testHibernate:
    [hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
    [hibernatetool] 1. task: hbm2java (Generates a set of .java files)
    [hibernatetool] 12 sept. 2006 08:16:21 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: Hibernate 3.2 cr3
    [hibernatetool] 12 sept. 2006 08:16:22 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: hibernate.properties not found
    [hibernatetool] 12 sept. 2006 08:16:22 org.hibernate.cfg.Environment buildBytecodeProvider
    [hibernatetool] INFO: Bytecode provider name : cglib
    [hibernatetool] 12 sept. 2006 08:16:22 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
    [hibernatetool] 12 sept. 2006 08:16:22 org.hibernate.cfg.Configuration configure
    [hibernatetool] INFO: configuring from file: hibernate.cfg.xml
    [hibernatetool] 12 sept. 2006 08:16:23 org.hibernate.cfg.Configuration doConfigure
    [hibernatetool] INFO: Configured SessionFactory: test
    [hibernatetool] 12 sept. 2006 08:16:25 org.hibernate.connection.DriverManagerConnectionProvider configure
    [hibernatetool] INFO: Using Hibernate built-in connection pool (not for production use!)
    [hibernatetool] 12 sept. 2006 08:16:25 org.hibernate.connection.DriverManagerConnectionProvider configure
    [hibernatetool] INFO: Hibernate connection pool size: 20
    [hibernatetool] 12 sept. 2006 08:16:25 org.hibernate.connection.DriverManagerConnectionProvider configure
    [hibernatetool] INFO: autocommit mode: false
    [hibernatetool] 12 sept. 2006 08:16:25 org.hibernate.connection.DriverManagerConnectionProvider configure
    [hibernatetool] INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@monip:1521:XE
    [hibernatetool] 12 sept. 2006 08:16:25 org.hibernate.connection.DriverManagerConnectionProvider configure
    [hibernatetool] INFO: connection properties: {user=monuser, password=****}
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0XE
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.dialect.Dialect <init>
    [hibernatetool] INFO: Using dialect: org.hibernate.dialect.Oracle9Dialect
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
    [hibernatetool] INFO: Using default transaction strategy (direct JDBC transactions)
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
    [hibernatetool] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Automatic flush during beforeCompletion(): disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Automatic session close at end of transaction: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: JDBC batch size: 15
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: JDBC batch updates for versioned data: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Scrollable result sets: enabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: JDBC3 getGeneratedKeys(): disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Connection release mode: auto
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Default schema: eppe
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Default batch fetch size: 1
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Generate SQL with comments: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Order SQL updates by primary key: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
    [hibernatetool] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
    [hibernatetool] INFO: Using ASTQueryTranslatorFactory
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Query language substitutions: {}
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: JPA-QL strict compliance: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Second-level cache: enabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Query cache: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory createCacheProvider
    [hibernatetool] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Optimize cache for minimal puts: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Structured second-level cache entries: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Statistics: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Deleted entity synthetic identifier rollback: disabled
    [hibernatetool] 12 sept. 2006 08:16:28 org.hibernate.cfg.SettingsFactory buildSettings
    [hibernatetool] INFO: Default entity-mode: pojo
    [hibernatetool] 12 sept. 2006 08:16:29 org.hibernate.connection.DriverManagerConnectionProvider close
    [hibernatetool] INFO: cleaning up connection pool: jdbc:oracle:thin:@monip:1521:XE
    [hibernatetool] 12 sept. 2006 08:16:29 org.hibernate.tool.hbm2x.Version <clinit>
    [hibernatetool] INFO: Hibernate Tools 3.2.0.beta7
    12 sept. 2006 08:16:29 org.hibernate.connection.DriverManagerConnectionProvider close
    INFO: cleaning up connection pool: jdbc:oracle:thin:@monip:1521:XE
    BUILD SUCCESSFUL
    Total time: 11 seconds
    Et pas de fichier généré dans le répertoire generated.

    Et quand je regarde le wizard la case Domain Code est bien cochée.

    par contre quand je vais dans la perspective Hibernate, et que j'essaie d'ouvrir la Database, j'imagine qu'il devrait y avoir une arbarescence des tables, mais cela n'apparait pas.

    Des idées ? Auriez vous une config oracle sous la main pour comparer ?

Discussions similaires

  1. Réponses: 0
    Dernier message: 11/05/2015, 21h00
  2. [Débutant] Comment faire un Reverse Engineering
    Par jérémyp8 dans le forum Accès aux données
    Réponses: 4
    Dernier message: 30/10/2014, 10h55
  3. comment faire du reverse engineering
    Par PinguinQueen dans le forum Outils
    Réponses: 8
    Dernier message: 24/04/2011, 11h47
  4. reverse engineering d'une base de donnée oracle 10g
    Par akilam87 dans le forum PowerAMC
    Réponses: 3
    Dernier message: 23/07/2010, 18h28
  5. Reverse Engineering d'une base AS 400
    Par troubleshooting dans le forum DB2
    Réponses: 0
    Dernier message: 24/08/2009, 11h13

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo