Hi

    I am Running EJbserver on two machines .
    Each is having same configuration .

    In both machine i am hving jConnect_5_2 as jdbc driver for sybase

    I am passing a string (query ) to my seesion bean
    and the steps i am doing in session bean are....

public Object getQueryResult(String sqlQ)
     throws RemoteException{

        java.util.Vector retVect = new java.util.Vector();
        System.out.println("Hello In side getqueryResult Session Beans");
        try{
           Context sessionContext = new InitialContext();
           DataSource ds  = (DataSource) sessionContext.lookup("jdbc_1");
           String   retStr= "";

           Connection con = ds.getConnection();
           Statement stmt = con.createStatement();
           ResultSet rS = null;
           rS   = stmt.executeQuery(sqlQ);
           while(rS.next()){
              retStr="";
              for(int cntr=1;cntr<=(rS.getMetaData()).getColumnCount();cntr++){
                 if(cntr==1){
                    retStr=rS.getString(cntr);
                    continue;
                 }
                 retStr +="|"+rS.getString(cntr);
              }
              retVect.add(retStr);
           }
           rS.close();
           stmt.close();
           con.close(); catch(Exception E){
           //If we are in problem then send back  the exception.
           return "Got Exception in Sssion Bean calling result set"+E;
        }
        System.out.println("Hello In side the Befor Return of Session Beans");
        return retVect;
     }


The above code perfectly gives me the result as desired  on my one machine
 But the same code when i am running on other machine i am geeeting error


    Hello is Got Exception In Create of Proposal Master>>java.rmi.ServerException:
RemoteException occurred in server
    thread; nested exception is: java.rmi.RemoteException: RuntimeException thrown by 
an
enterprise Bean; nested
    exception is: javax.ejb.EJBException>>0>>New Company>>null>>>
   QUERY>>>>>  select Status_Code, Status_Type from Status_Master where Status_Name =" 
New
Proposal"

   RET OBJ IS Got Exception in Sssion Bean calling resultset
com.sybase.jdbc2.jdbc.SybSQLException: Invalid column name ' New Proposal'.

As from the query it is clear that  "" NewProposal  "" of which status code and status
type shud be displayed.


The same code is working fine one  machine .

Is any one have any clue what exactly the error is ......


Thanks in advance
Ritesh

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to