-->
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.  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: HibernateConsoleRuntimeException -- Could not create or find
PostPosted: Mon Jan 09, 2006 11:22 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
I have an exception with the Code Creation tool.
It says "HibernateConsoleRuntimeException
Could not create or find with one argument delegate constructor" and in the detailed view "ClassNotFoundException"

I have Hibernate Tools 3.1.0.beta3

Any idea what class is missed? Any solution?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 09, 2006 11:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
HBX-531, stupid bug which i will do a release for as soon as possible to get it fixed.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 09, 2006 11:32 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
Any work around?
Let me know when there is a nightbuild fixing it!

Many Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 09, 2006 11:46 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
By the way, the code generation works fine in beta2 and it only fails in beta4 if you check on the "Reverse engineer from JDBC connection"

Many thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 09, 2006 11:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, the problem is that when you run the codegeneration the *second* time from the same launch configuration the code thinks that the blank string in reverse engineering strategy should be used....it shouldn't

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 7:47 am 
Beginner
Beginner

Joined: Tue Sep 16, 2003 11:26 am
Posts: 25
Location: Berlin - Germany
Workaround (works with Hibernate Tools 3.1.0.beta3):

Open the Hibernate Code Generation Dialog and select Tab Main

Enter
Code:
org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy

in the field reveng. strategy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 8:16 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
It doesnt throw an error but still not generation the code. :-(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 8:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you haven't put any mappings in the hibernate.cfg.xml or console configuration.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 9:04 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
I have no problems before without using a mapping file.
I want to create EJB3 entity PAR.

I have created a Console Configuration, it connects to the database and i can see all the tables.
So, the next step is going for the Autogenerated code, I create a new profile, use my Console Configuration, then choose the output directory. Check the Reverse Engineer JDBC connection, put the package for the classes, create a new revenge.xml (empty?) and put the revenge strategy that it said here. Check exporters Generate Java code, JDK5 code and EJB3 annotations choose utf-8 for encoding and run.

Nothing happends

But if you dont specify the revenge.xml file, it works! :-O

Many thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 9:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you *dont* specify the reveng.xml it works ?

and the reveng.xml file is *empty* ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 11:09 am 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
f you *dont* specify the reveng.xml it works ?

Yes, following all the steps but without a reveng.xml file specified it worked and created all the stuff (java classes...)

and the reveng.xml file is *empty* ?

Yes, i mean, the first time i tried this, i used an empty reveng.xml but it didnt work, then, i just blanked out the field and it created all the stuff.

Does it help? Maybe should we try to put a log or a video so you can see whats happening?

Many thanks again :-D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 11:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please try with an empty reveng.xml file again...it should not have any impact, meaning the files should just be generated.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 1:09 pm 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
With an empty file now it worked! (By empty i mean with <hibernate-reverse-engineering>
</hibernate-reverse-engineering>)

But it created some buggy fields in some java classes like this one -->private Serializable acceptCookie;

Does it help?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 1:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
dont you have a column called ACCEPT_COOKIE ?

the only problem is that the jdbc type apparently is db specific and not mapped...

what type is the column ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 1:24 pm 
Beginner
Beginner

Joined: Mon Jan 09, 2006 11:17 am
Posts: 25
Yes i do have a field called ACCEPT_COOKIE!

Ok seems we have found another problem.

Let me explain!
At the beginning this field was tinyint with size 1 wich it translated to boolean in java code. Then, I deployed the PAR inside the jboss and it said that this field has to be a BIT type. So now is changed! and then, the mapper returns this buggy field.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 42 posts ]  Go to page 1, 2, 3  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.