database 2 « Database « JPA Q&A





1. Using Hibernate for doing massive db operations    forum.hibernate.org

Hello! I have this problem: 1. Traverse 147 million rows in one table, join it with another significantly smaller table 2. Apply some business logic for each row, possibly accessing the db several times doing this 3. Generating response objects for a few (meaning thousands) of these rows, again accessing the db several times This will be done by a cluster ...

2. synchronizing two databases via application    forum.hibernate.org

Hi, What I am trying to do: User logs into a webapp running on server A. Server A contacts server B via HTTP, asks to download some persistent objects. Server B load()s those objects using hibernate, and returns them to server A (as Java serialized objects). Server A then persists those objects to its own database. When the objects are first ...

3. Is it possible to create databases with Hibernate?    forum.hibernate.org

I currently use the following tasks to create my database and build it's schema: Code: Creating database with file: ${database.type}-create.sql

4. Getting database native types    forum.hibernate.org

5. Hibernate work with existing databases?    forum.hibernate.org

am currently looking for an open source O/R vendor and was wondering if Hibernate can one class to serveral tables. We have to work with an existing database schema so our classes will not map 1-1 with the database tables. The database schema is'nt very oo and has other issues, but we are planning on to redesign the database for the ...

6. Changes not seen at the database    forum.hibernate.org

I have tryied every combination of Session.flush(), Transaction.commit(), Session.connection.commit() and I sitll don't see changes on the database. Objects are loading just fine. Here is my lates attempt at inserting a new object: Code: Session session = sessionFactory.openSession(); ...

7. hibernate and multiple database    forum.hibernate.org

Hi, I use the same hibernate instance to access multiple databases (with the same structure, just different instances). To achieve this I have as many session factories (with provided Connections) as databases. I would like to know if this is a safe pattern and if it is possible to enable caching (i.e. a separate cache for each database/session factory). The docs ...

8. HELP! Database Operation in more than one thread    forum.hibernate.org

