<div dir="ltr"><span style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px">Hello,</span><div><span style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"><br></span></div><div><span style="font-family:&#39;Helvetica Neue&#39;,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:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"> hql query</span><br></div><div><span style="font-family:&#39;Helvetica Neue&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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:&#39;Helvetica Neue&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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)">&lt;</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)">&gt;</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)">&quot;from &quot;</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)">&quot; where &quot;</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)">&quot;id&quot;</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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:17.7272720336914px">On debugging hibernate source, I realize that this is because hibernate&#39;s <b>SessionFactory instance does not have any entityPersister instances</b> due to which the hql query does have any translator&#39;s.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:&#39;Helvetica Neue&#39;,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:&#39;Helvetica Neue&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">&lt;</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)">&quot;persistenceProviderClass&quot;</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)">&quot;org.hibernate.jpa.HibernatePersistenceProvider&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;persistenceXmlLocation&quot;</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)">&quot;/com/software/persistence/persistence.xml&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;jpaProperties&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">&gt;</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)">&lt;</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)">&gt;</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)">&lt;</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)">&quot;hibernate.id.new_generator_mappings&quot;</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)">&quot;true&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.cache.use_second_level_cache&quot;</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)">&quot;false&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.dialect&quot;</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)">&quot;com.software.persistence.ExtendedOracle10gDialect&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.jdbc.batch_size&quot;</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)">&quot;10&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.jdbc.batch_versioned_data&quot;</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)">&quot;true&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.jdbc.batch.builder&quot;</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)">&quot;com.software.persistence.OracleBatchBuilder&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.multiTenancy&quot;</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)">&quot;DATABASE&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.tenant_identifier_resolver&quot;</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)">&quot;com.software.persistence.MultitenantIdentifierResolver&quot;</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">/&gt;</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)">&lt;</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)">&quot;hibernate.multi_tenant_connection_provider&quot;</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)">&quot;multiTenantConnectionProvider&quot;</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)">/&gt;</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)">&lt;/</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)">&gt;</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)">&lt;/</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)">&gt;</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:&#39;Helvetica Neue&#39;,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,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,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:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:15px;line-height:17.7272720336914px"><br></span></span></code></div></div>