-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate @Filter not working with WebSphere shared library
PostPosted: Thu Jun 27, 2013 12:18 pm 
Newbie

Joined: Thu Jun 27, 2013 12:09 pm
Posts: 1
Hi,

We are deploying our Spring+JPA+Hibernate based web application in WebSphere. In that application, we are packaging all our hibernate model objects as a separate jar file and keeping as a shared library reference. Our model object is annotation based entity classes. The problem we are facing is apart from the @org.hibernate.annotations.Filter, FilterDefs annotation all the annotations are working fine. When I am calling the session.enableFilter("activeRecordFilter"); getting the Exception like.

org.hibernate.HibernateException: No such filter configured [activeRecordFilter]

Our model object definition is like this



Code:
@javax.persistence.Entity
@org.hibernate.annotations.FilterDef(name = "activeRecordFilter", defaultCondition = "ACTV <> 'N'")
@org.hibernate.annotations.Filter(name = "activeRecordFilter")
@javax.persistence.Table(name = "ASSCTN", schema ="METADATA")
public class Association implements Serializable {

    /**
     * serialVersionUID to validate serialized object
     */





Exception Trace
Code:
org.hibernate.HibernateException: No such filter configured [activeRecordFilter]
    at org.hibernate.impl.SessionFactoryImpl.getFilterDefinition(SessionFactoryImpl.java:1204)
    at org.hibernate.engine.LoadQueryInfluencers.enableFilter(LoadQueryInfluencers.java:127)
    at org.hibernate.impl.SessionImpl.enableFilter(SessionImpl.java:2035)
    at com.metadata.common.baseclass.GenericDAOImpl.changeSoftDeleteFilterStatus(GenericDAOImpl.java:1228)
    at com.metadata.common.baseclass.GenericDAOImpl.populatePredicateList(GenericDAOImpl.java:1044)
    at com.metadata.common.baseclass.GenericDAOImpl.getIFGetResponse(GenericDAOImpl.java:425)
    at com.metadata.common.baseclass.GenericDAOImpl$$FastClassByCGLIB$$db8e9c53.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
    at com.metadata.common.repository.EntityRepository$$EnhancerByCGLIB$$22a81be7.getIFGetResponse(<generated>)
    at com.metadata.metadatamodule.dao.GetServiceDAO.getResults(GetServiceDAO.java:51)
    at com.metadata.metadatamodule.bo.GetServiceBO.getResults(GetServiceBO.java:67)
    at com.metadata.metadatamodule.bo.GetServiceBO$$FastClassByCGLIB$$42f9d8cc.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
    at com.metadata.metadatamodule.bo.GetServiceBO$$EnhancerByCGLIB$$78933e6b.getResults(<generated>)
    at com.metadata.metadatamodule.genericservice.GetService.getResults(GetService.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.