public Collection insertPosition(Collection positionInfoCollection, String userName) throws DbAccessException { logger.enterMethod(); Collection ret = new ArrayList(); NmsUserDAO nmsUserDAO = (NmsUserDAO) getDAODAOConst.NMSUSER_DAO); long userId = -1; Session sess = null; try { sess = IdnSessionFactory.openSession(); if (positionInfoCollection.size() <= 0 || userName == null) { logger.debug("position size=" + positionInfoCollection.size() + " userName=" + userName); throw new DbAccessException(DbAccessException.DBA_OTHER_EXCEPTION, ErrorReason.INSERT_OBJECT_FAILED_REASON); } else { userId = nmsUserDAO.selectUserIdByUserName(userName); ...

9. How to watch Hibernate interaction with DB    forum.hibernate.org

Is there some way to watch what Hibernate inserts into the DB - the actual values. I am watching the log of the SQL statements, e.g: Hibernate: insert into Interview_Answers (INTERVIEW_QUESTION_ID, ANSWER_ID, ID) values (?, ?, ?) but I would like to see the values that are being inserted to find out why this is happening: 0 [Thread-4] FATAL nz.govt.msd.inet.HR.HRExit.Struts.SectionCSubmitAction - ...





10. Using multiple databases    forum.hibernate.org

Hello! I have to access many MySQL databases that share the same schema via Hibernate. I can't add a connection parameter set for all of them to a configuration file, since they are very many and their number increases. Nevertheless, they all reside on the same MySQL server and the only difference in the connection parameters is their database name. Is ...

11. SAP DB support    forum.hibernate.org

12. Multilanguage database    forum.hibernate.org

Newbie Joined: Tue Oct 14, 2003 12:02 pm Posts: 11 Location: Romania Hi, First of all please excuse me if this is not the right place for posting this question. But i am sure that the Hibernate community has loads of developers with experience in DB and OOP issues. So here is my story: we have to develop a framework for ...

13. Logging DB Changes    forum.hibernate.org

Hi, I need to log all the changes (insert/update/delete) of my database into a table log. Logging all the fields changed (old and new value) and the tables envolved. I looked at the hibernate's documentation and saw that probably an interceptor would solve it. I'd like to know if it's possible to do it and how to do it. In the ...

14. using two databases    forum.hibernate.org

Hi! I've failed to find anyone telling anything about using two databases for their application. I have the situation where I have read only-access to enterprise legacy system, and another database where most of the O/R-mapping will occur. However, obviously we would like _not_ having to batch information or somehow have duplicate data, hence some information - such as customers, distributors ...

15. DB Priveldges    forum.hibernate.org

Beginner Joined: Fri Mar 05, 2004 1:48 pm Posts: 28 Hello, I am having a host of problems getting hibernate2.1.2 to work with DB2 7.2 on OS390. Below is info on the latest. I did a search on the sqlcodes and I am still lost. Any help is greatly appreciated! Code: _________________________________________ Session s = factory.openSession(); Transaction tx=null; try { s.setFlushMode(FlushMode.NEVER); ...

16. Is it possible to create database with hibernate?    forum.hibernate.org

Take a look on import net.sf.hibernate.tool.hbm2ddl.SchemaUpdate. It creates the required table-structure for all your mappings. I guess Hibernate is not able to create a database on its own, since it is not the task it was build for. Take a look at HSQLDB. Its a lightweight DBMS written entirely in Java. It is supported by Hibernate and suites well for small ...





17. Optimize any access to the database    forum.hibernate.org

Author Message payess Post subject: Optimize any access to the database Posted: Thu Mar 18, 2004 4:50 am Newbie Joined: Tue Sep 16, 2003 6:12 am Posts: 13 Hi, This is perhaps a silly question. I need to optimize the selects to the database. I only need this when serching for Incident objects. Problem is that this object have ...

18. Remote Database    forum.hibernate.org

Hi, I am doing a project with Hibernate/Mysql. Everything is working OK on a local machine. However, after I moved the database to a remote machine, for the first time, the program runs OK. But after that, everytime when I run the program Hibernate tries to recreate all the tables it has created. Thus the error message says " ERROR - ...

19. Working with 2 databases    forum.hibernate.org

20. Multiple databases    forum.hibernate.org

21. Simultaneous support for more than one database    forum.hibernate.org

Hello, Is there any way to support more than one database at the same time, using Hibernate? As we need to specify database related information in hibernate.properties file, then it can be just for one database at a time. But what if we want to use more than one database for some different requirements in the same system?

22. Accession problems in database    forum.hibernate.org

I try to access the same object in the database twice in the same session. But I get the following exception. Is there any way to avoid this error but still be able to access the object twice ? [14:44:54] [ERROR] com.test.testing.core.storage.HibernateTransaction - general exception - a different object with the same identifier value was already associated with the session: 4028fb06fc026d8100fc026dde0a02d9, ...

23. one DB, multiple apps, & hibernate?    forum.hibernate.org

Newbie Joined: Thu Apr 15, 2004 7:18 pm Posts: 2 Hi All, We have a Hibernate/Java/JSP app and are replacing parts of the JSP frontend (& some of the hibernate middle layer) with PHP. The PHP code is creating new objects & inserting the necessary related table rows. When we try to access (select) the PHP-created objects through the JSP/hibernate pages, ...

24. Unify 2000 database    forum.hibernate.org

Unify - wow I had/have a client that had used Unify is a big way. They have dropped it now for Oracle. I spent some time playing with the JDBC driver (about year (year and a half) or so ago) and it was very problematic. Not sure what the status is at the moment but Hibernate does require a quality JDBC ...

25. Can I use Hibernate 4 an existing database?    forum.hibernate.org

Hi, I've read some topics about Hibernate, but It's not clear to me, whether I can use Hibernate for an existing database schema. We need to migrate an old system to J2EE enviroment. we can't change the database schema, but we can change the application logic. So we have a lot of tables, complex selects and inserts. We wan't to design ...

26. DB architechture advice needed    forum.hibernate.org

Hi: Sorry for the offtopic discussion but I think this still might be a good forum to ask this question. I have a Demographics table in my DB which currently has a foreign key relationship with tables like Employee, Administrator etc.So the hibernate persistence class Employee 'contains' Demographics and there is EmployeeID field and a constraint in my Demographics table. However, ...

27. Support for IBM Cloudscape database    forum.hibernate.org

28. problem with case sensitive database    forum.hibernate.org

dear all I using hibernate 2.1 and a sapdb database with tablenames like this: myTABLE now some users want to acces this tables with hibernate, this tool rocks!, and I become the exception: table MYTABLE not found, sure thats clear, the name is myTABLE how can I deal with this? what's not possible: - rename all tables and column! - define ...

29. Case of multiple databases    forum.hibernate.org

Hi, I'm actually develloping an application using a tomcat webserver, hibernate and multiple mysql databases on differents computers. I use actually MySQL Connector/J to link one of these database to my web application but as MySQL Connector/J will at the end link others database I was wondering if hibernate will be able to switch from one database to another ? (in ...

30. Hibernate and database clusters    forum.hibernate.org

Hi, we are using Hibernate with Tomcat and DBCP connection pooling engine in our project, and it works very good so far. As database we are using a single Oracle instance. Now we are thinking about different DB clustering solutions in order to minimize/avoid application downtimes due to database downtimes. Oracle cluster seems to be a very expensive option, so we ...

31. xquery database    forum.hibernate.org

Sorry, but this is just not true. I can lock and release a textfile just the same. For sound data management you need a data model. This model gives you a) a well-defined structure that removes data redundancy b) a "sufficent" set of constraints to ensure the integrity of your data c) a set of well-defined operations to manipulate/query your data ...

