Results 1 to 6 of 6
  1. #1
    andi9 is offline Member
    Join Date
    May 2008
    Posts
    3
    Rep Power
    0

    Default cannot resolve symbol while using javac

    help help help... while compiling using javac in the cmd prompt.. i kept getting this error. :(

    im using j2sdk1.4.2_08.

    immediate response needed.. thanks
    ^
    JdbcSaveTransaction.java:66: cannot resolve symbol
    symbol : variable DomainLogger
    location: class com.extendyourstore.domain.arts.JdbcSaveTransactio n
    private static BaseLogger logger = DomainLogger.getInstance();
    ^
    JdbcSaveTransaction.java:86: cannot resolve symbol
    symbol : class SQLInsertStatement
    location: class com.extendyourstore.domain.arts.JdbcSaveTransactio n
    SQLInsertStatement sql = new SQLInsertStatement();
    ^
    JdbcSaveTransaction.java:86: cannot resolve symbol
    symbol : class SQLInsertStatement
    location: class com.extendyourstore.domain.arts.JdbcSaveTransactio n
    SQLInsertStatement sql = new SQLInsertStatement();
    ^
    JdbcSaveTransaction.java:89: cannot resolve symbol
    symbol : variable TABLE_TRANSACTION
    location: class com.extendyourstore.domain.arts.JdbcSaveTransactio n
    sql.setTable(TABLE_TRANSACTION);

    or you can reach me thru my ym id: simply_wicked_girl

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

    Default

    You are declaring some variable incorrectly. Compiler can't find those variables. That's why you get this error.

    Can you put your code here.

  3. #3
    andi9 is offline Member
    Join Date
    May 2008
    Posts
    3
    Rep Power
    0

    Default

    package com.extendyourstore.domain.arts;
    // java imports
    import java.sql.SQLException;
    import java.util.Date;
    import java.lang.StringBuffer;
    // commerce services import
    import com._360commerce.domain.data.ARTSDatabaseIfc;
    import com._360commerce.common.sql.SQLInsertStatement;
    import com._360commerce.common.sql.SQLUpdateStatement;
    import com._360commerce.common.sql.SQLUpdatableStatementI fc;
    // foundation imports
    import com.extendyourstore.foundation.manager.data.DataEx ception;
    import com.extendyourstore.foundation.manager.data.JdbcDa taConnection;
    import com.extendyourstore.foundation.manager.log.BaseLog ger;
    import com.extendyourstore.foundation.utility.Util;
    // domain imports
    import com.extendyourstore.domain.financial.AbstractStatu sEntityIfc;
    import com.extendyourstore.domain.manager.log.LogMessageC onstantsIfc;
    import com.extendyourstore.domain.manager.log.DomainLogge r;
    import com.extendyourstore.domain.store.WorkstationIfc;
    import com.extendyourstore.domain.transaction.Transaction Ifc;
    import com.extendyourstore.domain.customer.CustomerInfoIf c;

    public abstract class JdbcSaveTransaction
    extends JdbcDataOperation
    implements ARTSDatabaseIfc
    {
    /**
    The logger to which log messages will be sent.
    **/
    private static BaseLogger logger = DomainLogger.getInstance();

    /**
    revision number supplied by source-code-control system
    **/
    public static String revisionNumber = "$Revision: 1.1 $";

    //---------------------------------------------------------------------
    /**
    Inserts into the transaction table.
    <P>
    @param dataConnection connection to the db
    @param transaction a pos transaction
    @exception DataException upon error
    **/
    //---------------------------------------------------------------------
    public void insertTransaction(JdbcDataConnection dataConnection,
    TransactionIfc transaction)
    throws DataException
    {
    SQLInsertStatement sql = new SQLInsertStatement();

    // Table
    sql.setTable(TABLE_TRANSACTION);

    // Fields
    sql.addColumn(FIELD_RETAIL_STORE_ID, getStoreID(transaction));
    sql.addColumn(FIELD_WORKSTATION_ID, getWorkstationID(transaction));
    sql.addColumn(FIELD_BUSINESS_DAY_DATE, getBusinessDayString(transaction));
    sql.addColumn(FIELD_TRANSACTION_SEQUENCE_NUMBER,
    getTransactionSequenceNumber(transaction));
    sql.addColumn(FIELD_OPERATOR_ID, getOperatorID(transaction));
    sql.addColumn(FIELD_TRANSACTION_BEGIN_DATE_TIMESTA MP,
    getTransactionBeginDateString(transaction));
    sql.addColumn(FIELD_TRANSACTION_END_DATE_TIMESTAMP ,
    getTransactionEndDateString(transaction));
    sql.addColumn(FIELD_TRANSACTION_TYPE_CODE, getTransactionType(transaction));
    sql.addColumn(FIELD_TRANSACTION_TRAINING_FLAG, getTrainingFlag(transaction));
    sql.addColumn(FIELD_CUSTOMER_INFO, getCustomerInfo(transaction));
    sql.addColumn(FIELD_CUSTOMER_INFO_TYPE, getCustomerInfoType(transaction));
    sql.addColumn(FIELD_TRANSACTION_STATUS_CODE, getTransactionStatus(transaction));
    sql.addColumn(FIELD_TENDER_REPOSITORY_ID, getTillID(transaction));
    sql.addColumn(FIELD_TRANSACTION_POST_PROCESSING_ST ATUS_CODE,
    transaction.getPostProcessingStatus());
    sql.addColumn(FIELD_RECORD_LAST_MODIFIED_TIMESTAMP ,
    getSQLCurrentTimestampFunction());
    sql.addColumn(FIELD_RECORD_CREATION_TIMESTAMP,
    getSQLCurrentTimestampFunction());

    try
    {
    dataConnection.execute(sql.getSQLString());
    }
    catch (DataException de)
    {
    logger.error(LogMessageConstantsIfc.SCOPE_DOMAIN_A RTS_DB, "{0}",
    de);
    throw de;
    }
    catch (SQLException se)
    {
    logger.error(LogMessageConstantsIfc.SCOPE_DOMAIN_A RTS_DB, "{0}",
    se);
    throw new DataException(DataException.SQL_ERROR, "insertTransaction", se);
    }
    catch (Exception e)
    {
    logger.error(LogMessageConstantsIfc.SCOPE_DOMAIN_A RTS_DB, "{0}",
    e);
    throw new DataException(DataException.UNKNOWN, "insertTransaction", e);
    }

    // update transaction sequence number for register after each transaction.
    updateTransactionSequenceNumber(dataConnection, transaction);

    }
    --------------------------

    this was the code.. but it was not the full part of it.
    I properly managed to check all the methods aswell as the classes that were imported and add them to the classpath..

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

    Default

    Testing this code really mess for me too. In you error report, you can see number lines where compiler get errors. Check on those lines, you may find the solution.

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

  6. #6
    andi9 is offline Member
    Join Date
    May 2008
    Posts
    3
    Rep Power
    0

    Default

    D:\>javac
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are us
    ed
    -classpath <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -help Print a synopsis of standard options

    --------------------------
    Would it be better for me to produce my .class file using Eclipse IDE not by javac in cmd line.

Similar Threads

  1. Replies: 2
    Last Post: 09-18-2008, 07:30 AM
  2. Cannot Resolve Symbol error...
    By seral1969 in forum New To Java
    Replies: 4
    Last Post: 02-18-2008, 12:17 AM
  3. Replies: 1
    Last Post: 12-21-2007, 11:12 AM
  4. Error: cannot resolve symbol, help me
    By mathias in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 08-06-2007, 02:46 PM
  5. MySite/Valid.java:56: cannot resolve symbol
    By Albert in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 07-05-2007, 05:49 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
  •