I am using the following open source classes and trying to connect them using hibernate. I am getting the following exception :
Caused by: org.hibernate.MappingException: Could not determine type for: mod.sun.security.acl.AclEntryImpl, for columns: [org.hibernate.mapping.Column(aclentry)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:265) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:252) at org.hibernate.mapping.Collection.validate(Collection.java:247) at org.hibernate.mapping.IndexedCollection.validate(IndexedCollection.java:67) at org.hibernate.cfg.Configuration.validate(Configuration.java:841) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1000) at com.belfast.hibernate.HibernatePlugin.<clinit>(HibernatePlugin.java:34)
The code is as follows:
package mod.sun.security.acl;
import java.security.Principal; import java.security.acl.AclEntry; import java.security.acl.Group; import java.security.acl.Permission; import java.util.Enumeration; import java.util.Vector;
/** * This is a class that describes one entry that associates users * or groups with permissions in the ACL. * The entry may be used as a way of granting or denying permissions. * @author Satish Dharmaraj */ public class AclEntryImpl implements AclEntry { private long aclentryid; private Principal user = null; private Vector<Permission> permissionSet = new Vector<Permission>(10, 10); private boolean negative = false;
=====================================================================
package mod.sun.security.acl;
import java.security.Principal; import java.security.acl.Acl; import java.security.acl.AclEntry; import java.security.acl.Group; import java.security.acl.NotOwnerException; import java.security.acl.Permission; import java.util.Enumeration; import java.util.Hashtable; import java.util.NoSuchElementException; import java.util.Vector;
import com.belfast.storage.object.ObjectData;
/** * An Access Control List (ACL) is encapsulated by this class. * @author Satish Dharmaraj */ public class AclImpl extends OwnerImpl implements Acl { // // Maintain four tables. one each for positive and negative // ACLs. One each depending on whether the entity is a group // or principal. // private long aclid; private Hashtable<Principal, AclEntry> allowedUsersTable = new Hashtable<Principal, AclEntry>(23); private Hashtable<Principal, AclEntry> allowedGroupsTable = new Hashtable<Principal, AclEntry>(23); private Hashtable<Principal, AclEntry> deniedUsersTable = new Hashtable<Principal, AclEntry>(23); private Hashtable<Principal, AclEntry> deniedGroupsTable = new Hashtable<Principal, AclEntry>(23); private String aclName = null; private Vector<Permission> zeroSet = new Vector<Permission>(1,1); private ObjectData object;
==================================================
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="mod.sun.security.acl"> <class name="AclImpl" table="BEACL"> <id name="aclid"> <generator class="native"></generator> </id> <map name="allowedUsersTable" table="beaclentry"> <key column="id"></key> <index column="principal" type="com.belfast.db.object.Alias"></index> <element column="aclentry" type="mod.sun.security.acl.AclEntryImpl"></element> </map> <map name="allowedGroupsTable" table="beaclentry"> <key column="id"></key> <index column="principal" type="mod.sun.security.acl.GroupImpl"></index> <element column="aclentry" type="mod.sun.security.acl.AclEntryImpl"></element> </map> <map name="deniedUsersTable" table="beaclentry"> <key column="id"></key> <index column="principal" type="com.belfast.db.object.Alias"></index> <element column="aclentry" type="mod.sun.security.acl.AclEntryImpl"></element> </map> <map name="deniedGroupsTable" table="beaclentry"> <key column="id"></key> <index column="principal" type="mod.sun.security.acl.GroupImpl"></index> <element column="aclentry" type="mod.sun.security.acl.AclEntryImpl"></element> </map> <property name="aclName"></property> <list name="zeroSet" inverse="false" cascade="all" table="beperm"> <key column="permid"/> <index column="permission"></index> <one-to-many class="mod.sun.security.acl.PermissionImpl"></one-to-many> </list> <many-to-one name="object" class="com.belfast.storage.object.ObjectData" column="objectid" not-null="true"/> </class> </hibernate-mapping>
Any help is appreciated.
|