time « Data Type « JPA Q&A





1. What is the best way to manage Time in a Java application?    stackoverflow.com

So I'm using hibernate and working with an application that manages time. What is the best way to deal with times in a 24 hour clock? I do not need to worry about ...

2. Java Date Hibernate cut off time    stackoverflow.com

I have a Date type column in Oracle DB and it contains date and time for sure. But when I'm trying to get data in java application it will return date ...

3. What is userthink time in hibernate    stackoverflow.com

Please explain what userthink time in hibernate is with an example.

4. JPA 2.0 Oracle DATE has null time    stackoverflow.com

This seems like such a bonehead question, but I've been chasing my tail around a tree all day. I have a Struts 2 + Spring3/JPA/Hibernate application that inserts a large set ...

5. Temporal libraries for Java    stackoverflow.com

I'm looking for temporal libraries for Java, i.e. libraries which allow to store multiple historical version of the same concept. I'm looking for a library which has an API to do ...

6. What are the correct security policy value settings to allow both RMI and JPA/Hibernate to work at the same time    stackoverflow.com

I'm working on an application that requires the use of both JPA/Hibernate and RMI. Since RMI requires the use of a Security Policy to make sure that access to the network ...

7. Linux sleep/hibernate predetermined amount of time    stackoverflow.com

Is it possible to have the computer sleep or hibernate for a predetermined amount of time? And if so, how do I do that on Ubuntu?

8. Joda-Time Hibernate PersistentYearMonthDay Deprecated    stackoverflow.com

In looking through the Joda-Time Hibernate user guide it appears that there is no future support for the SQL DATE type. Since TIMESTAMP is specified to start on ...

9. speed up the init time of hibernate    coderanch.com

I use hibernate in my webapp on tomcat. I notice that it takes a lot time to setup my webapp (when i first hit my servlet). It takes about 4 seconds to start tomcat, but it takes 14 seconds to initialize my webapp. Can you please tell me how can I speed up the init time of my web app? Here ...





10. Hibernate 2nd level cache - Real time aplication    coderanch.com

The real reason is because data that changes, and even more importantly changes often, like bank account balances make incredibly bad choices for second level cache. Because the changing data invalidates the cache a lot, and in clustered environment causes a lot of changed data to be updated across all the machines (replicated). This is a huge drain on performance and ...

11. Flush time    forum.hibernate.org

flush time is the point at which the engine decides that it need to synchronize your changes to the db and actually execute the sql. i.e. you could call session.save(object1), session.save(object2), .....session.save(objectn) and if you were tracing the sql you wouldn't actually see any inserts executed. However, if you were to turn around and select from that table with FlushMode.AUTO on ...

12. filter with date time fails    forum.hibernate.org

13. how to get latest result with the time stamp    forum.hibernate.org

I want to write a hibernate query which should return a unique result with the latest time stamp. 6 1/7/2010 9:55:29 PM 6 1/5/2010 2:59:29 PM 6 1/7/2010 2:55:29 PM Imagine I need to query with no. 6 and also the latest time stamp. SO it should return me 6 and 1/7/2010/ 9:55:29 PM as a result.

14. hibernate strange behaviour? returing same row every time.    forum.hibernate.org

Hi all, I have DB View. and using hibernate to retrieve some data from view. I am sending simple query like Code: "from ViewContent where blessUid=1" And it is returning me only 1 same row * count(*).. e.g. like if there are 35 rows then I am getting first row 35 times... is fine or i am missing something??? and exe. ...

15. comparision time --for--hibernate team    forum.hibernate.org





17. TemporalType.TIME with Oracle    forum.hibernate.org

I've a JPA 2.0 entity, with a java.util.Date field mapped to a DATE column in Oracle. The field intended to represent just the time part, so I added the @Temporal(TemporalType.TIME) annotation. I'm using JBoss AS 6.0.0. All is fine when I read the entity because the field contains a java.sql.Time instance. Insteand when I persist the entity to the DB I ...

18. Same date/time returns nothing    forum.hibernate.org

