I'm trying to use web services and it's working but when I try to use hibernate in
server side i get no entity found exception..here is my server side bean
|
| @Stateless
|
| @Local( {
|
| LoginService.class
|
| })
|
| @Remote( {
|
| LoginService.class
|
| })
|
| //@SecurityDomain("JBossWS")
|
| //@RolesAllowed ({"admin", "guest"})
|
| //@RunAs("admin")
|
|
|
| /*
|
| * JBossWS Annotations
|
| */
|
| @WebService(name = "LoginService",
|
| serviceName = "LoginService",
|
| endpointInterface = "some.webservices.LoginServiceSEI"
|
| )
|
| public class LoginServiceBean implements LoginService
|
| {
|
| private static final Logger log = Logger.getLogger(LoginServiceBean.class);
|
|
|
|
|
| @PersistenceContext
|
| EntityManager em;
|
|
|
|
|
|
|
|
|
| public boolean checkUser(String userid,String passid)
|
| {
|
|
|
| log.info("checking
person('"+userid+"','"+passid+"')");
|
|
|
| try{
|
|
|
| User users=(User)em.createQuery("from User where username=:username and
password=:password")
|
| .setParameter("username",userid)
|
| .setParameter("password",passid)
|
| .getSingleResult();
|
| log.info("hi there");
|
|
|
| }catch(Exception e) { log.info(e.toString()); return false; }
|
| return true;
|
| //else return true;
|
|
|
| }
|
|
|
|
|
| }
|
|
and here is the exception
|
| 20:36:15,788 INFO [LoginServiceBean] javax.persistence.NoResultException: No entity
found for query
|
|
any help ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982192#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...