Client code cast error:EJB returning data in Collection of Objects

Still trying to understand this EJB stuff.....
My BMP EJB returns data to the client in a collection of objects;
  // Home interface (CountryHome) nothing unusual here
  public Collection findAllCountries()
  //Remote interface (Country) nothing unusual here
  public CountryModel getDetails()The data object is a serialised object;
  // data object - nothing strange here
  public class CountryModel implements Serializable {
    private int countryId;
    private String countryName;
    public CountryModel () {......etc etc
    public CountryModel getDetails()  {.......etc etc
    public String toString() { ...etcWhen I try and get at the data from the collection in the client code, calling getDetails() in CountryModel causes a cast exception. How can I get at the data?
  Collection a = home.findAllCountries();
  Iterator i = a.iterator();
  while (i.hasNext()) {
    Object obj = i.next();
    Country country = (Country)
         PortableRemoteObject.narrow(obj, Country.class);
    // this fails with class cast exception.....
    System.out.println(country.getDetails());And to add to the confusion, why does calling the remote interface's getPrimaryKey() method in the client code invoke the toString() method in the CountryModel class and work?
  while (i.hasNext()) {
    Object obj = i.next();
    Country country = (Country)
         PortableRemoteObject.narrow(obj, Country.class);
    // have no idea why this works.....but it does.....
    System.out.println(country.getPrimaryKey());Thanks, lebo

hi,
you are getting a collection of serializable objects and not remote objects. the narow method has to be applied only for remote objects (actually it is the stub that will be received on the client side).
so you modify your code as,
Collection a = home.findAllCountries(); Iterator i = a.iterator(); while (i.hasNext()) {    Object obj = i.next();    Country country = (Country)obj;
this will definitely solve the problem.
regards
srini

Similar Messages

  • ODS activation error"Activation of data records from ODS object terminated"

    Hi All,
    While activating ODS request I am getting following error
    "Activation of data records from ODS object KFI02O50 terminated ".
    data load is suceesful for ODS but during activation of the request it is giving error.
    I tried to change the status to green manually & then activated the request but still same problem.
    Also I tried to delete request & loaded again from PSA & then activated the request but still same problem
    If anybody has some solution please let me know.
    Thanks in advance
    Regards
    Sonal

    Hi Sonal,
              Sometimes when there is erroeneous records that time while activating the Request request get fails.To check this go to manage tab of the ODS there under log u can see the log icon click on that and check y activation got failed..
    Assign points if its helpful
    Regards,
    vid.

  • Error while activating data loaded into DataStore Object in BI 7.0

    Hi Guys,
    I am facing the following problem :
    When I load data into a Datastore Object, all the records get loaded but the job fails during activation of the data.
    Below is the job log :
    Activation is running: Data target 0RPM_DS07, from 77 to 77
    Overlapping check with archived data areas for InfoProvider 0RPM_DS07
    Check not necessary, as no data has been archived for 0RPM_DS07
    Data to be activated successfully checked against archiving objects
    SQL-END: 14.06.2007 12:33:25 00:00:00
    SQL Error: ORA-20000: Insufficient privileges
    Parallel processes (for Activation); 000003
    Timeout for parallel process (for Activation): 000300
    Package size (for Activation): 020000
    Task handling (for Activation): Backgr Process
    Server group (for Activation): No Server Group Configured
    All data fields updated in mode "overwrite"
    Resource error. No batch process available. Process terminated
    Time limit exceeded. No return of the split processes
    Resource error. No batch process available. Process terminated
    Request you to kindly help me resolve this issue.
    I am runnning the infopackage manually. Should I run it by a process chain??
    If I run by process chain, I get the following error in 1st step:
    You do not have authorization for InfoSource 0RPM_ITEM_FIN_PLANNING.
    Awaiting your replies,
    Thanks,
    punkuj...

    Hi,
    I think this problem remains unanswered.
    The issue behind this problem is, during parellel activation the child jobs acknowledge the parent job about status. If the child job takes long time to read data from active data table, then it times out and fails.
    Check the primary index on Active data table and it should be missing in your case. See the se11 index or db02 missing indexes. That is the reason that causes time out. Rebuild the primary index by asking your basis folks and repeat the activation. It should succeed.
    Thanks,
    Sri.

  • Error:Activation of data records from ODS object terminated

    Hi All
    i got error while loading the data "Activation of data records from ODS object terminated '
    could you please tell me procedure how can i solve this issue?
    regards
    vasu.

    - First check the Error Messages from the context menu of the activation step. Also check ST22 & SM21. This will tell you where the error is. Sometimes you might get duplicate records.
    - Next use the "Manage" context menu for the ODS in RSA1. Check if any of the previous records are red. If its red, it would mean that either load/activation has failed for previous request which needs to be corrected first b4 you correct the current one.
    - If al the above are OK, simply repeat the Activation step.
    Hope this helps.
    Regards
    Anujit Ghosh

  • Implementing Database codes FAIL /error in parsing data into jsp page

    Hi there,
    I have this problem trying to build a portal application. I am using the JSPDynPage, jsp page and a bean to build a page.
    I have this problem parsing data from JSPDynPage to the beans and to the jsp page.
    I tested out the connection between the beans and the jsp page. There is no error parsing information from the beans to the jsp page.
    So i tried to test out the codes for the database from the beans.
    Will this work? Because it does not display the results i want.
    I need an Solution asap to find out wad is wrong also also the correct codes to the database.
    public String db(){
    try {
                 InitialContext iC = new InitialContext();
                 DataSource dataSource = (DataSource)iC.lookup("java:env/jdbc/mySQL");
                 java.sql.Connection connection = dataSource.getConnection();
                 PreparedStatement st = connection.prepareStatement("SELECT name FROM test WHERE id='123'");
                 ResultSet resultSet = st.executeQuery();
                 while (resultSet.next()){
                      name = resultSet.getString("name");
                      name = name.toString();
                 connection.close();
                 return name;
                 } catch(Exception n){
                      e = "Exception";
                      return e;
    This is the method i put in the beans to test out the database connection.
    Thanks Loads
    Quatre

    Hi there,
    Thanks for the reply, i thought that no one is going to reply me anymore. Thanks loads.
    Bean Class name: Bean1
    Bean Packeage name: Beans1
    Bean id : myBean1
    Jsp Codes
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean1" scope="application" class="Beans1.Bean1" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <hbj:textView id = "ll" text="lalalalalalalalalasasa" />
      <%--
    <hbj:textView id = "l">
                   <% l.setName(myBean1.getName());%>
    </hbj:textView>
    --%>
    <hbj:textView
                    id="appraisal_yr_label"
                    text="Apprasial Year:">
                    </hbj:textView>
                    <hbj:textView id = "la" >
                    <% la.setText(myBean1.getName());%>
                    </hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    Beans1.java
    package Beans1;
    import java.io.Serializable;
    public class Bean1 implements Serializable{
    private String name = new String();
    private String e = new String();
    private String year = new String();
         public void setName(String name){
              this.name = name;
         public String getName(){
              return name;
    JSPDynPage
    import Beans1.Bean1;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class testDBv5 extends PageProcessorComponent {
    import Beans1.Bean1;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class testDBv5 extends PageProcessorComponent {
      public DynPage getPage(){
        return new testDBv5DynPage();
      public static class testDBv5DynPage extends JSPDynPage{
        private Bean1 myBean1= null;
        private String name = new String();
        public void doInitialization(){
              try{
                                  IntitialContext context = new javax.naming.InitialContext();
                                  DataSource dataSource = (DataSource)context.lookup("java:env/jdbc/appDB");
                                  Connection connection = dataSource.getConnection();
                                  Statement stmt = connection.createStatement();
                                  ResultSet rs = stmt.executeQuery("Select AppraisalYear From tblAppraisal Where AppraisalYear='2007'");
                                          while(rs.next()){
                                            year = rs.getString("AppraisalYear");
                                            rs.close();
                                            stmt.close();
                                            connection.close();
                                            return year;
                                       }catch (Exception n){
                                            n.printStackTrace();
              IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
                     Object o = profile.getValue("myBean1");
                     if(o==null || !(o instanceof Bean1)){
                        myBean1 = new Bean1();
                        profile.putValue("myBean1",myBean1);
                     } else {
                          myBean1 = (Bean1) o;
                        Object value = request.getSession().getValue("myBeans1");
                        if (value==null || (value instanceof Bean1)){
                             myBean1 = new Bean1();
                        request.getSession().putValue("myBean1", Object value);
              DataBase cn = new DataBase();
              name = cn.dataBaseConnection();
              myBean1.setName(name);
    //name = "gir";
    //myBean1.setName(name);
    // IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    //IPortalComponentContext myContext = request.getComponentContext();
    //Bean1 myNameContainer = (Bean1) myContext.getValue("myBean1");
    //myNameContainer.setName(name);
          // fill your bean with data here...
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("testDBv5.jsp");
    //testing purpose
      public static void main (String[] arg){
         testDBv5DynPage ef = new testDBv5DynPage();
               ef.doInitialization();
    Thanks Loads
    Quatre

  • Error while saving data using two entity objects (EO)

    Hi All,
    i am using two entity objects for saving the date in two different tables.
    on my page i am having two tables and two save buttons for saving the data in the respective tables.
    if i am not entering any data on the first table and putting valid data on the second table and click on the save button.
    it is going into error saying "Null Pointer Exception"..
    i am using getTransaction.commit() in my AM.
    so it is trying to save all the data in both the tables.
    i want to commit data of the respective table for which the save button is clicked.
    Waiting for ur reply

    Hi,
    i am using the following code for saving the data in the AM
    // TO SAVE THE JOB ASSIGNMENT DETAILS
    public void saveJobAssignmentDetails(String projectId)
    EmpAssignmentVOImpl empAssignVO = getEmpAssignmentVO1();
    getTransaction().commit(); // Line where i am getting the error
    rowNumberCountJobAssign = 0; // IN JOB ASSIGNMENT
    // EXECUTING THE DISPLAY FUNCTION AGAIN SO TAHT ALL SAVED FIELD ARE READONLY AS REQUIRED
    displayJobAssign(projectId);
    if(empAssignVO.getRowCount() != 0)
    throw new OAException("Job assignment details have been saved successfully. ",OAException.CONFIRMATION);
    Stack trace :
    oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO pa_job_bill_rate_overrides(START_DATE_ACTIVE,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,BILL_RATE_UNIT,PROJECT_ID,RECORD_VERSION_NUMBER,JOB_BILL_RATE_OVERRIDE_ID,RATE_CURRENCY_CODE) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11) RETURNING JOB_BILL_RATE_OVERRIDE_ID, JOB_ID, START_DATE_ACTIVE, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN, RATE, BILL_RATE_UNIT, PROJECT_ID, TASK_ID, END_DATE_ACTIVE, RECORD_VERSION_NUMBER, RATE_CURRENCY_CODE, DISCOUNT_PERCENTAGE, RATE_DISC_REASON_CODE INTO :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28; END;".
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:972)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("PA"."PA_JOB_BILL_RATE_OVERRIDES"."JOB_ID")
    ORA-06512: at line 1
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2154)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2036)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2880)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:371)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5108)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.schema.server.JobBillRateEOImpl.doDML(JobBillRateEOImpl.java:124)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4015)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(OAEntityImpl.java:1676)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2694)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2540)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1783)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1976)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(OADBTransactionImpl.java:680)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.server.jobBillRateAndAssignmentAMImpl.saveJobAssignmentDetails(jobBillRateAndAssignmentAMImpl.java:772)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:189)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("PA"."PA_JOB_BILL_RATE_OVERRIDES"."JOB_ID")
    ORA-06512: at line 1
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2154)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2036)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2880)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:371)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5108)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.schema.server.JobBillRateEOImpl.doDML(JobBillRateEOImpl.java:124)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4015)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(OAEntityImpl.java:1676)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2694)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2540)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1783)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1976)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(OADBTransactionImpl.java:680)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.server.jobBillRateAndAssignmentAMImpl.saveJobAssignmentDetails(jobBillRateAndAssignmentAMImpl.java:772)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:189)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

  • Error while fetching data into collection type.

    Hi all,
    I'm facing a problem while i'm fetching data into a table type.
    Open c1;
    open c2;
    loop
    Fetch c1 into partition_name_1;
    fetch c2 into partition_name_2;
    exit when c1%notfound or c2%notfound;
    open C1_refcursor for 'select a.col1,b.col2 from table1 partition('||partition_name_1||') a, table2 partition('||partition_name_2) b
    where a.col2=b.col2';
    loop
    fetch c1_refcursor BULK COLLECT into v1,v2 <-----This is the line where i'm getting the error as "ORA-01858: a non-numeric character was found where a numeric was expected"
    limit 100000;
    exit when v1.count=0;
    forall i in 1..v1.count
    end loop;
    i also checked the data type of the table variable its same as the column selected in the refcursor.
    Please help me out.
    Message was edited by:
    Sumit Narayan

    Ok I see that, but I don't think you can use associative arrays in this manner then, because you cannot select data directly into an associative_array.
    As far as I'm aware, they must be assigned an index and the error suggests to me that its missing an index.
    You can select directly into records and maybe this is where you need to go.

  • Javascript Error in InputField Date Type

    Hi,
    We have migrated the Enterprise Portal Application EP5SP6 to NW2004s SP6.Everything works fine except one issue in a Manager Reports, Where we are using Date type InputField.
    Code used:
    <hbj:inputField
    id="otherdate1"
    type="DATE"
    showHelp="TRUE"
    size="10"
    maxlength="10"
    jsObjectNeeded="true"
    disabled="TRUE"
    >
    <%
    JSP-scriptlet-START----
    otherPeriodFrom=myContext.getParamIdForComponent(otherdate1);
    JSP-scriptlet-END----
    %>
    </hbj:inputField>
    Javascript Error : Line : 3958 code: 2 Error: 'Undefined' is null or not an object
    Above Error appears when the below option in IE is selected.And also, Error appears only when the user enters the date.Also, I cannot ask users to uncheck the settings in IE as most of the users doesn't have administrator access to their amchines
    Error doesn't seem to appear when user selects the date from DataPicker component irrespective whether the below option in IE is selected or not.
    IE Setting option :
    Display a Notification about Every Script Error
    I'm not able to find what could be the problem in EP 7.0 as it works perfectly in EP5.0.
    Any ideas would be appreciated !!
    Thanks,
    Jojo

    Sent an OSS message to SAP.SAP found the problem and fixed the issue and will be available in NW2004s SPS9.
    Jojo

  • Oracle Date error on return parameter

    Hi,
    I'm getting a date parameter from Oracle returned as 0006-08-13, for Aug 13, 2006.
    I've tried a number of things in the SELECT statement, with both to_char and to_date, neither which have been sufficient.
    So I thought I'd try the replace method, but am getting an error.
    I have the following declared to have the parameter returned:
    Date datereq = admsql.getDate(9);
    String dtreq = replace(0,0,2(datereq));Do I need anything else or should I somehow use replace() wrapped around <%=dtreq%> ?
    Do I need to instead cast something to a SimpleDateFormat object in this case?
    Please advise. This is the one maddening area about Oracle!

    Hi,
    I'm getting a date parameter from Oracle returned as
    0006-08-13, for Aug 13, 2006.No, you're not. The date has probably been inserted incorrectly and is wrong in the database. Either that, or you need to learn how to format Java dates into Strings correctly.
    to_char is for converting a database DATE (or NUMBER) to a database character type such as VARCHAR2
    to_date is for converting a character type such as VARCHAR2 to a database DATE type
    I have no idea what it is you're trying to do with replace(); is that supposed to be String.replace()? If so, I don't think the code you've written should compile, and if it did, it still wouldn't do what you want; you can't do a string replacement on a Date object.
    You can get see what's been stored in your DATE (?) column with:
    // fix "your_date_column" and "your_table" and "where_clause"
    SQL = "select to_char(your_date_column, 'yyyy-mm-dd Day Month dd, Year') from your_table where where_clause";
    PreparedStatement ps = connection.prepareStatement(SQL);
    ResultSet rs = ps.executeQuery();
    rs.next();
    String dtreq = rs.getString(1);(Or you could run that SQL statement in SQL*Plus or some other general purpose SQL client; if you're going to program regularly with a database, such a thing is an essential professional tool).
    If the above SQL tells you the date really is Aug 13, 2006, then you need to figure out how to convert Java dates to Strings correctly; if the date is stored incorrectly, then you need to fix your program elsewhere.

  • Error SCardConnect return code = 80100009 / How to use another SC reader?

    Hello,
    I have 2 card readers connected to my PC. One for harddrive encryption which is part of our internal security and another one for my development (Gemplus GemPC433-SL7). I have installed the OpenCard framework for the first time on my PC because I would like to write a small SmartCard Client application reading some data from a file stored in a smart card.
    My problem is that I would like to use the Gemplus card reader to do this but when I start the batch "GetSmartCard.bat" it seems that it is trying to read the card from the smartcard reader used for my harddrive encryption. Then I get the error PC/SC Error SCardConnect return code = 80100009.
    Can you please tell me how can I force OCF to use the other card reader (GemPC433-SL7)?
    Thanks in advance for your replies.
    Alain

    I managed to get the Gemplus terminal by using the following code. I can detect is the card is inserted by using "terminal.isCardPresent(0);" but when I execute the line "SmartCard sc = SmartCard.waitForCard(cr);"
    I get the error : "opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC Exception in method SCardGetStatusChange: error executing SCardGetStatusChange
    return code = 8010002e"
    package com.hitec.chipandpin;
    import opencard.core.service.SmartCard;
    import opencard.core.service.CardRequest;
    import opencard.opt.iso.fs.FileAccessCardService;
    import opencard.opt.iso.fs.CardFile;
    import opencard.core.terminal.CardTerminal;
    import opencard.core.*;
    import java.io.*;
    import opencard.core.terminal.*;
    import opencard.core.service.*;
    import opencard.core.util.*;
    import java.util.Enumeration;
    public class InitFile {
      public static void main(String[] args)
        System.out.println("initializing file...");
          try {
          // initialize framework
            SmartCard.start();
          // get the enumeration of presently registered card terminals
            Enumeration terminals = CardTerminalRegistry.getRegistry().getCardTerminals();
            CardTerminal terminal = null;
            while (terminals.hasMoreElements()) {
              terminal = (CardTerminal) terminals.nextElement();
              if (terminal.getName().indexOf("Gemplus GemPC433") != -1) {
                //Gemplus terminal found
                break;
            // wait for a smartcard with file access support
            CardRequest cr = new CardRequest(CardRequest.ANYCARD , terminal, FileAccessCardService.class);
            SmartCard sc = SmartCard.waitForCard(cr);
            FileAccessCardService facs = (FileAccessCardService)sc.getCardService(FileAccessCardService.class, true);
            CardFile root = new CardFile(facs);
            CardFile file = new CardFile(root, ":c009");
            String entry = args[0].replace(':', '\n');
            byte[] bytes = entry.getBytes();
            int length = bytes.length;
            byte[] data = new byte[file.getLength()];
            if (data.length < length) {
              length = data.length;
            System.arraycopy(bytes, 0, data, 0, length);
            // write the data to the file
            facs.write(file.getPath(), 0, data);
            System.out.println(entry);
          catch (Exception ex) {
            ex.printStackTrace(System.err);
    finally { // even in case of an error...
          try {
            SmartCard.shutdown();
          } catch (Exception e) {
            e.printStackTrace(System.err);
        System.exit(0);
    }Can anyone of you help me to solve this problem?
    Thanks in advance.
    Alain.

  • CHECK OF UPDATE TASK Errors and RETURN CODE in RSVBCHCK.MX1

    hi ia m getting this error during the upgrade .i did checked in sm12 for any failed updates but there arent any .so i think there should be a table that i need to alter.should this be done in se16 ? and i think the table name is TRAN.LBWG any ideas.
    CHECK OF UPDATE TASK Errors and RETURN CODE in RSVBCHCK.MX1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    A2EEMCEX 141 Struct. appl. "02" cannot be changed due to setup table -> Long tex
      Long text:
        Cause
          Changing the extract structure &V#& for application &V#& is not
          permitted, because the restructure table &V#& for the extractor still
          contains data in &V#&.
          You cannot change the structure in this status, because when you load
          an InfoPackage from BW, this leads to errors.
        What to do
          <DS:TRAN.LBWG>Delete</> the entries for all restructure tables for
          application &V#&.
    1 ETH010XRSVBCHCK: Check of open update requests
    A2EEMCEX 141 Struct. appl. "02" cannot be changed due to setup table -> Long tex
    t" ""MC02M_0HDRSETUP""100"
    A2EEMCEX 141 Struct. appl. "02" cannot be changed due to setup table -> Long tex
    t" ""MC02M_0ITMSETUP""100"
    A2EEMCEX 141 Struct. appl. "02" cannot be changed due to setup table -> Long tex
    t" ""MC02M_0SCLSETUP""100"
    A2EEMCEX 141 Struct. appl. "03" cannot be changed due to setup table -> Long tex
    t" ""MC03BF0SETUP""100"
    A2EEMCEX 141 Struct. appl. "03" cannot be changed due to setup table -> Long tex
    t" ""MC03BX0SETUP""100"
    A2EEMCEX 141 Struct. appl. "03" cannot be changed due to setup table -> Long tex
    t" ""MC03UM0SETUP""100"
    A2EEMCEX 141 Struct. appl. "11" cannot be changed due to setup table -> Long tex
    t" ""MC11VA0HDRSETUP""100"
    A2EEMCEX 141 Struct. appl. "11" cannot be changed due to setup table -> Long tex
    t" ""MC11VA0ITMSETUP""100"
    A2EEMCEX 141 Struct. appl. "11" cannot be changed due to setup table -> Long tex
    t" ""MC11VA0STHSETUP""100"
    A2EEMCEX 141 Struct. appl. "11" cannot be changed due to setup table -> Long tex
    t" ""MC11V_0SSLSETUP""100"
    A2EEMCEX 141 Struct. appl. "13" cannot be changed due to setup table -> Long tex
    t" ""MC13VD0ITMSETUP""100"
    4 EPU202XEND OF SECTION BEING ANALYZED

    1. Call transaction SMQ1 and check whether all queues in all clients (client = '', queue name 'MCEX') have been processed. To process the queues, start the collective run report for each application in the displayed clients. If you no longer need the data in the BW system, deactivate the relevant extraction queues and DataSource in the LO cockpit (transaction LBWE) and delete the queue entries in transaction SMQ1.
    2. If you use the V3 update that is not serialized (usually only for application 03): Start collective run report RMBWV303. Then check the update orders in transaction SM13. If there are incorrect update orders in transaction SM13, correct the orders and then start the collective run report again. If you no longer require the update orders, you can delete them. There may be inconsistencies between tables VBMOD and VBHDR. For further information about this, see Notes 652310 and 67014.
    3. Before the upgrade, delete the contents of the setup tables. Execute report RMCEX_SETUP_ENTRIES to find out which setup tables still contain entries. You can use transaction LBWG to delete the contents of the setup tables for all clients.
    Unfortunately the check that the system carries out during the upgrade or when you import a Support Package does not display all affected applications. Therefore, Note 1083709 provides a check report that you can use to determine all affected applications and tables or queues.

  • Query in ASWE XML code doesn't return data

    Hello, since people on the Oracle Metalink site are to lazy to give an answer to this question. I'll try it via this forum. Here we go:
    I'm developing wireless applications running on Oracle9i Application Server Wireless Edition. I'v tried to implement the employee sample from Oracle Online Mobile Studio (studio.oraclemobile.com). The sample name is employee.jsp. This sample combines XML code with JSP.
    (code at the end of the text)
    When I test the sample I get no query results.
    When you take the first option for example, (search by dept number) the query result will not be displayed. I think it has something to do with the "executeQuery" line.
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    After giving the following input (employeenumber) 7369 (which excists in the
    database). I get the following errors:
    The panama server log returns the following error:
    1/14/02 5:19:28 PM NOTIFY : [Thread-13]
    core.XSLTransformerImpl.getXSLProc(XSLTransformerImpl.java:120)
    Create 10 number of XSL-processor for TINY_HTML
    1/14/02 5:19:35 PM NOTIFY : [Thread-15]
    adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL = http://host/portal/test/employee.jsp
    1/14/02 5:19:37 PM NOTIFY : [Thread-17] adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?choice=empNum
    1/14/02 5:19:49 PM NOTIFY : [Thread-19]adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?&empNum=7369
    1/14/02 5:19:50 PM ERROR : [Thread-19]rt.common.Controller.reportServiceInvocationError(Controller.java:707)
    Service Invocation Error: Stream closed.
    The jserv.log returns the following error:
    [14/01/2002 17:19:50:431 CET] Invalid column name
    java.sql.SQLException: Invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4383)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:667)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
    at portal.test._employee._jspService(_employee.java:201)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
    at oracle.jsp.JspServlet.internalService(JspServlet.java)
    at oracle.jsp.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:402)
    at org.apache.jserv.JServConnection.run(JServConnection.java:260)
    at java.lang.Thread.run(Thread.java:479)
    Does this have something to do with the encoding of the query result in the select statement? As you can see the variable is in the requeststring (URL = http://host/portal/test/employee.jsp?&empNum=7369)
    My database connection works fine (I've also tested the query using SQL plus and the SQL adapter also works).
    Is this the right statement?: ("select * from EMP where EMPNO='" + empNum + "'");
    I can not do anything with the error in the jserv.log (java.sql.SQLException: Invalid column name).
    The columnname EMPNO excists in the example table. The query in SQL plus gives a result.
    Can someone give my any suggestions?
    Thanks in advance.
    Thomas Wesseling, UCC
    ### Code of employee.jsp ###
    <?xml version="1.0" encoding="UTF-8"?>
    <SimpleResult>
    <SimpleContainer>
    <%@ page language="java" import="java.sql.*, java.util.*, java.text.* "%>
    <%
    //URL variables
    String choice = request.getParameter("choice");
    String empNum = request.getParameter("empNum");
    String lastName = request.getParameter("lastName");
    String jobTitle = request.getParameter("jobTitle");
    String deptNum = request.getParameter("deptNum");
    String notFoundMsg = null; //String for containing varying not found msg
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@172.16.0.51:1521:ora816", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = null;
    //**** Start of service - first card ****
    if (choice==null && empNum==null && lastName==null &&
    jobTitle==null && deptNum==null)
    %>
    <SimpleMenu title="Employee Search by:">
    <SimpleMenuItem target="employee.jsp?choice=empNum">Employee Number</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=lastName">Name</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=jobTitle">Job Title</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=deptNum">Dept Number</SimpleMenuItem>
    </SimpleMenu>
    <%
    //**** SECOND CARD - which search criteria ****
    if (choice!=null)
    if (choice.equals("empNum") && empNum == null)
    %>
    <!-- show search by employee number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="empNum" format="*N">Enter Employee Number: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("lastName") && lastName == null)
    %>
    <!-- show search by last name -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="lastName" format="*A">Enter Last Name: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("jobTitle") && jobTitle == null)
    %>
    <!-- show search by job title -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormSelect name="jobTitle" title="Enter Job Title:">
    <SimpleFormOption value="CLERK">Clerk</SimpleFormOption>
    <SimpleFormOption value="SALESMAN">Salesman</SimpleFormOption>
    <SimpleFormOption value="MANAGER">Manager</SimpleFormOption>
    <SimpleFormOption value="ANALYST">Analyst</SimpleFormOption>
    <SimpleFormOption value="PRESIDENT">President</SimpleFormOption>
    </SimpleFormSelect>
    </SimpleForm>
    <%
    else if (choice.equals("deptNum") && deptNum == null)
    %>
    <!-- show search by dept number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="deptNum" format="*N">Enter Dept Number: </SimpleFormItem>
    </SimpleForm>
    <%
    //**** THIRD CARD - query DB based on criteria ****
    //**** empNum entered as search criteria ****
    if (empNum != null) //empNum is entered as search criteria- NEED TO TEST FOR NON-int
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    if (rset.next()) //if rset returns data, show data
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next() is true
    else
    notFoundMsg = "Employee Number " + empNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if empNum != null
    //**** lastName as search criteria ****
    else if (lastName != null)
    rset = stmt.executeQuery("select * from EMP where ENAME='" + lastName + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Name " + lastName + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if lastName != null
    //**** jobTitle as search criteria ****
    else if (jobTitle != null)
    rset = stmt.executeQuery("select * from EMP where JOB='" + jobTitle + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Job Title " + jobTitle + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if jobTitle != null
    //**** deptNum as search criteria ****
    else if (deptNum != null) //deptNum is entered as search criteria
    rset = stmt.executeQuery("select * from EMP where DEPTNO='" + deptNum + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    else
    notFoundMsg = "Dept Number " + deptNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if deptNum != null
    conn.close();
    %>
    </SimpleContainer>
    </SimpleResult>
    ### Code of NotFound.jsp ###
    <SimpleText>
    <SimpleTextItem><%=notFoundMsg%></SimpleTextItem>
    <Action label="Search" type="ACCEPT" task="GO" target="employee.jsp?"></Action>
    </SimpleText>
    ### Code of ShowResult.jsp ###
    <%
    //format date from query
    java.sql.Date date = rset.getDate("HIREDATE");
    String hireDate = DateFormat.getDateInstance(DateFormat.MEDIUM).format(date);
    %>
    <SimpleText>
    <SimpleTextItem>Emp#: <%=rset.getString("EMPNO")%></SimpleTextItem>
    <SimpleTextItem>Name: <%=rset.getString("ENAME")%></SimpleTextItem>
    <SimpleTextItem>Job: <%=rset.getString("JOB")%></SimpleTextItem>
    <SimpleTextItem>Manager: <%=rset.getString("MGR")%></SimpleTextItem>
    <SimpleTextItem>Hire Date: <%=hireDate %></SimpleTextItem>
    <SimpleTextItem>Salary: <%=rset.getString("SAL")%></SimpleTextItem>
    <SimpleTextItem>Commission: <%=rset.getString("COMM")%></SimpleTextItem>
    <SimpleTextItem>Dept#: <%=rset.getString("DEPTNO")%></SimpleTextItem>
    <SimpleTextItem>Email: <%=rset.getString("EMAIL")%></SimpleTextItem>
    <SimpleTextItem>Phone: <%=rset.getString("PHONE")%></SimpleTextItem>
    <Action label="Search" type="SOFT1" task="GO" target="employee.jsp"></Action>
    <Action label="Call" type="OPTIONS" task="CALL" number="<%=rset.getString("PHONE")%>"></Action>
    </SimpleText>

    Is EMPNO really a string field and not a numeric field? Your query is like
    ... where EMPNO='1949'
    and should it perhaps be
    ... where EMPNO=1949
    ?

  • Received return code 500 ( Error during conversion of XI message )

    Hello Experts,
    I am configuring the WSRM for SD in SAP. I have only configured services CreditWorthinessQuery_Out and CreditWorthinessQuery_In on soamanager to carry out credit checks.
    while i am creating sales order i am getting below error.
    Received return code 500 ( Error during conversion of XI message )
    In debug i checked the string of error it showed me below string :
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">#<SOAP:Hea
    der>#</SOAP:Header>#<SOAP:Body>#<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.o
    rg/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during c
    onversion of XI message</faultstring><faultactor>http://sap.com/xi/XI/Message/30
    </faultactor><detail><SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.co
    m/xi/XI/Message/30"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSE
    R">UNEXPECTED_VALUE</SAP:Code><SAP:P1>Main/@versionMajor</SAP:P1><SAP:P2>000</SA
    P:P2><SAP:P3>003</SAP:P3><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMess
    age namespace=""/><SAP:Stack>XML tag Main/@versionMajor has incorrect value 000;
    expected value is 003##</SAP:Stack></SAP:Error></detail></SOAP:Fault>#</SOAP:Bo
    dy>#</SOAP:Envelope>#
    Does anyone have any idea about this? I am not integrating with PI/XI system.

    Hi
    Can you check this out?
    Transaction SXMB_ADM  Integration Engine Configuration
    For an application system you have to maintain the role of the business system as an application system. Set the corresponding Integration Server as an HTTP destination (for example, dest://INTEGRATION_SERVER). Create the destination in transaction SM59 and set the type to HTTP Connections to R/3 System. Test the connection by using the Connection Test button; you should get HTTP 500 u2013 Empty HTTP Request received, because no u201Ereal‟ XML document is sent during this test.
    A HTTP return code 500 (Internal Server Error) is OK.
    Regards
    Pothana

  • New to EJBs  exception in client code

    Hi i am new to EJBs when i execute the client code it is giving the following exceptions
    can any one tell me the steps to execute a simple EJB session bean. what class paths and what config and what xml files are required??
    i followed so many tutorials but the problem is not solved
    thanks
    here is the exception i wrote the JNDI name as "HelloWorld" in the weblogic-ejb-jar.xml (i am using weblogic 8.1 application server)
    Full compiler error(s):
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
            ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                              ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                                                                                   ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:140: cannot resolve symbol
    symbol  : class Hello
    location: class jsp_servlet.__helloclient
            Hello hello = home.create(); //[ /HelloClient.jsp; Line: 18]
            ^
    4 errorsand the client jsp file is as follows
      <%@ page import="java.util.*"%>
    <%@ page import="javax.naming.InitialContext"%>
    <%@ page import="javax.naming.Context"%>
    <%@page language="java" contentType="text/html"%>
    <html>
        <head>
            <title>JSP Page</title>
        </head>
        <body>
            <%
                Properties props = System.getProperties();
                   out.println("SREENIVAS  FIRST EJB");
              try {
                   Context ctx = new InitialContext(props);
                Object obj = ctx.lookup("HelloWorld");
                HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
                Hello hello = home.create();
                   out.println(hello.hello());
                hello.remove();
                ctx.close();
            } catch (Exception e) {
                e.printStackTrace();
        %></body>
    </html>

    i got the output
    its working
    the change i did is
    i put all the remote,home and local interfaces in a package and added that package to a jar file.
    then i added the jar file to class path.
    import this package into your client class.
    thats it now just deploy your ejbmodule.jar and webapplication.war in the server and test the code
    bye bye

  • PC/SC error SCardConnect return code = 80100009

    I created an application using the OpenCard Framework. I am using a Schlumberger Reflex USB v2 reader. When I run my application, I receive the following error "opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC Exception in method SCardConnect: PC/SC Error SCardConnect return code = 80100009".
    This return code corresponds to this variable in windows, SCARD_E_UNKNOWN_READER.
    I know the card reader and the PC/SC driver for the reader work correctly because I have used them with other applications.
    Is there some special configuration I have to make within the OpenCard Framework to have it recognize my reader? Or, is there some configuration I have to do within Windows 2000?
    Thanks

    My java code can detect is a card is in the reader introduced only if i run the program many times.
    With the i variable i debug that not the last running detects that the card was introduced.
    And i can detect that tha card was introduced only with these error.
    PLEASE HELP ME!!!!!!!!!
    Thanks in advanced
    My code looks like:
    import java.awt.Frame;
    import java.io.FileNotFoundException;
    import opencard.core.OpenCardException;
    import opencard.core.service.CardServiceException;
    import opencard.core.service.SmartCard;
    import opencard.core.service.CardRequest;
    import opencard.core.terminal.CardTerminalException;
    import opencard.core.util.OpenCardPropertyLoadingException;
    import opencard.opt.iso.fs.FileAccessCardService;
    import opencard.opt.iso.fs.CardFile;
    public class ReadFile {
         static int i = 16;
    public static void main(String[] args)
    System.out.println("reading smartcard file..."+ i);
    // here, the application code will be filled in
    try {
              SmartCard.start();
    //          wait for a smartcard with file access support
         CardRequest cr =
         new CardRequest(CardRequest.NEWCARD, null, FileAccessCardService.class);
         System.out.println("1");
         SmartCard sc = SmartCard.waitForCard(cr);
         System.out.println("2");
         FileAccessCardService facs = (FileAccessCardService)
         sc.getCardService(FileAccessCardService.class, true);
         System.out.println("3");
         CardFile root = new CardFile(facs);
         System.out.println("4");
         CardFile file = new CardFile(root, ":c009");
         System.out.println("5");
         byte[] data = facs.read(file.getPath(), 0,
         file.getLength() );
         System.out.println("6");
         sc.close();
         System.out.println("7");
         String entry = new String(data);
         System.out.println("8");
         entry = entry.trim();
         System.out.println("9");
         System.out.println(entry);
         System.out.println("10");
         } catch (OpenCardPropertyLoadingException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (CardServiceException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (CardTerminalException e) {
              cardInserted();
              e.printStackTrace();
         } catch (ClassNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (OpenCardException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         finally{
              try {
                   SmartCard.shutdown();
              } catch (CardTerminalException e) {
                   // TODO Auto-generated catch block
                   System.out.print("Halli Hallo ");
                   e.printStackTrace();
    System.exit(0);
    }//main
    static void cardInserted(){
         System.out.println("\ncardInserted" + i + "\n");
    }//cardInserted
    }

Maybe you are looking for