Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
In dao I am creating HQL query and have AccessControlPermission...What wrong? I am using Sun JSAS 8.1
javax.ejb.EJBException at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:2807) at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2713) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2521) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:137) at $Proxy69.createAccount(Unknown Source) at TestServlet.processRequest(TestServlet.java:37) at TestServlet.doGet(TestServlet.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:747) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55) Caused by: java.lang.ExceptionInInitializerError at net.digitway.mms.dao.accounting.impl.AccountDAOImpl.isEmailExists(AccountDAOImpl.java:50)
!!!!!!!!!!!!!!! Here I am creating query: session.createQuery !!!!!!!!!!!!!!!!
at net.digitway.mms.services.ejb.AccountServiceBean.checkEmailExistence(AccountServiceBean.java:119) at net.digitway.mms.services.ejb.AccountServiceBean.createAccount(AccountServiceBean.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:128) ... 34 more Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkExit(SecurityManager.java:744) at com.sun.enterprise.J2EESecurityManager.checkExit(J2EESecurityManager.java:83) at java.lang.Runtime.exit(Runtime.java:88) at java.lang.System.exit(System.java:868) at antlr.CharScanner.panic(CharScanner.java:274) at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340) at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:25) at antlr.CharScanner.(CharScanner.java:51) at antlr.CharScanner.(CharScanner.java:60) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:55) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:52) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:46) at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:20) at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:41) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:203) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427) at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:291) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005) at net.my.mms.dao.HibernateUtil.(HibernateUtil.java:32) ... 43 more