LobHandlers and Hibernate tools in Eclipse
Hi,
I'm using the Hibernate Eclipse tools to help me to create HQL queries. The problem is that I don't know where I can define the lobhander here.
I get the following exception:
Code:
java.lang.IllegalStateException: No LobHandler found for configuration - lobHandler property must be set on LocalSessionFactoryBean
at org.springframework.orm.hibernate3.support.AbstractLobType.nullSafeGet(Unknown Source)
at org.hibernate.type.CustomType.nullSafeGet(Unknown Source)
at org.hibernate.type.AbstractType.hydrate(Unknown Source)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(Unknown Source)
at org.hibernate.loader.Loader.loadFromResultSet(Unknown Source)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Unknown Source)
at org.hibernate.loader.Loader.getRow(Unknown Source)
at org.hibernate.loader.Loader.getRowFromResultSet(Unknown Source)
at org.hibernate.loader.Loader.doQuery(Unknown Source)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Unknown Source)
at org.hibernate.loader.Loader.loadEntity(Unknown Source)
at org.hibernate.loader.entity.AbstractEntityLoader.load(Unknown Source)
at org.hibernate.loader.entity.AbstractEntityLoader.load(Unknown Source)
at org.hibernate.persister.entity.AbstractEntityPersister.load(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.load(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(Unknown Source)
at org.hibernate.impl.SessionImpl.fireLoad(Unknown Source)
at org.hibernate.impl.SessionImpl.immediateLoad(Unknown Source)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(Unknown Source)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(Unknown Source)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(Unknown Source)
at imserso.iparlamento.modelo.Archivo$$EnhancerByCGLIB$$a70ac5ab.hashCode(Unknown Source)
at java.util.HashMap.hash(Unknown Source)
at java.util.HashMap.containsKey(Unknown Source)
at java.util.HashSet.contains(Unknown Source)
at org.apache.commons.lang.builder.ToStringStyle.isRegistered(Unknown Source)
at org.apache.commons.lang.builder.ToStringStyle.appendInternal(Unknown Source)
at org.apache.commons.lang.builder.ToStringStyle.append(Unknown Source)
at org.apache.commons.lang.builder.ToStringBuilder.append(Unknown Source)
at imserso.iparlamento.modelo.IniciativaParlamentaria.toString(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer$LabelProviderImpl.getColumnText(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.doUpdateItem(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.runtime.Platform.run(Unknown Source)
at org.eclipse.ui.internal.JFaceUtil$1.run(Unknown Source)
at org.eclipse.jface.util.SafeRunnable.run(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.createItem(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer$7.run(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.refresh(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.refresh(Unknown Source)
at org.eclipse.jface.viewers.TableViewer.inputChanged(Unknown Source)
at org.eclipse.jface.viewers.ContentViewer.setInput(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.setInput(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(Unknown Source)
at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source)
at org.hibernate.console.QueryPageModel.add(Unknown Source)
at org.hibernate.console.KnownConfigurations$1.queryPageCreated(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.access$5(Unknown Source)
at org.hibernate.console.ConsoleConfiguration$3.execute(Unknown Source)
at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(Unknown Source)
at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(Unknown Source)
at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(Unknown Source)
at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(Unknown Source)
at org.eclipse.jface.action.Action.runWithEvent(Unknown Source)
So, you will say, add the lobhandler. The problem is that the config file must be an Hibernate one. Mine is:
Code:
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name="connection.url">XXX</property>
<property name="connection.username">XXX</property>
<property name="connection.password">XXX</property>
<property name="connection.pool_size">1</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">false</property>
</session-factory>
</hibernate-configuration>
So I'm unable to use it with LobHandlers. Are you able to use it with them ? Any comment would be really welcome.
Thanks in advance,
Juan