AbstractMethodError calling remote method

Java student and rank RMI newbie here; please go easy on me. My subinterface, remote class, and client app all compile fine, but when I run the client app I get an error:
Exception in thread "main" java.lang.AbstractMethodError: DatabaseUpdater_Stub.i
nitCourseList()Lcom/sun/rowset/CachedRowSetImpl;
        at EnrollPanel.<init>(Enroll3.java:99)
        at Enroll3.main(Enroll3.java:25)Here is my subinterface:
import com.sun.rowset.CachedRowSetImpl;
import java.rmi.*;
import java.sql.*;
import javax.sql.*;
public interface DbUpdaterInterface extends Remote
     public abstract CachedRowSetImpl initCourseList() throws RemoteException, SQLException;
     public abstract CachedRowSetImpl initStudentList() throws RemoteException, SQLException;
     public abstract CachedRowSetImpl initEnrollmentList() throws RemoteException, SQLException;
     public abstract void addNewCourseInDb() throws RemoteException;
     public abstract void addStudentToCourseInDb() throws RemoteException;
     public abstract void addNewStudentInDb() throws RemoteException;
     public abstract void enrollStudentInCourseInDb() throws RemoteException;
}and the remote class that implements the interface:
import com.sun.rowset.CachedRowSetImpl;
import java.net.*;
import java.rmi.*;
import java.rmi.server.*;
import java.sql.*;
import javax.sql.*;
public class DatabaseUpdater extends UnicastRemoteObject implements DbUpdaterInterface
     Connection dbConnection;
     public DatabaseUpdater(Connection dbConnection) throws RemoteException
          this.dbConnection = dbConnection;
     public CachedRowSetImpl initCourseList() throws RemoteException, SQLException
          CachedRowSetImpl rset = new CachedRowSetImpl();
          Statement courseStatement = dbConnection.createStatement();
          String courseQuery = "SELECT CourseID, MaxEnrollment, CurrentEnrollment FROM Courses";
          ResultSet courseResults = courseStatement.executeQuery(courseQuery);
          rset.populate(courseResults);
          courseStatement.close();
          return rset;
// ... some more methods ...
     public static void main(String []args)
          try
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               Connection dbConnection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=project3.mdb");
               DatabaseUpdater x = new DatabaseUpdater(dbConnection);   // a remote object
               Naming.rebind("DatabaseUpdater", x);   // the remote object is named as "DatabaseUpdater"
               System.out.println("Database updater is running....");
          catch (Exception e)
               System.err.println(e);
}In my client app, here is the problem code, with the last line being the one that throws the error:
               // invoke remote DatabaseUpdater object
               DbUpdaterInterface dbUpdater = (DbUpdaterInterface) Naming.lookup("DatabaseUpdater");
               // call remote object to get result set of all courses, students, enrollments
               CachedRowSetImpl courseResults = dbUpdater.initCourseList();Any ideas? AbstractMethodError refers to trying to call an abstract method, but I have my subinterface's initCourseList() method implemented in my remote class just fine. I'd greatly appreciate some help!

Oops, my mistake. I had made changes since last running rmic on my remote class. Nothing to see here, move along!

