-->
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.  [ 9 posts ] 
Author Message
 Post subject: Error Under Artifact Generation - Getting Database MetaData
PostPosted: Mon Jul 04, 2005 12:15 pm 
Newbie

Joined: Mon Jul 04, 2005 11:26 am
Posts: 1
When doing the reverse engineer from JDBC connection, I got the following error:
Error under artifact generation
Reason:
org.hibernate.exception.GenericJDBCException:Getting database metadata.

I set hibernate.default_schema too.

Thanks in advance.

Richard


Top
 Profile  
 
 Post subject: 3.0a4
PostPosted: Mon Jul 04, 2005 4:30 pm 
Beginner
Beginner

Joined: Fri Feb 20, 2004 6:15 pm
Posts: 38
Are you using 3.0a4? For some reason, the Eclipse update site only downloads 3.0a2. I had a lot of problems with it, but a4 is working much better.

You can manually download it from sourceforge.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 4:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
for reasons explained many times in the forum we cannot provide an update site at the moment because eclipse does not bump up their version numbers (meaning your eclipse would download the latest version of hibernate plugin, but not the latest version of the WTP plugins - stupid!)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: org.hibernate.exception.GenericJDBCgetting database metadata
PostPosted: Fri Apr 13, 2007 6:11 pm 
Newbie

Joined: Fri Apr 13, 2007 6:03 pm
Posts: 3
Hi,
I am new to Hibernate and am trying to run the reverse engineering task using ANT.
I am using Oracle 9.2.0.5 along with the latest oracle drivers found in ojdbc14.jar and am using Hibernate 3.2. I am getting the above exception in addition to this: java.sql.SQLException: invalid arguments in call

My ant file snippet is:

<!-- Enable the HibernateToolTask -->
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="project.classpath"/>

<!-- Generate XML metadata mappig files from database schema -->
<target name="reveng.hbmxml"
description="Read database, generate XML mapping files">

<hibernatetool destdir="${src.java.dir}">
<jdbcconfiguration
propertyfile="${basedir}/helloworld.db.properties"/>
<hbm2hbmxml/>
<hbm2cfgxml/>
</hibernatetool>

</target>

I was able to export the schema in another example and hence am confident that the username/password work along with the connection URL and Driver.

Can you please tell me what I am doing wrong?

Thanks in advance.

Sachin


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 2:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not anyway near enough information to help you.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: more details
PostPosted: Mon Apr 16, 2007 12:26 pm 
Newbie

Joined: Fri Apr 13, 2007 6:03 pm
Posts: 3
Sorry for that. Let me add more details of the exception.

Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.2.0.cr5
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernatetool] INFO: Bytecode provider name : cglib
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: Using Hibernate built-in connection pool (not for production use!)
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: Hibernate connection pool size: 20
[hibernatetool] Apr 16, 2007 9:21:39 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: autocommit mode: false
[hibernatetool] Apr 16, 2007 9:21:40 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@svc-db01:1521:xtap9
[hibernatetool] Apr 16, 2007 9:21:40 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: connection properties: {user=test_ss}
[hibernatetool] Apr 16, 2007 9:21:40 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] WARNING: Could not obtain connection metadata
[hibernatetool] java.sql.SQLException: invalid arguments in call
[hibernatetool] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
[hibernatetool] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
[hibernatetool] at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
[hibernatetool] at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:184)
[hibernatetool] at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
[hibernatetool] at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
[hibernatetool] at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:525)
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[hibernatetool] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[hibernatetool] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
[hibernatetool] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1929)
[hibernatetool] at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:38)
[hibernatetool] at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:82)
[hibernatetool] at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:287)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:303)
[hibernatetool] at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
[hibernatetool] at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:171)

I am sorry for the data dump but dont know what specific information i should provide.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 12:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
looks like like a connection or driver problem.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: connection or driver?
PostPosted: Mon Apr 16, 2007 1:41 pm 
Newbie

Joined: Fri Apr 13, 2007 6:03 pm
Posts: 3
I am using the driver when I export the schema and then run the application to save and retrieve data.

When you say it could be a driver problem could you mean that it does not allow the ability to retrieve meta data? Or is it even more upstream that it is not allowing to make the connection. If it is the latter, then how does it allow to export the schema and run the application.

Thanks.


Top
 Profile  
 
 Post subject: Re: connection or driver?
PostPosted: Tue Apr 17, 2007 1:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sachinshah wrote:
I am using the driver when I export the schema and then run the application to save and retrieve data.


From hibernate tools in eclipse or in a seperate tool ? (hibernate core or hibernate tool ant tasks?)

Quote:
When you say it could be a driver problem could you mean that it does not allow the ability to retrieve meta data? Or is it even more upstream that it is not allowing to make the connection. If it is the latter, then how does it allow to export the schema and run the application.

Thanks.


The exception occurs when login is attempted; did you remember to put both user and password and a proper uril in the settings ?

_________________
Max
Don't forget to rate


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