-->
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: Invalid filter-parameter name format when using formula
PostPosted: Thu Dec 20, 2012 2:16 am 
Newbie

Joined: Thu Dec 20, 2012 2:08 am
Posts: 3
Hi!
I am using hibernate xml configuration and the formula tag for my purposes.
I have a regexp_like syntax in my formula:
Code:
<formula>
            case
                when regexp_like(substr(column1, 11),'^[[:digit:]]+$') then substr(column1,11)
                else null
            end
            </formula>


The problem now is, that the character ':' is known as the HQL Varible Prefix, and so, the getFilterParameterValue in the SessionImpl.class is trying to parse the filterParameterName 'digit:'.
This is an Invaldi filter-parameter name format, and an exception is thrown.

Can anyone tell my how to escape this term, so that it is not parsed ?

Thanks,
Klaus

StackTrace:
Code:
Caused by: java.lang.IllegalArgumentException: Invalid filter-parameter name format
   at org.hibernate.impl.SessionImpl.parseFilterParameterName(SessionImpl.java:1122)
   at org.hibernate.impl.SessionImpl.getFilterParameterValue(SessionImpl.java:1082)
   at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:497)
   at org.hibernate.loader.Loader.processFilters(Loader.java:1599)
   at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1521)
   at org.hibernate.loader.Loader.doQuery(Loader.java:677)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
   at org.hibernate.loader.Loader.loadEntity(Loader.java:1864)
   at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
   at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
   at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2928)
   at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:416)
   at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:392)
   at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
   at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
   at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
   at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906)
   at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:864)
   at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:574)
   at org.hibernate.type.EntityType.resolve(EntityType.java:390)
   at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:120)
   at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:858)
   at org.hibernate.loader.Loader.doQuery(Loader.java:733)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
   at org.hibernate.loader.Loader.loadCollection(Loader.java:1998)
   at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:52)
   at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
   at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
   at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1755)
   at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
   at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
   at org.hibernate.collection.PersistentMap.values(PersistentMap.java:241)


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.