You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ricci Gian Maria <al...@nablasoft.com> on 2012/11/02 17:44:51 UTC

How to use (if it is applicable) hibernate inside a solr plugin

Hi to everyone,

 

I'm a .NET developer, so I'm pretty new to java developing. I was able to
write a custom filter to use in solr, but I had problem with another filter
that should use hibernate to read some data from a database during
initialization.

 

First of all I was not able to make it read the hibernate.cfg.xml file,
because I always got a hibernate.cfg.xml not found. This is not a big issue,
I configured hibernate entirely with code and that problem was solved (even
if I'd like to understand how can I use it inside a solr plugin). Now the
problem is that when hibernate Configuration try to configure the mapping it
is not able to find Mapped classes.

 

In the error I found: caused by: org.hibernate.MappingException: class
Dictionary.Term not found while looking for property: value

 

My question is, anyone had already managed to access a database with
hibernate inside a solr plugin? Is this an unsupported scenario so I need to
resort to some other technique to access database, or am I missing
something?

 

Thanks for any help.

 

 

--

Ricci Gian Maria

MVP Visual Studio ALM

 <http://www.codewrecks.com/> http://www.codewrecks.com

 <http://blogs.ugidotnet.org/rgm> http://blogs.ugidotnet.org/rgm

Twitter:  <http://twitter.com/alkampfer> http://twitter.com/alkampfer

Msn:  <ma...@nablasoft.com> alkampfer@nablasoft.com