thanks for the suggestion,
i changed the 'type' attribute to 'class', now it is giving foll error
javax.servlet.ServletException: class org.ofbiz.entity.GenericDelegator : java.lang.IllegalAccessException: org.ofbiz.entity.GenericDelegator
now it gives following error
javax.servlet.ServletException: class org.ofbiz.entity.GenericDelegator : java.lang.IllegalAccessException: org.ofbiz.entity.GenericDelegator
here is piece of code form GenericDelegator class
package org.ofbiz.entity;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import javax.xml.parsers.ParserConfigurationException;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilCache;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.config.EntityConfigUtil;
import org.ofbiz.entity.datasource.GenericHelper;
import org.ofbiz.entity.datasource.GenericHelperFactory;
import org.ofbiz.entity.eca.EntityEcaHandler;
import org.ofbiz.entity.model.DynamicViewEntity;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.model.ModelField;
import org.ofbiz.entity.model.ModelFieldType;
import org.ofbiz.entity.model.ModelFieldTypeReader;
import org.ofbiz.entity.model.ModelGroupReader;
import org.ofbiz.entity.model.ModelKeyMap;
import org.ofbiz.entity.model.ModelReader;
import org.ofbiz.entity.model.ModelRelation;
import org.ofbiz.entity.model.ModelViewEntity;
import org.ofbiz.entity.serialize.SerializeException;
import org.ofbiz.entity.serialize.XmlSerializer;
import org.ofbiz.entity.transaction.TransactionUtil;
import org.ofbiz.entity.util.DistributedCacheClear;
import org.ofbiz.entity.util.EntityFindOptions;
import org.ofbiz.entity.util.EntityListIterator;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.entity.util.SequenceUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
public class GenericDelegator implements DelegatorInterface {
public static final
String module = GenericDelegator.class.getName();
/** the delegatorCache will now be a HashMap, allowing reload of definitions,
* but the delegator will always be the same object for the given name */
protected static Map delegatorCache = new HashMap();
protected String delegatorName;
protected EntityConfigUtil.DelegatorInfo delegatorInfo = null;
/** set this to true for better performance; set to false to be able to reload definitions at runtime throught the cache manager */
public static final boolean keepLocalReaders = true;
protected ModelReader modelReader = null;
protected ModelGroupReader modelGroupReader = null;
protected UtilCache primaryKeyCache = null;
protected UtilCache allCache = null;
protected UtilCache andCache = null;
// keeps a list of field key sets used in the by and cache, a Set (of Sets of fieldNames) for each entityName
protected Map andCacheFieldSets = new HashMap();
protected DistributedCacheClear distributedCacheClear = null;
protected EntityEcaHandler entityEcaHandler = null;
public static final String ECA_HANDLER_CLASS_NAME = "org.ofbiz.entityext.eca.DelegatorEcaHandler";
protected SequenceUtil sequencer = null;
public static GenericDelegator getGenericDelegator(String delegatorName) {
GenericDelegator delegator = (GenericDelegator) delegatorCache.get(delegatorName);
if (delegator == null) {
synchronized (GenericDelegator.class) {
// must check if null again as one of the blocked threads can still enter
delegator = (GenericDelegator) delegatorCache.get(delegatorName);
if (delegator == null) {
try {
delegator = new GenericDelegator(delegatorName);
} catch (GenericEntityException e) {
Debug.logError(e, "Error creating delegator", module);
}
if (delegator != null) {
delegatorCache.put(delegatorName, delegator);
}
}
}
}
return delegator;
}
wd appreciate ur help/suggestions.. thanks again
Originally posted by kirtikumar patel:
hi! meera
you are using wrong attribute in usebean tag you have to use "class" instead of "type".
you can only use 'type" attribute when object of that class already exist and you want to use it.But if you want to create object you have to use "class" attribute .
if you want to more hepl,you can email me on this Id: [email protected]
Best Regards
kirti