-->
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.  [ 1 post ] 
Author Message
 Post subject: Tomcat and DBCP: Address already in use error
PostPosted: Mon Sep 22, 2003 3:16 pm 
Newbie

Joined: Mon Sep 22, 2003 3:14 pm
Posts: 1
I've been searching everywhere and cant seem to find a solution:
Using Windows XP, JTDS, SQL Server 2000, and Tomcat 4.1.27, Hibernate 2.0.3.

I have a servlet that i call during when i first start tomcat:
The follogin code is used to initiate Hibernate:


private static Properties goDatabaseProperties = null;
private static SessionFactory goSessionFactory = null;

goDatabaseProperties = new Properties();
goDatabaseProperties.setProperty
( "hibernate.connection.datasource", "java:comp/env/jdbc/ReportMill" );
goDatabaseProperties.setProperty
( "hibernate.dialect", "net.sf.hibernate.dialect.SybaseDialect" );
goDatabaseProperties.setProperty( "hibernate.show_sql", "true" );

Configuration config = new Configuration();
config.addClass( com.database.UserAccounts.class);
config.addProperties( goDatabaseProperties );
goSessionFactory = config.buildSessionFactory();

Its seems to works b/c even in the sql profiler i see the validating query i
put in tomcat being executed:
But here is the output:
Sep 22, 2003 11:25:10 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.0.3
Sep 22, 2003 11:25:10 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Sep 22, 2003 11:25:10 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Sep 22, 2003 11:25:10 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: JVM proxy support: true
Sep 22, 2003 11:25:10 AM net.sf.hibernate.cfg.Configuration addClass
INFO: Mapping resource: com/report_mill/database/UserAccounts.hbm.xml
Sep 22, 2003 11:25:11 AM net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: com.report_mill.database.UserAccounts -> User_Accounts
Sep 22, 2003 11:25:11 AM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
Sep 22, 2003 11:25:11 AM net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
Sep 22, 2003 11:25:11 AM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Sep 22, 2003 11:25:12 AM net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.SybaseDialect
Sep 22, 2003 11:25:12 AM net.sf.hibernate.util.NamingHelper getInitialContext
INFO: JNDI InitialContext properties:{}
Sep 22, 2003 11:25:12 AM
net.sf.hibernate.connection.DatasourceConnectionProvider configure
INFO: Using datasource: java:comp/env/jdbc/ReportMill
Sep 22, 2003 11:25:12 AM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: Use outer join fetching: true
DBCP borrowObject failed: java.sql.SQLException: Address already in use: connect
Error
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Address already
in use: connect


I cant seem to find any solution for the "Address already in use" error. This
doesnt seem to be a tomcat port issue its more of a database issue.

Has anyone ever seen this problem and fixed it.





Code:
Code:


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.