Using a ResultSet from an EJB on my client

Hi,
How do i use an ResultSet delivered form my EJB on my Java Client ?
On Sybase EAServer my code looks like this
java.sql.ResultSet rs =
com.sybase.CORBA.jdbc11.SQL.getResultSet(bnoEJBRemote.getForm("X"));
How will it look like using BEA WLS 6.1 ?
Do i have to use dbKona ?
TIA,
Borre

Hi .
Click here >  How to report an issue with Your iTunes Store purchase
And explain that you were charged twice here >  Apple - Support - iTunes Store - Contact Us

Similar Messages

  • Need assistance using coherence calls from an ejb, get exception

    I've added some Coherence calls to a simple EJB, that can be called from a plain java client or a jsp. The bean code is attached as well as the call stack for the exceptions, first
    for plain java client, second for jsp. Have also run Web installer, this file
    is attached too.
    Your help would be greatly appreciated.
    Thank you,
    Ken Rubin<br><br> <b> Attachment: </b><br>javaclientexception.txt <br> (*To use this attachment you will need to rename 209.bin to javaclientexception.txt after the download is complete.)<br><br> <b> Attachment: </b><br>jspexception.txt <br> (*To use this attachment you will need to rename 210.bin to jspexception.txt after the download is complete.)<br><br> <b> Attachment: </b><br>ConverterBean.java <br> (*To use this attachment you will need to rename 211.bin to ConverterBean.java after the download is complete.)<br><br> <b> Attachment: </b><br>coherence-web.xml <br> (*To use this attachment you will need to rename 212.bin to coherence-web.xml after the download is complete.)

    Hi CP,
    I had added C:/tangosol/lib/tangosol.jar;C:/tangosol/lib/coherence.jar
    to my classpath originally and could not find the classes. After I copied both jars into
    my Sun/AppServer/lib path, the jars were found, yet I
    get another exception, which is attached.
    My server is Sun Java Application Server 8 Q1.
    Thank you,
    Ken<br><br> <b> Attachment: </b><br>aftercopyinglibs.txt <br> (*To use this attachment you will need to rename 213.bin to aftercopyinglibs.txt after the download is complete.)

  • How to transmit an exception from an EJB to a client ?

    I have a deployed EJB with a business method that throws an exception if something goes wrong. When the EJB is called (by a remote Java client) the client is not getting any exception if something goes wrong in the EJB's business method. This is how the EJB's business method is currently coded:
    void m() throws RemoteException
    try { //stuff
      } catch( Exception e ) {
        throw RemoteException(e.getMessage());
      } finally {
        // clean up
    What is wrong with this ? Any help is appreciated.
    Thanks,
    Colm.

    i think have to do something like this
    void m() throws RemoteException
    try { //stuff
      } catch( Exception e ) {
        throw new RemoteException(e.getMessage());
      } finally {
        // clean up
    look the "new", and have to create a custom class exception.
    look here:
    http://www-128.ibm.com/developerworks/library/j-ejbexcept.html
    http://docs.jboss.org/jbossas/javadoc/4.0.2/javax/ejb/EJBException.java.html
    http://docs.jboss.org/jbossas/javadoc/4.0.2/javax/ejb/

  • Using T3 Services from EJB's

    I want to use weblogic's T3Services from within stateless session beans. But when I try to do this I get the following error
    java.rmi.RemoteException: java.lang.NoClassDefFoundError: weblogic/common/T3ServicesDef
    and when I try to put \weblogic\classes in JAVA_CLASSPATH while starting weblogic the server does not start.
    Is their a way of using these services from within EJB's
    I am using weblogic 5.1.0 service pack 6 under WINNT environment with SP5
    Thanks
    Sohit

    You have classpath problems. Please post the classpath and the weblogic
    classpath that you are using to start the server. In particular, make
    sure that your ejb-jar is not found in either of these.
    -- Rob
    Sohit wadhwa wrote:
    >
    I want to use weblogic's T3Services from within stateless session beans. But when I try to do this I get the following error
    java.rmi.RemoteException: java.lang.NoClassDefFoundError: weblogic/common/T3ServicesDef
    and when I try to put \weblogic\classes in JAVA_CLASSPATH while starting weblogic the server does not start.
    Is their a way of using these services from within EJB's
    I am using weblogic 5.1.0 service pack 6 under WINNT environment with SP5
    Thanks
    Sohit

  • Using Spring beans from EJB MDB

    I have a situation where I need to use spring beans from an EJB 3.0 MDB. The project does not have any webapps or anything,
    it will be only a MessageBean facade that needs to call spring beans. It is meant to be a service, that can be called by usign a single EJB message.
    The problem is I cannot get the spring context to load properly, since the MDBean it self is initialized(constructor called) only when it receives the first message from the broker, thus It's "too late" to initialize the spring context. What I want to do is load the spring context when the EJB is deployed in the Java EE container. So, is there a way I can call a some method, class, anything when the EJB is deployed in the container. Can I do something with a deployment descriptor?
    I am using glassfish V2 UR1, EJB 3.0, Spring 2.0.7 The project is deployed as a jar.

    Miku wrote:
    I have a situation where I need to use spring beans from an EJB 3.0 MDB. The project does not have any webapps or anything,
    it will be only a MessageBean facade that needs to call spring beans. It is meant to be a service, that can be called by usign a single EJB message. Why not make it a real service? Spring's contract first web services are a very nice way to go. It hides the fact that you're using a message-driven component for processing, too.
    %

  • How to get resultset from oracle procedure use ejb3

    how to get resultset from oracle procedure use ejb3
    i know oracle procedure should like this
    Create or replace PROCEDURE resultset_test(
    aaa IN NUMBER,
    bbb OUT sys_refcursor) ....
    but what s the ejb3 scripts looks like? please give me an example or link~
    ths

    - there are no EJB3 scripts, only compiled application code
    - the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
    Now you should know what to Google to get your "example script": "java jdbc oracle procedure"

  • ClassCastException: You must use ResultSet from this driver!class webl

    Hi,
    I have configured the Connection pool and DataSources for SQLServer using inet-OPTA
    drivers.
    I am using the CachedRowSet implementation from inet and it seems to bomb out
    with the following error stack trace:
    STACK TRACE:
    java.lang.ClassCastException: You must use ResultSet from this driver!class webl
    ogic.jdbc.rmi.SerialResultSet
    at com.inet.tds.CachedRowSet.a(Unknown Source)
    at com.inet.tds.CachedRowSet.populate(Unknown Source)
    Any ideas of what is causing this problem ?
    Is it that i cannot use the CachedRowSet implementation from inet.
    If that is the case we have lot of code that uses this and i will have to change
    a lot.
    Any help is appreciated
    Thanks
    Venu

    The code is in one of the utility classes that is in the classpath and this utility
    class is used by the Stateless session EJB that i deployed in the WebLogic AppServer.
    As i understand, Weblogic 8.1 is out and i will try running on it.
    Thanks
    Venu
    Joseph Weinstein <[email protected]_this> wrote:
    >
    >
    venu wrote:
    Hi,
    I am running WebLogic version 7.0.2
    Do you have any idea when the 8.1 will be available (i believe it isstill in
    beta)
    I'll find out. Do answer my other question: Where is this code running
    that gets the exception?
    Joe
    - Srini
    Joseph Weinstein <[email protected]_this> wrote:
    venu wrote:
    Hi,
    I have configured the Connection pool and DataSources for SQLServerusing inet-OPTA
    drivers.
    I am using the CachedRowSet implementation from inet and it seems
    to
    bomb out
    with the following error stack trace:
    STACK TRACE:
    java.lang.ClassCastException: You must use ResultSet from this driver!classwebl
    ogic.jdbc.rmi.SerialResultSet
    at com.inet.tds.CachedRowSet.a(Unknown Source)
    at com.inet.tds.CachedRowSet.populate(Unknown Source)
    Any ideas of what is causing this problem ?
    Is it that i cannot use the CachedRowSet implementation from inet.
    If that is the case we have lot of code that uses this and i will
    have
    to change
    a lot.
    Any help is appreciated
    Thanks
    VenuHi. What version of the server are you using. This problem will goaway
    for 8.1.
    We currently wrap all JDBC objects from pooled drivers, to maintaincontrol
    over
    the pooled connection. Where is this code running that gets the exception.
    It seems that Inet's rowset implementation needs to cast the resultset
    it gets
    to be inet's result set object, in order to make some non-standardmethod
    calls.
    Joe

  • Using COM component from EJB

    Hi,
    I'd like to use a third party COM component from. I know JIntegra and such tools but I'd like to use a non-commercial software as I need it for my diploma thesis.
    Did anyone ever manage to call an ActiveX/COM component from an EJB. I mean a third party component, not a self developed one.
    Could I use M$ specific classes in my EJB or do they rule out each other?
    Any working example?
    TIA
    Frank

    Did you really manage to use third party DLLs with EZJCOM?
    Would be great if you could clarify this to me:
    If I would use M$ specific classes to have a Java / COM - communication then I would
    have to use M$ JVM, right?
    But if I use that VM, I can not use my classes within the J2EE / EJB environment as this
    requires Sun's JVM, right?
    So, if I use EZJCOM for that than I do not have to use any M$ specific stuff, right?
    Unfortunately, I did not get any further yet. The product I'd like to use is Lindo.
    I have the DLL, but trying to use it with EZJCOM it says: No COM interface definition.
    No tlb is given either. There's a JAR package with classes that seem to use JNI to call
    DLL functions, so maybe it does not provide a COM interface.
    But that means I would have to build my own (maybe VB) ActiveX DLL that calls all the funtions
    in the Lindo DLL. But that would keep me busy for weeks I guess :-(
    As I need it for my diploma thesis, I can not spend a lot of time building ActiveX components.
    Frank

  • Using a JMS control from an EJB project

    I'm developing an EJB in Workshop and my EJB is expected to send messages to a JMS queue. How can I use a JMS control (JCX) from my EJB?

    If you're talking about making an executable jar file that will work with the bouncycastle jar:
    (1) Make a jar as usual with your classes in it
    (2) Include a manifest file that specifies the class containing your app's main() method
    (3) In that same manifest, make sure that the bouncycastle jar is included in the Class-Path
    Details are in Sun's Tutorial: [Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html] and specifically [http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html|http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html] for the business of having your app recognise the other jar file's classes at runtime.
    Doubtless this can all be done from the comfort of your IDE, but I don't know how. There will be documentation on NetBeans site I suppose.
    Edited by: pbrockway2 on Jul 23, 2008 8:59 PM

  • How can Transformation control be used from an EJB Project?

    I want to perform some data transformation directly from within the EJBs. Can Transformation
    control be used from an EJB Project? How?

    William, thanks for the reply.
    I bought this drive module from a private party and was surprised to find out what it was. At first I thought it was just Apple's way of protecting the drive during shipping.
    I own it and will probably have an hard time returning it. It was advertised as a 750GB Seagate SATA ES hard drive. The price was very reasonable, especially if I was buying it as a Drive Module. So if I can sell it great, if not I want to use the drive.
    How can I tell if this is a Xserve RAID module or Drive Module? The box just says Apple Drive Module no mention of RAID. The Apple model # is MA504G/A, and it say Apple Drive Module 750GB SATA (Intel). On the hard drive itself it says Seagate Barracuda ES 750Gbytes.
    If this is just the Drive Module and I can use it in my Mac Pro, does it just unplug or unscrew out of the housing it's in and plug into the Mac Pro like a normal drive? And then can it be used like a normal drive to set up a RAID in the Mac Pro with a duplicate bare drive? It's sealed and I don't want to open it until I know I can use it.
    Sorry for all the questions but I know enough to be dangerous and this this has me stumped.

  • Resultset from a Stored Procedure

    Hello Everyone,
    Is it possible to return a resultset from a stored procedure? I need to do display set of rows which are resulted by joining few tables.
    Is it possible?
    Please help..
    TIA
    Regards,
    Rao Santapur.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Raymond Tang ([email protected]):
    You can use 'REF CURSOR'<HR></BLOCKQUOTE>
    I have created a stored procedure with a ref cursor- what parameters do i need to pass via Sql*Plus to get results?
    [email protected]
    null

  • How can I look up DataSource from one EJB to the other EJB?

    Image that, I have 3 databases:
    DB1
    DB2
    DB3,
    And then, 03 DataSources is deployed in DS EJB, named DataSource1, DataSource2, DataSource3.
    In the other App EJB, I have Connection Management function, as follows:
    public Connection getConnection(databaseKey) {
    if (databaseKey.equals("DB1")){
    connection = remote.lookup("DataSource1");
    }else if (databaseKey.equals("DB2")){
    connection = remote.lookup("DataSource2");
    }else if (databaseKey.equals("DB3")){
    connection = remote.lookup("DataSource3");
    return connection;
    How can I access DataSource 1,2,3 from the other EJB? How to config EJB server for that?
    Thanks in advance!
    Now, I have the other App EJB. Some class will require one of the above DataSource from DS EJB through function getConnection(databaseKey){}

    I strongle suggest you to use a ServiceLocator for this . It will be very easy to identify.Go to the sun home page and look for a servicelocator pattern.You can even directly use that code for you.

  • How to use one ResultSet many times in a jsp page ?

    Hi all,
    I have .jsp page and I have used it to get data from DB and display them to users. So I have to get data from DB in number of places in this particular jsp.
    I thought that it is better to have one ResultSet for entire page and once it is done its job, the ResultSet will be closed and I can use it again and again like this.
    Resultset rs = new ResultSet();
    try{
        //My operations
    }catch(Exception ex){
       //Handle Exceptions
    }finally{
       rs.close();
    }After above code snippet I can use same ResultSet again below the page.
    I just want to know this,
    1. is this a good coding practice?
    2. Should i put rs = null; within finally clause?
    any help will be appreciated
    thank in advance,
    Dilan.

    Ok, Finally I switched my coding to use DAO and DTO, and I learned it through internet.
    I removed all of data access codes from my jsp file(lets say 'functions.jsp'). I then created one interface and two clasess.
    here is my DAO interface.
    public interface UserFunctionsDAO{
        public List<UserFunctionsDTO> selectUserList();
    }here is DTO class
    public class UserFunctionsDTO{
        private String category = "";
        private String sub_category = "";
        private int cat_id = 0;
        private int sub_cat_id = 0;
        public UserFunctionsDTO(){}
        public UserFunctionsDTO(String category, String sub_category, int cat_id, int sub_cat_id){
            this.category = category;
            this.sub_category = sub_category;
            this.cat_id = cat_id;
            this.sub_cat_id = sub_cat_id;
        //Setters and getters will go here.
    }my concrete data access class is like this.
    public class UserFunctionsDataAccess implements UserFunctionsDAO{
        MyDB dbObject = null;
       private static final String SQL_GET_DISTINCT_CAT= "SELECT DISTINCT cat FROM cat_table";
       public List<UserFunctionsDTO> selectUserList(){
           dbObject = new MyDB();
           dbObject.sqlSelect(SQL_GET_DISTINCT_CAT);
           ResultSet rs = dbObject.getResultSet();
           ArrayList list = new ArrayList();
           while(rs.next()){
               list.add(new UserFunctionsDTO(rs.getString('category'), .......................));
           return list;     
    }I think now im following good coding practices, but I have one problem.
    1. How do I retrieve this userlist from my jsp page?
    2. Should I include UserFunctionsDTO in my jsp page as a bean?
    3. If I include it, how can I get the list from it?
    thanks in advance,
    Dilan.

  • Can you store the resultSet from a query into a vector?

    I am totally frustrated. How the heck does one store the results of a query (resultSet) in a vector so that I can get the vector from my jsp page to display in a table.? searchRS is my resultSet from stmt.executeQuery().
    public Vector storeResultSet ()throws SQLException
    int dataType;
    Vector rows = new Vector();
    System.out.println("INSIDE SEARCHQUERY VALUE OF searchRS: " + searchRS);
    // Get the ResultSetMetaData. This will be used for the column headings
    ResultSetMetaData rsmd = searchRS.getMetaData();
    // Get the number of columns in the result set
    int numCols = rsmd.getColumnCount ();
    columnNames = new String[numCols];
    System.out.println("inside of store results and column count of rsmd is: " + numCols);
    boolean more = searchRS.next();
    while (more)
    Vector testData = new Vector();
    for(int i=0;i<numCols;i++)
    Object value = searchRS.getObject(i);
    rows.add(value);
    System.out.println("VALUE of testData vector is: " + rows);
    more = searchRS.next ();
    rows.add(testData);
    System.out.println("This is the populated vector in storeSearchResults " + rows);
    return rows;
    }>

    The OP has initiated a new thread asking this question, it's here
    http://forum.java.sun.com/thread.jspa?threadID=5162925
    Please don't created duplicate threads! If you feel you have to create a new thread for this question, post here and explain (as I did) so that no further replies will be posted to this thread.

  • How to call a CORBA Object in a 3rd Party ORB from a EJB

    Hello
    I found a few articles on the web how to call EJBs for example from C++.
    However, I want to do the inverse. I want to resolve an Object (implemented in C++, using OmniORB) via COS-Naming and invoke it from a EJB. I can write a simple Java Client which does this without a problem. But as soon as I try to do the same in EJB I get the following:
    [#|2004-11-09T10:48:16.848+0100|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.corba._DEFAULT_.rpc.transport|_ThreadID=12;|"IOP00710209: (INTERNAL) Unable to create listener thread on the specific port"
    org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 209 completed: No
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:3142)
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:3160)
    at com.sun.corba.ee.impl.legacy.connection.SocketFactoryAcceptorImpl.initialize(SocketFactoryAcceptorImpl.java:60)
    at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:190)
    at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:207)
    at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:104)
    I think there is somehow a conflict because the SUN Appserver also uses CORBA. My Code looks like this:
    String[] a = null;
    Properties props = new Properties();
    final String CORBA_HOST = "arcos";
    final String ORB_INITIAL_PORT = "2809";
    props.put("org.omg.CORBA.ORBInitialPort", ORB_INITIAL_PORT);
    props.put("org.omg.CORBA.ORBInitialHost", CORBA_HOST);
    org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(a, props);
    So I thought this might be because there is already a ORB initialised. So I replaced the last line with
    org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
    Which should give me an ORB instance. However I get the following exception:
    [#|2004-11-09T11:51:59.206+0100|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.err|_ThreadID=15;|
    org.omg.CORBA.NO_IMPLEMENT: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.genericNoImpl(ORBUtilSystemException.java:7085)
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.genericNoImpl(ORBUtilSystemException.java:7107)
    at com.sun.corba.ee.impl.orb.ORBSingleton.resolve_initial_references(ORBSingleton.java:311)
    at com.ascom.util.CorbaNaming.resolve(CorbaNaming.java:26)
    at com.ascom.fxm.FileManager.<init>(FileManager.java:46)
    at com.ascom.srv.file.web.FileImporterImpl.importFile(FileImporterImpl.java:146)
    Any ideas? Thank you very much in advance.
    Oliver Jaun

    Perhaps you could take a look at the following document and see if it meets your needs:
    http://java.sun.com/j2se/1.4.2/docs/guide/rmi-iiop/interop.html

Maybe you are looking for

  • BPM 11g and PAPI

    Hello everyone, Do you know if BPM 11g supports PAPI? I can't find information about this. Are there any alternative like PAPI? Thank so much for any information. Susan

  • Enter G/L document error-urgent

    Dear expert, When user enter document in FB50 for G/L account xxx, there was a message :"an entry in field order is not permitted for account xxxx.". In which tcode I could check for what kind of orders permitted to that account? And how to correct t

  • Sync my iphone on a new paltop

    Hello, I have a iphone 4S and synced on my Office Laptop. I have a plan to change my sycning to a new laptop which i purchased at home which has itunes for my Ipad already synced. Please advise how to transfered the data from my office laptop to my h

  • Urgent: Flash CMS with Actionscript 3.0/PHP/MySQL

    Hello everybody. I'm new to this community and I'm actually relatively new to flash and actionscript but I could say I have fair knowledge about them. So anyway, I usually build flash websites the traditional way using timeline animation and scriptin

  • Post Yosemite upgrade: crackling sound appears

    Hello All, I have a Late 2013 13" Macbook Pro Retina. I just upgraded to Yosemite from Mavericks and have noticed this crackling sound coming from the laptop even if nothing is running. I am quite positive it never made this noise before. Has anyone