32. Changed database context to    forum.hibernate.org

===========start exception ========================= 11:27:54,553 DEBUG JDBCExceptionReporter:18 - SQL Warning java.sql.SQLWarning: [DEV03752]Changed database context to 'rem1'. at com.inet.tds.a.a(Unknown Source) at com.inet.tds.a.(Unknown Source) at com.inet.tds.TdsDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at .sf.hibernate.connection.DriverManagerConnectionProvider. getConnection(DriverManagerConnectionProvider.java:101) ===============end exception ======================= I am using hibernate 2.1 with MS Sql Server. The demo is working, but I get the above exception, and the tables end up created in a ...

33. Heterogeneous Database Suggestions    forum.hibernate.org

I'm working on a system that must use multiple databases (several Oracle, DB2 servers). The information I require for my upper level objects is split across the databases. These systems were setup at different locations by different managments so some information is missing in some places, different id formats, etc. I've extracted the field information I require and boiled it down ...

34. Hibernate and DB Replication    forum.hibernate.org

Our adoption of Hibernate is going on to almost 1.5 years now. We are now in the process of replacing an in-house persistence mechanism on another project with Hibernate. We haven't had any real problems thus far and the development team are huge endorsers of the product. Thanks. Question: We have geographically disparate EIS database tiers throughout North America and have ...

35. Adminapp - Where in the code does it create the database.    forum.hibernate.org

I've downloaded and successfully installed the adminapp web application on Tomcat. I particularly like the fact that adminapp automatically creates the database tables for you when running the application. I would like to adopt the same thing for my own webapplication, and was looking through the adminapp source code to see how it was done. I notice that the database tables ...

36. Different customers in one database?    forum.hibernate.org

