ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | shark List | September 2004 Index

<--  Date Index  --> <--  Thread Index  -->

use JaWE Calss in PackageManagement module


Hi:
    I use below code to implement PackageManagement in web application ,But it  clew   me that:
 
HTTP Status 500 - 
 
--------------------------------------------------------------------------------
 
type Exception report
 
message 
 
description The server encountered an internal error () that prevented it from fulfilling this request.
 
exception 
 
javax.servlet.ServletException: Servlet execution threw an exception
 
 
root cause 
 
java.lang.NoClassDefFoundError: org/enhydra/jawe/JaWE
QuickFlowClient.PackageManagement.CPackageAdminObj.SetPackageList(CPackageAdminObj.java:43)
QuickFlowClient.PackageManagement.PackageAdminServlet.doGet(PackageAdminServlet.java:25)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
 
note The full stack trace of the root cause is available in the Tomcat logs.
 
 
--------------------------------------------------------------------------------
 
Apache Tomcat/5.0.16
 
//****************************************code************************************************//
 
 
package QuickFlowClient.PackageManagement;
 
import java.util.*;
import javax.servlet.http.HttpSession;
import WorkflowService.*;
import org.enhydra.jawe.xml.elements.*;
import org.enhydra.jawe.JaWE;
import  org.enhydra.shark.api.client.*;
 
public class CPackageAdminObj
{
    public SharkInterface WorkflowEngine = null;
    private static String szUserID="";
    private static String szPasswd="";
    private static String szServerName="";
    private static String szCorbaName="";
    private CPackageAdminObj()
    {
 
    }
    //use factory method to avoid create a new CPackageAdminObj object every time
    public static CPackageAdminObj getInstance(HttpSession session)
    {
        QuickFlowClient.CSessionDataObj SessionData=(QuickFlowClient.CSessionDataObj)session.getAttribute("SessionData");
        CPackageAdminObj PackageAdminObj=SessionData.PackageAdminObj;
        if(PackageAdminObj==null)
        {
            PackageAdminObj=new CPackageAdminObj();
            PackageAdminObj.WorkflowEngine=SessionData.WorkflowEngine;
            
            SessionData.PackageAdminObj=PackageAdminObj;
            szUserID=SessionData.OperatorID;
            szPasswd=SessionData.OperatorPSW;
        }
        return PackageAdminObj;
    }
    
    public ArrayList  SetPackageList()
    {
        ArrayList PackageList=new ArrayList();
        if(SharkPackageManagementConn(szUserID,szPasswd,szServerName,szCorbaName))
        {
            PackageList=insertPackages(JaWE.getInstance().getXMLInterface().getAllPackages());
        }
        return PackageList;
    }
    private boolean SharkPackageManagementConn(String szUserID,String szUserPasswd,String szServer,String szCorbaName)
    {
        boolean bResult=true;
        try
        {
             WorkflowEngine.getSharkConnection().connect(szUserID,szUserPasswd,szServer,szCorbaName);
        }
        catch(Exception e)
        {
            bResult=false;
            e.printStackTrace();
        }
        return bResult;
    }
 
    private ArrayList insertPackages(Collection packages)
    {
        Iterator it=packages.iterator();
        ArrayList PackageList=new ArrayList();
        while(it.hasNext())
        {
            org.enhydra.jawe.xml.elements.Package pkg=
                (org.enhydra.jawe.xml.elements.Package)
                it.next();
            String pkgId=pkg.get("Id").toString();
            try
            {
 
                String[] vers=WorkflowEngine.getAdminInterface().getPackageAdministration().getPackageVersions(pkgId);
                String curVer=WorkflowEngine.getAdminInterface().getPackageAdministration().getCurrentPackageVersion(pkgId);
                if(vers==null)continue;
                for(int i=0;i< vers.length;i++)
                {
                    Vector row=new Vector();
                    row.add(pkgId);
                    row.add(vers[i]);
                    if(vers[i].equals(curVer))
                    {
                        row.add(pkg.get("Name").toString());
                        WorkflowProcesses wps=(WorkflowProcesses)pkg.get("WorkflowProcesses");
                        row.add(new Integer(wps.size()));
                    }
                    else
                    {
                        row.add("???");
                        row.add(new Integer(-1));
                    }
                    PackageList.add(row);
                }
            }
            catch(Exception ex)
            {
                ex.printStackTrace();
            }
        }
        return PackageList;
    }
}
 
//***********************************************************************//
 
Can you tell me why ?
 
 
    thanks a lot
 
 
                                                                    Wilson Ke
                                                                    2004-9-27
                                                           
 
 
 
 


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.