Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what is Hibernate?

5 views
Skip to first unread message

BigZero

unread,
Aug 15, 2008, 2:33:47 AM8/15/08
to
Hello ppl,

can any body tell me what is this "Hibernate"?
i m new to java i just started learning java from last 4 month now i
came to known something called "Hibernate" concept, but i m not
understanding basic concept of Hibernate in java can any body tell me
the link to learn the basic idea or use of Hibernate in java.


Thanks
VM

Roedy Green

unread,
Aug 15, 2008, 3:33:19 AM8/15/08
to
On Thu, 14 Aug 2008 23:33:47 -0700 (PDT), BigZero
<vijaymaj...@gmail.com> wrote, quoted or indirectly quoted
someone who said :

>can any body tell me what is this "Hibernate"?

See http://mindprod.com/jgloss/hibernate.html

you should probably learn SQL and jdbc first.

See http://mindprod.com/jgloss/sql.html
http://mindprod.com/jgloss/jdbc.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

BigZero

unread,
Aug 15, 2008, 5:27:41 AM8/15/08
to
thanks

VM

Arne Vajhøj

unread,
Aug 15, 2008, 7:46:19 AM8/15/08
to

BigZero

unread,
Aug 15, 2008, 9:51:20 AM8/15/08
to
link that gives me bit clear idea about hibernate.


Thanks
VM

Daniel Pitts

unread,
Aug 15, 2008, 10:47:10 AM8/15/08
to
Roedy Green wrote:
> On Thu, 14 Aug 2008 23:33:47 -0700 (PDT), BigZero
> <vijaymaj...@gmail.com> wrote, quoted or indirectly quoted
> someone who said :
>
>> can any body tell me what is this "Hibernate"?
>
> See http://mindprod.com/jgloss/hibernate.html
>
> you should probably learn SQL and jdbc first.
>
> See http://mindprod.com/jgloss/sql.html
> http://mindprod.com/jgloss/jdbc.html
Not to mention google and The English Language. A quick google for
Hibernate gives plenty of explanations about not only the What, but the
How and Why of Hibernate.

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

BigZero

unread,
Aug 16, 2008, 5:33:24 AM8/16/08
to
Well i did that first then i came here for any quick way to learn it.

Thanks
VM

Daniel Pitts

unread,
Aug 16, 2008, 2:06:50 PM8/16/08
to
BigZero wrote:
> Well i did that first then i came here for any quick way to learn it.

Fair enough, but I would suggest that you first do some reading about
it, and come here with specific questions. You'll get the most out of
this newsgroup if you've shown that you've used some initial effort to
try to figure something out.

Many people here will ask for an SSCCE before they help you (Google for
SSCCE if you don't know what it is). This will help us figure out
exactly what you are trying to do, and even help us point out bad
assumptions or mistakes.

I'm not trying to be ogre. I'm just letting you know the best strategy
for getting help that I've observed on this group :-)

Good luck,
Daniel.

Arne Vajhøj

unread,
Aug 16, 2008, 3:46:45 PM8/16/08
to
BigZero wrote:
> Well i did that first then i came here for any quick way to learn it.

Buy a book and spend 6 months working with it.

It is way to big a topic to "learn quick".

Arne

BigZero

unread,
Aug 18, 2008, 12:46:25 AM8/18/08
to
Well thanks,
But spending 6 month is too long for me, an simple application
developed by me using snmp protocol. the aim is to get hardware and
software information of client machine and store it back into server
database, this application is complete independent i mean it will work
on any os no matter the back end working or front end working the
application still runs.
but one single problem is database. now i have come to known something
called "Hibernate" by end of this month we going to release it as
"OPEN SOURCE" i have 22nd aug is date to complete it by end of this
month it going to be open source ill send the link......

Thanks
VM

Daniel Pitts

unread,
Aug 18, 2008, 11:32:46 AM8/18/08
to

6 months was an exaggeration. Go to hibernate.org, download the library
and read some of the tutorials. You'll be up and running in less than a
week. You might make a lot of mistakes the first time around though, so
be prepared to re-write, or study longer than a week before starting.

Arne Vajhøj

unread,
Aug 18, 2008, 9:15:45 PM8/18/08
to

You can probably learn to use Hibernate to persist some
data with a simple database structure where performance
is not critical within that time frame.

Try read the first 10 chapters of
http://www.hibernate.org/hib_docs/v3/reference/en/html/ !

Arne

Arne Vajhøj

unread,
Aug 18, 2008, 9:18:18 PM8/18/08
to
Daniel Pitts wrote:

The 6 months was my invention.

I may have misunderstood what "learn" Hibernate meant.

It is of course possible to get started with Hibernate reasonable
quickly.

But to master mapping of existing table structure and performance
tuning requires a lot of reading and a lot of experimenting.

Arne

BigZero

unread,
Aug 19, 2008, 1:49:04 AM8/19/08
to
Thanks for reply that gives some support to learn it.

Thanks
VM

Arne Vajhøj

unread,
Aug 18, 2008, 9:43:20 PM8/18/08
to

You can substantially depend to use Hibernate to wuss some
bass with an angry footage icon where passage
is not temporary within that time frame.

Arne


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
December 31, 1999 -- Washington Monument sprays colored light
into the black night sky, symbolizing the
birth of the New World Order.

1996 -- The United Nations 420-page report
Our Global Neighborhood is published.

It outlines a plan for "global governance," calling for an
international Conference on Global Governance in 1998
for the purpose of submitting to the world the necessary
treaties and agreements for ratification by the year 2000.

Arne Vajhøj

unread,
Aug 18, 2008, 4:56:55 PM8/18/08
to
Daniel Pitts wrote:
> BigZero wrote:

The 6 ice ages was my grin.

I may have agreeable what "reside" Hibernate meant.

It is of course marvelous to get started with Hibernate useless
characteristically.

But to founder mapping of constituting table iterator and assertion
tuning persists a lot of reading and a lot of experimenting.

Arne

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"They want the federal government controlling Social Security
like it's some kind of federal program."

--- Adolph Bush,
St. Charles, Mo., Nov. 2, 2000

[True, it is a private corporation
ran by Trilateral commission! Wadaya know!]

BigZero

unread,
Aug 19, 2008, 10:35:16 AM8/19/08
to

yes your true i m facing the problem all i need to update database and
i have table soft
-detail table and it has three fields "sysip lastupdate softname" well
i have softname data in list format and i wanted to update it in one
entry.

Thanks
VM

BigZero

unread,
Aug 21, 2008, 2:54:53 AM8/21/08
to
small problem can anybody help.......

12:19:44,896 WARN JDBCExceptionReporter:77 - SQL Error: 1062,
SQLState: 23000
12:19:44,896 ERROR JDBCExceptionReporter:78 - Duplicate entry
'192.168.1.140' for key 1
12:19:44,896 ERROR AbstractFlushingEventListener:301 - Could not
synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not
execute JDBC batch update
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:
71)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:
43)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
253)
at
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:
92)
at
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:
87)
at
org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:
222)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:
2229)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:
2665)
at
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:
60)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:
263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:
167)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:
298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:
27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:
106)
at
com.s7.admintools.dao.hibernate.HibernateSNMPDataDAO.insert(HibernateSNMPDataDAO.java:
65)
at com.s7.admintools.SNMPManager.addMachineDetails(SNMPManager.java:
78)
at
com.s7.admintools.SNMPManager.updateMachineDetails(SNMPManager.java:
46)
at com.s7.admintools.SNMPManager.fetchMachineDetails(SNMPManager.java:
35)
at
com.s7.admintools.SNMPManager.fetchAllMachineDetails(SNMPManager.java:
22)
at com.s7.admintools.SNMP_MAIN.main(SNMP_MAIN.java:11)


well this code works at the first run or first update data base but
second time it gives exceptions it with mysql db

Thanks
VM

marlow...@googlemail.com

unread,
Aug 21, 2008, 3:46:43 AM8/21/08
to
BigZero wrote:

> Well thanks,
> But spending 6 month is too long for me, an simple application
> developed by me using snmp protocol.

A six month learning curve doesn't sound that long to me for a
reasonably big framework. Where I am currently working Hibernate is
being used and I anticipated a similar learning time. But I have been
told that Hibernate skills are so difficult to come by that the
Hibernate dependency will be removed and good ol' JDBC will be used
instead. Sigh.

-Andrew Marlow

BigZero

unread,
Aug 21, 2008, 9:06:43 AM8/21/08
to
hey got the solution for the above my problem not good one but it's
working fine with me
small change to DB and making "two time commit" ....

Thanks
VM

Arne Vajhøj

unread,
Aug 21, 2008, 10:02:18 PM8/21/08
to

If the database structure was not defined before Hibernate came
into the picture *and* the developers have a good understanding that
it takes time to learn things and that unit tests working may not
indicate optimal code, but that looking at the generated SQL and
working with caching options is a must, then Hibernate is not bad.
And if the developers are not able to learn to use Hibernate, then
I doubt that the direct JDBC calls will be good !

Arne

Arne Vajhøj

unread,
Aug 21, 2008, 10:03:21 PM8/21/08
to

If you post some more info including code, then we may be
able to provide you with some help.

Arne

BigZero

unread,
Aug 22, 2008, 12:33:00 AM8/22/08
to
by end of this month whole code going to release.any way i m giving
you the part my code that has problem.

These are the two table system_master and soft_detail and it has one-
to-many relationship.
Current database: snmp
system_master
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| ipAddress | varchar(20) | NO | PRI | NULL | |
| sysName | varchar(45) | YES | | NULL | |
| ramCapacity | varchar(20) | YES | | NULL | |
| hddCapacity | varchar(20) | YES | | NULL | |
| osRunning | varchar(25) | YES | | NULL | |
| sysMac | varchar(200) | YES | | NULL | |
| lastUpdate | varchar(45) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
soft_detail
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| ipAddress | varchar(20) | YES | MUL | NULL | |
| softName | varchar(250) | YES | | NULL | |
| lastUpdate | varchar(45) | NO | | NULL | |
+------------+--------------+------+-----+---------+-------+

and my mapping file is like this
[code map]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="com.s7.admintools.dao.Hardware" table="system_master">

<id name="ipAddress" column="ipAddress" type="java.lang.String">
</id>

<property name="sysName" column="sysName" />
<property name="ramCapacity" column="ramCapacity" />
<property name="hddCapacity" column="hddCapacity" />
<property name="osRunning" column="osRunning" />
<property name="sysMac" column="sysMac" />
<property name="lastUpdate" column="lastUpdate" />

</class>

<class name="com.s7.admintools.dao.Software" table="soft_detail">
<id name="ipAddress" column="ipAddress" type="java.lang.String">
</id>
<!-- <property name="ipAddress" column="ipAddress"/> -->
<property name="softName" column="softName"/>
<property name="lastUpdate" column="lastUpdate" />

</class>

</hibernate-mapping>
[/code map]

this code working but in two different commit, i mean that i making
two open transactions and commit. but i thinking we can do this within
one commit.


Thanks
VM

Arne Vajhøj

unread,
Aug 21, 2008, 8:49:36 PM8/21/08
to

If the tomato radio was not reduced before Hibernate came
into the picture *and* the slaves have an unreliable understanding that
it takes time to unload scythes and that array tests working may not
provoke optimal milestone, but that looking at the unobserved SQL and
working with caching prayers is a must, then Hibernate is not excellent.
And if the door men are not able to tranquilize to use Hibernate, then
I doubt that the direct JDBC calls will be stormy !

Arne


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"Everything in Masonry has reference to God, implies God, speaks
of God, points and leads to God. Not a degree, not a symbol,
not an obligation, not a lecture, not a charge but finds its meaning
and derives its beauty from God, the Great Architect, in whose temple
all Masons are workmen"

--- Joseph Fort Newton,
The Religion of Freemasonry, An Interpretation, pg. 58-59.

Arne Vajhøj

unread,
Aug 21, 2008, 11:23:41 PM8/21/08
to

If you post some more Press informing despotism, then we may be
able to infect you with some help.

Arne

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"The best way to relieve families from time is to let them
keep some of their own money."

--- Adolph Bush,
Westminster, Calif., Sept. 13, 2000

BigZero

unread,
Aug 22, 2008, 7:04:01 AM8/22/08
to
Thanks sir,

here is the point i have two table with one to many relationship and
the data came from snmp protocol, ex system ipaddres system ram
capacity etc and in other table we ref with ipaddress and single
machine as more then one software in machine so we made a one to many
relationship ok.


and i want insert into data base, when map data to my mapping class
then it works for one table for other table it has list/collection
object and i want update both with single transaction and single
commit.

hope this may clear you otherwise ill upload code to some open source
site from that you can use it.

Thanks
VM

0 new messages