19. two threads hitting the same row @ exactly the same time    forum.hibernate.org

Given that majority of today's systems are at least dualcore systems I'm wondering what might happen if two threads hit the same database row at exactly the same time (with each thread running on a different core) Let's assume I'm using optimistic locking, either by timestamp versioning or increments. Should I take any precautious measures in the case that an entity ...

20. About time hibernate got a real forum    forum.hibernate.org

21. First time user...where begin?!    forum.hibernate.org

It would be a good helper for the Hibernate very newbies users if we can count with a document or tutorial that shows step by step the use of this framework. I was traying to generate the classes and the hbm.xml files from getting the information directly from database using Middlegen...I downloaded Middlegen then I try to find some information about ...

22. QueryException every time!?    forum.hibernate.org

I'm trying to make a query, as shown below: ( ... ) Iterator it = session.find( "select b.mp_fk, b.qtd_actual " + "from a in class test.X, " + "b in class test.Y, " + "c in class test.Z " + "where c.mp_lote_fk = a.id and a.mp_fk = b.mp_fk" ); ( ... ) It keeps giving me : net.sf.hibernate.QueryException: could not resolve ...

23. Hibernate 2.1 beta 6 , is It time to change ?    forum.hibernate.org

This question is "lazy" in Gavin's terms because I did not search all the documentation, just checked it quickly :) I have classes A and B. A lives in TBL_A, B is in TBL_B. B extends A and mapped using As I see, when use I session.delete(objectB), this removes records from both tables. The quesion is: my I control this ...

24. First Time user's questions    forum.hibernate.org

Hi everybody, I apologise if this was asked/answered earlier but I wasn't able to locate the answer I needed in a search, hence this question. I am using Oracle rel.8.1.x and was just testing a sample web-application before I start using Hibernate2 in my project. The application is hosted on Websphere 4.x. When I try to run a simple servlet I ...

25. Hibernate 2.2 Release Time    forum.hibernate.org

26. Time Zone Persistance Issue    forum.hibernate.org

Hello. I am trying to get Hibernate to persist the time zone information in a java Calendar type. I've generated some test code that demonstrates my strategy and reveals the problem. I'm using postgresql version 7.4.2. First, I have a simple class called TimeWithTimeZone that is mapped to a table called time_w_timezone and has a member called testTime that is of ...

27. Time for a change.    forum.hibernate.org

Guys, I have had enough. I am sick of: (1) people demanding free support, and never saying thanks (2) people telling me how to behave in our own community (3) people who are too lazy to read documentation and FAQs (4) people who use our software for free but won't help us by talking about their success, or letting us talk ...

28. Please help me,this took me a week time.    forum.hibernate.org

Newbie Joined: Fri Jun 25, 2004 11:47 pm Posts: 2 tomcat5.09+oracle9.02+hibernate2.12. tomcat/conf/server.xml ---------------------------------------- factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@localhost:1521:daily username dlc password love1234 maxActive 20 maxIdle 10 maxWait -1 ----------------------------------------- tomcat/webapps/hibernate/web-inf/web.xml ...

29. onte-to-one and lazy init (one more time!)    forum.hibernate.org

Hi! I'm trying to make a one-to-one relation between a Person and his PersonData. With the code below it works: Code:

30. Why did not execute two method at same time?    forum.hibernate.org

31. How to get a SessionFactory second time?    forum.hibernate.org

when i using the Hibernate i find a little problem and i nearly make me crazy! The problem is that when i use the following and get a SessionFactory; Configuration conf= new Configuration().addClass(PersonModel.class); sessionFactory = conf.buildSessionFactory(); Session s = sessionFactory.openSession(); Transaction t = s.beginTransaction(); PersonModel p1=new PersonModel(); p1.setName("soso"); p1.setAddress("china"); s.save(p1); t.commit(); s.close(); The first time this goes very well,the person i ...

32. JBoss3.2.3 first time user    forum.hibernate.org

33. Joda-Time: Trouble with basic value types    forum.hibernate.org