Hi, while playing around with hibernate and some webframeworks a very basic question arised to me: Suppose you have a webapplication which supports an great number of customers (let's say up to 200). The application uses 50 "domain" tables (tables which store customer data) in the backend. All the access and the OR mapping is made via hibernate. The question is, ...

37. Database independent UTF-8    forum.hibernate.org

I'm developing an e-learning platform for slavistic languages and I wondered, whether there is a possibility to store UTF-8 encoded data to a database. I know I can do it with several databases using some of their special parameter, but I'd like a more independent solution. So I thought of writing an Interceptor which encodes / decodes (from UTF-8 into something ...

38. Working with several databases.    forum.hibernate.org

If I understand your question correctly, you need two seperate Configurations. A Configuration is responsible for generating a SessionFactory. So basically you would just construct two different Configurations (each describing the connection characteristic and class mapped to each of the underlying databases) and then ask each to build a seperate SessionFactory. You would need to explicitly specify the config file for ...

39. how to convert between Java and DB types    forum.hibernate.org

Hi, I am new to Hibernate and haven't worked with it yet, forthe spec I am doing now I need to migrate from one O/R to hibernate. The question is how to define conversion between Java and DB types ? That is, we have some type in DB (say VARCHAR) and in Java class it is boolean, based on some logic. ...

40. Replicate between two databases    forum.hibernate.org

Hi, My Hibernate App includes functionality to "synchronize" data between two databases (one for development and production). I'm trying to use Hibernate to copy/update data, but I'm crashing again and again. Should I use plain SQL to INSERT / UPDATE data on my production DB? All my objects have to use "assigned" for generator class, because when I'm copying the objects ...

41. Database changes handling    forum.hibernate.org

hbm2java generates the POJO code from mapping xmls. Is there a way to specify somewhere (like some properties file), to use a different name for the generated class file instead of the one specified in the mapping file? We have a major concern like after developing our application using hibernate, if there are some changes to database layout or change in ...

42. Getting DB pool status/info via HIbernate API?    forum.hibernate.org

43. Hibernate and DB clusters    forum.hibernate.org

44. Everything seem good but nothing in DB    forum.hibernate.org

Hi (sorry for my english in advance), I'm trying to test Hibernate with e simple example I'm using hibernate 2.1.3 Oracle 8.1.6 My probleme is that i can retrieve and print data from my database but when i try to insert or update an object everything seems to be good but nothing is inserted in Database. hibernate.cfg.xml

87. long lived state management in web apps without db commits    forum.hibernate.org

Hi I would like some advice on how to solution a problem with Hibernate on the EJB business tier. We are running WLS at the moment with Stateless Session EJBs. DVOs/DTOs are used to send data between the web and business tier and vice versa. Existing Situation: So far in our J2EE apps data is saved/committed to the database on a ...

88. hardcode the databases in Hibernate    forum.hibernate.org

I have my Hibernate project working with a Java database (derby) and the Ingres database server. Now our customer likes the possibility to chose between these databases from a configuration menu. Is it possible to hardcode the databases in the Hibernate source? Where do I have to look in the source code? Regards, Roland Beuker

89. which database for nibernate 3    forum.hibernate.org

90. about src of hibernate: how do it do between obj and db?    forum.hibernate.org

about src of hibernate: how do it do between obj and db? I want to do someting like encoding strings before save , update or delete to database and after load from db. so , I read src of hibernate. but it 's not easy for me. who can give me a idea such as what and where do persiste with ...

92. artifact generation from ingres database    forum.hibernate.org

****** ****** org.hibernate.dialect.IngresDialect ...

93. DBCP for multiple databases    forum.hibernate.org

Hello all, I am trying to implement DBCP connection pooling on Tomcat 5 for my application. My problem is that the application has already been written using direct connections. ie the three mapping files for the three databases each contain entries for net.sf.hibernate.dialect.InformixDialect I am trying to now ...

94. Axion DB    forum.hibernate.org

95. Change the database encoding.    forum.hibernate.org

96. Implementing Hibernate where DB not properly normalized    forum.hibernate.org

Hi, I am new to Hibernate. I am using hibernate with a database which is not pretty much normalized. I have written the database design as below. Datatypes Activity ActivityId Integer ActivityName Varchar(50) AssignTo Integer TeamAssignment Bit UserInfo UserId Integer LoginId Varchar(30) FirstName Varchar(20) LastName Varchar(20) Team TeamId Integer TeamName Varchar(30) UserTable UserId Integer TeamId Integer In the system there are ...

97. Multiple Databases - Sample Code    forum.hibernate.org

Newbie Joined: Tue Jan 06, 2004 8:06 am Posts: 13 Hi all I've written code catering to multiple database connection. Am posting it here for everyone future reference. Few pre-processing notes: [hbmMap] Due to the modular nature of my project, the hbm.xml are specified in a custom cfg file instead of normal hibernate.cfg.xml. I pre-processed hbm.xml into map of {DB_INSTANCE,hbm list} ...

98. Mckoi DB and Hibernate 3    forum.hibernate.org

Newbie Joined: Wed Jul 06, 2005 10:09 am Posts: 4 I'm trying to run the supplied example "eg" with Mckoi database. Hibernate version: 3.0.5 Mapping documents: Supplied "eg" example, with Mckoi set as: ## Mckoi SQL hibernate.dialect org.hibernate.dialect.MckoiDialect hibernate.connection.driver_class com.mckoi.JDBCDriver #hibernate.connection.url jdbc:mckoi:/// hibernate.connection.url jdbc:mckoi:local://C:/hibtest/db.conf hibernate.connection.username admin hibernate.connection.password admin Code between sessionFactory.openSession() and session.close(): As supplied in "eg" sample Full stack trace ...

99. Configure Hibernate with two databases.    forum.hibernate.org

100. support for Advantage DB?    forum.hibernate.org