-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: java.lang.reflect.ReflectPermission exception on SunAppServe
PostPosted: Wed Feb 01, 2006 8:42 pm 
Newbie

Joined: Tue Nov 22, 2005 11:28 am
Posts: 6
Hi I am sort of new to Hibernate but i created an app following the tutorial in the docs section. I tried the command line version, everything works great and now i'm using the same settings for a web app deployed on Sun's AppServer 8.1.

When i deploy the app an Initialization exception is thrown (stacktrace below) in the "HibernateUtil" class which has a static block and returns a reference to the SessionFactory. Do i need to give explicit permissions? anybody knows?

Thanks
Saniya
=============================================

java.lang.ExceptionInInitializerError
at travelcenterhibernate.HibernateUtil.<clinit>(Unknown Source)
at travelcenterhibernateweb.SessionBean1.getPeopleList(SessionBean1.java:140)
at travelcenterhibernateweb.Page1.<init>(Page1.java:154)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at java.beans.Beans.instantiate(Beans.java:204)
at java.beans.Beans.instantiate(Beans.java:48)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:203)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:298)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
at com.sun.rave.web.ui.appbase.faces.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:96)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:753)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:728)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:278)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
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 com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
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.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
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.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
at org.hibernate.property.BasicPropertyAccessor.getSetterOrNull(BasicPropertyAccessor.java:233)
at org.hibernate.property.BasicPropertyAccessor.createSetter(BasicPropertyAccessor.java:214)
at org.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:209)
at org.hibernate.mapping.Property.getSetter(Property.java:255)
at org.hibernate.tuple.PojoEntityTuplizer.buildPropertySetter(PojoEntityTuplizer.java:259)
at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:103)
at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:249)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:411)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1152)
... 61 more
|#]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 4:03 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
http://docs.sun.com/source/816-7149-10/ ... html#23037


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 4:26 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
http://docs.sun.com/source/816-7149-10/ ... html#27715


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 10:30 am 
Newbie

Joined: Tue Nov 22, 2005 11:28 am
Posts: 6
Thanks, I got it to work already. So whoever ran into the same issue here is another post that resolved my issue:

http://forum.hibernate.org/viewtopic.ph ... permission

http://www.hibernate.org/294.html

Saniya


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.