ClassCastException while looking up RMI objects bound to weblogic.JNDI under WLS 6.1

We deploy a servlet (in a single .war archive) establishing a RMI connection to
an external Java object bound into weblogic JNDI (WLS 6.1).
We get a ClassCastException on invoking JNDI lookup:
Servlet failed with Exception>
java.lang.ClassCastException: $Proxy67
     at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
     at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
     at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
     at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
     at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Curiously we don't observe these problems when we include all the classes of the
remote application in the classpath of the WebLogic Server. Actually we want to
avoid including external classes in weblogic.classpath for (hot) deployment reasons.
It also seems that problems don't occur when accessing the remote object from
an independent client application.
We expect this to be a classloader conflict within WLS 6.1
Does anybody know a solution to our problems?
Thanks for suggestions
Andreas Koerner

There was a similar bug that was supposedly fixed in WL 6.1 SP 2. I had
filed a bug on this myself, and was given a patch for SP1, you should be
able to ask for the patch for CR060416.
Peter Mularien
Deploy Solutions, Inc.
Andreas Koerner wrote:
>
We deploy a servlet (in a single .war archive) establishing a RMI connection to
an external Java object bound into weblogic JNDI (WLS 6.1).
We get a ClassCastException on invoking JNDI lookup:
Servlet failed with Exception>
java.lang.ClassCastException: $Proxy67
at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Curiously we don't observe these problems when we include all the classes of the
remote application in the classpath of the WebLogic Server. Actually we want to
avoid including external classes in weblogic.classpath for (hot) deployment reasons.
It also seems that problems don't occur when accessing the remote object from
an independent client application.
We expect this to be a classloader conflict within WLS 6.1
Does anybody know a solution to our problems?
Thanks for suggestions
Andreas Koerner

