• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bean.xml ConnectException-Connection timed out: connect

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I'm very new to Spring and trying to enhance a Java program on Eclipse and connected to Oracle database.
This is my first time ever for posting on forums, any help is much appreciate!!!

I have a jobmgmt_beans.xml file and it's in the same package with all the other classes under src/net.JavaCodeEnhancement inside Eclipse.
There is always a red little cross mark on the jobmgmt_beans.xml file icon, and when open this file, it shows ConnectException-Connect timed out: connect at the bottom of eclips .Does anyone has any idea on what is causing the error ?

I'm currently using eclipse 3.3.1.1 and Spring framework 3.0.5

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>mars-beans.properties</value>
<value>mars-password.properties</value>
</list>
</property>
</bean>

<bean id="PoolingDAO"
init-method="decrypt"
class="net.CodeEnhancement.jdbcDAO" >
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="key" value="${key}" />
<property name="url" value="${db.url}" />
<property name="username" value="${db.username}" />
<property name="password" value="${db.password}" />
<property name="connCache" value="true" />
<property name="connCacheProperties">
<props>
<prop key="MaxStatementsLimit">100</prop>
<prop key="PropertyCheckInterval">60</prop>
</props>
</property>
</bean>

<bean id="DBHelperBean" class="net.CodeEnhancement.DBHelper">
<property name="db"><ref local="PoolingDAO"/></property>
<property name="schemaName" value="${db.schema}" />
</bean>

</beans>

 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

What "JobMgmt.JOBMGT_BEANS_FILE" referes to? And tell us how you run the application and your file structure etc...
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
make sure that the file "jobmgmt_beans.xml" is on classpath, i.e if you are using Eclipse then it should resides under "bin" dir.
 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vijitha Kumara wrote:Welcome to CodeRanch!

What "JobMgmt.JOBMGT_BEANS_FILE" referes to? And tell us how you run the application and your file structure etc...



Hi, thanks for your reply !

I've solved the file not exist error for calling "JobMgmt.JOBMGT_BEANS_FILE" inside the main, JOBMGT_BEANS_FILE was defined at the top of main:
public static final String JOBMGMT_BEANS_FILE = "jobmgmt_beans.xml";

but I'm still having that little red cross icon on my jobmgmt_beans.xml file
It still stated that is the ConnectException-connect time out: connect

I'm thinking could the problem caused by
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN //EN" "http://www.springframework.org/dtd/spring-beans.dtd">
inside the .xml file?
as I'm using sping 3x, is that the right dtd ?
 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sagar Rohankar wrote:make sure that the file "jobmgmt_beans.xml" is on classpath, i.e if you are using Eclipse then it should resides under "bin" dir.


Hi,
It works when it is in the bin, thanks
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sze sze chan wrote:
I'm thinking could the problem caused by
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN //EN" "http://www.springframework.org/dtd/spring-beans.dtd">
inside the .xml file?
as I'm using sping 3x, is that the right dtd ?


This is the one I used in my project, try this:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
OR I suspect the proxy problem if you're inside the network. The eclipse is trying tho access that DTD link but somehow not able to reach. Check you network connection in Eclipse.
 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sagar Rohankar wrote:

sze sze chan wrote:
I'm thinking could the problem caused by
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN //EN" "http://www.springframework.org/dtd/spring-beans.dtd">
inside the .xml file?
as I'm using sping 3x, is that the right dtd ?


This is the one I used in my project, try this:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
OR I suspect the proxy problem if you're inside the network. The eclipse is trying tho access that DTD link but somehow not able to reach. Check you network connection in Eclipse.



Hi, i've tried the dtd link it still doesn't work.....
and I went to the eclipse network connection, it was set to "Direct connection to internet" and the proxy is by default, it's blank inside the manual proxy configuration. Do I need to set anything for proxy ?
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sze sze chan wrote:Do I need to set anything for proxy ?


Only if you're inside the proxy network.
 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sagar Rohankar wrote:

sze sze chan wrote:Do I need to set anything for proxy ?


Only if you're inside the proxy network.



hi ,
i've set the HTTP proxy and SSL proxy, which are the proxy and port.
but everytime i set it it has error : org.eclipse.core.runtime.AssertionFailedException:assertion failed;
any idea on what it this? btw, the red cross of jobmgmt_beans.xml is still there

thanks for your help
 
author
Posts: 422
13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The DTD is *so* Spring 1.0.

Start with the following, then fill in the blanks:

 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Craig Walls wrote:
The DTD is *so* Spring 1.0.

Start with the following, then fill in the blanks:



thank you for your reply, now the little cross mark is gone :jumpingjoy
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic