-->
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: Disaster. What the **** is happening???????
PostPosted: Thu Jun 21, 2007 6:25 am 
Regular
Regular

Joined: Fri Jan 20, 2006 9:38 am
Posts: 61
Location: Notts, UK
Hibernate version: 3.2.0

I suddenly can't read any entities! I get the following error. What is it? Why does it happen? What do I need to do. This is just a mystery. It just started happening. I'm not using EJBs, so what's this EJBMethodPermission?

Code:
10:11:41,204 ERROR [executehql_jsp]] Servlet.service() for servlet org.apache.jsp.manager.executehql_jsp threw exception
java.lang.SecurityException: Denied: (javax.security.jacc.EJBMethodPermission com.aspicio.entity.base.Person read)[*:read()], caller
=Subject:
        Principal: Ultimate Logistics/ultimate/nigelw
        Principal: CallerPrincipal(members:Ultimate Logistics/ultimate/nigelw)
        Principal: Roles(members:User)

        at org.hibernate.secure.JACCPermissions.checkPermission(JACCPermissions.java:49)
        at org.hibernate.secure.JACCPreLoadEventListener.onPreLoad(JACCPreLoadEventListener.java:30)
        at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:125)
        at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
        at org.hibernate.loader.Loader.doQuery(Loader.java:729)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2220)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.apache.jsp.manager.executehql_jsp._jspService(executehql_jsp.java:69)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 6:32 am 
Regular
Regular

Joined: Fri Jan 20, 2006 9:38 am
Posts: 61
Location: Notts, UK
This only happens when I attempt to read whole entities using HQL.

Code:
from Person


Throws that error.

Code:
select knownAs from Person


does not!?!?!?!!!!!!!!!!!


Top
 Profile  
 
 Post subject: Sounds Like Someone Changed Your Permission
PostPosted: Thu Jun 21, 2007 11:53 am 
Newbie

Joined: Tue Apr 10, 2007 10:40 am
Posts: 8
Based on "suddenly" a security error happening, it sounds to me like something in your environment changed - perhaps the admins are tightening settings up and got overly aggressive for your taste?

Does the following variation on your query provide more insight?

Code:
Select p from Person as p


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 12:23 pm 
Regular
Regular

Joined: Fri Jan 20, 2006 9:38 am
Posts: 61
Location: Notts, UK
You want to know what it was?

I changed from using EntityManagerFactory.createEntityManager() which is deprecated to using EntityManagerFactory.buildEntityManager.

That bust the whole thing!

I'm sticking with the deprecated method.


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.