Error creating bean with name '/admin/information' defined in ServletContext resource [/WEB-INF/modules/spring-config-admin.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: subclass's has not only one entity manager property.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/admin/information' defined in ServletContext resource [/WEB-INF/modules/spring-config-admin.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: subclass's has not only one entity manager property.
Caused by: 
java.lang.IllegalArgumentException: subclass's has not only one entity manager property.高手帮帮忙 看看这个是什么原因?

解决方案 »

  1.   


    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) 
    // Source File Name:   FavourManagerAction.javapackage com.comhg.scis.action;import com.comhg.scis.ScisStrutsEntityAction;
    import com.comhg.scis.domain.*;
    import com.comhg.scis.service.*;
    import com.comhg.scis.service.system.UserManager;
    import com.comhg.web.ectable.PageSortModel;
    import java.util.Enumeration;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.*;public class FavourManagerAction extends ScisStrutsEntityAction
    {    public FavourManagerAction()
        {
        }    public void setInfoClassManager(InfoClassManager infoClassManager)
        {
            this.infoClassManager = infoClassManager;
        }    public void setInformationManager(InformationManager informationManager)
        {
            this.informationManager = informationManager;
        }    public void setUserManager(UserManager userManager)
        {
            this.userManager = userManager;
        }    public void setFavourManager(FavourManager favourManager)
        {
            this.favourManager = favourManager;
        }    public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
        {
            request.setAttribute("user_id", Long.valueOf(getUserId()));
            String a[] = (String[])null;
            a = request.getParameterValues("sel");
            if(a != null)
            {
                String sel = "";
                for(int i = 0; i < a.length; i++)
                    sel = (new StringBuilder(String.valueOf(sel))).append(a[i]).append(",").toString();            sel = sel.substring(0, sel.length() - 1);
                favourManager.removeSelFavour((int)getUserId(), sel);
                PageSortModel psm = new PageSortModel(request, null);
                request.setAttribute("favours", favourManager.getUserFavour(new Integer((int)getUserId()), psm));
                request.setAttribute("infoClasses", infoClassManager.getAll());
                return mapping.findForward("list");
            }
            if(!autoRedirectDetail(request, response))
            {
                PageSortModel psm = new PageSortModel(request, null);
                request.setAttribute("favours", favourManager.getUserFavour(new Integer((int)getUserId()), psm));
                request.setAttribute("infoClasses", infoClassManager.getAll());
                return mapping.findForward("list");
            } else
            {
                return null;
            }
        }    public boolean autoRedirectDetail(HttpServletRequest request, HttpServletResponse response)
        {
            String strDirectDetail = request.getContextPath();
            String strIC2 = null;
            String strEnum = null;
            String strTemp = null;
            String strFavourId = null;
            String strInfoId = null;
            String strInfoClassId = null;
            String strPICid = null;
            boolean br = false;
            Enumeration enumPara = request.getParameterNames();
            int iParaCount = 0;
            while(enumPara.hasMoreElements()) 
            {
                strEnum = (String)enumPara.nextElement();
                iParaCount++;
                strTemp = request.getParameter(strEnum).trim();
                if(strTemp.length() > 0)
                    if(strEnum.equals("id"))
                        strFavourId = strTemp;
                    else
                    if(strTemp.equals("ec_p"))
                        return false;
            }
            if(strFavourId != null)
            {
                Integer i = Integer.valueOf(strFavourId);
                Favour f = (Favour)favourManager.get(i);
                strInfoId = f.getInformation().getId();
                if(strInfoId != null)
                {
                    Information info = (Information)informationManager.get(strInfoId);
                    strInfoClassId = info.getInfoClass().getId();
                    if(strInfoClassId != null)
                    {
                        InfoClass infoclass = (InfoClass)infoClassManager.get(strInfoClassId);
                        int ilevel = infoclass.getCatalog_level().intValue();
                        if(ilevel == 1)
                        {
                            if(info.getEnterprise() != null)
                                strDirectDetail = (new StringBuilder(String.valueOf(strDirectDetail))).append("/qyyj/qyyj.do?m=infodetail&id=").append(strInfoId).append("&c=1").toString();
                            else
                                strDirectDetail = (new StringBuilder(String.valueOf(strDirectDetail))).append("/qyyj/qyyj.do?m=infodetail&id=").append(strInfoId).append("&c=0").toString();
                        } else
                        if(ilevel == 2)
                        {
                            if(infoclass.getPinfoClass().getId().equals("1000"))
                                strDirectDetail = (new StringBuilder(String.valueOf(strDirectDetail))).append("/zxzx/zxzx.do?m=infodetail&ic2=").append(infoclass.getId()).append("&id=").append(strInfoId).toString();
                            else
                            if(infoclass.getPinfoClass().getId().equals("1002"))
                                strDirectDetail = (new StringBuilder(String.valueOf(strDirectDetail))).append("/dtsjk/show.do?method=infodetail1&catalog=").append(strInfoClassId).append("&enter=").append(info.getEnterprise().getId()).append("&year=").append(info.getOwner_year()).append("&month=").append(info.getOwner_month()).toString();
                        } else
                        if(ilevel == 3)
                            strDirectDetail = (new StringBuilder(String.valueOf(strDirectDetail))).append("/qbzx/qqbzx.do?ic1=1001&ic2=").append(infoclass.getPinfoClass().getId()).append("&ic3=").append(strInfoClassId).append("&ep=").append(info.getEnterprise().getId()).toString();
                        if(strDirectDetail != null)
                            try
                            {
                                response.sendRedirect(strDirectDetail);
                                br = true;
                            }
                            catch(Exception e)
                            {
                                br = false;
                            }
                    }
                }
            }
            return br;
        }    private InformationManager informationManager;
        private UserManager userManager;
        private FavourManager favourManager;
        private InfoClassManager infoClassManager;
    }