First of all, things were working perfectly in my previous laptop, when I shifted my code to the new laptop I am getting this error, Basically, I am calling finder method in my EJB and code of it was working fine as in EJB-jar it looks like this
<query>
<query-method>
<method-name>finduserrightsonform</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from UserRightsOnForm o where o.ser_groups_users_id=?1 and o.ser_form_id=?2</ejb-ql>
</query>
as both columns in DB are integers so as in my previous laptop Postgres auto-cast it's there, but what I am missing is strange.
so far as I tried
- cast using cast(columnname as character varying) e.g. it also through error
- change method param to Integer it will not work as well, in fact, stoped deployed the jar
- changing the Postgress versions to the previous one.
- casting like using ::smallint
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying ERROR [stderr] (EJB default - 3) Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
its look like the environment maybe jar issue but what I am missing not catching it.
calling code:
sms.viewUserRightsOnFormImpl(userId, "validationForm", groupId);
defination:
Collection findUserRightOnForm(String user_id, String form_id) throws FinderException;
using Jdevelper 11g postgress 9.2 Jboss 6 EJB 2.1
Note: Tried all google links and stackover links almost wasted my 2 days.