ResultSet Class in XI

Hi,
I need to know in which jar file the ResultList class is available and how to get, I want to know all the methods in ResultList.
I will add value to result list by using result.addValue, but how to remove single value.
Thanks,
RamuV

Hi
The jar file is "aii_mt_rt.jar".
This will be available at least on two to three paths under XI server directory(usr\sap...)
\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.xi.repository
\usr\sap\<SID>\SYS\global\xi\repository_server\javaws\repository
The same jar file can found on your client machine(where you work on IR and ID frameworks) at
C:\Documents and Settings\<USER>\Application Data\Sun\Java\Deployment\javaws\cache\http\Dsystem\P50000\DMrep\DMrepository
However the jar file will be prefixed with extra alphatbets "RM". This is only for internal application purposes.
The jar file will be "RMaii_mt_rt.jar".
Since you might not have access to server you better take it from your client PC and rename if required.
For your remaining queries you can follow Aamirs link.
Thanks
Gujjeti
Edited by: Praveen Gujjeti on May 12, 2008 9:32 PM

Similar Messages

  • The ResultSet class is not very convenient to use

    Often we need to know how many rows have been retrieved from the database before we read each row's data in order to do preparation works such as allocate appropriate memories to store the data.The ResultSet class in java.sql package does not provide a function to retrieve the total rows read from the database. We must do the follow to get the count of rows:
    ResultSet rs;
    rs.last();
    int lastrow = rs.getRow();
    rs.first();
    int firstrow = rs.getRow();
    int rows = lastrow - firstrow + 1;
    String [] data = new String[rows];
    // retrieve each row's data into the string array
    It would be much more convenient if the class can provide a function like:
    rs.getRows();

    Often we need to know how many rows have been
    retrieved from the database before we read each row's
    data in order to do preparation works such as allocate
    appropriate memories to store the data.But then we learn a little bit of Java and realize we can add the rows to a List (such as an ArrayList) without having to know that number in advance.

  • The ResultSet.class file

    Hi,
    I am also having similar problems with ResultSet class. I would like the ResultSet.class file that you sent to Ashish. It would help me solve my problem very quickly. Could you sent it to me as an attachment in an email.
    Thanks in advance,
    Jason Mitchell

    stmt.executeQuery(query) will return a resultset, you are asking for an int.
    resultset contains the details of the executed statement AFAIK. Bit new to this but the way I would do it is as follows:
    try{
                // Step 1: Load the JDBC driver.
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                // Step 2: Establish the connection to the database.
                String url = "jdbc:odbc:shop";
                conn = DriverManager.getConnection(url);
                System.out.println("Connected to shop database");
                catch(Exception e){
                System.err.println("Got an exception! ");
                System.err.println(e.getMessage());
                System.out.println("Suggestion: Perhaps your database cannot be found");
            }And then to insert data I would do this, use another try catch block, that way if there is an exception u will know it is not related to database connectivity.
    PreparedStatement pstmt = null;
                ResultSet rs = null;
                pstmt = conn.prepareStatement("INSERT INTO User (lastname,firstname) " +
              "values ('" + lastname + "', " +
              "'" + firstname + "')";
                pstmt.execute();Oh and declare conn somewhere;
    private Connection conn; //Database connection
    I hope this has helped
    Message was edited by:
    TheSniipe

  • Statement and ResultSet Interface type of Object

    Hi,
    Can any one explains me where exactly (in which Class) the implementation of the Statement and ResultSet Interface type of Object Instance be created
    Regards
    Krishna

    I dont really understand what you are trying to ask but:
    Your JDBC driver has concrete implementations of Statement and Resultset. If you want to know what classes are being used try something like:Connection con = ??;
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery( "???" );
    System.out.println( "Connection class: " + con.getClass().getName() );
    System.out.println( "Statement  class: " + st.getClass().getName() );
    System.out.println( "ResultSet  class: " + rs.getClass().getName() );

  • Cannot read multiple resultsets from transaction datasource

    I get a SQL exception "This object was closed() and cannot be used anymore."
    when I try to access the first row of the second result set from a stored procedure.
    This occurs when the code is running within an EJB using a transaction-capable
    datasource hooked to a connection pool that uses the MSSQLSERVERv7 JDriver
    to talk to SQL Server 7.0.
    I noted that the resultset class used is weblogic.jdbc20.rmi.SerialResultSet.
    The error occurs during the resultSet.next() call even though the resultset is
    not null and getUpdateCount() returns -1.
    However, the same code works correctly when run in a simple main() procedure from
    the DOS command line, connecting directly to the database using only the classes
    supplied with the JDriver product. The resultset class used in this case is
    weblogic.jdbc.mssqlserver4.TdsResultSet.
    The stored procedure is very simple, it just has two lines: SELECT 'Hello' and
    SELECT 'World'. The Java code follows.
    <PRE>
    // ... code to get the connection ...
    CallableStatement callableStatement = connection.prepareCall("{CALL spTest}");
    callableStatement.execute();
    ResultSet resultSet = callableStatement.getResultSet();
    if ((resultSet != null) && resultSet.next())
    System.out.println("Row from first result set:" + resultSet.getString(1));
    callableStatement.getMoreResults();
    resultSet = callableStatement.getResultSet();
    if ((resultSet != null) && resultSet.next()) // this call to next() throws the
    exception
    System.out.println("Row from second result set:" + resultSet.getString(1));
    resultSet.close();
    callableStatement.close();
    connection.close();
    </PRE>
    I am running WL5.10sp11 with mssqlserver4v70sp11 on NT4.0sp6a and JDK1.3.0_02
    (HotSpot Client VM).
    Regards,
    Tom B.

    Tom Bechtold wrote:
    >
    Joe,
    Here is the debug messages and trace with your diagnostic jar.
    I hope this helps - Tom
    we got Hello
    java.sql.SQLException: java.lang.Exception: ResultSet originally closed at:
    at weblogic.jdbcbase.mssqlserver4.TdsResultSet.close(TdsResultSet.java,
    Compiled Code)
    at java.lang.Exception.<init>(Unknown Source)
    at weblogic.jdbcbase.mssqlserver4.TdsResultSet.close(TdsResultSet.java,
    Compiled Code)
    at weblogic.jdbcbase.jts.ResultSet.close(ResultSet.java:260)
    at weblogic.jdbc20.rmi.internal.ResultSetImpl.close(ResultSetImpl.java:53)
    at weblogic.jdbc20.rmi.SerialResultSet.close(SerialResultSet.java:54)
    ... rest of EJB call stack ...Hi. I do want to see the whole stack trace please, and also the EJB code.
    thanks,
    Joe
    >
    Joseph Weinstein <[email protected]> wrote:
    Tom Bechtold wrote:
    Hi Joe,
    I pasted your sample program into my bean and ran it under
    WL510sp11 and JDriver 5.1.0sp11, and it did exhibit the error
    as my code did.
    But it runs fine under WL510sp10 with JDriver 5.1.0sp11.
    Thanks for your great support,
    TomYou're very welcome. Please take the attached jar file, and add it
    at the front of the server's weblogic.classpath, by editting the
    startWebLogic script, and let me know what happens. This jar contains
    the ResultSet class, with a hack to remember where it was closed, and
    print that out if/when it is closed a second time.
    Joe
    Joseph Weinstein <[email protected]> wrote:
    Tom Bechtold wrote:
    A follow-on note: when I back out to Service Pack 10, the problem
    is
    not there,
    so it seems that it is an issue with Service Pack 11.
    - Tom Bechtold
    "Tom Bechtold" <[email protected]> wrote:
    I get a SQL exception "This object was closed() and cannot be used
    anymore."
    when I try to access the first row of the second result set from
    a
    stored
    procedure.
    This occurs when the code is running within an EJB using a transaction-capable
    datasource hooked to a connection pool that uses the MSSQLSERVERv7JDriver
    to talk to SQL Server 7.0.
    I noted that the resultset class used is weblogic.jdbc20.rmi.SerialResultSet.
    The error occurs during the resultSet.next() call even though theresultset
    is not null and getUpdateCount() returns -1.Hi. You say that getUpdateCount() returns -1. I don't see that inthe
    code you sent,
    so you probably just gave us a representative sample of the code you
    run. I did
    runs uch code with the driver alone, and it works as you say. I will
    see if I can
    set up a server to do this via a DataSource, but in case anyone wants
    to help/race with
    me :-), here's simple code to run. If you convert it to a DataSource
    connection,
    and it behaves differently, I'll send you a diagnostic class to seewhat's
    up...
    Joe
    Connection connection = null;
    try
    Properties properties = new Properties();
    properties.put("user", "sa");
    properties.put("password", "");
    Driver d = (Driver)Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    connection = d.connect("jdbc:weblogic:mssqlserver4:JOE:1433",
    properties);
    // or get connection from DataSource...
    Statement statement = connection.createStatement();
    try {
    statement.execute("drop procedure bla");
    } catch (Exception e){}
    statement.execute("create procedure bla as select 'Hello
    ' select 'world'");
    CallableStatement c = connection.prepareCall("{ call bla()
    c.execute();
    ResultSet resultset = c.getResultSet();
    while(resultset.next())
    System.out.println("we got " + resultset.getString(1));
    resultset.close();
    c.getMoreResults();
    resultset = c.getResultSet();
    while(resultset.next())
    System.out.println("we got " + resultset.getString(1));
    resultset.close();
    catch(SQLException exception1)
    exception1.printStackTrace();
    finally
    try { connection.close();} catch(Exception ex) {}
    However, the same code works correctly when run in a simple main()procedure
    from the DOS command line, connecting directly to the database
    using
    only
    the classes supplied with the JDriver product. The resultset classused in this
    case
    is weblogic.jdbc.mssqlserver4.TdsResultSet.
    The stored procedure is very simple, it just has two lines: SELECT
    'Hello'
    and SELECT 'World'. The Java code follows.
    // ... code to get the connection ...
    CallableStatement callableStatement = connection.prepareCall("{CALLspTest}");
    callableStatement.execute();
    ResultSet resultSet = callableStatement.getResultSet();
    if ((resultSet != null) && resultSet.next())
    System.out.println("Row from first result set:" + resultSet.getString(1));
    callableStatement.getMoreResults();
    resultSet = callableStatement.getResultSet();
    if ((resultSet != null) && resultSet.next()) // this call to next()throws the
    exception
    System.out.println("Row from second result set:" + resultSet.getString(1));
    resultSet.close();
    callableStatement.close();
    connection.close();
    I am running WL5.10sp11 with mssqlserver4v70sp11 on NT4.0sp6a and
    JDK1.3.0_02
    (HotSpot Client VM).
    Regards,
    Tom B.--
    B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
    CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner,
    NJ
    SENIOR WEB DEVELOPER San Jose,CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA
    San Jose, CA
    SR. PRODUCT MANAGER Bellevue,WA
    SR. WEB DESIGNER San Jose,CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose,CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose,CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose,CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services)
    Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose,CA
    MANAGER, E-SALES Plano, TX--
    B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
    CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner,
    NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA
    San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services)
    Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX
    B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco, CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner, NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services) Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX

  • Getting the number of rows returned from ResultSet

    Hi,
    Does anyone know a method to get the number of rows returned with a query using the Resultset class?
    Thanks.

    Hi 281080,
    If your database and JDBC driver support it, in order to use the solution that da-alexj has suggested, you need to create a 'scrollable' "ResultSet" -- the javadoc for method "createStatement()" (in class "java.sql.Connection") has more details.
    However, I have found with Oracle 8.1.7.4 database and Oracle (thin) JDBC driver, that part of their implementation of the "last()" method (in class "java.sql.ResultSet") is to actually iterate through the entire "ResultSet" in order to reach the last row. If your "ResultSet" is very large (I tested it with a 100,000 row "ResultSet"), this will take a long time.
    Just wanted to make you aware of that.
    Of-course, this may be irrelevant to you since I didn't see any mention in your post of what database and JDBC driver you are using.
    Hope this has helped you, anyway.
    Good Luck,
    Avi.

  • Resultset (absolute) method error

    rs.absolute(2);
    rs.updateInt(1,2);
    rs.updateString(2,"here");
    rs.updateRow();
    but here it shows an error message like
    PreResset.java:20: cannot find symbol
    symbol : method updateSting(int,java.lan
    location: interface java.sql.ResultSet
    rs.updateSting(2,"dev");
    please how can i update the data in database by using absolute method
    Edited by: Ram_mca04 on Jan 23, 2009 12:12 AM

    BalusC wrote:
    jschell wrote:
    BalusC wrote:
    Ram_mca04 wrote:
    PreResset.java:20: cannot find symbol
    symbol : method updateSting(int,java.lan
    location: interface java.sql.ResultSet
    rs.updateSting(2,"dev");This just means that the mentioned method doesn´t exist in the ResultSet class which you´re using.
    According to the [API documentation|http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html#updateString(int,%20java.lang.String)] this method was introduced in Java 1.2. Either you´re using Java 1.1 or older, or there is some huge flaw in your environment.
    Or an older driver.He encountered the problem during compilation (cannot find symbol), not during runtime (NoSuchMethodError).True.
    And something else I noticed when re-reading - look closely at the posted method name.

  • ReadObject() method cant find a serilizable class in serilizable Vector

    I have been thinking this problem for three hours,I dont know what to do now
    first,my envirment path is :
    G:\tomcat2\Tomcat 4.1\webapps\ROOT\WEB-INF\classes;
    G:\tomcat2\Tomcat 4.1\webapps\ROOT\WEB-INF\classes\DataBase
    "myfriendsCol.dbs"has only a serilizable Vector in it,
    "myfriendsCol.dbs" is in DataBase package;
    this Vector has some DataStructure(code is below):
    package DataBase;  //DataStructure in DataBase package
    import java.io.*;
    public class DataStructure implements Serializable{
      String columnID;     //column's name
      String columnType;  
      public DataStructure(String CI,String CT){
        columnID=CI; 
        columnType=CT;
      public String getColumnID(){
        return columnID;
      public String getColumnType(){
        return columnType;
    }now,I want use jsp to visit "myfriendsCol.dbs",this jsp file is in G:\tomcat2\Tomcat 4.1\webapps\ROOT
    code here:
    <%@ page contentType="text/html;charset=GB2312" %>
    <%@ page import="DataBase.*" %>
    <%@ page import="DataBase.DataStructure" %>
    <html>
       <body>
        <% SQLDriver driver=new SQLDriver();
           ResultSet set=driver.executeQuery("desc myfriends");
         %>
        </body>
    </html>SQLDriver.class and ResultSet.class in DataBase package together with DataStructure.class and myfriendsCol.dbs
    in driver.executeQuery(String sql);code below:
    public ResultSet executeQuery(String sql){
       else if(sql.indexOf("desc")!=-1){
         String tableName=sql.substring(sql.indexOf("c")+2,sql.length());//get tablename"myfriends"
         Vector tableInfo=readVector(tableName);//code below
      public Vector readVector(String tableName){
        try{
         String filename=tableName+"Col.dbs";     //filename is "myfriendsCol.dbs"
         File path=new File("G:/tomcat2/Tomcat 4.1/webapps/ROOT/WEB-INF/classes/DataBase",filename);
         fileInput=new FileInputStream(path);
         objInput=new ObjectInputStream(fileInput);
         outer=(Vector)objInput.readObject();  //exception occur !
         }catch(ClassNotFoundException ex){System.out.println("classNotFoundException2 is "+ex);}
          catch(IOException ioex){System.out.println("IOException is "+ioex);}
        return outer;
      }   tomcat report error:
    classNotFoundException2 is java.lang.ClassNotFoundException: DataStructure

    did you compile it?
    Is it in the right location?
    The last message would appear not...

  • Related To My SQL Data Base Resultset Coonectivity

    Hi
    I want to open Crystal report through Java 1.5 Using JAVA Beans class.
    Data Base: My SQL, JDBC connectivity
    Class Names: CrystalRepoty(For Viewing The Report)
    Bean Class(WorkinfoDataSourceBean): For Data Base Connectivity
    When i open the perticular report its gives error.
    Error Detials
    Failed to open connection (Connection: databaseType=Java Beans Connectivity serverName=WorkinfoDataSourceBean state=closed databaseDriverName=crdb_javabeans.dll).
    com.crystaldecisions.reports.queryengine.al: Error loading ResultSet class (WorkinfoDataSourceBean)

    Hi,
    When there is a need to display huge amount of data...one approach is to display data on demand by user. 
    Keep updating the table with latest 100 rows and when user wants previous history populate the table with previous history of data.  By providing comfortable user interface user will not feel it as a burden.
    Hope this helps.
    With regards,
    JK
    (Certified LabVIEW Developer)
    Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

  • NPE in com.mysql.jdbc.ResultSet

    hi guys,
    config: Connector/J 3.1.11 - mysql 5.0 - java 1.5
    is anybody has ever seen this exception??
    Caused by: java.lang.NullPointerException
            at com.mysql.jdbc.ResultSet.buildIndexMapping(ResultSet.java:597)
            at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:905)
            at com.mysql.jdbc.ResultSet.getString(ResultSet.java:4977)we've got this exception and we can't understand why!!
    the ResultSet class fragment...
    for (int i = numFields - 1; i >= 0; i--) {
              Integer index = new Integer(i);
              String columnName = this.fields.getName();
              String fullColumnName = this.fields[i].getFullName();
              if (columnName != null) {
                   this.columnNameToIndex.put(columnName, index);
                   this.columnNameToIndex.put(columnName.toUpperCase(), index);
                   this.columnNameToIndex.put(columnName.toLowerCase(), index); // <--- this line caused the exception
              if (fullColumnName != null) {
                   this.fullColumnNameToIndex.put(fullColumnName, index);
                   this.fullColumnNameToIndex.put(fullColumnName.toUpperCase(),
                             index);
                   this.fullColumnNameToIndex.put(fullColumnName.toLowerCase(),
                             index);
    i don't understand why it is possible. columnNameToIndex is protected and only accessed by the ResultSet class. it is in the buildIndexMapping() method and this method is called only in a synchronized method so ???
    any ideas??
    sup@reno

    Caused by: java.lang.NullPointerException
    at com.mysql.jdbc.ResultSet.buildIndexMapping(ResultSet.java:597)It's an open-source jdbc driver, which maintainted by Mysql. You can try to fix it, and recompile your Connector/J, or report simply Mysql that issue.

  • Best efficiently  way to transform a large rows ResultSet to Vector

    Best efficiently way to transform a large rows ResultSet to a 2-dimensional ArrayList or Vector in a minute ?
    If you can help me solve this problem , I 'll give you my duke .

    Why don't you use info objects? For example your table is having col1(number),col2(text/varchar),col3(text/varchar), create an info object like this,
    class MytableInfo implements java.io.Serializable {
    private int col1;
    private String col2;
    private String col3;
    public MytableInfo(int col1,String col2,String col3) {
    this.col1=col1;
    this.col2=col2;
    this.col3=col3;
    public int getCol1() {
    return col1;
    //Getter for other two properties too.
    and in your ResultSet class,
    Vector v = new Vector();
    while(rs.next()) v.add(new MytableInfo(rs.getInt(1),rs.getString(2),rs.getString(3));
    return v;
    So, it will be easier for retrieving the values later and it is a clean way of doing it.
    Sudha

  • Oraub8 (64-bit int) and Number class

    What's the best mechanism for getting and setting numbers from a 64-bit integer (oraub8). I'm surprised these methods don't exist the Statement or ResultSet classes by now.
    Strategies I'm considering: A) use getNumber().getBytes() and then do the conversion, or B) use setDataBuffer() to get the raw number format directly and then do the conversion.

    That's my whole point. The OCCI Number class doesn't have an operator int64() method. Nor do Statement or ResultSet have getXXX()/setXXX() methods for 64-bit integers. Compilers have supported 64-bit ints for a while now.
    Sequences used as primary key generators can certainly be larger than a 32-bit integer. I don't have a primary key that large...yet. But I could being there within the next year or two. I'm looking for a migration path for my code. Continuing to represent a primary key as a whole number within the app is cleaner than converting from int to string.

  • Interface ResultSet

    I am now confused with interface and class. java.sql.Resultset is an interface as defined in spec. However, we can always use its methods. So who implement those methods? According to the definition of interface, the methods are not implemented.
    Thanks!

    Do this
    ResultSet rs = pstmt.executeQuery(sql);
    System.out.println("ResultSet class = " + rs.getClass());
    You will see that rs is not a 'ResultSet' rather it is a class which implements a ResultSet.

  • JWSD RPC: abstract class or interface aren't working

    I have an abstract class called Record, and some classes that extend Record. These class have been added in the additionalTypes part of the configuration file (a copy of the config.xml is shown below)
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration
    xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service name="sscService"
    packageName="ssc"
    targetNamespace="http://www.eurice.de/infocitizen/ssc"
    typeNamespace="http://www.eurice.de/infocitizen/type/ssc">
    <interface name="ssc.server.SupplierPort"
    servantName="BasicSupplier"/>
    <typeMappingRegistry>
    <additionalTypes>
    <class name="ssc.ConnectionSpec"/>
    <class name="ssc.InteractionSpec"/>
    <class name="ssc.MappedRecord"/>
    <class name="ssc.IndexedRecord"/>
    <class name="ssc.server.ResultSet"/>
    <class name="ssc.server.SOAPNull"/>
    <class name="ssc.ResultSetMetaData"/>
    <class name="ssc.Entry"/>
    <class name="ssc.SupplierMetadata"/>
    <class name="ssc.EISMetadata"/>
    <class name="ssc.cl.BirthCertificate"/>
    </additionalTypes>
    </typeMappingRegistry>
    </service>
    </configuration>
    However the xrpcc tool issues the following error message:
    E:\Projects\ssc\.\xrpccServer\ssc\Record_SOAPSerializer.java:33: class ssc.Recor
    d is an abstract class. It can't be instantiated.
    Record instance = new Record();
    Can you help me?

    OK, I took your record class as is:
    public abstract class Record {
    private java.lang.String recordId;
    private java.lang.String name;
    private java.lang.String shortDescription;
    public java.lang.String getName() {
    return name;
    public void setName(java.lang.String name1){
    name=name1;
    public java.lang.String getShortDescription() {
    return shortDescription;
    public void setShortDescription(java.lang.String shortDescription1){
    shortDescription=shortDescription1;
    public java.lang.String getRecordId() {
    return recordId;
    public void setRecordId(java.lang.String id1){
    recordId=id1;
    Added a subclass:
    public class MyRecord extends Record {
    private int age;
    public MyRecord() {}
    public void setAge(int age) {
    this.age = age;
    public int getAge() {
    return age;
    Used the record in a service endpoint interface:
    public interface Interface extends Remote {
    public Record echo_Record(Record record) throws RemoteException;
    Put MyRecord as an additionalType in the config.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration
         xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service name="Interface_Service"
    targetNamespace="http://echoservice.org/wsdl"
    typeNamespace="http://echoservice.org/types"
    packageName="stub_tie_generator_test">
    <interface name="stub_tie_generator_test.Interface"
    servantName="stub_tie_generator_test.InterfaceImpl"/>
    <typeMappingRegistry>
    <additionalTypes>
         <class name="stub_tie_generator_test.MyRecord"/>
    </additionalTypes>
    </typeMappingRegistry>
    </service>
    </configuration>
    And invoked the method with:
    Record rec = new MyRecord();
    ((MyRecord)rec).setAge(33);
    rec.setShortDescription("short");
    rec.setName("name");
    rec.setRecordId("id");
    Record returnedRec = stub.echo_Record(rec);
    assertTrue(((MyRecord)rec).getAge() == ((MyRecord)returnedRec).getAge());
    assertTrue(rec.getShortDescription().equals(returnedRec.getShortDescription()));
    assertTrue(rec.getRecordId().equals(returnedRec.getRecordId()));
    assertTrue(rec.getName().equals(returnedRec.getName()));
    and everything works. I am not sure what the problem you are having is.
    May I suggest you try my simplified example and see if it works for you.

  • This problem has troubled me two days!class cant visit class between jars;

    I set classpath: CLASSPATH:C:\Documents and Settings\xxxx
    in this directory,I have a jdbc.jar and a sub directory named t,Test class in t ;
    Test class code here:
    package t;
    import jdbc.DateParser;
    public class Test{
        public static void main(String[] args){
            DateParser parser=new DateParser();
            String s=parser.formatDate("1987/9/9");
           System.out.println(s);
    }I do this:
    C:\Documents and Settings\xxxx>java t.Test
    1987/09/09 00:00:00
    this Test class run successfully
    and I do this(note: in MANIFEST.MF,just only this words at first line : Main-Class: t.Test) :
    C:\Documents and Settings\xxxx>jar cvfm t.jar MANIFEST.MF t
    list (manifest)
    add&#65306;t/(read= 0) (write= 0)(stored 0%)
    add&#65306;t/Test.java(read= 237) (write= 159)(compressed 32%)
    add&#65306;t/Test.class(read= 524) (write= 347)(compressed 33%)
    C:\Documents and Settings\xxxx>java -jar t.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: jdbc/DateParser
    at t.Test.main(Test.java:5)
    this execution is failed?
    why??
    this problem has troubled me two days!I really need help!

    C:\Documents and Settings\xxxx>jar tvf jdbc.jar
    0 Thu Nov 04 21:16:20 CST 2004 META-INF/
    91 Thu Nov 04 21:16:20 CST 2004 META-INF/MANIFEST.MF
    0 Tue Nov 02 23:32:50 CST 2004 jdbc/
    547 Sun Oct 31 18:54:08 CST 2004 jdbc/Blob.class
    4280 Fri Oct 29 23:28:40 CST 2004 jdbc/ResultSet.class
    2100 Sun Oct 31 23:45:56 CST 2004 jdbc/Statement.class
    2438 Thu Oct 28 22:22:32 CST 2004 jdbc/Connection.class
    1384 Thu Oct 28 22:11:42 CST 2004 jdbc/HStream.class
    2172 Thu Oct 28 22:20:08 CST 2004 jdbc/Test.class
    3347 Sun Oct 17 21:23:38 CST 2004 jdbc/DateParser.class
    4495 Wed Oct 20 17:19:26 CST 2004 jdbc/Sorter.class
    Actually, ignore that. I think the problem is you are using "java -jar xxx". This runs the JAR in encapsulated mode, which ignores any classpath setting.you mean using "java -jar xxx" cant let xxx visit a class that in another jar?
    if that,what command shoud I use?

Maybe you are looking for