mysql 2 « MySQL « JPA Q&A





1. Broken pipe with mysql and hibernate    forum.hibernate.org

the probem is when the connection opens a long time the pool conection that used hibernate for work dont close the broken conections. What is the parameter of dbcp for close this connections. When i start a application the console show: AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@a84b47) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 The configuration of hibernate.cfg.xml is: java:comp/env/jdbc/xxx org.hibernate.dialect.MySQLDialect

2. MySQLSyntaxErrorException while sessionfactory on MySQL5.0    forum.hibernate.org

Newbie Joined: Wed Jun 07, 2006 10:31 am Posts: 3 Location: pune, india All Details bewl on format required. Opening session factory works if I use addCLass merthod whihc uses individual hbm.xml files. But if I use hibernate.cfg.xml (listed below, using configuration constructor it throws an exception in mySQL hierarchy!!! also I don't understand why am getting net/sf/ehcache/CacheException as all jars ...

3. hibernate wsad mysql    forum.hibernate.org

4. problems with my first app (Hibernate + MySQL)    forum.hibernate.org

Hi I'm Blai and I'm a newbie in Hibernate. First, my apologies for I might be doing silly questions here. I'm a bit confused and trying to build my first application with Hibernate 3 and MySQL. So this is my story: To test Hibernate I have 3 tables in MySQL (Person, Email, Telephone) with their relations defined. Very simple database for ...

5. AES - MySQL - Hibernate    forum.hibernate.org

6. Need help with Regular of MySQL    forum.hibernate.org

7. derived properties with MySQL 5    forum.hibernate.org

I'm not sure if I'm reading this right or not but looking at the SQL Hibernate has generated it appears you have a column called ID_RESTAURANT, I get that from the following: restaurant0_.ID_RESTAURANT as ID1_1_0_, If that's the case (and assuming that the equivalent ID in T_RATING is still REStTAURANT_ID) maybe the following formula would work: (select avg(r.RATING) from T_RATING r ...

8. 2 problems switching to mysql    forum.hibernate.org

9. Hibernate is not getting synchronized with MySql.    forum.hibernate.org

I am encountering a problem with Hibernate when the data is updated from the external tools, updated data is not getting effected in the application. when the Server (JBoss) is started logger information in the console of the eclipse IDE is "Second Level Cache:enabled". > But according to the Documentation of Hibernate "Cache doesn't get enabled untill it is explicitly declared ...





10. Initial SessionFactory creation failed for MySQL    forum.hibernate.org

11. Problem with sizeEq in MySQL 4    forum.hibernate.org

Hi, I have a problem with the sizeEq method in Restriction class. The only difference is that im working with a Mysql 5.0 and the production database is Mysql 4.0. Everything else is the same. Hibernate 3.2 and tomcat 5.5. I have seen this bug http://lists.jboss.org/pipermail/hibern ... 00197.html but it says it is solved. I have this class: Code: public class ...

12. Work with excluding set in Hibernate/MySQL    forum.hibernate.org

13. Should I build referential integrity in MySQL?    forum.hibernate.org

If you ever plan to access your data by other means than your hibernate-using application (one of the great advantages of using a rdbms as persistance storage that you can), you should have all referential integrity in the db and not only rely on the ORM. A simple example would be if you have to import data from a legacy application. ...

14. Problem MySQL-Hibernate    forum.hibernate.org

Good time. I have problem with using Hibernate and MySQL. I created simple application for showing this problem. If configuration application to the MySQL database, then application create exception(please see further) But, if configuration this application to the PostgreSQL database, application work fine. Please help me Code : 1. Main Action public class Test { public static void main(String[] args) { ...

15. Hibernate and DB Views in MySQL    forum.hibernate.org

public List getRecords(long start, Integer numRecords, String sortField, Boolean asc, List qryFields, Date fromDate, Date toDate, Long classificationID) { Criteria criteria = getHibernateTemplate().getSessionFactory() .getCurrentSession().createCriteria(MasterListView.class); ...

16. Moving from mySQL to MSSQL 2005    forum.hibernate.org

Is there any specific things I should be aware of when moving from mySQL to MSSQL 2005? Running under JBoss, and the only thing I've changed is the -ds.xml connection file, and the sqldialect setting in persistence.xml. Most things work as before, but a many- to-many mapping bombs out with a: 12:42:36,856 ERROR [LazyInitializationException] could not initialize proxy - no Session ...





17. Incorrect arguments to mysql_stmt_execute(    forum.hibernate.org

HI All, I got this exception when I will try to add the record in the database. the project work fine on my machine and insert the record , but on production server it has generated exception "org.hibernate.exception.GenericJDBCException: could not insert:" and on digging i found the exception "Incorrect arguments to mysql_stmt_execute" . I can not understand what is the problem ...

18. MySQL backticks    forum.hibernate.org

I have been using the MyEclipseIDE to reverse engineer a set of hibernate 3.2 data objects and DAO's using Annotations. My issue revolves around adding MySQL backticks (`) to table, catalog and column names in order to insure that MySQL queries run properly in situations where names conflict with SQL keywords. Upon reading the JIRA issue: http://opensource.atlassian.com/project ... e/HHH-2660 I have ...

19. MySQL backticks    forum.hibernate.org

I have been using the MyEclipseIDE to reverse engineer a set of hibernate 3.2 data objects and DAO's using Annotations. My issue revolves around adding MySQL backticks (`) to table, catalog and column names in order to insure that MySQL queries run properly in situations where names conflict with SQL keywords. Upon reading the JIRA issue: http://opensource.atlassian.com/project ... e/HHH-2660 I have ...

20. I am unable to process in MYSql .    forum.hibernate.org

Hi, My project has been devloped for Oracle as per client requirment. Now client has requested to migrate from oracle to MySql . TO_NUMBER(a.UNIT_SKEY || TO_CHAR(0+1000) || TO_CHAR("+ iterationId + "+10000)|| c.DATE_SKEY)," I am unable to process with this query in MYSql . To_Number does not support . So do we have any alternative using Query or Criteria so that I ...

21. Use of HIbernate and MySql View definitions    forum.hibernate.org

22. MySQL 5.1 and Hibernate 3 Issue    forum.hibernate.org

Hello All, Currently, I encounter a few issues between MySQL 5.1 and Hibernate 3. I will mention 2 first. They are: During hbm2ddl auto creation, all the cascade value in the Foreign Keys for On Delete and On Update is Restrict even when I put "all" and other values (E.g. delete-orphan) for the cascade attribute. In another words, I need to ...

23. Hibernate and MySQL    forum.hibernate.org

Hello there, I'm using hibernate 3 with mysql 5.1 but my connections are not being really closed. This is an example of code where I use hibernate to list data from my MySQL database. Code: public Localidade localizar(Long id) { EntityManager em = getEntityManager(); try ...

24. Trying to configure Webshpere 7.0, JPA and MySql    forum.hibernate.org

Hello, I am trying to configure Websphere 7.0 with and JPA and MySql. I have gotten as far as using a configured datasource to read the database but when trying to persist I get an exception. Has anyone had any luck with such configuration? Thanks in advance. Here is the configuration: - ...

25. Hibernate with mysql    forum.hibernate.org

Hi, i have written one sample application ,and i used MySql database. when i used the below code ,the data what ever i have given is stored into the table. Transaction tx = session.beginTransaction(); tx.begin(); Book book=new Book(); book.setId(5); book.setBookName("abc"); session.save(book); tx.commit(); but if i use session.saveOrUpdate(book); instead of session.save(book); previous data is deleting and current data only storing into the ...

26. Problem comparing 2 datetimes, DB = MySql    forum.hibernate.org

Hello, My app is executing a query wrote using the hibernate API for Java. The query has a SELECT and it has a comparison: os.fecha <= :fechaFinal os.fecha is a "datetime" in the database. fechaFinal is a java.util.Date The code is here: Code: public List consultarOServConSaldoPendientes(Date fechaInicial, Date fechaFinal) ...

27. Hibernate 3 with Mysql 5 Compatibility Issue    forum.hibernate.org

Hi, I am using hibernate3.jar of hibernate-distribution-3.3.2.GA, with mysql-5.0.86-win32. While try to persist an entity within transaction, the following error is thrown. Is there any compatibility issue between Hibernate 3 & Mysql 5. Please help. Thanks, Karthick java.sql.BatchUpdateException: Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your ...

28. using mysql with hibernate    forums.oracle.com

this is hibernate.cfg.xml com.mysql.jdbc.Driver http://192.168.0.4/inhouse/myadmin in_house_123 inhouse1234 1 org.hibernate.dialect.MySQLDialect thread ...

29. Using mysql with hibernate 3.2.3    forums.oracle.com

//localhost:3306/hbn1, sun.management.compiler=HotSpot Client Compiler, hbm2ddl.auto=create, os.name=Windows XP, sun.boot.class.path=C:\Archivos de programa\Java\jre1.6.0_01\lib\resources.jar;C:\Archivos de programa\Java\jre1.6.0_01\lib\rt.jar;C:\Archivos de programa\Java\jre1.6.0_01\lib\jsse.jar;C:\Archivos de programa\Java\jre1.6.0_01\lib\jce.jar;C:\Archivos de programa\Java\jre1.6.0_01\lib\charsets.jar, hibernate.current_session_context_class=thread, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0_01-b06, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, user.name=Enyel, connection.driver_class=org.gjt.mm.mysql.Driver, current_session_context_class=thread, user.language=es, sun.boot.library.path=C:\Archivos de programa\Java\jre1.6.0_01\bin, dialect=org.hibernate.dialect.MySQLDialect, java.version=1.6.0_01, user.timezone=America/Mexico_City, sun.arch.data.model=32, java.endorsed.dirs=C:\Archivos de programa\Java\jre1.6.0_01\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, java.class.version=50.0, user.country=MX, connection.url=jdbc:mysql://localhost:3306/hbn1, java.home=C:\Archivos de programa\Java\jre1.6.0_01, java.vm.info=mixed mode, ...