Loading ...
Sorry, an error occurred while loading the content.
 

error hibernate (belajar dari ebook mas Ifnu)

Expand Messages
  • Tri Mulyanto
    Dear All NUG, Mohon Maaf Lahir Batin Yach. Gw lagi belajar hibernate dari ebook nya mas Ifnu, tapi waktu run MainHibernate nya muncul error 05 Sep 11 16:01:01
    Message 1 of 23 , Sep 5, 2011
      Dear All NUG,
      Mohon Maaf Lahir Batin Yach.

      Gw lagi belajar hibernate dari ebook nya mas Ifnu, tapi waktu run MainHibernate nya muncul error


      05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
      INFO: Hibernate 3.2.5
      05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
      INFO: hibernate.properties not found
      05 Sep 11 16:01:01 org.hibernate.cfg.Environment buildBytecodeProvider
      INFO: Bytecode provider name : cglib
      05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
      INFO: using JDK 1.4 java.sql.Timestamp handling
      05 Sep 11 16:01:01 org.hibernate.connection.UserSuppliedConnectionProvider configure
      WARNING: No connection properties specified - the user must supply JDBC connections
      Exception in thread "main" org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
          at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
          at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
          at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
          at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
          at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
          at pos.MainHibernate.main(MainHibernate.java:26)
      Java Result: 1
      BUILD SUCCESSFUL (total time: 0 seconds)

      Gw jg dah coba dari source code dari ebooknya, hasilnya sama juga, udah coba cari di mbah google, tp blm ketemu. Please bantuannya yach.

      Thank U
      Regards
    • onsir salman
      file hibernate.properties gak ada, misal klw ada mungkin salah taruh INFO: hibernate.properties not found
      Message 2 of 23 , Sep 5, 2011
        file hibernate.properties gak ada, misal klw ada mungkin salah taruh
        INFO: hibernate.properties not found
      • Eko Kurniawan Khannedy
        * Hibernate Dialect must be explicitly set* silahkan tambahin atribut : hibernate.dialect = nama kelas Dialect nya
        Message 3 of 23 , Sep 5, 2011
           Hibernate Dialect must be explicitly set

          silahkan tambahin atribut :

          hibernate.dialect = nama kelas Dialect nya

          On Mon, Sep 5, 2011 at 4:02 PM, Tri Mulyanto <ghemulyanto@...> wrote:
           

          Dear All NUG,
          Mohon Maaf Lahir Batin Yach.

          Gw lagi belajar hibernate dari ebook nya mas Ifnu, tapi waktu run MainHibernate nya muncul error


          05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
          INFO: Hibernate 3.2.5
          05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
          INFO: hibernate.properties not found
          05 Sep 11 16:01:01 org.hibernate.cfg.Environment buildBytecodeProvider
          INFO: Bytecode provider name : cglib
          05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
          INFO: using JDK 1.4 java.sql.Timestamp handling
          05 Sep 11 16:01:01 org.hibernate.connection.UserSuppliedConnectionProvider configure
          WARNING: No connection properties specified - the user must supply JDBC connections
          Exception in thread "main" org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
              at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
              at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
              at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
              at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
              at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
              at pos.MainHibernate.main(MainHibernate.java:26)
          Java Result: 1
          BUILD SUCCESSFUL (total time: 0 seconds)

          Gw jg dah coba dari source code dari ebooknya, hasilnya sama juga, udah coba cari di mbah google, tp blm ketemu. Please bantuannya yach.

          Thank U
          Regards


        • Tri Mulyanto
          ini hibernate.cfg.xml nya mas
          Message 4 of 23 , Sep 5, 2011
            ini hibernate.cfg.xml nya mas

            <?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>
                <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
                <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
                <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/pos</property>
                <property name="hibernate.connection.username">root</property>
                <property name="hibernate.hbm2ddl.auto">create</property>
                <property name="hibernate.show_sql">true</property>
                <property name="hibernate.format_sql">true</property>
                <mapping class="model.Person"/>
              </session-factory>
            </hibernate-configuration>


            --- On Mon, 9/5/11, Eko Kurniawan Khannedy <echo.khannedy@...> wrote:

            From: Eko Kurniawan Khannedy <echo.khannedy@...>
            Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
            To: netbeans-indonesia@yahoogroups.com
            Date: Monday, September 5, 2011, 4:35 PM

             

             Hibernate Dialect must be explicitly set

            silahkan tambahin atribut :

            hibernate.dialect = nama kelas Dialect nya

            On Mon, Sep 5, 2011 at 4:02 PM, Tri Mulyanto <ghemulyanto@...> wrote:
             

            Dear All NUG,
            Mohon Maaf Lahir Batin Yach.

            Gw lagi belajar hibernate dari ebook nya mas Ifnu, tapi waktu run MainHibernate nya muncul error


            05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
            INFO: Hibernate 3.2.5
            05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
            INFO: hibernate.properties not found
            05 Sep 11 16:01:01 org.hibernate.cfg.Environment buildBytecodeProvider
            INFO: Bytecode provider name : cglib
            05 Sep 11 16:01:01 org.hibernate.cfg.Environment <clinit>
            INFO: using JDK 1.4 java.sql.Timestamp handling
            05 Sep 11 16:01:01 org.hibernate.connection.UserSuppliedConnectionProvider configure
            WARNING: No connection properties specified - the user must supply JDBC connections
            Exception in thread "main" org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
                at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
                at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
                at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
                at pos.MainHibernate.main(MainHibernate.java:26)
            Java Result: 1
            BUILD SUCCESSFUL (total time: 0 seconds)

            Gw jg dah coba dari source code dari ebooknya, hasilnya sama juga, udah coba cari di mbah google, tp blm ketemu. Please bantuannya yach.

            Thank U
            Regards


          • Tri Mulyanto
            Set hibernate propertiesnya gimana ya mas? file hibernate.cfg.xml nya saya taro di folder src ... From: onsir salman Subject: Re:
            Message 5 of 23 , Sep 5, 2011
              Set hibernate propertiesnya gimana ya mas? file hibernate.cfg.xml nya saya taro di folder src

              --- On Mon, 9/5/11, onsir salman <onsirsalman@...> wrote:

              From: onsir salman <onsirsalman@...>
              Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
              To: netbeans-indonesia@yahoogroups.com
              Date: Monday, September 5, 2011, 9:28 AM

               

              file hibernate.properties gak ada, misal klw ada mungkin salah taruh
              INFO: hibernate.properties not found
            • Aditya Lukman Afandi
              iya nih hibernate.cfg.xml kaga ke baca bener sih di src naronya mungkin coba di clear dulu projectnya, trus build lagi deh ... -- Aditya Lukman Afandi
              Message 6 of 23 , Sep 5, 2011
                iya nih hibernate.cfg.xml kaga ke baca

                bener sih di src naronya

                mungkin coba di clear dulu projectnya, trus build lagi deh


                Pada 6 September 2011 09:34, Tri Mulyanto <ghemulyanto@...> menulis:
                 

                Set hibernate propertiesnya gimana ya mas? file hibernate.cfg.xml nya saya taro di folder src

                --- On Mon, 9/5/11, onsir salman <onsirsalman@...> wrote:

                From: onsir salman <onsirsalman@...>

                Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                To: netbeans-indonesia@yahoogroups.com
                Date: Monday, September 5, 2011, 9:28 AM


                 

                file hibernate.properties gak ada, misal klw ada mungkin salah taruh
                INFO: hibernate.properties not found




                --
                Aditya Lukman Afandi
                Programmer / Java Developer

                Blogs : http://dhiazaditya0606.wordpress.com/

              • Tri Mulyanto
                udah gw coba clean and build hasilnya tetep sama mas adit ... From: Aditya Lukman Afandi Subject: Re: [netbeans-indonesia] error
                Message 7 of 23 , Sep 5, 2011
                  udah gw coba clean and build hasilnya tetep sama mas adit

                  --- On Tue, 9/6/11, Aditya Lukman Afandi <aditya.lukman@...> wrote:

                  From: Aditya Lukman Afandi <aditya.lukman@...>
                  Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                  To: netbeans-indonesia@yahoogroups.com
                  Date: Tuesday, September 6, 2011, 2:38 AM

                   

                  iya nih hibernate.cfg.xml kaga ke baca

                  bener sih di src naronya

                  mungkin coba di clear dulu projectnya, trus build lagi deh


                  Pada 6 September 2011 09:34, Tri Mulyanto <ghemulyanto@...> menulis:
                   

                  Set hibernate propertiesnya gimana ya mas? file hibernate.cfg.xml nya saya taro di folder src

                  --- On Mon, 9/5/11, onsir salman <onsirsalman@...> wrote:

                  From: onsir salman <onsirsalman@...>

                  Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                  To: netbeans-indonesia@yahoogroups.com
                  Date: Monday, September 5, 2011, 9:28 AM


                   

                  file hibernate.properties gak ada, misal klw ada mungkin salah taruh
                  INFO: hibernate.properties not found




                  --
                  Aditya Lukman Afandi
                  Programmer / Java Developer

                  Blogs : http://dhiazaditya0606.wordpress.com/

                • Willy Yoni
                  Suhu, pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. Tolong bantuannya para suhu.
                  Message 8 of 23 , Sep 6, 2011
                    Suhu,

                    pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. 
                    Tolong bantuannya para suhu. 
                    Terima Kasih.


                  • Muhammad Edwin
                    ooh gampang bro dilist aja JInternalFrame yg muncul di JDesktopPane nanti waktu proses pemanggilan JInternalFrame yg baru, sebelumnya dicek dulu sudah ada di
                    Message 9 of 23 , Sep 6, 2011
                      ooh gampang bro
                      dilist aja JInternalFrame yg muncul di JDesktopPane
                      nanti waktu proses pemanggilan JInternalFrame yg baru, sebelumnya dicek dulu sudah ada di list belum

                      kurang lebih kayak gini -->
                              JDesktopPane desktopPane = new JDesktopPane();        
                              // get list of jinternalframe on jdesktoppane
                              JInternalFrame[] internalFrame = desktopPane.getAllFrames();
                              // cek sudah ada atau belum
                              for (JInternalFrame jInternalFrame : internalFrame) {
                                  // implementasi 
                              }
                      gw yakin loe bisa lah

                      have fun :)


                      2011/9/7 Willy Yoni <willy_alvokat@...>
                       

                      Suhu,

                      pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. 
                      Tolong bantuannya para suhu. 
                      Terima Kasih.



                      --
                      Regards,


                      edwin.
                      "It's Not the Big That Eat the Small... It's the Fast That Eat the Slow"

                    • Tri Mulyanto
                      di MainFrame nya buat variable dari JInternalFrame untuk menampung JInternalFrame yg aktif. contohnya kurang lebih public ChildFrame childFrame; // buat
                      Message 10 of 23 , Sep 6, 2011
                        di MainFrame nya buat variable dari JInternalFrame untuk menampung JInternalFrame yg aktif.

                        contohnya kurang lebih

                        public ChildFrame childFrame; // buat variable dari JInternalFrame
                        //code untuk menampilkan JInternalFrame
                            private void menuChildActionPerformed(java.awt.event.ActionEvent evt) {                                            
                                try {
                                    if(childFrame == null)
                                    {
                                        childFrame = new ChildFrame();
                                        desktopPane.add(childFrame);
                                    }else
                                    {
                                        childFrame.toFront();
                                    }
                                    childFrame.setVisible(true);
                                    childFrame.setSelected(true);
                                    penggunaFrame.setSize(desktopPane.getSize());
                                   
                                } catch (PropertyVetoException ex) {
                                    Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
                                   
                                }
                               
                            }              

                        Regards
                        --- On Wed, 9/7/11, Willy Yoni <willy_alvokat@...> wrote:

                        From: Willy Yoni <willy_alvokat@...>
                        Subject: [netbeans-indonesia] JInternalFrame yang sama hanya muncul 1 kali,
                        To: netbeans-indonesia@yahoogroups.com
                        Date: Wednesday, September 7, 2011, 4:29 AM

                         

                        Suhu,

                        pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. 
                        Tolong bantuannya para suhu. 
                        Terima Kasih.


                      • Willy Yoni
                        Terima kasih,saya coba dl.. ________________________________ From: Muhammad Edwin To: netbeans-indonesia@yahoogroups.com Sent: Wed,
                        Message 11 of 23 , Sep 6, 2011
                          Terima kasih,saya coba dl..


                          From: Muhammad Edwin <edwinkun@...>
                          To: netbeans-indonesia@yahoogroups.com
                          Sent: Wed, September 7, 2011 12:01:52 PM
                          Subject: Re: [netbeans-indonesia] JInternalFrame yang sama hanya muncul 1 kali,

                           

                          ooh gampang bro

                          dilist aja JInternalFrame yg muncul di JDesktopPane
                          nanti waktu proses pemanggilan JInternalFrame yg baru, sebelumnya dicek dulu sudah ada di list belum

                          kurang lebih kayak gini -->
                                  JDesktopPane desktopPane = new JDesktopPane();        
                                  // get list of jinternalframe on jdesktoppane
                                  JInternalFrame[] internalFrame = desktopPane.getAllFrames();
                                  // cek sudah ada atau belum
                                  for (JInternalFrame jInternalFrame : internalFrame) {
                                      // implementasi 
                                  }
                          gw yakin loe bisa lah

                          have fun :)


                          2011/9/7 Willy Yoni <willy_alvokat@...>
                           

                          Suhu,

                          pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. 
                          Tolong bantuannya para suhu. 
                          Terima Kasih.



                          --
                          Regards,


                          edwin.
                          "It's Not the Big That Eat the Small... It's the Fast That Eat the Slow"

                        • Willy Yoni
                          Pngn tanya lg suhu, gimana kalo ketika ada internal frame sedang aktif, lalu ingn memunculkan internalFrame yang lain. jadinya internal frame yang sebelumnya
                          Message 12 of 23 , Sep 7, 2011
                            Pngn tanya lg suhu,

                            gimana kalo ketika ada internal frame sedang aktif, lalu ingn memunculkan internalFrame yang lain. jadinya internal frame yang sebelumnya Minimize secara otomatis.
                            tolong bantuannya para suhu.

                            Terima kasih.


                            From: Muhammad Edwin <edwinkun@...>
                            To: netbeans-indonesia@yahoogroups.com
                            Sent: Wed, September 7, 2011 12:01:52 PM
                            Subject: Re: [netbeans-indonesia] JInternalFrame yang sama hanya muncul 1 kali,

                             

                            ooh gampang bro

                            dilist aja JInternalFrame yg muncul di JDesktopPane
                            nanti waktu proses pemanggilan JInternalFrame yg baru, sebelumnya dicek dulu sudah ada di list belum

                            kurang lebih kayak gini -->
                                    JDesktopPane desktopPane = new JDesktopPane();        
                                    // get list of jinternalframe on jdesktoppane
                                    JInternalFrame[] internalFrame = desktopPane.getAllFrames();
                                    // cek sudah ada atau belum
                                    for (JInternalFrame jInternalFrame : internalFrame) {
                                        // implementasi 
                                    }
                            gw yakin loe bisa lah

                            have fun :)


                            2011/9/7 Willy Yoni <willy_alvokat@...>
                             

                            Suhu,

                            pngn nanya, bagaimana cara nya jika dalam DesktopPane ada JIntenalFrame yang sama ingin di muncul kan hanya 1 kali saja. 
                            Tolong bantuannya para suhu. 
                            Terima Kasih.



                            --
                            Regards,


                            edwin.
                            "It's Not the Big That Eat the Small... It's the Fast That Eat the Slow"

                          • Martinus Ady H
                            2011/9/7 Tri Mulyanto ... Bisa juga dengan cara JInternalFrame-nya dibuat jadi singeleton, nanti dari MainFrame baru dicek, apakah
                            Message 13 of 23 , Sep 7, 2011
                              2011/9/7 Tri Mulyanto <ghemulyanto@...>
                              >
                              >
                              >
                              > di MainFrame nya buat variable dari JInternalFrame untuk menampung JInternalFrame yg aktif.
                              >
                              > contohnya kurang lebih
                              >
                              > public ChildFrame childFrame; // buat variable dari JInternalFrame
                              > //code untuk menampilkan JInternalFrame
                              >     private void menuChildActionPerformed(java.awt.event.ActionEvent evt) {
                              >         try {
                              >             if(childFrame == null)
                              >             {
                              >                 childFrame = new ChildFrame();
                              >                 desktopPane.add(childFrame);
                              >             }else
                              >             {
                              >                 childFrame.toFront();
                              >             }
                              >             childFrame.setVisible(true);
                              >             childFrame.setSelected(true);
                              >             penggunaFrame.setSize(desktopPane.getSize());
                              >
                              >         } catch (PropertyVetoException ex) {
                              >             Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
                              >
                              >         }
                              >
                              >     }
                              >
                              > Regards

                              Bisa juga dengan cara JInternalFrame-nya dibuat jadi singeleton,
                              nanti dari MainFrame baru dicek, apakah JInternalFrame trsb dah di
                              instantiate atau belum, klo sudah buat jadi visible(true) klo belum
                              create JInternalFrame-nya :)

                              Regards,
                              --
                              Martinus Ady H.
                              http://martinusadyh.web.id/
                              @martinusadyh
                            • Martinus Ady H
                              2011/9/7 Willy Yoni ... Klo JInternalFrame sebelumya dan yang mau ditampilkan dibuat maximize(true), maka kita ga usah mikirin lagi
                              Message 14 of 23 , Sep 7, 2011
                                2011/9/7 Willy Yoni <willy_alvokat@...>
                                >
                                >
                                >
                                > Pngn tanya lg suhu,
                                > gimana kalo ketika ada internal frame sedang aktif, lalu ingn memunculkan internalFrame yang lain. jadinya internal frame yang sebelumnya Minimize secara otomatis.
                                > tolong bantuannya para suhu.
                                > Terima kasih.

                                Klo JInternalFrame sebelumya dan yang mau ditampilkan dibuat
                                maximize(true), maka kita ga usah mikirin lagi apakah JInternalFrame
                                yg kemarin mau diminimize atau ndak. Soalnya setiap kita create new
                                JInternalFrame kemudian kita setVisible(true), maka secara otomatis
                                JInternalFrame yang baru ini akan memenuhi layar :)

                                Regards,
                                --
                                Martinus Ady H.
                                http://martinusadyh.web.id/
                                @martinusadyh
                              • Ifnu bima
                                ... udah solve nih problemnya? Harusnya sih langkahnya sederhana saja, ga ribet, asal hibernate.cfg.xml ada di classpath, Hibernate library pasti bisa
                                Message 15 of 23 , Sep 7, 2011
                                  >
                                  > udah gw coba clean and build hasilnya tetep sama mas adit

                                  udah solve nih problemnya?

                                  Harusnya sih langkahnya sederhana saja, ga ribet, asal
                                  hibernate.cfg.xml ada di classpath, Hibernate library pasti bisa
                                  menemukanya. Coba clean and build trus cek folder build/classes di
                                  dalam folder project, ada gak hibernate.cfg.xml di dalam folder itu.
                                  Kalau ga ada ya memang belum kecopy, kalau ada tapi gak jalan, pasti
                                  ada masalah lain, entah library hibernatenya gak pas atau ada
                                  konfigurasi yang salah.




                                  --
                                  http://ifnubima.org/indo-java-podcast/
                                  http://tanyajava.com/download/javadesktop
                                  http://tanyajava.com/download/scrum
                                  @ifnubima

                                  regards
                                • Tri Mulyanto
                                  belum mas, okeh saya coba cek dulu ... From: Ifnu bima Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu) To:
                                  Message 16 of 23 , Sep 7, 2011
                                    belum mas, okeh saya coba cek dulu

                                    --- On Thu, 9/8/11, Ifnu bima <ifnubima@...> wrote:

                                    From: Ifnu bima <ifnubima@...>
                                    Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                    To: netbeans-indonesia@yahoogroups.com
                                    Date: Thursday, September 8, 2011, 12:13 AM

                                     

                                    >
                                    > udah gw coba clean and build hasilnya tetep sama mas adit

                                    udah solve nih problemnya?

                                    Harusnya sih langkahnya sederhana saja, ga ribet, asal
                                    hibernate.cfg.xml ada di classpath, Hibernate library pasti bisa
                                    menemukanya. Coba clean and build trus cek folder build/classes di
                                    dalam folder project, ada gak hibernate.cfg.xml di dalam folder itu.
                                    Kalau ga ada ya memang belum kecopy, kalau ada tapi gak jalan, pasti
                                    ada masalah lain, entah library hibernatenya gak pas atau ada
                                    konfigurasi yang salah.

                                    --
                                    http://ifnubima.org/indo-java-podcast/
                                    http://tanyajava.com/download/javadesktop
                                    http://tanyajava.com/download/scrum
                                    @ifnubima

                                    regards

                                  • Tri Mulyanto
                                    Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas
                                    Message 17 of 23 , Sep 7, 2011
                                      Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas

                                      --- On Thu, 9/8/11, Ifnu bima <ifnubima@...> wrote:

                                      From: Ifnu bima <ifnubima@...>
                                      Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                      To: netbeans-indonesia@yahoogroups.com
                                      Date: Thursday, September 8, 2011, 12:13 AM

                                       

                                      >
                                      > udah gw coba clean and build hasilnya tetep sama mas adit

                                      udah solve nih problemnya?

                                      Harusnya sih langkahnya sederhana saja, ga ribet, asal
                                      hibernate.cfg.xml ada di classpath, Hibernate library pasti bisa
                                      menemukanya. Coba clean and build trus cek folder build/classes di
                                      dalam folder project, ada gak hibernate.cfg.xml di dalam folder itu.
                                      Kalau ga ada ya memang belum kecopy, kalau ada tapi gak jalan, pasti
                                      ada masalah lain, entah library hibernatenya gak pas atau ada
                                      konfigurasi yang salah.

                                      --
                                      http://ifnubima.org/indo-java-podcast/
                                      http://tanyajava.com/download/javadesktop
                                      http://tanyajava.com/download/scrum
                                      @ifnubima

                                      regards

                                    • Martinus Ady H
                                      2011/9/8 Tri Mulyanto ... Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ? Regards, -- Martinus Ady H.
                                      Message 18 of 23 , Sep 7, 2011
                                        2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                        >
                                        >
                                        >
                                        > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                        >

                                        Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                        Regards,
                                        --
                                        Martinus Ady H.
                                        http://martinusadyh.web.id/
                                        @martinusadyh
                                      • Tri Mulyanto
                                        ini konfigurasi hibernate.cfg.xml nya mas martin
                                        Message 19 of 23 , Sep 7, 2011
                                          ini konfigurasi hibernate.cfg.xml nya mas martin

                                          <?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>
                                              <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
                                              <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
                                              <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/pos</property>
                                              <property name="hibernate.connection.username">root</property>
                                              <property name="hibernate.hbm2ddl.auto">create</property>
                                              <property name="hibernate.show_sql">true</property>
                                              <property name="hibernate.format_sql">true</property>
                                              <mapping class="model.Person"/>
                                            </session-factory>
                                          </hibernate-configuration>

                                          --- On Thu, 9/8/11, Martinus Ady H <mrt.itnewbies@...> wrote:

                                          From: Martinus Ady H <mrt.itnewbies@...>
                                          Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                          To: netbeans-indonesia@yahoogroups.com
                                          Date: Thursday, September 8, 2011, 4:32 AM

                                           

                                          2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                          >
                                          >
                                          >
                                          > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                          >

                                          Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                          Regards,
                                          --
                                          Martinus Ady H.
                                          http://martinusadyh.web.id/
                                          @martinusadyh

                                        • Tri Mulyanto
                                          ini main classnya package pos; import java.util.List; import model.Person; import org.hibernate.HibernateException; import org.hibernate.Query; import
                                          Message 20 of 23 , Sep 7, 2011
                                            ini main classnya

                                            package pos;

                                            import java.util.List;
                                            import model.Person;
                                            import org.hibernate.HibernateException;
                                            import org.hibernate.Query;
                                            import org.hibernate.Session;
                                            import org.hibernate.SessionFactory;
                                            import org.hibernate.cfg.Configuration;


                                            /**
                                             *
                                             * @author Administrator
                                             */
                                            public class MainHibernate {

                                                /**
                                                 * @param args the command line arguments
                                                 */
                                                public static void main(String[] args) {
                                                    SessionFactory sessionFactory = new Configuration().buildSessionFactory();
                                                   
                                                    Person p = new Person();
                                                    p.setName("me");
                                                    p.setPassword("mypassword");
                                                   
                                                   
                                                        Session session = sessionFactory.openSession();
                                                        try
                                                        {
                                                        session.beginTransaction();
                                                        session.save(p);
                                                        session.getTransaction().commit();
                                                    }catch(HibernateException hibernatExcception)
                                                    {
                                                       session.getTransaction().rollback();
                                                    }
                                                    session.close();
                                                   
                                                    session = sessionFactory.openSession();
                                                    Query query = session.createQuery("from Person");
                                                    List<Person> listperson = query.list();
                                                    for(Person person : listperson)
                                                    {
                                                        System.out.println("Id : " + person.getId());
                                                        System.out.println("Name : " + person.getName());
                                                        System.out.println("Password : " + person.getPassword());
                                                    }
                                                    session.close();
                                                    sessionFactory.close();
                                                }
                                            }


                                            --- On Thu, 9/8/11, Martinus Ady H <mrt.itnewbies@...> wrote:

                                            From: Martinus Ady H <mrt.itnewbies@...>
                                            Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                            To: netbeans-indonesia@yahoogroups.com
                                            Date: Thursday, September 8, 2011, 4:32 AM

                                             

                                            2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                            >
                                            >
                                            >
                                            > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                            >

                                            Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                            Regards,
                                            --
                                            Martinus Ady H.
                                            http://martinusadyh.web.id/
                                            @martinusadyh

                                          • ifnu
                                            semuanya sepertinya bener, coba attach project kamu ke sini, dizip dl ya, library ga perlu diikutkan. Sent from my iPhone
                                            Message 21 of 23 , Sep 8, 2011
                                              semuanya sepertinya bener, coba attach project kamu ke sini, dizip dl ya, library ga perlu diikutkan.

                                              Sent from my iPhone

                                              On Sep 8, 2011, at 14:44, Tri Mulyanto <ghemulyanto@...> wrote:

                                               

                                              ini main classnya

                                              package pos;

                                              import java.util.List;
                                              import model.Person;
                                              import org.hibernate.HibernateException;
                                              import org.hibernate.Query;
                                              import org.hibernate.Session;
                                              import org.hibernate.SessionFactory;
                                              import org.hibernate.cfg.Configuration;


                                              /**
                                               *
                                               * @author Administrator
                                               */
                                              public class MainHibernate {

                                                  /**
                                                   * @param args the command line arguments
                                                   */
                                                  public static void main(String[] args) {
                                                      SessionFactory sessionFactory = new Configuration().buildSessionFactory();
                                                     
                                                      Person p = new Person();
                                                      p.setName("me");
                                                      p.setPassword("mypassword");
                                                     
                                                     
                                                          Session session = sessionFactory.openSession();
                                                          try
                                                          {
                                                          session.beginTransaction();
                                                          session.save(p);
                                                          session.getTransaction().commit();
                                                      }catch(HibernateException hibernatExcception)
                                                      {
                                                         session.getTransaction().rollback();
                                                      }
                                                      session.close();
                                                     
                                                      session = sessionFactory.openSession();
                                                      Query query = session.createQuery("from Person");
                                                      List<Person> listperson = query.list();
                                                      for(Person person : listperson)
                                                      {
                                                          System.out.println("Id : " + person.getId());
                                                          System.out.println("Name : " + person.getName());
                                                          System.out.println("Password : " + person.getPassword());
                                                      }
                                                      session.close();
                                                      sessionFactory.close();
                                                  }
                                              }


                                              --- On Thu, 9/8/11, Martinus Ady H <mrt.itnewbies@...> wrote:

                                              From: Martinus Ady H <mrt.itnewbies@...>
                                              Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                              To: netbeans-indonesia@yahoogroups.com
                                              Date: Thursday, September 8, 2011, 4:32 AM

                                               

                                              2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                              >
                                              >
                                              >
                                              > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                              >

                                              Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                              Regards,
                                              --
                                              Martinus Ady H.
                                              http://martinusadyh.web.id/
                                              @martinusadyh

                                            • Tri Mulyanto
                                              ini mas file zip projectnya ... From: ifnu Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu) To:
                                              Message 22 of 23 , Sep 8, 2011

                                                ini mas file zip projectnya

                                                --- On Thu, 9/8/11, ifnu <ifnubima@...> wrote:

                                                From: ifnu <ifnubima@...>
                                                Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                                To: "netbeans-indonesia@yahoogroups.com" <netbeans-indonesia@yahoogroups.com>
                                                Date: Thursday, September 8, 2011, 7:06 AM

                                                 

                                                semuanya sepertinya bener, coba attach project kamu ke sini, dizip dl ya, library ga perlu diikutkan.

                                                Sent from my iPhone

                                                On Sep 8, 2011, at 14:44, Tri Mulyanto <ghemulyanto@...> wrote:

                                                 

                                                ini main classnya

                                                package pos;

                                                import java.util.List;
                                                import model.Person;
                                                import org.hibernate.HibernateException;
                                                import org.hibernate.Query;
                                                import org.hibernate.Session;
                                                import org.hibernate.SessionFactory;
                                                import org.hibernate.cfg.Configuration;


                                                /**
                                                 *
                                                 * @author Administrator
                                                 */
                                                public class MainHibernate {

                                                    /**
                                                     * @param args the command line arguments
                                                     */
                                                    public static void main(String[] args) {
                                                        SessionFactory sessionFactory = new Configuration().buildSessionFactory();
                                                       
                                                        Person p = new Person();
                                                        p.setName("me");
                                                        p.setPassword("mypassword");
                                                       
                                                       
                                                            Session session = sessionFactory.openSession();
                                                            try
                                                            {
                                                            session.beginTransaction();
                                                            session.save(p);
                                                            session.getTransaction().commit();
                                                        }catch(HibernateException hibernatExcception)
                                                        {
                                                           session.getTransaction().rollback();
                                                        }
                                                        session.close();
                                                       
                                                        session = sessionFactory.openSession();
                                                        Query query = session.createQuery("from Person");
                                                        List<Person> listperson = query.list();
                                                        for(Person person : listperson)
                                                        {
                                                            System.out.println("Id : " + person.getId());
                                                            System.out.println("Name : " + person.getName());
                                                            System.out.println("Password : " + person.getPassword());
                                                        }
                                                        session.close();
                                                        sessionFactory.close();
                                                    }
                                                }


                                                --- On Thu, 9/8/11, Martinus Ady H <mrt.itnewbies@...> wrote:

                                                From: Martinus Ady H <mrt.itnewbies@...>
                                                Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                                To: netbeans-indonesia@yahoogroups.com
                                                Date: Thursday, September 8, 2011, 4:32 AM

                                                 

                                                2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                                >
                                                >
                                                >
                                                > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                                >

                                                Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                                Regards,
                                                --
                                                Martinus Ady H.
                                                http://martinusadyh.web.id/
                                                @martinusadyh

                                              • Tri Mulyanto
                                                Dear All Problem gw sudah solved, gw buat Class HibernateUtil, trus Main class nya gw ubah jadi gini /*  * To change this template, choose Tools | Templates
                                                Message 23 of 23 , Sep 8, 2011

                                                  Dear All Problem gw sudah solved,
                                                  gw buat Class HibernateUtil,
                                                  trus Main class nya gw ubah jadi gini

                                                  /*
                                                   * To change this template, choose Tools | Templates
                                                   * and open the template in the editor.
                                                   */
                                                  package pos;

                                                  import java.util.List;
                                                  import model.Person;
                                                  import org.hibernate.HibernateException;
                                                  import org.hibernate.Query;
                                                  import org.hibernate.Session;
                                                  import org.hibernate.SessionFactory;
                                                  import org.hibernate.cfg.Configuration;
                                                  import util.HibernateUtil;


                                                  /**
                                                   *
                                                   * @author Administrator
                                                   */
                                                  public class MainHibernate {

                                                      /**
                                                       * @param args the command line arguments
                                                       */
                                                      public static void main(String[] args) {
                                                         
                                                         
                                                          Person p = new Person();
                                                          p.setName("me");
                                                          p.setPassword("mypassword");
                                                         
                                                         
                                                              Session session = HibernateUtil.getSessionFactory().openSession();
                                                              try
                                                              {
                                                              session.beginTransaction();
                                                              session.save(p);
                                                              session.getTransaction().commit();
                                                          }catch(HibernateException hibernatExcception)
                                                          {
                                                             session.getTransaction().rollback();
                                                          }
                                                          session.close();
                                                         
                                                          session = HibernateUtil.getSessionFactory().openSession();
                                                          Query query = session.createQuery("from Person");
                                                          List<Person> listperson = query.list();
                                                          for(Person person : listperson)
                                                          {
                                                              System.out.println("Id : " + person.getId());
                                                              System.out.println("Name : " + person.getName());
                                                              System.out.println("Password : " + person.getPassword());
                                                          }
                                                          session.close();
                                                         
                                                      }
                                                  }


                                                  Thank U mas Ifnu, mas Martin, Mas Eko Khanedy, All NUG
                                                  Regards

                                                  -ghemulyanto-
                                                  --- On Thu, 9/8/11, ifnu <ifnubima@...> wrote:

                                                  From: ifnu <ifnubima@...>
                                                  Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                                  To: "netbeans-indonesia@yahoogroups.com" <netbeans-indonesia@yahoogroups.com>
                                                  Date: Thursday, September 8, 2011, 7:06 AM

                                                   

                                                  semuanya sepertinya bener, coba attach project kamu ke sini, dizip dl ya, library ga perlu diikutkan.

                                                  Sent from my iPhone

                                                  On Sep 8, 2011, at 14:44, Tri Mulyanto <ghemulyanto@...> wrote:

                                                   

                                                  ini main classnya

                                                  package pos;

                                                  import java.util.List;
                                                  import model.Person;
                                                  import org.hibernate.HibernateException;
                                                  import org.hibernate.Query;
                                                  import org.hibernate.Session;
                                                  import org.hibernate.SessionFactory;
                                                  import org.hibernate.cfg.Configuration;


                                                  /**
                                                   *
                                                   * @author Administrator
                                                   */
                                                  public class MainHibernate {

                                                      /**
                                                       * @param args the command line arguments
                                                       */
                                                      public static void main(String[] args) {
                                                          SessionFactory sessionFactory = new Configuration().buildSessionFactory();
                                                         
                                                          Person p = new Person();
                                                          p.setName("me");
                                                          p.setPassword("mypassword");
                                                         
                                                         
                                                              Session session = sessionFactory.openSession();
                                                              try
                                                              {
                                                              session.beginTransaction();
                                                              session.save(p);
                                                              session.getTransaction().commit();
                                                          }catch(HibernateException hibernatExcception)
                                                          {
                                                             session.getTransaction().rollback();
                                                          }
                                                          session.close();
                                                         
                                                          session = sessionFactory.openSession();
                                                          Query query = session.createQuery("from Person");
                                                          List<Person> listperson = query.list();
                                                          for(Person person : listperson)
                                                          {
                                                              System.out.println("Id : " + person.getId());
                                                              System.out.println("Name : " + person.getName());
                                                              System.out.println("Password : " + person.getPassword());
                                                          }
                                                          session.close();
                                                          sessionFactory.close();
                                                      }
                                                  }


                                                  --- On Thu, 9/8/11, Martinus Ady H <mrt.itnewbies@...> wrote:

                                                  From: Martinus Ady H <mrt.itnewbies@...>
                                                  Subject: Re: [netbeans-indonesia] error hibernate (belajar dari ebook mas Ifnu)
                                                  To: netbeans-indonesia@yahoogroups.com
                                                  Date: Thursday, September 8, 2011, 4:32 AM

                                                   

                                                  2011/9/8 Tri Mulyanto <ghemulyanto@...>
                                                  >
                                                  >
                                                  >
                                                  > Saya suah coba clean and build, file hibernate.cfg.xml ada di folder build/classes. tidak ada folder project. saya juga sudah coba run project yg dari mas ifnu, tapi hasilnya sama mas
                                                  >

                                                  Bisa pastein satu2x kesini ga konfigurasi dan file yang digunakan ?

                                                  Regards,
                                                  --
                                                  Martinus Ady H.
                                                  http://martinusadyh.web.id/
                                                  @martinusadyh

                                                Your message has been successfully submitted and would be delivered to recipients shortly.