Hello everybody
 
I have a problem i hav a CMP bean in which i am doing doing a findBy method to get some info from my table.
As per the normal way i have mentioned the query in my home class.
After deploying have also found the same query in the orion.ejb.jar xml file but when i run my application the look up gets done findByPrimaryKey method is also working but the moment it reaches this findBy method it gives me the following error.
 
Note: My query looks like this in orion.ejb.jar xml file :
<finder-method query="select T_Hotel.hotel_name from T_Hotel where T_Hotel.trans_xid=$1" partial="false">
    <!-- Generated SQL: "select T_Hotel.hotel_name from T_Hotel where T_Hotel.trans_xid=?" -->
where hotel_name , trans_xid are my columns and the table name is T_Hotel
 
 
java.sql.SQLException: Column not found
 at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(Unknown Source)
 at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
 at THotelHome_EntityHomeWrapper2.findByTrans_xid(THotelHome_EntityHomeWrapper2.java:959)
 at CMP.HotelServlet.doGet(HotelServlet.java:61)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at com.evermind.server.http.d1.si(JAX)
 at com.evermind.server.http.d1.forward(JAX)
 at com.evermind.server.http.ed.sp(JAX)
 at com.evermind.server.http.ed.so(JAX)
 at com.evermind.util.f.run(JAX)

Reply via email to