Similar Messages

  • Exception data: java.lang.AbstractMethodError - Calling Remote Method.

    We recently changed some of our CMP fields from primative int's to integer's and now we are receiving Abstract Method Errors at runtime. We have fixed all the methods that use this CMP fields, well at least we think we got them all. Since this are remote methods the sever is setup to pull JAR files from a lib directory on the server. This JAR files have also been updated. Can anyone give me more information about this error or something I might be missing.
    ------------------------------------------------------------------------------------- Errors -------------------------------------------------------------------------------------
    [11/7/07 15:40:23:141 CST] 00000022 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getPositionInfo" on bean "BeanId(hr-ear#hr-ejb.jar#PositionService, null)". Exception data: java.lang.AbstractMethodError: com/tgt/supply/pdd/ejb/entity/AmcOffice.getOfcI()Ljava/lang/Integer;
         at com.theamc.hr.ejb.session.PositionServiceBean.getPositionCollections(PositionServiceBean.java:1383)
         at com.theamc.hr.ejb.session.PositionServiceBean.getPositionInfo(PositionServiceBean.java:46)
         at com.theamc.hr.ejb.session.EJSRemoteStatelessPositionService_fae72574.getPositionInfo(EJSRemoteStatelessPositionService_fae72574.java:262)
         at com.theamc.hr.ejb.session._PositionService_Stub.getPositionInfo(_PositionService_Stub.java:272)
         at com.theamc.hr.web.servlet.PositionServlet.createPageObject(PositionServlet.java:153)
         at com.theamc.framework.servlet.ControllerServlet.doGet(ControllerServlet.java:221)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    [11/7/07 15:34:10:043 CST] 00000020 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getUserOrgInfo" on bean "BeanId(userprofile-ear#userprofile-ejb.jar#UserOrgInfo, null)". Exception data: java.lang.AbstractMethodError: com/tgt/supply/pdd/ejb/entity/AmcOffice.getOfcI()Ljava/lang/Integer;
         at com.theamc.userprofile.ejb.session.UserOrgInfoBean.getUserOfficeValue(UserOrgInfoBean.java:536)
         at com.theamc.userprofile.ejb.session.UserOrgInfoBean.getUserOrgInfo(UserOrgInfoBean.java:84)
         at com.theamc.userprofile.ejb.session.EJSRemoteStatelessUserOrgInfo_13c2e095.getUserOrgInfo(EJSRemoteStatelessUserOrgInfo_13c2e095.java:194)
         at com.theamc.userprofile.ejb.session._UserOrgInfo_Stub.getUserOrgInfo(_UserOrgInfo_Stub.java:273)
         at com.theamc.userprofile.servlet.UserOrgInfoServlet.createPageObject(UserOrgInfoServlet.java:243)
         at com.theamc.framework.servlet.ControllerServlet.doGet(ControllerServlet.java:221)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    ------------------------------------------------------------------------------------- Usage -------------------------------------------------------------------------------------
    HashMap ofcRegn = new HashMap();
    AmcOffice off = null;
    AmcOfficeHome offHome = com.tgt.supply.pdd.ejb.entity.EntityHomeFactory.getAmcOfficeHome();
    ArrayList ofcColl = new ArrayList();
    Iterator iter = offHome.findAll().iterator();
    while (iter.hasNext()) {
    off = (AmcOffice) PortableRemoteObject.narrow(iter.next(), AmcOffice.class);
    ofcColl.add(new GenericCode(""+off.getOfcI(),off.getOfcN())); line 1383
    ofcRegn.put(""+off.getOfcI(),""+off.getRegnI());
    The abstract method error is thrown when off.getOfcI() is called. OfcI is the field that was changed from a primative int to an integer.
    Any help is appreciated
    Chris

    I am pretty sure. I am using RAD locally so I have deleted all the generated AccessBean and Deployment code and rerun the deploy. My concern is that these remote methods are using an external JAR file which is loaded when the server is started. I have updated this JAR files, but I am not sure if maybe they are being cached some where.

  • Problem calling remote method

    All the cirrus connection is working fine, I make one net  connection and get my key, then I make a net stream, do connection with  the other user, the problem happens when i send the remote method to  call on the other user application.
    In the net status (using previuos created net  connection) event handler when the status get "Success" i make one  request like this:
    myStream.send("myFunction"); (I don`t remember if is .send or .play, but i tested both for sure)
    And i have a public function called myFunction() to be activated on the other side.
    Everything looks fine, i got the connection but i can`t access the remote method myFunction().
    If needed, i can send my code for you to see.
    Sorry for my english.
    Thanks a lot for helping!

    you can only call NetStream.send() on a publishing stream (one on which you have called NetStream.publish(streamName)).  and that NetStream must either be a client-server one (if talking to FMS) or a P2P one (either a group NetStream or a 1:1 one created as NetStream.DIRECT_CONNECTIONS).
    on the subscriber side, your "myFunction" must be a function property on the subscribing NetStream.client object.

  • JNI newbie problem calling remote method

    I have written the class and used javah to gen the .h file;
    class CallNative.java
    public class CallNative {
    static {
    System.loadLibrary("nativeapi");
    public native boolean doSomething(String x, String y);
    in the implementation i have
    callNativeImpl.cpp
    #include "StdAfx.h"
    #include <windows.h>
    #include "CallNative.h"
    BOOL APIENTRY DllMain (HANDLE hModule, DWORD dwReason, void** lpReserved) {
    return TRUE;
    extern "C" {
    JNIEXPORT jboolean JNICALL
    Java_CallNative_doSomething
    (JNIEnv *env, jobject obj, jstring strX, jstring strY) {
    jboolean Result = doSomething(strX, strY);
    I get > error C2065: 'doSomething' : undeclared identifier
    when compiling.
    What is the correct way of calling the external (native) method?
    Thanks in advance!

    Just for a test, change the line:
    jboolean Result = doSomething(strX, strY);to:
      printf("This is a JNI example.\n");
      return;It seems like "doSomething" is the function you are already in...
    Don't forget to also add an include of <stdio.h> for the printf to work.
    Good luck,
    Alfredo

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • Problem Calling Remote Session Bean Method

    Need help. I am trying to call a method in a remote stateless session bean in an EJB in my web application from a stateless session bean in a different EJB in the web application. I am getting a run-time error that says,
    "java.lang.NoClassDefFoundError: dtpitb.common.sb.reports.CommonReportsHome"
    ref = ctx.lookup( jndiName );
    // Cast to Local Home Interface using RMI-IIOP
    commonReportsHome = (CommonReportsHome)
    PortableRemoteObject.narrow(ref, CommonReportsHome.class);
    If while in a session bean of an EJB, I want to call a public method in the session bean of a totally different EJB, is there something in particular I am missing. I can make the call from the web application code. I can make a remote call from this session bean to itself in the exact same fashion. I just can't call a session bean in another EJB. All thoughts are welcome.
    Thanks,
    Pete

    Thanks for replying. That could very well be the case I suppose. I'm using JBuilder and WebLogic, and JBuilder pretty much does all of the deployment descriptor code for me. However, maybe this is something I need to incorporate manually.
    One EJB is in the same project as the web application code. The other EJB (common_ejb) is in another project. The calling session bean is in the project with the web app, and the remote session bean method that I'm targeting is in the common EJB session bean. Both EJBs are included in the web app's WEB-INF\lib dir and in the war file.
    So theoretically, this isn't an unconventional practice I assume?
    Thanks,
    Pete

  • NullPointerException while calling a Remote Method

    I have got the following exception wh�le calling a remote method,
    do you have any idea?
    java.lang.NullPointerException
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
         at distributedchess.server.ChessGameImpl_Stub.applyAction(ChessGameImpl_Stub.java:53)

    Looks to me like your server has a bug in a remote method.

  • Calling a remote method from a link

    I've been programming in Java for a few years, but I'm quite new at using JSP. I have a Java class that has methods to do some manipulations in a remote database. I'd like to invoke one of its public methods from a JSP page when I click on the correct link.
    The "link" would act the same way as a button, the only thing that it would do is calling the method from my class when clicked on. Example: There's a link that says "Generate XML file" and when I click on it, the method generateXML() from the Java class is called. No need to display anything, just do the treatment. Maybe make a refresh of the page afterwards, but that's it. I do not know how to pull this off, help would be greatly appreciated.
    Thanks,
    Julien

    call your java class function in a jsp and link it.
    For ex:
    generatexml.jsp ---> call your function in this jsp
    And make the link like this
    GenerateXML
    You can make it as a pop up and close the popup window once the process is over

  • Calling ejb remote method

    SQLPLUS How to call ejb remote method in the sql plus.i am getting problem to intiallize the initial context.

    hi chidambaresh,
    you could have sent this to me directly.
    the Enumeration si an interface and so the object we get during the runtime is basically an object of some implementation of this interface.
    the Enumeration you get from HAshtable is actually Serializable.
    but the Enumeration you actually get from Vector (this is actaully an inner class of Vector viz., Vector$1) is not serializable. that is what the error you are getting.
    regards
    Srinivasan.R
    (VAMSOFT)

  • Calling remote CFC method from CFFORM

    From what I understand by the remote methods in CFCs you can
    access them by passing the argument names and values through the
    URL with the method defined as well. I am trying to do the
    following:
    http://www.cfcoding.com/osu/components/Employees.cfc?method=addEmployee&firstname=Tristan& lastname=Lee&email=tristanlee%40gmail.com&address=1234+Some+Dr.&city=My+City&state=My+Stat e&zip=12345&comments=Test2&onNext=%2Fadmin%2F
    I have attached the code for that function, but it seems as
    though when I call that method with the arguments, the page is just
    blank. Even with output being on, I still can't get anything to
    display. In the end, the new employee isn't inserted into the
    database which is my biggest concern. Any dieas?

    There are several issues:
    1. You need to obtain file handle before calling GetFileType(). How are you going to get it?
    2. The simplest way to call a method from kernel32 would be using jni wrapper library, like xFunction:
    import com.excelsior.xFunction.*;
        /* Call Beep() from KERNEL32.DLL */
        xFunction f =  new xFunction( "kernel32",  "int Beep(int,int)" );
        f.invoke( new Argument(1770),  new Argument(100) );regards, Denis

  • Local function calling remote function - error

    Dear All
    i have following remote function wich return some value from both methods ie.
    1) select func1(variable, varialbe) from dual@remoteDB; working
    2) select func1(variable, varialbe) from dual; -- by making a synonym at local
    Now i create a local function funclocal calling remote functino i.e. func1 in this example as:
    CREATE OR REPLACE FUNCTION funclocal(locc varchar2, artnoo number)
    RETURN NUMBER IS
    query_str VARCHAR2(1000);
    STKQTYY NUMBER;
    artno number(10);
    loc varchar2(80);
    BEGIN
    artno := artnoo;
    loc := locc;
    query_str := 'select func1(loc, artno) from dual ';
    EXECUTE IMMEDIATE query_str
    INTO STKQTYY;
    RETURN STKQTYY;
    END;
    compiled successfully.
    But when i run as:
    SQL> select funclocal('abc', 469183) from dual;
    select funclocal('@st3', 469183) from dual
    ERROR at line 1:
    ORA-00904: "ARTNO": invalid identifier
    ORA-06512: at "funclocal", line 11
    Please guide me.
    Regards
    Saeed

    EXECUTE IMMEDIATE query_strAs Andreas states: Why are you using dynamic sql?
    From what I see all you need is sth like
    create or replace function funclocal (locc varchar2, artnoo number)
       return number
    is
    begin
       return func1 (locc, artnoo);
    end funclocal ;
    /even the whole concept of a »local« function seems suspicious. Why do you need that one?

  • Error While calling remote object

    [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/Remote/messagebroker/amf'"]
    This is the error I am getting when I am trying to call a method in java
    This is java code
    package demo;
    public class  Hello
    public String sayHello()
    System.out.println("1st Method is calledddddddd");
    return "Hello World!";
    public String sayHelloWithParam(String str){
    System.out.println("2nd Method is calledddddddd");
    return "You have typed  "+str;
    This is my mxml code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    public function sayHello(event:ResultEvent):void{
    label1.text=event.result.toString();
    public function sayHelloWithParameter(event:ResultEvent):void{
    label1.text=event.result.toString();
    ]]>
    </mx:Script>
    <mx:RemoteObject id="hello" destination="helloworldclass" fault="mx.controls.Alert.show(event.fault.toString())">
    <mx:method name="sayHello" result="sayHello(event)"/>
    <mx:method name="sayHelloWithParam" result="sayHelloWithParameter(event)"/>
    </mx:RemoteObject>
    <mx:Label x="55" y="51" text="Label" id="label1"/>
    <mx:Button x="253" y="49" label="Button1" click="hello.sayHello()"/>
    <mx:TextInput x="55" y="106" id="t1"/>
    <mx:Button x="253" y="106" label="Button2" click="hello.sayHelloWithParam.send();"/>
    </mx:Application>
    When I click the button I am getting that error..
    Please help me in solving this

    Your server code must be faulty. If things work well you should see a blank screen when you point your browser to the amf endpoint.
    An Apache message like "The requested resource (/bpm-backend/whatever) is not available." indicates that something in your server app is not working properly or not mapped right.

  • RMI server calling a method on a client object ?

    Hi All,
    I am writing a client - server application and my intention is to use RMI for comunication.
    When the client has to retrive datas from the server it's easy, but let's suppose that the server has to inform the client about some updates about the data, how can I do that?
    I do not want the client keeping calling methods on the server to see if there is something of new :(
    Is there some way to pass an OutputStream to the client, so when the server writes someting, the client reads it ? ( the client should have a thread which keeps reading)
    Or maybe I could pass a reference of a client class to the server so when the server needs to inform the client, it calls a method on this class?
    thanks, Fab

    The client can be a Remote Object to, passed as a remote reference when calling the server.
    Basically all you'll have to do is "register" the client on the serverside.
    Your serverside class would the have a:
    register(RemoteClient client) method.
    The server could the use this remote reference for callbacks.
    So, all you have to do is declare the Remote Interface for the client and implement it, and the call the servers myRemoteServer.register(this).
    If you've already implemented the server, it's a peace of cake to enhance your client.

  • Trying to call a method on an RMI server from a GUI

    Hi all, I'm new to the forums and I desperately need some help!
    My question fits into the RMI category but also the database/GUI side so sorry if this is posted in the wrong place.
    My application is a client/server system (programmed in Netbeans 6.8) that also uses GUIs and JDBC-ODBC. Basically, I am trying to call a method that adds an entry to my database from a GUI button.
    Due to the required RMI, I have the ServerInterface that extends Remote and I have a ServerImpl class that implements the Interface, and the RMI works fine so there is no problem there.
    My code for the button is:
    private void addUserActionPerformed(java.awt.event.ActionEvent evt) {                                       
    try{server.addNewUser("new");}
    catch(Exception e){}
    addUser.setText("buttonhaschanged");
    The server variable is declared above as ServerImpl server;
    The actual addNewUser method works fine when it is called explicitly via RMI in my main "Client" class, but this GUI is going to be like an "administrator GUI" that can manipulate the database, so there is no RMI involved here.
    Anyway, my button doesn't have any effect on the database, but the button changes text as desired so the button itself works, but it doesn't do what I want to the database, so I think my problem is the use of my "server" variable. I've tried making it static and I've tried making it of type ServerInterface, but no luck. Would I have to make the GUI class extend the interface too?
    Sorry for rambling on!
    Many thanks in advance
    David
    Edited by: DHD on Feb 26, 2010 6:15 AM

    Would I have to make the GUI class extend the interface too?Your GUI has nothing to do with the RMI. How did you obtaint the "server" ? have you looked in the RMI registry to get the stub object ?
    The second thing to notice is you are invoking a RMI calls on a EDT which you should not do it. Your RMI method calls should be invoked via SwingWorker-->doInBackground(); please take a look at the Java Doc
    [http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html|java Doc SwingWorker sample usage]
    You mentioned that the RMI method invocation works fine from the main class and not from the GUI so what did you do in the main class to get the stub do it in the doInBackground() method
    Regards,
    Alan
    London

  • Connection problem while invoking remote method from client using oracle 8.1.6 server

    while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.

    r singh wrote:
    >
    I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
    the start up of the server.
    My settings:
    - WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
    - I created the connection pool for oracle with the following
    parameters:
    connection name: OracleConnectionPool
    url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
    driver class name: oracle.jdbc.driver.OracleDriver
    properties: user=scott
    password=tiger
    - I have also downloaded classes12.zip and nls_charset12.zip from
    Oracle.com
    and have placed under $WL_HOME/lib.
    - I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
    in
    front of the $CLASSPATH in the startWeblogic.sh script. The echoed
    classpath
    from the startup script is:
    /opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
    charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
    _sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
    - Still I get the error:
    <Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
    connection pool "Or
    acleConnectionPool" No suitable driver>
    Can somebody point me out if i am doing anything wrong here.
    Thanks.
    RamanandHi,
    Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
    not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
    Joe

Maybe you are looking for

  • Network Cable Unplugged?? 915g-combo

    I have the Realtek RTL8169/8110 Family Gigabit Ethernet NIC onboard LAN, but I cannot get it to say that the cable is plugged in, even though it is. I have tried downloading the latest drivers, with no luck. I'm stuck with using this old 10 Mbps card

  • I need some pointers debugging my website

    Hi, I've nearly finished my first website (yippee). However, I uploaded it and found that when I click on some of my links, whether it's some of my images or links to PDF files, they jump out of the way or refuse to open! I would really appreciate so

  • Database adapter -  commit transactions

    Hello everybody. Is it possible with the BPEL Process Manager (Databas Adapter) to handle some f.e. INSERTS on a database (also with more then one adapter) only with on database connection and commit all INSERTS only at the end of the process? So it

  • ORA-22990 saving an XmlDocument

    I tried to save an XMLDocument into a CLOB using the code i found in the Steve Muench's book (chap. 6 XMLDocuments). When I execute it I get the Error ORA-22990 LOB locators cannot span transactions. The error is issued when i close the BufferedWrite

  • **Newbie to Understanding Mac Desktops**

    So, my Mac was in storage for a couple years. Now that i'm using it, I've had issues like Malware, Spyware, Virus'.... so I believe! Whatshould I get and where shall I go to get Anti Theft and Virus Protection best suited for Mac Os X Snow Leopard? A