-->
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.  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Artifact generation gives no output, no errors seen.
PostPosted: Fri Feb 04, 2005 11:45 pm 
Newbie

Joined: Fri Feb 04, 2005 11:09 pm
Posts: 9
Hello,
I am trying to use Hibernate tools 3.0 alpha1 to reverse engineer hbm.xml and POJO code. I am using Oracle 9.1.x database with Eclipse-SDK-3.1M4-win32.
I created a source folder called 'DataAccess' below the Project root of 'TestJavaProject'. I run the Hibernate Artifact generation from the DataAccess folder but get only one file generated in the output directory. The only file that was generated was GeneralHbmSettings.hbm.xml

I have the following entries in the hibernate.cfg.xml file, which is stored in the TestJavaProject level:

Code:
<property name="hibernate.connection.username">userid</property>
        <property name="hibernate.connection.password">passwd</property>
        <property name="hibernate.default_schema">userid</property>   
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@cpsdev08:30516:CADABC1</property>
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>

To get around the Oracle driver not found error, I had to copy the classes12.zip file also in the TestJavaProject (from the c:\Oracle\jdbc\lib) since this file contains the class for
Code:
oracle.jdbc.driver.OracleDriver
.

Every time I run the artifact generation, it runs successfully without any message but just generates the GeneralHbmSettings.hbm.xml file.

Any help or pointers would be most appreciated.

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 05, 2005 2:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
does your user have priveligies to access database metadata ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 7:59 am 
Beginner
Beginner

Joined: Fri Sep 24, 2004 8:18 am
Posts: 24
max wrote:
does your user have priveligies to access database metadata ?


Well, I have similar problem, no code generated, even :
1. using scott/tiger as userid/password
2. using Oracle JDBC driver ojdbc14.jar
3. specify default_schema and/or default_catalog as scott

Any help at all ?

Thanks,
nusa.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 1:53 pm 
Beginner
Beginner

Joined: Fri Sep 24, 2004 8:18 am
Posts: 24
max wrote:
does your user have priveligies to access database metadata ?


Hi,

The error I got is the following :
Code:
!ENTRY org.eclipse.core.runtime 4 2 2005-02-06 00:56:47.213
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
   at org.hibernate.eclipse.console.HibernateConsoleSaveParticipant.doneSaving(HibernateConsoleSaveParticipant.java:67)
   at org.eclipse.core.internal.resources.SaveManager.executeLifecycle(SaveManager.java:309)
   at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:138)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
   at org.eclipse.core.runtime.Platform.run(Platform.java:747)
   at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle(SaveManager.java:141)
   at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:964)
   at org.eclipse.core.internal.resources.DelayedSnapshotJob.run(DelayedSnapshotJob.java:45)
   at org.eclipse.core.internal.resources.SaveManager.shutdown(SaveManager.java:1107)
   at org.eclipse.core.internal.resources.Workspace.close(Workspace.java:303)
   at org.eclipse.core.resources.ResourcesPlugin.shutdown(ResourcesPlugin.java:335)
   at org.eclipse.core.internal.compatibility.PluginActivator.stop(PluginActivator.java:80)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:994)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:990)
   at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:498)
   at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop(AbstractBundle.java:437)
   at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles(BundleStopper.java:73)
   at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles(BundleStopper.java:62)
   at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping(EclipseAdaptor.java:551)
   at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:457)
   at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run(SystemBundle.java:182)
   at java.lang.Thread.run(Thread.java:595)


Any idea, suggestion, help ?

Thanks,
nusa


Top
 Profile  
 
 Post subject: I think this is schema setting problem
PostPosted: Sun Feb 06, 2005 9:30 pm 
Newbie

Joined: Fri Feb 04, 2005 3:24 am
Posts: 6
If there are many schemas on your database,you must set the one is default.
the property maybe like this.

<property name="hibernate.default_schema">[Your schema name here]</property>


Top
 Profile  
 
 Post subject: Re: I think this is schema setting problem
