-->
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.  [ 5 posts ] 
Author Message
 Post subject: Problem with Hibernate Tools
PostPosted: Thu May 08, 2008 2:38 pm 
Newbie

Joined: Thu May 08, 2008 2:27 pm
Posts: 3
Hi,
I have a little problem with hibernate tools when I try to use my own naming strategy. When I use default naming strategy, evrything works fine.

Error:
org.hibernate.console.HibernateConsoleRuntimeException: Could not configure naming strategy br.com.tesystem.util.IMSNamingStrategy
Could not configure naming strategy br.com.tesystem.util.IMSNamingStrategy
java.lang.ClassNotFoundException: br.com.tesystem.util.IMSNamingStrategy
br.com.tesystem.util.IMSNamingStrategy
java.lang.ClassNotFoundException: br.com.tesystem.util.IMSNamingStrategy
br.com.tesystem.util.IMSNamingStrategy

My Class:


Code:
package br.com.tesystem.util;

import  org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import  org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import  org.hibernate.cfg.reveng.TableIdentifier;

public class IMSNamingStrategy extends DelegatingReverseEngineeringStrategy {

   public IMSNamingStrategy (ReverseEngineeringStrategy delegate) {
      super(delegate);
   }

   @Override
   public String columnToPropertyName(TableIdentifier table, String column) {
      if (column.startsWith("ID")) {
         return "id";
      } else {
         return super.columnToPropertyName(table, column);
      }
   }
}


Eclipse 3.3.2
Hibernate tools -3.2.2.Beta1 (downloaded today)

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 6:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
is the strategy built and available in the classpath ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Classpath
PostPosted: Fri May 09, 2008 7:00 am 
Newbie

Joined: Thu May 08, 2008 2:27 pm
Posts: 3
Strategy Class is in the same project as Console Configuration. In the classpath configuration of Console Configuration I have an user entry that references the project. Is it enough or do I have to reference explicitly the directory where the class is located?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 09, 2008 7:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it should not make a difference, but please test and report if it does (or does not).

It might be an issue with variables on the classpath.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: ...
PostPosted: Fri May 09, 2008 7:21 am 
Newbie

Joined: Thu May 08, 2008 2:27 pm
Posts: 3
I tried:
*create a jar file from my project and referene it in classpath of configuration console
*put the folder in classpath that contains naming strategy class.

Still don't working. I am running out of ideas...[/img]


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