Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2008, 10:40 AM
Member
 
Join Date: Nov 2008
Posts: 4
Rep Power: 0
ank_k is on a distinguished road
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

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");
	}
	
 
}
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-13-2008, 10:58 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,523
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-13-2008, 11:00 AM
Member
 
Join Date: Nov 2008
Posts: 4
Rep Power: 0
ank_k is on a distinguished road
Default
Thanks for replying.
Package name and folder structure are exactly the same.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-13-2008, 11:49 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,523
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
Can you copy-paste your complete error message.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-13-2008, 12:12 PM
Member
 
Join Date: Nov 2008
Posts: 4
Rep Power: 0
ank_k is on a distinguished road
Default
This is all I am getting in eclipse
"The type Comparable is not generic; it cannot be parameterized with arguments <String>"
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My Java program will not compile and run? sabrown311313 Java Applets 1 09-23-2008 10:38 AM
Help with Compile time errors bri1547 New To Java 2 08-25-2008 12:22 AM
i click on it,then first time error page comes,second time click then product page co 82rathi.angara New To Java 21 08-01-2008 12:13 PM
compile error dirtycash New To Java 6 12-12-2007 07:00 PM
Help with Java Compile File baltimore New To Java 1 08-06-2007 08:48 AM


All times are GMT +2. The time now is 11:21 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org