Similar Messages

  • How to look up a TxDataSource bound in weblogic JNDI

    HI,
    How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
    javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
    ..it gives me classcast exception.
    and if i lookup it using javax.sql.DataSource like below
    javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
    then while executing my sql on the connection object it throws some other excepiton
    like below
    java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
    [weblogic.rjvm.PeerGoneException: ; nested exception is:
    java.io.EOFException]
    at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
    at TestTransactionMgr.main(TestTransactionMgr.java:46)
    How can i solve this problem.. Actually my application needs to handle distributed transactions so i need to implement XADataSource.
    can somebody help me iin this.
    Thanks & Regards
    Akhil Nagpla

    Hi Akhil did u get the solution for distributed database /
    I am also working on same but i dint get the solution yet. Please if u have any solution for the same do mail me to [email protected] and [email protected]
    here goes my problem !
    we have 2 oracle databases.
    I am using Stateless EJB and container managed transaction !
    And inside a ejb method i am getting 2 different connection from 2 different datasources ok !
    Since am using container managed transaction it starts transaction automatically when the method begins,
    and the transaction ends when the method exit out ok !
    Now i insert into 2 databases and when the method exits it gives an error listed below !
    i am using NON emulated datasource with class name "com.evermindsql.DriverManagerDataSource"
    and looking up this datasource in the EJB with name specified in location attribute of datasource !
    "com.evermind.server.rmi.OrionRemoteExcepttion: Transaction was rolled back: javax.transaction.SystemException: could not commit: error code 29540- for additional error code check the oracle log file"
    For distributed database we configured DBLINK also !
    If u can give more info regarding DBlink it will be better ! Even after we set DBlink we are getting error !
    Please tell us how to configure the database !
    Oracle 9iAS
    Oracle 9i DB
    regards
    Sreenath.V

  • How can i look up a TxDataSource bound in Weblogic JNDI

              HI,
              How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
              javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
              .it gives me classcast exception.
              and if i lookup it using javax.sql.DataSource like below
              javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
              then while executing my sql on the connection object it throws some other excepiton
              like below
              java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
              Exception - with nested exception:
              [weblogic.rjvm.PeerGoneException: ; nested exception is:
                      java.io.EOFException]
              at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
              at TestTransactionMgr.main(TestTransactionMgr.java:46)
              How can i solve this problem.. Actually my application needs to handle distributed
              transactions so i need to implement XADataSource.
              can somebody help me iin this.
              Thanks & Regards
              Akhil Nagpla
              

              HI,
              How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
              javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
              .it gives me classcast exception.
              and if i lookup it using javax.sql.DataSource like below
              javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
              then while executing my sql on the connection object it throws some other excepiton
              like below
              java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
              Exception - with nested exception:
              [weblogic.rjvm.PeerGoneException: ; nested exception is:
                      java.io.EOFException]
              at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
              at TestTransactionMgr.main(TestTransactionMgr.java:46)
              How can i solve this problem.. Actually my application needs to handle distributed
              transactions so i need to implement XADataSource.
              can somebody help me iin this.
              Thanks & Regards
              Akhil Nagpla
              

  • Unable to retreive RMI object bound to JNDI

    Hi
    I am trying to retrieve an rmi object that appears to have been sucessfully
    deployed to the weblogic server. Upon startup the nt command console shows
    the message below and the class name appears in the Distributed objects/rmi
    area in the Weblogic console.
    Invoking main-style startup Guid xxxxxx.GuidImpl
    However if I try to write a test client using either one of the following
    calls I get a NameNotFoundException.
    I have tried both the name Guid (which is what is in the startup entry) and
    the fully qualified name. They all have the same results.
    Sample calls:
    Naming.lookup("Guid");
    or
    getInitialContext();
    jndiContext.lookup("Guid");
    In my weblogic properties files I have the following entry:
    weblogic.system.startupClass.Guid=xxx.GuidImpl
    in the main of GuidImpl class I have the following entry:
    Naming.bind("xxx.Guid");
    any ideas as to what might be wrong?
    Thanks

    Hi, all:
    Currently I evaluate BEA Weblogic 6.1 server. I've read the "Programming
    WebLogic JNDI" section of the documentation for Weblogic server 6.1.
    However, I couldn't find the answer for my question. What problem I have
    now is that
    (1): How I can create a object in the Java VM when the Weblogic server
    startup? Note:
    This class need to read a property files and
    store all of properties information into its instance for the
    client program to lookup it later.
    (2): How can the previous created object to be bound in the Weblogic
    JDNI server and the bounded
    object can be shown up in the JDNI tree in the Weblogic server's
    console?
    (3): How do I code my servlet to lookup that object I
    just created in the step1? What configuration settings need to be
    done before Weblogic server is started?
    Because I am stopped by this problem, if anyone can give me the example
    code or some explanation of the solution ASAP,
    it would be very appreciated....Thanks in advance.......
    Merry Christmas
    Long

  • How to register RMI object with runnign Weblogic Server instance?

    I need to write some RMI objects(non EJB) and register it with the already running weblogic server so that I can access them from a RMI client.
    Can some help me with this?

    So more precisely the way I am doing it is
    I have a remote interface
    package com.myserv.rmi;
    public interface NSPQueryExecutionService extends java.rmi.Remote
    public void getQueryExecutionDelegate();
    I have the Implementation as
    package com.myserv.rmi;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class NSPQueryExecutionServiceImpl
    implements NSPQueryExecutionService
    public static final void main (String[] arg) {
    try {
    Properties properties = null;
    properties = new Properties();
    properties.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context context = new InitialContext(properties);
    context.bind("QueryExecutionService", new NSPQueryExecutionServiceImpl());
    System.out.println("================================> QueryExecutionService Bound");
    } catch (Exception ex){
    ex.printStackTrace();
    System.out.println("Unable to start QueryExecutionService");
    public NSPQueryExecutionServiceImpl()
    public void getQueryExecutionDelegate()
    System.out.println("inside remote");
    I compile these classes and I do a weblogic.rmic as
    java weblogic.rmic com.myserv.rmi.NSPQueryExecutionServiceImpl
    I run the NSPQueryExecutionServiceImpl class to bind the RMIObject with the weblogic server.
    Finally when I try to access this from my client it is able to access the object but when I invoke an operation on it gives the exception that RJVM is already shutdown.
    Edited by kuldeep.sharma at 02/15/2007 9:37 AM

  • ClassCastException while looking up Home

    I have created a CMP Customer Bean, whose persistence fields are ID(PK), name, password and address inside the package navin.ejb.ecommerce.
    The bean has been deployed successfully.
    Now I have made an Login servlet also in the same package which allows login to customers whose name and password match with those in the database.
    But in the init() method when I lookup the bean, it gives the ClassCastException. The lookup should return a class of type navin.ejb.ecommerce.CustomerHome but it gives error as:
    java.lang.ClassCastException: navin.ejb.ecommerce.CustomerBeanHomeImpl_ServiceStub
    Can anyone tell me the possible solution. I am using Weblogic.

    Hello Navin,
    Try this out
    Object obj = ctx.lookup(<bean_jndi_name>);
    CustomerHome home = (CustomerHome) PortableRemoteObject.narrow(obj, CustomerHome.class)
    Also checkout the JNDI tree of the server, so that you are sure that teh name you are looking for in the lookup method is bound to the bean you want.
    Hope this helps.
    regards,
    Abhishek.

  • ClassCastException - While type casting Home object after EJB JNDI Lookup

    Sun One Application Server throws a ClassCastException when I try to type cast Home object to it's respective interface type.
    Here is the code ---
    ==============================================
    Object obj = PortableRemoteObject.narrow( context.lookup( jndiName ), homeClass);
    System.out.println("Remote Object - obj : "+obj);
    if (obj != null) {
       System.out.println("obj.getClass().getName() : "+obj.getClass().getName());
       System.out.println("obj.getClass().getSuperclass() : "+obj.getClass().getSuperclass());
       Class[] interfaces = obj.getClass().getInterfaces();
       if (interfaces != null) {
          for (int count = 0; count < interfaces.length; count++) {
             System.out.println("interfaces[ " + count + " ].getName() : " + interfaces[ count ].getName());
    }==============================================
    The class name is dislpayed as the Stub class name.
    While displaying the interfaces, the Home Interface name is displayed.
    But later when I try to type cast it into Home Interface type, it throws a ClassCastException.
    Can somebody please check this?

    Please post the stack trace. Also, take a look at our EJB FAQ to make sure you're doing the
    recommended lookup :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • JAXB : ClassCastException while using generated java objects

    Hi,
    I am using JAXB for unmarshalling my xml to set of java objects. It is working but when i use one child object and cast it i am getting ClassCastException.
    java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to com.xyz.base.EmployeeType
    My XSD
    ======
    <xsd:complexType name="EmployeeType">
    </xsd:complexType>
    <xsd:complexType name="EmployeeList">
         <xsd:sequence>
              <xsd:element name="Employee" type="base:EmployeeType" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    JAXB Binding
    ==========
    In Binding i am direct schema compiler to use ArrayList for EmployeeList.. as i want to use this as ArrayList.
    <jxb:bindings node="//xs:complexType[@name='EmployeeList']">
              <jxb:class ref="java.util.ArrayList"/>
    </jxb:bindings>
    Everything works well but when i extract element from EmployeeList (i.e. ArrayList) and try to type cast it to EmployeeType, getting following exception:
    java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to com.xyz.base.EmployeeType
    so at the time of unmarshalling how jaxb will know about the type of child element and use accordingly.
    Any help would be greatly appreciated.

    Hi,
    Could you try outputting the class type of the object you are trying to cast?
    Check the class of the object. Say use object.class.getName().
    I used jaxb quite a long time ago but I believe it resolves the classes correctly.

  • ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool

    Hi,
    I am using weblogic server 5.1 and connection pools for accessing Oracle database.
    We wanted to use BLOB in oracle and I coded the java class to insert data into BLOB
    field.
    When I code a sample calss without using weblogic pool, I do not have any problem.
    But when I use the weblogic connection pool, I get classcastException as described
    below:
    I am using
    "insert into shipmentCorrection (" + insfields + ") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
    to insert a dummy record with empty_blob and then getting the BLOB locater by the
    following code:
    java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROM shipmentCorrection
    WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+ CorrectionNum +" and
    Bl_Type = '"+ blType +"'" );
    rset.next();
    BLOB blob = ((OracleResultSet)rset).getBLOB(1);
    java.io.OutputStream outstream = blob.getBinaryOutputStream();
    IN the above line of code where I cast the ResultSet to OracleResultSet, I get the
    classcastException as follows:
    I donno how to solve this problem. Could any one please help me on this ?
    java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
    at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
    at fmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
    .java:2471)
    at fmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
    java:1316)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java:347)
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:69)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    Thanks,
    Muralidaran Chakravarthy

    When using weblogic pool drivers it is not possible to cast to an Oracle
    JDBC driver, (or any other driver )
    pool driver hides the driver you have configured.
    "Muralidaran Chakravarthy" <[email protected]> wrote in message
    news:3ce16855$[email protected]..
    >
    Hi,
    I am using weblogic server 5.1 and connection pools for accessing Oracledatabase.
    We wanted to use BLOB in oracle and I coded the java class to insert datainto BLOB
    field.
    When I code a sample calss without using weblogic pool, I do not have anyproblem.
    But when I use the weblogic connection pool, I get classcastException asdescribed
    below:
    I am using
    "insert into shipmentCorrection (" + insfields + ") VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
    >
    to insert a dummy record with empty_blob and then getting the BLOB locaterby the
    following code:
    java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROMshipmentCorrection
    WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+CorrectionNum +" and
    Bl_Type = '"+ blType +"'" );
    rset.next();
    BLOB blob = ((OracleResultSet)rset).getBLOB(1);
    java.io.OutputStream outstream = blob.getBinaryOutputStream();
    IN the above line of code where I cast the ResultSet to OracleResultSet, Iget the
    classcastException as follows:
    I donno how to solve this problem. Could any one please help me on this ?
    java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
    at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
    atfmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
    java:2471)
    atfmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
    java:1316)
    atweblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java:347)
    atweblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:69)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    Thanks,
    Muralidaran Chakravarthy

  • I need to run multiple external programs concurrently using RMI objects.

    have a web based solutiion which uses a backend machine for some processing. I have a RMI based Java proram running on the backend machine and the web server talks with this backend machine through RMI. Now, on this backend machine, I need to call some external program using Process s = Runtime.getRuntime().exec(....). Since this is a web application, multiple clients will connect at the same time and I need to run this external program for multiple clients at the same time.
    Here is what I do. I have a separate RMI object bound to registry for each client that connects to the web server. This RMI object implements runnable interface, since I can't extend this class from Thread (it already extends from UnicastRemoteObject). So each time I call upon a method from this object, only one process gets started and other objects need to wait till this process finishes.
    I need to start multiple processes at the sametime so that other clients don't have to wait for this thread to finish.
    Please let me know if anybody has any other solution than installing an application server on this backend machine.
    Here is my code.
    public class iLinkOnlineSession extends UnicastRemoteObject implements Session, Serializable, Runnable
      public iLinkOnlineSession(String sessName, String sessId, String rootLogs, String rootWrks) throws RemoteException
        setSessionId(sessId);
        setName(sessName);
        ROOT_LOGS = rootLogs;
        ROOT_WORKSPACE = rootWrks;
        searchKeys_ = new Vector();
        searchObjects_ = new Hashtable();
        Thread s = new Thread(this);
        s.start();
      public void run()
        System.out.println("running");
      public String checkLogin(String user, String passwd)
        String msg = "";
        String cmd = "iLinkOnlineLogin";
        cmd += " param "+ user + " param " + passwd;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);           // Call to the external program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          String line = rd.readLine();
          while(line != null)
            System.out.println(line);
            msg += line;
            line = rd.readLine();       
          int res = proc.waitFor();
        }catch(Exception e)
             e.printStackTrace();
        System.out.println("Msg: " + msg);
        return msg;
      public String searchObject(String user, String passwd, String param1, String paramVal1, String param2, String paramVal2, String param3, String paramVal3, String relLev, String mfgLoc)
        String cmd = "iLinkOnlineSearch";
        cmd += " param " + user + " param " + passwd + " param " + getSessionId() + " param " + logFile_ + " param " + param1 + " param " + paramVal1 +
              " param " + param2 + " param " + paramVal2 + " param " + param3 + " param " + paramVal3 + " param "
              + relLev + " param " + mfgLoc;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);                // External program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          FileWriter out = new FileWriter(resultFile_);
          System.out.println("Filename: "+resultFile_);
          BufferedWriter wout = new BufferedWriter(out);
          String line = rd.readLine();
           while(line != null)
            System.out.println(line);
            wout.write(line);
            wout.newLine();
            wout.flush();
            line = rd.readLine();
          int res = proc.waitFor();
          wout.close();
          if(res == 0)
            boolean ret = createResultTable();
            if(ret == true)
              return GlobalConstants.SUCCESS_MSG;
            else
              return GlobalConstants.ERROR_MSG;
        }catch(Exception e)
                e.printStackTrace();
        System.out.println("getting results");
        return GlobalConstants.ERROR_MSG;
      }

    I guess I don't get it.
    RMI servers are inherently multi-threaded, so why are you running separate servers for every client?

  • ClassCastException while creating sendstream

    Hi,
    I'm trying to establish an unicast rtp session and play an url to the remote client.
    DataSource[] sources = new DataSource[urls.length];
              for(int i = 0; i < urls.length; i++) {
                   sources[i] = Manager.createDataSource(urls);
              DataSource mergedDataSource = Manager.createMergingDataSource(sources);
              SendStream sendStream = m_rtpManager.createSendStream(mergedDataSource, 1);
              sendStream.start();
    I throws ClassCastException while creating the sendstream object.
    java.lang.ClassCastException
         at com.sun.media.rtp.RTPSessionMgr.createSendStream(RTPSessionMgr.java:1098)
         at com.sun.media.rtp.RTPSessionMgr.createSendStream(RTPSessionMgr.java:1262)
         at com.untd.apps.ms.rtp.session.RtpSession.play(RtpSession.java:85)
         at com.untd.apps.ms.action.HandleAnncCommand.execute(HandleAnncCommand.java:44)
    I decompiled the RtpSessionMgr class and here are the few lines of the createSendStream method
    /** RtpSessionMgr class **/
    public SendStream createSendStream(int ssrc, javax.media.protocol.DataSource ds, int streamindex)
    throws UnsupportedFormatException, IOException, SSRCInUseException
    SSRCInfo i = cache.lookup(ssrc);
    if(i != null)
    throw new SSRCInUseException("SSRC supplied is already in use");
    int newSSRC = ssrc;
    if(cache.rtcp_bw_fraction == 0.0D)
    throw new IOException("Initialized with zero RTP/RTCP outgoing bandwidth. Cannot create a sending stream ");
    PushBufferStream streams[] = ((PushBufferDataSource)ds).getStreams();
    PushBufferStream sendstream = streams[streamindex];
    The datsource that I use is PullDataSource (In the api, it is mentioned that we can pass both push and pullDatasources to this method).
    By default the Datasource for http protocol is an instance of PullDataSource. But in the createSendStream method, the dataSource is casted to PushDataSource. I guess this is why it throws ClassCastException.
    Could someone please help me resolve this error.
    Thanks,
    Ganesh.

    Never mind. Resolved the issue myself.
    By setting the audio formats using processor, I resolved the issue. The datasource from processor.getDataOutput() is a PushDataSource.

  • How can we determine exactly what server an RMI object is bound to?

    We have RMI objects that bind to a server in a cluster. How can we determine for
    monitoring purposes what server a RMI object is currently bound to /executing
    on?
    We have tried the most of the Mbeans but can't find one that returns runtime info
    for startup classes or RMI objects.
    We have a new monitoring requirement we are trying to satisfy.

    try get the value of PKEY_OfflineAvailability using shell property system APIs (SHGetPropertyStoreFromParsingName or ShellFolderItem.ExtendedProperty)
    Visual C++ MVP

  • "Errored while looking up datasource: PWC4216: Name myDB is not bound in th

    hi all,
    am trying to deploy my web application (.war which has a servlet which connects to a db and fetches records and displays in jsp) file in SunOne web server V7 but i cant get past this error :
    [29/Jun/2010:15:14:46] failure (24218): for host 146.171.59.144 trying to POST /BbaMigrationQueryTool/BBAMigrationQuery, service-j2ee reports: NamingExcep
    tion caught: Errored while looking up datasource: PWC4216: Name myDB is not bound in this Context
    my java code to lookup the jndi name :
       1.     //looks up a datasource 
       2.     private static synchronized DataSource getDataSource(String jndiName) throws NamingException { 
       3.  
       4.         DataSource dataSource = null; 
       5.  
       6.         try { 
       7.             Context c = new InitialContext(); 
       8.              Context envContext = (Context) c.lookup("java:comp/env"); 
       9.             Logger.getLogger(DBUtilities.class.getName()).log(Level.INFO, "Found sub context"); 
      10.               dataSource = (DataSource) envContext.lookup(jndiName); 
      11.  
      12.         } catch (NamingException e) { 
      13.             e.printStackTrace(); 
      14.             throw new NamingException("Errored while looking up datasource: " + e.getMessage()); 
      15.         } 
      16.  
      17.         return dataSource; 
      18.     } 
      i call the above method with "jdbc/myDB" and have created a JDBC recourse within the SunOne web server via the admin console.
    my web.xml i have an entry for the resource as follows :
       1.             <resource-ref> 
       2.         <res-ref-name>jdbc/myDB</res-ref-name> 
       3.         <res-type>javax.sql.DataSource</res-type> 
       4.         <res-auth>Container</res-auth> 
       5.         <res-sharing-scope>Shareable</res-sharing-scope> 
       6.     </resource-ref> 
    in my sun-web.xml i have an entry as follows :
       1.     <resource-ref> 
       2.         <res-ref-name>jdbc/myDB</res-ref-name> 
       3.         <jndi-name>jdbc/myDB</jndi-name> 
       4.     </resource-ref> 
    server.xml has this entry in it :
       1.   <jdbc-resource> 
       2.     <jndi-name>jdbc/myDB</jndi-name> 
       3.     <datasource-class>oracle.jdbc.pool.OracleDataSource</datasource-class> 
       4.     <property> 
       5.       <name>password</name> 
       6.       <value>76765</value> 
       7.     </property> 
       8.     <property> 
       9.       <name>user</name> 
      10.       <value>56756</value> 
      11.     </property> 
      12.     <property> 
      13.       <name>url</name> 
      14.       <value>jdbc:oracle:thin:@serveretc etc</value> 
      15.     </property> 
      16.     <description/> 
      17.   </jdbc-resource>
      what could be wrong ??
    thanks in advance.
    Edited by: cesarNZ on Jun 29, 2010 7:58 PM
    Edited by: cesarNZ on Jun 29, 2010 8:00 PM

    try to not split the attributes in server.xml
    use them like
    <Context path="/myPath" docBase="myDocBase" debug="5" reloadable="true" crossContext="true" source="org.eclipse.jst.j2ee.server:myDocBase">
                          <Resource name="jdbc/myDB"
                                                     auth="Container"
                                                     type="javax.sql.DataSource"
                                                     maxActive="100"
                                                     maxIdle="30"
                                                     maxWait="10000"
                                                     username="$$$"
                                                     password="$$$"
                                                     driverClassName="com.mysql.jdbc.Driver"
                                                     url="jdbc:mysql://localhost/myTest" />
                     </Context>and i dont know why you define two resources
    try to look at
    http://forums.sun.com/thread.jspa?messageID=11013089&#11013089

  • Java.io.EOFException while returning a large object using RMI

    Hello
    I am having an issue with RMI which seems to be quite common (given the given the amount of matches in Google) but for which I can find a way out.
    In my application there 2 RMI objects , say OBJECT1 and OBJECT2. For OBJECT1 to get stuff from the database it gives a call to OBJECT2, which in turn fetches it from the DB and provides it back to OBJECT1.
    It is in such a call from OBJECT1 that i get the following exception.
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.io.EOFException
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
    at CALL FROM OBJECT1
    ... 13 more
    Caused by: java.io.EOFException
    at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2571)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1824)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1759)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1835)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1759)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
    ... 15 more
    The rows retrieved from the DB are stored in a user-defined array (serializable incl. all the subcomponents except for the primitive data fields) and the same is return back from OBJECT2.
    Interesting thing is that this exception occurs only when the number of rows retrieved by OBJECT2 is exceeds a certain limit, i.e. when the no. of rows are less the application works perfectly.
    Tried the following based on what was mentioned in different posts: Added following parameters to the JVM startup call.
    -Dsun.rmi.server.exceptionTrace=true - did not get any pointers
    -Dsun.rmi.log.debug=true
    -Dsun.rmi.transport.connectionTimeout=600000 - cause the time for the DB query was above the default time of 15 sec
    I am using Sun j2sdk1.4.2_13 for the application.
    Any pointers to resolve this issue would be greatly appreciated.

    ronpg wrote:
    The issue is solved by increasing the VM max. memory parameters!if you want to avoid issues like this in the future, check out RMIIO. it provides an api for a "streaming remote iterator" over rmi, so you wouldn't have too read all this data into memory at once (causing memory exhaustion issues).

  • ClassCastException while PortableRemoteObject.narrow

    Hello,
    I am getting the ClassCastException when I am narrowing the looked up home object.
    Here is the exception:
    java.lang.ClassCastException
         at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at samples.ejb.client.HelloClient.main(HelloClient.java:50)
    Here is the code :
    try {
    System.out.println("Looking up greeter bean home interface");
    String JNDIName = "HelloGreet";
    System.out.println("Looking up: " + JNDIName);
    Object objref = initContext.lookup(JNDIName);
    System.out.println("Object from the look up -->"+objref);
    home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(objref, HelloHome.class);
    any help appreciated. Thanks in advance
    With Regards,
    J. P. Naidu

    Hi Pullaiah,
    I've same problem with Sun ONE AS (notice that I encounter same problem on J2EE Reference Implementation too).I looked up for a solution everywhere but I did't find it and I'd be very happy if someone could post one.
    Thanks ,
    Fil

Maybe you are looking for

  • Fully embedding fonts in PDF

    Hi, I had a piece of information but I can't seem to find it anymore so I have to ask ... This is about understanding limitations of fully embedding fonts in a PDF (from Indesign Server). Actually it's about one limitation in particular. I know fonts

  • Can't load any classes from infobus.jar (WL 6.0 SP1)

    Hi, I am deploying an .ear file, which has one .war file in it. The war file, has infobus.jar, inside it under \WEB-INF\lib. Whenever in my servlet code I try to load a class from infobus.jar, I get the following exception : About to load class javax

  • Change color of blog post title

    Hello, I'm trying to change the color of the post title (REGLAS DE ACENTUACIÓN. Palabras agudas), but not working. Here is the link: http://ivink.com/confundidos-entre-letras And here is the code that I have insert: .blog-post h2.post-title { color:

  • I have 3.2 edition that I never registered and my photos are now locked in the program how do I now

    I have photo shop album starter 3.2 that I never registered...the registratio n time is now expired and my photos are locked into the program...how do I get them out or del ete the program with out losing my pictures?

  • How to install permenant UC License on 2951 voice gateway

    Hi All, I have C2951 Voice gateway and I want to install Permenant UC license and I don't know how to get it and how to install on it and how to activate it,so I would like to request all of you that if you have any idea please explain me in details