Hi, I look after the Joda-Time project ( http://joda-time.sourceforge.net ). We provide a complete replacement for the poor JDK Date and Calendar classes, and are very close to v1.0. We recently had a mail to our list (see bottom) regarding Hibernate integration which I can't help with as I don't use Hibernate. The issue occurred because we made our key class ...

34. Storing time info with millisecond precession. How?    forum.hibernate.org

Right, because java.util.Calendar and is not castable to either java.sql.Timestamp nor java.util.Date. The correct combination should be to use type="calendar" which specifies the Hibernate CalendarType. Both CalendarType and TimestampType map to the JDBC TIMESTAMP type. JDBC defines the TIMESTAMP datatype as having millisecond precision. So if there is a problem getting correct precision from either of these, the problem is with ...

35. First time using Hibernate    forum.hibernate.org

Hibernate version: 2.1 Mapping documents: Project class: ...

36. Date is OK, but Time is zero for type date ?    forum.hibernate.org

I changed the SQL column type from DATE to TIMESTAMP. It works ! Thanks ! But still the type="date" doesnt work. From what i read in hibernate in action, mapping type="date" corresponds with java type java.util.Date and SQL Type DATE, and that's what i really wanted. Still curious if i miss something important while wading through the book and the reference. ...

37. Posting this for the second time....    forum.hibernate.org

38. Need confirmation on required run-time dependencies    forum.hibernate.org

[b]Hibernate version:2.1[/b] We are intending to redistribute Hibernate 2.1 with our product. I would like to get confirmation from the Hibernate team on the minimal set of dependent JARs that must be included in this redistribution and cannot be left out via configuration. Here is my list along with comments [list] Apache DBCP, CP30 or Proxol. Not strictly a requirement since ...

40. Hibernate retrieving data,Having problems with Time datatype    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hi, I'm new to Hibernate. I'm using time datatype as one of the column to store HH:MM. I have defined the column as NULLABLE filed, meaning it can accept null values. When Hibernate tries to retrieve the rows from the table, time columns get NPE(NullPointer) 12:51:58 [ERROR] Error getting value for ...

41. first time user - problem with Hybernateutil class    forum.hibernate.org

Hi I have just started to use hybernate and reading a tutorial "Road to Hybernate" , i built the first application and i am getting a exception i can't make head or tails out of. Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/objectweb/asm/Type java.lang.ExceptionInInitializerError at de.gloegl.road2hibernate.HibernateUtil.(HibernateUtil.java:17) at de.gloegl.road2hibernate.EventManager.main(EventManager.java:11) Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180) at net.sf.cglib.core.KeyFactory.(KeyFactory.java:66) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:321) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005) at de.gloegl.road2hibernate.HibernateUtil.(HibernateUtil.java:13) ... 1 ...

42. Set one-to-many pulling back size of 1 every time.    forum.hibernate.org

I am having a problem with using set mapping in hibernate 3.0 I have a relationship between a sdrl and a schedule. The sdrl can have multiple schedules. I am trying to use a set to get the schedules loaded into the sdrl. Inside my sdrl.xml file I have this: Inside ...

43. How to unuse cache, each time data read from cache    forum.hibernate.org

Question description: first I get the Sysuser and display it in my jsp page, it was correct . then I modify it and submit , the data sava into database successfully. then I get the same Sysuse obj second time. but this time the Sysuser obj is the old data before update. Obviously it invoke the cache obj . Then I ...

45. how to configure hibernate in real time application???    forum.hibernate.org

Hi, I started a new porject, and i want to implement Hibernate with that, i worked with hibernate, but i didnt configured it. i refered hibernate documentaion. those configuration are simple. i want to know how to do it in real time application. i defined HibernateUtil it simply gets the sessionfactory. is it enough?? can i use Interceptor? how it works?? ...

46. date Type (Hibernate type, date & time for Oracle DATE??    forum.hibernate.org

Check if it is an instance of java.sql.Date This class extends java.util.Date but removes the Time part of it, just like java.sql.Time does the other way round. If you want the date including Date and Time you need the type Timestamp on the database. This would the return java.sql.Timestamp which contains Date and Time.

47. GTM Time to local time    forum.hibernate.org

Here's a better alternative. Code: private Date m_dteInternalDate = null; // This is in milliseconds from the epoch, TZ agnositic. private static final TimeZone m_tzUI = TimeZone.getTimeZone("GMT+5"); // Really this should be in the UI layer, and passed into methods in this class private static final Calendar m_Cal = GregorianCalendar.getInstance(m_tzUI); /* This ...

48. Which Java API class for date type data with time zone?    forum.hibernate.org

In this web application, I am currently using the GregorianCalendar class to store a date data. The time zone is set based on the user's location. A date data is not stored corrently in the DB thorough Hibernate. For instance, the date "Sat Apr 08 11:56:38 PDT 2006" with "GMT+08" is saved as "2006-04-07 20:56:38.609-07". It seems the DB always takes ...

49. hibernate-3.2.0.cr1 build-time instrumentation regression?    forum.hibernate.org

Hi All, After upgrading from hibernate-3.1.2 to hibernate-3.2.0.cr1, I hit some problems with lazy loading that I have been trying to track down. One big difference I have noticed in my debugging that looks fishy is the following: I have mappings that contain both lazy properties, and lazy many-to-one proxy associations. In 3.2.0.cr1, all lazy properties *and* lazy many-to-one proxy associations ...

50. Using build time instrumentation    forum.hibernate.org

Hallo, we are using build time instrumentation, because we use field access. I do not understand why Hibernate use runtime instrumentation for classes I instrumented at the build time. We have a big data model and we looses much time at every start of the program. Is it possible to do the runtime instrumentation one time at the build time? Ciao ...

51. joda-time, @Temporal & hibernate 3.2.0    forum.hibernate.org

52. Hibernate Startup Time    forum.hibernate.org

We have had a long standing "inconvenience" with hibernate and its startup time. We have 355 persistent classes (using a class per table approach on a legacy database schema). No, we can't change the schema unfortunately. Some of the tables are large (150+ columns) with upwards of 30 FKs. The startup time (To create and initialize the factory) is 20 Seconds ...

53. ORA-02396: exceeded maximum idle time    forum.hibernate.org

54. Store time, best way    forum.hibernate.org

Hi I need to store time in my DB. I wonder which is the best or recommended way to do it. Should I use timestamps ? Should I use a String representation in a varchar ? I will need to make searches with comparisons with this field so speed for that is important. Thanks in advance C

55. Oracle time zone    forum.hibernate.org

56. with time zone    forum.hibernate.org

57. Compare two Date without time    forum.hibernate.org

Hi Folks, I have a field in my database that is a DateTime(YYYY-MM-DD HH:MM:SS), but I need compare with a Date(YYYY-MM-DD) field in other table, how I do this in a HQL? if a do this: field1 = field2 in HQL the return is false because the time. Someone can help me, Thanks,

58. local time problem    forum.hibernate.org

Hi, I faced a problem with querying for local times in hibernate. Suppose I have a table with a time( without date) field in it. I want to query it for a specific local date. I create a Calendar, set the TimeZone and time; and I expect hibernate to get the time in the specified timezone when setting the parameter for ...

59. idle time    forum.hibernate.org

Author Message ricardomarques Post subject: idle time Posted: Wed Oct 31, 2007 6:00 am Newbie Joined: Fri Jul 20, 2007 7:04 am Posts: 6 Hi guys Here's my problem, when i deploy my web applocation it on a server and leave it idle for a day (don't know sure the time), when a access it through a web browser ...

60. Time and Date Questions    forum.hibernate.org

I have an application where a user can specify when a playlist should be played. Example: Playlist "X-MAS" should be played from 1st Dec. to 26th Dec. Every day from 09:00 AM til 06:00 PM. Therefore I created this mapping: Code: @Column(name = "rps_timestart", nullable = true) private Time timestart = null; @Column(name = "rps_timeend", nullable = ...

61. first time to use Hibernate    forum.hibernate.org

the error Quote: 14:02:19,021 ERROR JDBCExceptionReporter:78 - Communications link failure Last packet sent to the server was 0 ms ago. Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at onlyfun.FirstHibernate.main(FirstHibernate.java:25) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 0 ms ...

62. Pattern discussion : Real time modification    forum.hibernate.org

Hi Hibernate community, I'm relatively new to Hibernate but I'm facing "non standard" problem. A lot of blogs, books and tutorials speak about Hibernate-Spring-[Insert your Web framework here]. But my concern is a bit different, my web framework can simulate a "connected Mode" with Ajax and Reverse Ajax. Like googleDoc, this allows to build "nearly realtime" application : a user modification ...

63. Again the Date and Time Problem    forum.hibernate.org

Hi ppl ! This is a old issue but i couldn't solve yet. I'm using Hibernate 3 and connecting to an Oracle version 8i. Now the problem: I have a DATE type field. (Not TIMESTAMP, this type doesn't exist in this version) I'm trying to map this field to an java.util.Date class. But it only retrieves the date and ignore the ...

64. Processing takes more and more time... Cache/Memory problem?    forum.hibernate.org

Hi there, I have (again) performance problems on one service methods of my applications. I retrieve a huge quantity of instances of one entity. And i process (read from) each entity sequentially (which means as well load the associated entities/associations since i use a lot of lazy loading) At the beginnin, this works quickly (one instance is treated in 100ms), but ...

65. How to decrease the execution time in hibernate    forum.hibernate.org

66. Mysterious time bomb    forum.hibernate.org

This piece of code has been running for some months with any problem until today. I suddenly run into an exception. Since I am unable to explain any causes, I try replacing the find method with the findByNamedParam method. This hack solves the problem. Interesting enough, another version of the same piece code is running fine as I am writing. It ...

67. Mysterious time bomb    forum.hibernate.org

This piece of code has been running for some months with any problem until today. I suddenly run into an exception. Since I am unable to explain any causes, I try replacing the find method with the findByNamedParam method. This hack solves the problem. Interesting enough, another version of the same piece code is running fine as I am writing. It ...

68. Date/Time issue with Oracle and SQLServer 2005    forum.hibernate.org

Hi This problem what i am facing seems to be very trivial , but I am not able to think of Solution after going through All the docs. I have the following hbm/Java code for a table. ...

69. Merging the the new object second time doesn't work    forum.hibernate.org

Newbie Joined: Wed May 07, 2008 11:04 pm Posts: 1 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hello, I'm trying to save a new object (which doesn't exist in database already) in the database using session.merge(). Though it works fine when session.merge() is called only once, it throws exception when session.merge(obj) is called second time. Note that this ...

70. trouble to setup hibernate for the first time    forum.hibernate.org

Hi, I am currently tring to work with Hibernate for the first time, but I alywase get the following exception: Code: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void org.ERPPrototyp.client.RPC.LoginService.login(java.lang.String,java.lang.String) throws org.ERPPrototyp.client.exceptions.AuthenticationException' threw an unexpected exception: org.hibernate.HibernateException: identifier of an instance of org.ERPPrototyp.User was altered from 1 to 1 at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) ...

71. Calculate an average over time    forum.hibernate.org

72. Hibernate returns different data each time is invoked    forum.hibernate.org

org.hibernate.context.ThreadLocalSessionContext false false 8 ...

73. Hibernate dosn't work when app startup for the first time    forum.hibernate.org

Hello all, I am facing a wierd problem with Hibernate. I am developing a Swing application that access MySQL by Hibernate. My developent envioroment is MyEclipse. Everything works fine in MyEclipse. After that use InstallShield to generate a setup.exe for my application. In order to generate the setup.exe, I do the following steps: 1. generate a fatjar file, bill.jar, for instance ...

74. system time changes freezes hibernate    forum.hibernate.org

i ran into a problem while testing something that is comparing something with the system time. so i set the system time one month forward to perform my test. suddenly i can't do any hibernate operation anymore. the program just freezes if i try to save, update or delete an entity from the database. it hangs in the line where i ...