Results 1 to 5 of 5
  1. #1
    ank_k is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default Java 1.5 compile time error

    There is a class that one of my team members have written in J2se 1.5
    While it is working on her machine it is giving the following compile time error is other machines (using J2se 1.5)

    The type Comparable is not generic; it cannot be parameterized with arguments <String>

    this error is coming at the very first line (package declaration) of the class.

    Can someone please let me know what the problem could be and how to resolve it.

    We are using eclipse 3.2.2
    Code for the class is

    Java Code:
    package com.tec.fms.components.search;
     
     
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
     
    import org.apache.log4j.Logger;
     
    import com.documentum.web.common.ArgumentList;
    import com.documentum.web.form.Form;
    import com.documentum.web.form.IReturnListener;
    import com.documentum.web.form.control.Link;
    import com.documentum.web.form.control.databound.DataProvider;
    import com.documentum.web.form.control.databound.Datagrid;
    import com.documentum.web.form.control.databound.TableResultSet;
    import com.documentum.web.formext.component.Component;
    import com.tec.fms.common.IConstants;
    import com.tec.fms.common.utils.FMSUtils;
    import com.documentum.fc.client.IDfCollection;
    import com.documentum.fc.common.DfException;
    import com.documentum.fc.common.DfLogger;
    import com.documentum.fc.common.IDfTime;
     
     
     
    public class SearchResultsFeedback extends Component implements IReturnListener
    {
    	
    	private static final long serialVersionUID = 1L;
    	private String strFeedbackQuery = null;
    	private String strAppendedQuery = null;
    	private Datagrid resultsGrid = null;
    	private DataProvider provider = null;
        private List columnList = null;
        public static final String inputdate ="inputdate";
        public static final String inputby ="inputby";
        public static final String approveddate = "approveddate";
        public static final String responsedate = "respdate";
        public static final String LBL_STATUS = "Status";
        public static final String LBL_FBID = "FB-ID";
        public static final String LBL_TYPE = "Type";
        public static final String LBL_BRAND = "Brand";
        public static final String LBL_PRODUCT_NM = "Product Name";
        public static final String LBL_REQUISITION = "Requisition";
        public static final String LBL_INPUT_BY = "Input By";
        public static final String LBL_INPUT_DT = "Input Date";
        public static final String LBL_RESPONDED_BY = "Responded By";
        public static final String LBL_RESPONDED_ON = "Responded On";
        public static final String LBL_APPROVED_ON = "Approved On";
        public static final String EXCEL_DATA = "Excel Data";
        private static final String orderByClause= " ORDER BY feedback_id desc, r_creation_date desc";
        private static final String arrHeaders []= new String[]
              				{
              					IConstants.feedback_id,
              					IConstants.fb_overview,
              					inputdate,
              					inputby,
              					approveddate,
              					IConstants.fb_latest_status,
              					IConstants.fb_type ,
              					IConstants.fb_brand ,
              					IConstants.fb_product ,
              					IConstants.performer_name,
              	       		    responsedate
              	       		   
              				};
        private TableResultSet tabResultSet = null;
        
        private Logger logger = DfLogger.getLogger(this);
    	
    	/* (non-Javadoc)
    	 * @see com.documentum.web.formext.component.Component#onInit(com.documentum.web.common.ArgumentList)
    	 */
    	public void onInit(ArgumentList args)
    	{
    		logger.debug("onInit : Begin");
    	    super.onInit(args);
    	    try
    	    {
    		    strAppendedQuery = args.get("appendedQuery");
    		    strFeedbackQuery = args.get("feedbackQuery");
    		    executeSearchQuery();
    	    }
    	    catch(Exception exp)
    	    {
    	    	logger.error(exp);
    	    }
    	    logger.debug("onInit : End");
     
    	 }
     
    	/**
    	 * 
    	 */
    	private void executeSearchQuery()
    	{
    		logger.debug("executeSearchQuery : Begin");
    		IDfCollection resultSet = null;
    		// for Feedback object
    		String strFbId = null;
    		String strRequisition = null;
    		String strInputBy = null;
    		String strApprovedBy = null;
    		IDfTime dtInput = null;
    		String strStatus = null;
    		// For response object
    		
    		String strType = null;
    		String strBrand = null;
    		String strProd = null;
    		String strRespondedBy = null;
    		
    		IDfTime dtResponse = null;
    		IDfTime dtApproval = null;
    		if(null != strFeedbackQuery)
    		{
    		    // execute the query
    			resultSet = FMSUtils.executeQuery(getDfSession(), strFeedbackQuery);
    			Object arrRows[] = null;
    			List arrList = new ArrayList();
    			StringBuffer strBufAppendedQuery = null;
    			try 
    			{
    				if(null != resultSet)
    				{
    					while(resultSet.next())
    					{
    						strBufAppendedQuery = new StringBuffer();
    						IDfCollection responseSet = null;
    						String strTemp = null;
    						arrRows = new Object[11];
    						strFbId = resultSet.getString(IConstants.feedback_id);
    						strRequisition = resultSet.getString(IConstants.fb_overview);
    						dtInput = resultSet.getTime(inputdate);
    						strInputBy = resultSet.getString(inputby);
    						strApprovedBy = resultSet.getString(approveddate);
    						strStatus = resultSet.getString(IConstants.fb_latest_status);
    						arrRows[0] = strFbId;
    						arrRows[1] = strRequisition;
    						arrRows[2] = dtInput;
    						arrRows[3] = strInputBy;
    						arrRows[4] = strApprovedBy;
    						arrRows[5] = strStatus;
    						
    						strTemp = strBufAppendedQuery.append(strAppendedQuery)
    											.append(" and feedback_id = '"+strFbId+"'")
    											.append(orderByClause).toString();
    						
    						responseSet = FMSUtils.executeQuery(getDfSession(), strTemp);
    						System.out.println("Check->>>>>>>>> "+strTemp);
    						try 
    						{
    							if(null != responseSet)
    							{
    								while(responseSet.next())
    								{
    									strType = resultSet.getString(IConstants.fb_type);
    									arrRows[6] = strType;
    									strBrand = resultSet.getString(IConstants.fb_brand);
    									arrRows[7] = strBrand;
    									strProd = resultSet.getString(IConstants.fb_product);
    									arrRows[8] = strProd;
    									strRespondedBy = resultSet.getString(IConstants.performer_name);
    									arrRows[9] = strRespondedBy;
    									dtResponse = resultSet.getTime(responsedate);
    									arrRows[10] = dtResponse;
    									break;
    								}
    							}
    						}
    						catch(DfException e)
    						{
    							e.printStackTrace();
    							logger.error(e);
    						}
    						finally
    						{
    							if(null != responseSet)
    							{
    								try {
    									responseSet.close();
    								} catch (DfException e) {
    									e.printStackTrace();
    									logger.error(e);
    								}
    							}
    						}
    						arrList.add(arrRows);
    					}
    					tabResultSet = new TableResultSet(arrList,arrHeaders);
    					showResults();
    				}
    			} 
    			catch (DfException e)
    			{
    				e.printStackTrace();
    				logger.error(e);
    			}
    			finally
    			{
    				if(null != resultSet)
    				{
    					try {
    						resultSet.close();
    					} catch (DfException e) {
    						e.printStackTrace();
    						logger.error(e);
    					}
    				}
    			}
    		}
    		logger.debug("executeSearchQuery : End");
    	}
     
    	/**
    	 * 
    	 */
    	private void showResults()
    	{
    		logger.debug("showResults : Begin");
    		try
    		{
    			/* Populate the table resultset and set data into data grid */
    			resultsGrid = (Datagrid)getControl(IConstants.resultsDataGrid , Datagrid.class);
    			provider = resultsGrid.getDataProvider();
    			provider.setScrollableResultSet(tabResultSet);
    		}
    		catch(Exception exp)
    		{
    			logger.error(exp);
    		}
    		logger.debug("showResults : End");
    	}
    	
    	/**
    	 * @param lnkFbId
    	 * @param args
    	 */
    	public void launchDetailedView(Link lnkFbId, ArgumentList args)
    	{
    		try
    		{
    			// TO DO
    			setComponentNested("test", args, getContext(), this);	
    		}
    		catch(Exception exp)
    		{
    			logger.error(exp);
    		}
    		logger.debug("launchDetailedView : End");
    	}
     
    	/* (non-Javadoc)
    	 * @see com.documentum.web.form.IReturnListener#onReturn(com.documentum.web.form.Form, java.util.Map)
    	 */
    	public void onReturn(Form arg0, Map arg1) 
    	{
    		logger.debug("onReturn : Begin");
    		System.out.println("on return********************");
    		
    	}
    	
    	public void launchHistoryComp(Link lnkFbId, ArgumentList args)
    	{
    		logger.debug("launchHistoryComp : Begin");
    		try
    		{
    			// TO DO
    			setComponentNested("test", args, getContext(), this);
    		}
    		catch(Exception exp)
    		{
    			logger.error(exp);
    		}
    		logger.debug("launchHistoryComp : End");
    	}
    	
     
    }

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Package should be compatible with your one. You cannot use different one here. Or else you have to keep the same structure.

    Package is the folder path located your project.

  3. #3
    ank_k is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default

    Thanks for replying.
    Package name and folder structure are exactly the same.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  5. #5
    ank_k is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default

    This is all I am getting in eclipse
    "The type Comparable is not generic; it cannot be parameterized with arguments <String>"

Similar Threads

  1. My Java program will not compile and run?
    By sabrown311313 in forum Java Applets
    Replies: 1
    Last Post: 09-23-2008, 10:38 AM
  2. Help with Compile time errors
    By bri1547 in forum New To Java
    Replies: 2
    Last Post: 08-25-2008, 12:22 AM
  3. Replies: 21
    Last Post: 08-01-2008, 12:13 PM
  4. compile error
    By dirtycash in forum New To Java
    Replies: 6
    Last Post: 12-12-2007, 07:00 PM
  5. Help with Java Compile File
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •