-->
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.  [ 3 posts ] 
Author Message
 Post subject: error while fetching children
PostPosted: Wed Dec 20, 2006 8:41 am 
Newbie

Joined: Wed May 17, 2006 4:32 am
Posts: 16
Hello,

i'm using Hibernate Tools, 3.2 beta 8 and after creating the Console configuration where i've specified additional mapping files and path to classes with DB jar. Then it raises "Error while fetching children" and in the details it says that cant fing the mapping class. I'm confused about the reason why, i think that it is bug, because i've specified the exact class-path.

Then i went step-by-step by attaching each mapping and finally found out the problem!

Actually it breaks on the custom type for the column

<property
name="confirmationType"
access="field"
type="com.xxx.model.custom.ConfirmationEnumerationType"
column="confirmation_type"
not-null="true"
update="false"
>

So when i've removed that property from the mapping the console configuration started nicely without errors.

Any suggestions? It must be a real bug!

The other further thing is when i click on the Session Factory then it writes:
session factory error: could not instantiate cache implementation
Error
Wed Dec 20 16:25:31 MSK 2006
org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]

org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)



so how is to resolve that?

well after adding some more props it started working well:
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.cache.use_second_level_cache">false</property>

anyway, why this additional information is not specified in the installation manual???


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 10:01 am 
Newbie

Joined: Wed May 17, 2006 4:32 am
Posts: 16
so the question remains: what to do with custom types in the mappings???

And i have one more problem for criteria editor code completion: it writes
Error while performing code completion
Reason:
Console_name doesn't exist

While in HQL editor table-completion is working nicely for Console_name.
Is this also the bug?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 2:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
There is *nothing* special about hibernate tools in the respect of configuring Hibernate. Just do the same as if you needed to run Hibernate.

The pojo classes (and *dependendent* classes) needs to be on the classpath and your custom type is apparently not on the classpath and the same with your cacheprovider.

Btw. I'm quite sure the stacktrace mentioned the exact reason for the failing startup.

_________________
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.  [ 3 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.