Thank you for your kind answer.
The queries are generated by jpacriteria library, another layer over hibernate.
I found out that each object is given an alias, for example:
SELECT $obj$5cdba0 FROM com.example.MyEntity $obj$5cdba0
Actually the query does work, but makes the class loader blacklist the String "$obj$5cdba0.class" because someone (hibernate?) is trying to forName it.
I see these solutions, in order of dirtyness(?):
1) patch jpacriteria library in order to avoid generating insane queries
2) disable blacklisting by using jboss-classloading.xml (quick, any drawbacks?)
3) clear blacklist every day with a quartz job, by using jmx
Regarding 2) there are 104 classloader instances, but I should override the blacklist policy only for the classloader with id="vfsfile:$JBOSS_HOME/server/node1/conf/jboss-service.xml". Where should I put the jboss-classloading.xml?
Any other ideas?
(Someone tell Adrian Brock that jpacriteria should be added to the *blacklist* of stupid frameworks ;)
And btw why is the class loader using an unlimited cache for a blacklist?? Why not LRU?)