PostPosted: Mon Feb 07, 2005 5:45 am 
Beginner
Beginner

Joined: Fri Sep 24, 2004 8:18 am
Posts: 24
billyu wrote:
If there are many schemas on your database,you must set the one is default.
the property maybe like this.

<property name="hibernate.default_schema">[Your schema name here]</property>


Hi,

I've already specified the default_schema and/or default_catalog as scott.
Maybe the problem is not just in the default_schema/default_catalog.

Any takers ?

Thanks,
nusa.


Top
 Profile  
 
 Post subject: Artifact generation gives no output, no errors seen.
PostPosted: Mon Feb 07, 2005 1:43 pm 
Newbie

Joined: Fri Feb 04, 2005 11:09 pm
Posts: 9
max wrote:
does your user have priveligies to access database metadata ?


No. This user just had access to the application tables. Please let me know if I am missing anything.

Regards.


Top
 Profile  
 
 Post subject: Re: Artifact generation gives no output, no errors seen.
PostPosted: Mon Feb 07, 2005 2:21 pm 
Newbie

Joined: Fri Feb 04, 2005 11:09 pm
Posts: 9
nigam11 wrote:
max wrote:
does your user have priveligies to access database metadata ?


No. This user just had access to the application tables. Please let me know if I am missing anything.

Regards.


Hi,
I tried this with a user with database operator privileges, but got the same result. This was was able to see the entire database and its metadata.


Top
 Profile  
 
 Post subject: Re: Artifact generation gives no output, no errors seen.
PostPosted: Tue Feb 08, 2005 7:53 am 
Beginner
Beginner

Joined: Fri Sep 24, 2004 8:18 am
Posts: 24
Anyone want to help us ? Max ?

Thanks,
nusa


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 11, 2005 5:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ok im back again ,)

...I simply cant understand how you are not seeing any tables with your user if that user normally works with hibernate.

What happens if you use a tool like DbVisualizer and run it with the same user/pw and jdbc driver - do you get a view of the tables ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 11, 2005 9:36 am 
Newbie

Joined: Fri Feb 11, 2005 9:31 am
Posts: 1
Hi i've the same problem but the error message is different

Code:
Error 2005-02-11 14:10:50.390 Error under artifact generation
org.hibernate.exception.GenericJDBCException: Reading from database
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:125)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:120)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:611)
at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:575)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2803)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:536)
at oracle.jdbc.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:2578)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:708)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:106)
... 8 more


I've tried to set up hibernate.cfg.xml with
Code:
<property name="hibernate.default_schema">[Your schema name here]</property>


and the problem is always the same ... anyone have suggestion ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 11, 2005 9:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
do you guys never use the search facility on these forums ? ,)

this is reported before and is a known bug which will be fixed.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 8:54 pm 
Newbie

Joined: Fri Feb 04, 2005 11:09 pm
Posts: 9
max wrote:
ok im back again ,)

...I simply cant understand how you are not seeing any tables with your user if that user normally works with hibernate.

What happens if you use a tool like DbVisualizer and run it with the same user/pw and jdbc driver - do you get a view of the tables ?



Hi Max,
We changed the username, password and schema letter case in the hibernate.cfg.xml file and the tools are now working fine. It did not work for lower case but works fine in upper case. So at this time, our hibernate.cfg.xml file looks like this:

Code:
<property name="hibernate.connection.username">USERID</property>
        <property name="hibernate.connection.password">PASSWD</property>
        <property name="hibernate.default_schema">USERID</property>   
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@cpsdev08:30516:CADABC1</property>
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>


Thanks.
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 4:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes oracle is non-symmetrical case sensitive...pain to debug ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: ORA-01000
PostPosted: Fri Feb 18, 2005 4:41 am 
Newbie

Joined: Fri Feb 18, 2005 4:34 am
Posts: 1
is this bug fixed now?
i meet the same problem~


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page 1, 2  Next

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.