Results 1 to 4 of 4
  1. #1
    Rafa is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Question Hibernate Properties

    I don't understand what's happen. I import a project and when run recieve this error in DAO:

    Compiling 3 source files to E:\NetBeansProjects\i582\Agenda_Model\build\classe s
    warning: [options] bootstrap class path not set in conjunction with -source 1.5
    Note: E:\NetBeansProjects\i582\Agenda_Model\src\br\com\i nfnet\contatos\ContatoDAO.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 warning
    Copying 3 files to E:\NetBeansProjects\i582\Agenda_Model\build\classe s
    compile:



    and this in hibernate.cfg.xml

    Mai 19, 2013 4:41:46 PM org.hibernate.cfg.Environment <clinit>
    INFO: hibernate.properties not found
    Mai 19, 2013 4:41:46 PM org.hibernate.cfg.Environment buildBytecodeProvider


    The proprties of hibernate are the following:
    <!-- Database connection settings -->
    <property name="connection.driver_class">org.postgresql.Driv er</property>
    <property name="connection.url">jdbc:postgresql://localhost:5432/postgres</property>
    <property name="connection.username">postgres</property>
    <property name="connection.password">postgres</property>

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

    <!-- SQL dialect -->
    <property name="dialect">org.hibernate.dialect.PostgreSQLDia lect</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.No CacheProvider</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">update</property>

    <mapping resource="Contato.hbm.xml"/>

    </session-factory>

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,817
    Rep Power
    19

    Default Re: Hibernate Properties

    That's a warning, not an error.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Rafa is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Question Re: Hibernate Properties

    Why my Hibernate don't create table ?

    The hibernate.cfg has any error?

    Thanks.

    Print screen of hibernate.cfg:


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

    <!-- Database connection settings -->
    <property name="connection.driver_class">org.postgresql.Driv er</property>
    <property name="connection.url">jdbc:postgresql://localhost:5432/postgresDB</property>
    <property name="connection.username">postgres</property>
    <property name="connection.password">postgres</property>

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

    <!-- SQL dialect -->
    <property name="dialect">org.hibernate.dialect.PostgreSQLDia lect</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.No CacheProvider</property>

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

    <!-- create - Drop and re-create the database schema on startup -->
    <!-- Update - so cria se precisar -->
    <!-- None - nao faz nada -->
    <property name="hbm2ddl.auto">create</property>

    <mapping resource="Contato.hbm.xml"/>

    </session-factory>

    </hibernate-configuration>

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

Similar Threads

  1. Properties
    By Winarto in forum XML
    Replies: 0
    Last Post: 08-29-2008, 03:32 PM
  2. properties help me please
    By Winarto in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-29-2008, 12:42 PM
  3. Replies: 2
    Last Post: 06-30-2007, 03:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •