-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
 Post subject: ..cannot retrieve data without internet connection :(
PostPosted: Tue Jun 14, 2005 9:49 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
....can anyone help me with problem?...when im not connected to the internet the JSP page is not working..but when im connected to the internet it display well annd i retrieve data from MySQL..what should i do to solve this problem. :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 10:34 am 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
Two areas I can suggest you look at:

1) DNS, does any part of your system require DNS to connect to something, for example:

Web Browser -> Website
Website -> Bind to Address (127.0.0.1:80)
Website -> Jakarta
Jakarta -> Bind to Address (127.0.0.1:800#)
Website -> Connect to MySQL
MySQL -> Bind to Address (127.0.0.1:3306)

Can you ping each of the components with the internet is down ?

Can your system resolve the IPs when the internet is down ? (on unix, Check our /etc/hosts and /etc/host.conf)


2) Is your whole site working on loopback (127.0.0.1) ? You have MySQL server running on loopback IP ? You have Website running on loopback ?


Top
 Profile  
 
 Post subject: ...reply
PostPosted: Tue Jun 14, 2005 10:58 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
1) DNS, does any part of your system require DNS to connect to something, for example:

Web Browser -> Website
Website -> Bind to Address (127.0.0.1:80)
Website -> Jakarta
Jakarta -> Bind to Address (127.0.0.1:800#)
Website -> Connect to MySQL
MySQL -> Bind to Address (127.0.0.1:3306)

Can you ping each of the components with the internet is down ?-i cannot ping this components when the internet is down..

Can your system resolve the IPs when the internet is down ? (on unix, Check our /etc/hosts and /etc/host.conf)


2) Is your whole site working on loopback (127.0.0.1) ? You have MySQL server running on loopback IP ? You have Website running on loopback ?
---------> YES, MySQL is using that IP..YAP...
---im using a dial-up modem...
this id my hibernate.cfg.xml :

<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/estore</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

what should i do?i cannot use the phone for internet during my development process...


Top
 Profile  
 
 Post subject: ...reply
PostPosted: Tue Jun 14, 2005 11:16 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
..i can 127.0.0.1 even when the internet is down...what this does mean?how do i configure now my system?..tnx.


Top
 Profile  
 
 Post subject: ...reply
PostPosted: Tue Jun 14, 2005 11:17 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
..i can ping 127.0.0.1 even when the internet is down...what this does mean?how do i configure now my system?..tnx.[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 12:32 pm 
Newbie

Joined: Mon Jun 06, 2005 9:38 am
Posts: 4
Have you found the solution..?

Just thinking aloud. Is there a hibernate exception thrown? Something related to the hibernate DTD ?


Top
 Profile  
 
 Post subject: ---reply
PostPosted: Tue Jun 14, 2005 9:18 pm 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
...i have not solve my problem.but there is a error throw HttpClient.class was not found and there is a dtd error like http://hibernate.sourceforge.net/hibern ... on-2.0.dtd
What does this means?do i really to connect to the internet in order to run my application?in what ways i can solve my problem even im not connected to the internet?..tnx


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 9:28 pm 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
Smells like its trying to get a copy of the DTD from its URL. Where are you running the application from ? and IDE (Eclipse?). I know that Java IDEs can provide assistance when editing from the files DOCTYPE, but I would not expect this to stop an application working, especially when the application is trying to access its own DTD.


New avenues:

1) As you sure its hibernate throwing out the error and not your IDE ?

2) Can you disable DTD checking within hibernate ?

3) Maybe you can install the DTD into a place where hibernate can access it (rather than trying to download a copy everytime).


FYI at least my point 3 seems to be covered in my installed copy of 3.0.2:

Code:
jar -tvf ../WEB-INF/lib/hibernate3.jar | grep dtd
  1972 Wed Apr 27 11:26:54 BST 2005 org/hibernate/hibernate-configuration-3.0.dtd
40234 Wed Apr 27 11:26:54 BST 2005 org/hibernate/hibernate-mapping-3.0.dtd


Top
 Profile  
 
 Post subject: ---reply
PostPosted: Tue Jun 14, 2005 11:00 pm 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
...i try to put the DTD's where hibernate can access so that i can test wether hibernate or IDE(eclipse 3.0.1) has occuring that error..i'll just post a report after my testing..tnx a lot


Top
 Profile  
 
 Post subject: ---reply
PostPosted: Wed Jun 15, 2005 1:13 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
...im running my application in a Windows XP platform and Eclipse 3.0.1..MySQL 3.23.58 and jakarta tomcat 5.0.28.

1) As you sure its hibernate throwing out the error and not your IDE ? --->hibernate is throwing out error HttpClient.class cannot be found

2) Can you disable DTD checking within hibernate ?--->i dont know to disable DTD checking

3) Maybe you can install the DTD into a place where hibernate can access it (rather than trying to download a copy everytime). --> i installed the DTD to WEB-INF/lib but i doesnt and i put in WEB-INF/src also i doesnt work.

What are my other options to solve my problem?..of course i want to continue my project.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 5:18 am 
Newbie

Joined: Mon Jun 13, 2005 2:19 am
Posts: 5
what hibernate version are you using ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 5:45 am 
Regular
Regular

Joined: Tue Nov 23, 2004 7:42 am
Posts: 82
Location: London, England
The problem here is you are using a Hibernate 2.0 configuration file with Hibernate 3.0.

In hibernate.cfg.xml change
Code:
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

to
Code:
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">


Top
 Profile  
 
 Post subject: --reply
PostPosted: Wed Jun 15, 2005 11:55 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
but i still need a internet connection...i try this configuration:

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://localhost:8080/crm/hibernate-configuration-3.0.dtd">

but there is a error say that: "-//Hibernate/Hibernate Configuration DTD//EN" ->this line should be in well-formed format.

What configuration i should do so that it has no error and my application run without internet connection..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 12:27 pm 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
If you use the standard hibernate doctype declarations, hibernate uses a customised EntityResolver that looks in the hibernate3.jar for the DTD's before falling back on the internet location. So use the standard doctypes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 12:54 pm 
Beginner
Beginner

Joined: Wed Aug 11, 2004 3:50 pm
Posts: 26
CollinL wrote:
If you use the standard hibernate doctype declarations, hibernate uses a customised EntityResolver that looks in the hibernate3.jar for the DTD's before falling back on the internet location. So use the standard doctypes.


And for those of us that for burro-cratic reasons can't move up to 3.0, how do you accomplish this with Hibernate 2.x?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.