-->
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.  [ 6 posts ] 
Author Message
 Post subject: MiddlegenException Connection refused
PostPosted: Mon Oct 17, 2005 1:46 am 
Beginner
Beginner

Joined: Wed Oct 12, 2005 8:52 am
Posts: 23
Hello,
I am trying to run middlegen against the oracle 9i db and the following error occurs:

Code:
C:\dev\middlegen-2.1\samples\build.xml:228: middlegen.MiddlegenException: Couldn't connect to database: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093120)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))


The following is my config properties:

Code:
  <property environment="env"/>

   <property name="database.script.file"           value="${src.dir}/sql/${name}-oracle.sql"/>
   <property name="database.driver.file"           value="${env.ORACLE_HOME}/jdbc/lib/classes12.jar"/>
   <property name="database.driver.classpath"      value="${database.driver.file}"/>
   <property name="database.driver"                value="oracle.jdbc.driver.OracleDriver"/>
   <property name="database.url"                   value="jdbc:oracle:thin:@999.99.999.99:1521:db1"/>
   <property name="database.userid"                value="user"/>
   <property name="database.password"              value="pass"/>
   <property name="database.schema"                value=""/>
   <property name="database.catalog"               value=""/>

   <!--property name="jboss.datasource.mapping"       value="Oracle7"/-->
   <!--property name="jboss.datasource.mapping"       value="Oracle8"-->
   <property name="jboss.datasource.mapping"       value="Oracle9i"/>


Hibernate version:
3

Name and version of the database you are using:
Oracle 9i


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 2:37 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
what happens when you use that URL w/ plain JDBC? what does Oracle say about ERR=12505 ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 3:27 am 
Beginner
Beginner

Joined: Wed Oct 12, 2005 8:52 am
Posts: 23
Thanks,

I just saw that the address of the machine was changed. I can connect now but the following error message is now displayed:

Quote:
middlegen.MiddlegenException: Middlegen successfully connected to the database, but couldn't find any tables. Perhaps the specified schema or catalog is wrong? -Or maybe there aren't any tables in the database at all?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 11:52 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I had this problem w/ oracle once. I ended up manually putting all of the table names in the middlegen conf file. this actually won't take long if you can do a select on one of the meta tables and pass it through sed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 7:42 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Most likely you need to include the schema your tables are in for it to pick them up.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 18, 2005 5:20 am 
Beginner
Beginner

Joined: Wed Oct 12, 2005 8:52 am
Posts: 23
Yes I expilicitly provided the schema name. It works fine now. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.