[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [jboss-user] [JBossWS] - hibernate and web services
From: ypasmk <do-not-reply () jboss ! com>
Date: 2006-10-31 19:03:27
Message-ID: 11451561.1162321407704.JavaMail.jboss () colo-br-02 ! atl ! jboss ! com
[Download RAW message or body]
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#3982192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982192
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic