<div dir="ltr"><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px">Hello,</span><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"><br></span></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px">I have been trying to integrate hibernate 4 multi-tenancy support in our application but I get the below exception on executing an</span><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"> hql query</span><br></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"><br></span></div><div><pre class="" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">lang</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">ArrayIndexOutOfBoundsException</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at org</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">hibernate</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">jpa</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">spi</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AbstractEntityManagerImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">resultClassChecking</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AbstractEntityManagerImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">362</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at org</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">hibernate</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">jpa</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">spi</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AbstractEntityManagerImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">createQuery</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AbstractEntityManagerImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">344</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke0</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Native</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Method</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">62</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">DelegatingMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">DelegatingMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">43</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at org</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">springframework</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">orm</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">jpa</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">ExtendedEntityManagerCreator</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">344</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at com</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">proxy</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">$Proxy288</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">createQuery</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Unknown</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Source</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke0</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Native</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Method</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">NativeMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">62</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">reflect</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">DelegatingMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">DelegatingMethodAccessorImpl</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">43</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at org</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">springframework</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">orm</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">jpa</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">SharedEntityManagerCreator$SharedEntityManagerInvocationHandler</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">invoke</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">SharedEntityManagerCreator</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">java</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">291</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
at com</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">sun</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">proxy</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">$Proxy43</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">createQuery</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Unknown</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Source</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span></code></pre></div><div><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px">The hql query is -</span><br></span></code></div><div><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><pre class="" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">List</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Field</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> fields </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> entityManager</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">createQuery</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"from "</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">+</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Employee</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">class</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getName</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">()</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">+</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">" where "</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">+</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> getQueryForInClause</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"id"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> ids</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">),</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Employee</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">class</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">).</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getResultList</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">();</span></code></pre></span></code></div><div><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:17.7272720336914px">On debugging hibernate source, I realize that this is because hibernate's <b>SessionFactory instance does not have any entityPersister instances</b> due to which the hql query does have any translator's.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:17.7272720336914px">Is it because the Entity beans are not getting scanned? If so what could be the cause?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:17.7272720336914px">The entityFactory spring is declared as below</p><pre class="" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">property name</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"persistenceProviderClass"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"org.hibernate.jpa.HibernatePersistenceProvider"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">property name</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"persistenceXmlLocation"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"/com/software/persistence/persistence.xml"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">property name</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"jpaProperties"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">map</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.id.new_generator_mappings"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"true"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.cache.use_second_level_cache"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"false"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.dialect"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"com.software.persistence.ExtendedOracle10gDialect"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.jdbc.batch_size"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"10"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.jdbc.batch_versioned_data"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"true"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.jdbc.batch.builder"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"com.software.persistence.OracleBatchBuilder"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.multiTenancy"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"DATABASE"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.tenant_identifier_resolver"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"com.software.persistence.MultitenantIdentifierResolver"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">entry key</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"hibernate.multi_tenant_connection_provider"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
value</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">-</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">ref</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"multiTenantConnectionProvider"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"></</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">map</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"></</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">property</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:17.7272720336914px">Thanks,<br>Amit.</p></span></code></div><div><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"><br></span></span></code></div></div>