RemoteException and ClassNotFoundException

i'm a newbie in RMI, i followed the tutorial, but can't get my example to work.
i did a jar with all classes needed.
this is the content of server.jar:
META-INF/
META-INF/MANIFEST.MF
jharon/
jharon/model/
jharon/model/AbstractDocument.class
jharon/model/Category.class
jharon/model/DocumentFactory.class
jharon/model/DocumentFactoryIf.class
jharon/model/DocumentKeeper.class
jharon/model/HtmlDocument.class
jharon/model/ImmutableCategoryIf.class
jharon/model/ImmutableDocumentIf.class
jharon/model/MutableCategoryIf.class
jharon/model/MutableDocumentIf.class
jharon/model/Profile.class
jharon/model/Publishable.class
jharon/server/
jharon/server/Publisher.class
jharon/server/PublisherEngine.class
jharon/server/PublisherEngine_Skel.class
jharon/server/PublisherEngine_Stub.class
the jar has been constructed by ANT with this script:
<target name="compile" depends="init" description="Compile sources" >
        <javac   srcdir="${src.dir}"
            destdir="${build.dir}"
            debug="on"
            deprecation="on">
            <include name="**/*.java"/>
            <classpath refid="project.class.path"/>
        </javac>
        <rmic  base="${build.dir}" includes="jharon/server/PublisherEngine.class" />
    </target>
<target name="server-jar" depends="init, compile" description="Create
        server-jharon.jar">
        <jar jarfile="${dist.dir}/${server}"
            basedir="classes">
            <include name="jharon/server/**/*.class"/>
            <include name="jharon/model/**/*.class"/>
             <manifest>
                <attribute name="Main-Class"
                    value="jharon.server.PublisherEngine"/>
            </manifest>
        </jar>
    </target>then, following the tutorial i unset the CLASSPATH, launch the rmiregistry, and then:
java -jar server-jharon.jar
which reports me this very long error:
java -jar server-jharon.jar
PublisherEngine exception: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: jharon.server.PublisherEngine_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: jharon.server.PublisherEngine_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at jharon.server.PublisherEngine.main(PublisherEngine.java:33)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: jharon.server.PublisherEngine_Stub
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: jharon.server.PublisherEngine_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
... 9 more
anyone could help me please?
thanks
Valerio

apparently i solved with this sequence of commands:
1) unset $CLASSPATH
2) export CLASSPATH=/local/path/to/server-jharon.jar
3)rmiregistry &
4) java -jar server-jharon.jar
and i get this answer:
PublisherEngine bound
which means (i hope) that the rmi registry has registred that instance...
i'll keep updated

Similar Messages

  • Notinited and ClassNotFoundException errors

    I hope someone can help me with the following problem:
    When I run my applet in a browser as a local computer, (meaning that the Applet is running on my computer rather than on the internet) it runs perfectly fine in any browser. However, when I try loading and running it from my site, I get the following errors:
    =================ERROR ON STATUS BAR:====================
    "Applet classes/Motif_Applet notinited"
    =================ERROR ON JAVA CONSOLE:==================
    load: class classes/Motif_Applet.class not found.
    java.lang.ClassNotFoundException: classes.Motif_Applet.class
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:153)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:506)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: java.io.FileNotFoundException: home/bee99001/public_html/classes/Motif_Applet/class.class
         at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
         at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:261)
         at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
         at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
         ... 10 more"
    ===================MY HTML CODE==========================
    <html>
    <head>
    </head>
    <body>
    <applet
    codebase = "."
    code = "classes.Motif_Applet.class"
    width = "900"
    height = "700"
    >
    </applet>
    </body>
    </html>
    ====================MORE INFORMATION=====================
    My HTML file is in folder "Public_html"
    My classes are in folder "classes" which is a subfolder of "Public_html".
    =========================================================
    I would appreciate any kind of help, reference, directions that you maybe able to lead me towards. Thanks for you time!

    I also made the following "dummy" modification and it now gives me the following error.
    ======================My Modification====================
    <applet
    codebase = "./classes"
    code = "Motif_Applet"
    width = "900"
    height = "700"
    >
    =====================New Error==========================
    load: class Motif_Applet not found.
    java.lang.ClassNotFoundException: Motif_Applet
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:153)
    at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:506)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
    at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
    at sun.applet.AppletPanel.run(AppletPanel.java:293)
    at java.lang.Thread.run(Thread.java:536)
    Caused by: java.io.FileNotFoundException: home/bee99001/public_html/classes/Motif_Applet.class
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:261)
    at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
    at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
    ... 10 more
    HELP PLEASE!! :-(

  • Web Server 6.1 and ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    I am trying to set up the Oracle jdbc on Sun ONE Web Server Enterprise Edition 6.1 but do not seem to be having any luck. It seems that OCI and thin fails.
    I have installed the Oracle client in the folder c:\oracle\ora92. I have selected the following items to install in the Oracle client: Oracle 9i Client 9.2.0.1.0, Common files, JDBC/OCI, JDBC/Thin, and Internet Directory Client. (I then downloaded ojdbc14.jar and placed it in jdbc\lib folder.)
    I am seeing the following error: ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    From the following web page:
    <code>
    <%@page language="java"
    import="java.sql.*,
    oracle.jdbc.driver.*,
    oracle.sql.*
    "%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <%
    //connections to ops2
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@wydot-ops2","username","password");
    Statement stmt = conn.createStatement();
    ResultSet rset = null;
    rset = stmt.executeQuery("SELECT AGENCY_NUMID,AGENCY_NAME FROM flightsch.state_agencies ORDER BY agency_name");
    while(rset.next())
    String ag_name = rset.getString("agency_name");
    %>
    <%= ag_name%>
    <%
    } //end of while loop
    rset.close();
    stmt.close();
    conn.close();
    %>
    </body>
    </html>
    </code>
    I have made the following entries into the Sun One Administration pages:
    Java Tab
    JVM path Settings
    Classpath suffix = c:\oracle\ora92\jdbc\lib
    Ignore Env Class Path = on
    Native Lib Path Prefix = c:\j2sdk1.4.2_02\lib
    Native Lib Path Suffix =
    JDBC Connection Pools
    Pool = jdbc-oracle-pool
    DataSource Classname = oracle.jdbc.pool.Oracle.DataSource
    URL = wydot-ops2
    User = username
    Password = password
    (Rest of items = defaults)

    oracle.jdbc.driver.OracleDriver is deprecated, you may be having an issue with that. Try oracle.jdbc.OracleDriver instead.
    Typically you don't need to registerDriver, just load the classes:
    Class.forName("oracle.jdbc.OracleDriver");
    WEB-INF/lib is the correct place to place application jar files, it is part of the automatic CLASSPATH for typical containers.

  • Remoteexception and  ejbexception

    I have a stateless session bean method:
    try{
    catch(){
    throw new EJBException()...// here
    I read some article says: either throw EJBException for local or throw RemoteException for remote.
    but my EJB suppose to be used by both local or remote client, how can I throw both EJBException or RemoteException?
    Thanks

    Your EJB should not directly throw RemoteException. First, you need to decide whether the
    condition you encounter is an application exception or a system exception. An application
    exception is a condition from which the client might be able to recover and is considered non-fatal
    by the container. When an application exception is thrown, the client will receive that exact
    exception. An application is a user-defined exception or any other existing exception that is a
    sublcass of java.lang.Exception (except java.rmi.RemoteException)
    With a system exception, the container destroys the bean instance that threw the exception
    and automatically rolls back the current transaction. The way to signify a system exception is by
    throwing EJBException or any runtime exception.
    The container will convert that exception to the appropriate client-side
    exception. In the case of a Local EJB client, the client will receive EJBException. If the client is
    an EJB 2.x Remote client, it will receive RemoteException. If the client is a 3.0 Remote client, it
    will receive EJBException.

  • RemoteExceptions and Entity bean failover

    The documentation gives an example of how to achieve failover with
              entity beans. (See below). How can one tell that the RemoteException
              is due to the server being down rather than some other reason.
              For example in EJB 1.0 aren't many exceptions generated in the bean
              wrapped in a RemoteException? For example if there is an SQLException
              the bean might throw a RemoteException that wraps the SQLException. In
              such a case it doesn't make sense to try it again.
              So what is the correct way to find out whether the exception is due to a
              server failure rather than some other reason?
              dan
              AccountHome home =
              (AccountHome)ctx.lookup("example.AccountHome");
              Account account;
              int attempts;
              while (attempts < LIMIT) {
              try {
              tx.begin();
              account = home.findByPrimaryKey(ACCOUNT);
              account.deposit(500);
              account.withdraw(10);
              tx.commit();
              break;
              catch (RemoteException re ) {
              // Retry
              try {
              tx.rollback();
              attempts++;
              catch (Exception e) {
              // Something unrecoverable has happened
              throw e;
              

    Yes, this is the "nasty" case as I've heard several people put it. It's among the
              problems that make distributed programming difficult. Since the database is managing
              the transaction log, the other app servers in the cluster do not know if the tx was
              committed or not either.
              -- Rob
              dan benanav wrote:
              > If a remote exception is thrown from an entity bean then is it the case that we know
              > the transaction has rolled back? What if the server went down after the transaction
              > was committed?
              >
              > dan
              >
              > Rob Woollen wrote:
              >
              > > dan benanav wrote:
              > >
              > > > Isn't there a more definitive way to determine whether the problem is due to a
              > > > connection error or the server being down?
              > > >
              > >
              > > My first answer to your question is why do you need this? Both a db
              > > connection error and the server going down should be relatively rare events in a
              > > production system. RemoteException is meant to indicate that a system-level
              > > error has occured and the transaction has rolled back. Doing another find in
              > > this case is not going to limit your application's performance / scalability.
              > >
              > > -- Rob
              > >
              > > >
              > > > Rob Woollen wrote:
              > > >
              > > > > dan benanav wrote:
              > > > >
              > > > > > The documentation gives an example of how to achieve failover with
              > > > > > entity beans. (See below). How can one tell that the RemoteException
              > > > > > is due to the server being down rather than some other reason.
              > > > >
              > > > > Any application error should be thrown as an application exception that
              > > > > you could obviously distinguish from RemoteException.
              > > > >
              > > > > As you correctly point out, db errors like SQLException are often
              > > > > wrapped in RemoteException when they reach the client.
              > > > >
              > > > > I would code the application to give up if it gets an application
              > > > > exception. For instance, if you try to withdraw more money than you have,
              > > > > there is no sense in retrying.
              > > > >
              > > > > I would retry (up to a small limit) on RemoteExceptions if it makes
              > > > > sense in your application. Even SQLExceptions may be transient. For
              > > > > instance, Oracle may not have been able to serialize your transaction on
              > > > > the first attempt, but your second try might go through.
              > > > >
              > > > > -- Rob
              > > > >
              > > > > >
              > > > > >
              > > > > > For example in EJB 1.0 aren't many exceptions generated in the bean
              > > > > > wrapped in a RemoteException? For example if there is an SQLException
              > > > > > the bean might throw a RemoteException that wraps the SQLException. In
              > > > > > such a case it doesn't make sense to try it again.
              > > > > >
              > > > > > So what is the correct way to find out whether the exception is due to a
              > > > > > server failure rather than some other reason?
              > > > > >
              > > > > > dan
              > > > > >
              > > > > > AccountHome home =
              > > > > > (AccountHome)ctx.lookup("example.AccountHome");
              > > > > > Account account;
              > > > > > int attempts;
              > > > > >
              > > > > > while (attempts < LIMIT) {
              > > > > > try {
              > > > > > tx.begin();
              > > > > > account = home.findByPrimaryKey(ACCOUNT);
              > > > > > account.deposit(500);
              > > > > > account.withdraw(10);
              > > > > > tx.commit();
              > > > > > break;
              > > > > > }
              > > > > > catch (RemoteException re ) {
              > > > > > // Retry
              > > > > > try {
              > > > > > tx.rollback();
              > > > > > attempts++;
              > > > > > }
              > > > > > catch (Exception e) {
              > > > > > // Something unrecoverable has happened
              > > > > > throw e;
              > > > > > }
              > > > > > }
              

  • Behaviour of AXIS with Spring and Java, in response to bad webservice call

    This is a stretch, but I wonder if you can help me - I'm new to this, and working in a project that has already been configured to work with Axis.
    We have a Java project built with the Spring framework, in order to provide webservices for access via SOAP. As I understand it (ie not very well!) Axis works to accept these SOAP messages from the client and transform them into calls on our Java methods, and do the reverse with the responses - cool! Which is excellent, and it works well with the config files we have already set up.
    But I have two problems/questions, which may well be related�
    2) In trying to test what exactly happens in which case, I sent some test messages to the service, and found that I could send incorrect parameter names, and sometimes the service still gets called! Axis seems to match the data it recieves to the parameters of the method in some clever way that I don�t understand. Sometimes this works, sometimes it shows a type error. But it seems to depend what parameter I rename as to what exactly happens, so the results are (superficially, at least) unpredictable! I'm sure this behaviour is configurable in some way, but I can't seem to find out how this is done. I'd like to make it so that missing parameters are passed into the method as nulls (as is happening now), but that badly named, duplicated or extraneous parameters are refused, with a specific errormessage stating what the issue is. Similarly, I'd like to reply with an explanatory message if a parameter is passed wth an incorrect type, rather than just a message "org.xml.sax.SAXException: Bad types" that does not detail which parameter is problematic.
    1) The client can receive a "500" response, with an "Internal Server Error" message, although I'm having trouble figuring out exactly when this happens. I'd like to be able to configure what message they receive, in order to give them more information about what they got wrong.
    I just don't know where to start with this - I'm sure there must be ways of configuring all this!
    As much info about an example of what I'm looking at as seems sensible follows. Please forgive me if I've used incorrect terminology somewhere! :)
    Thanks a heap,
    Tracey
    ======================
    So, let's say I have a Java class called DiaryService, with a method called createDiary that takes the appropriate data and returns a confirmation/error message - it starts like this :
        public String createDiary(final String library,
                final BigDecimal companyCode, final Date diaryDate,  final Date actionedDate,
         final String diaryMessage) throws RemoteException And another called GetDiary that returns a Diary as a SOAP bean which looks like this :
        public DiarySoapBean getDiary(final String library,
                final BigDecimal companyCode, final Date diaryDate) throws RemoteExceptionAxis very helpfully lets me access the createDiary and getDiary, by sending XML messages like this example:
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ns1:createDiary soapenc:root="1" xmlns:ns1="http://localhost:8080/morph_zta/services/DiaryService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <library xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">ZRMORPHTA</library>
    <companyCode xsi:type="xsd:Decimal" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">1</companyCode>
    <diaryDate xsi:type="xsd:date" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">2007-01-01Z</diaryDate>
    <actionedDate xsi:type="xsd:date" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">2007-01-01Z</actionedDate>
    <diaryMessage xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"/>Blah blah blah</diaryMessage>
    </ns1:createDiary>
    </soapenv:Body>If I rename a parameter, the service may get called, with some other data in that parameter or not, or may not get called at all and the user get a "SAXException: Bad types" error message. I would like it to return a message stating that the parameter is not expected.
    If I duplicate a parameter, the first occurrence appears to be used, and the next ignored. I would like it to return a message saying tnat the extra parameter is not expected.
    If I add gibberish parameters, I get a "No such operation" message. I would like to be able to tell which parameters are incorrect.
    We have entries like this in web.xml:
        <listener>
            <listener-class>
                   org.apache.axis.transport.http.AxisHTTPSessionListener
         </listener-class>
        </listener>
        <servlet>
            <display-name>Apache-Axis Servlet</display-name>
            <servlet-name>axis</servlet-name>
            <servlet-class>
                   com.workingmouse.webservice.axis.SpringAxisServlet
         </servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>/servlet/AxisServlet</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>*.jws</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>/services/*</url-pattern>
        </servlet-mapping>     And these bits in our server-config.wsdd :
        <!-- Global config options -->
        <globalConfiguration>
            <parameter name="adminPassword" value="admin"/>
            <parameter name="attachments.Directory" value="./attachments"/>
            <parameter name="attachments.implementation"
                    value="org.apache.axis.attachments.AttachmentsImpl"/>
            <parameter name="sendXsiTypes" value="true"/>
            <parameter name="sendMultiRefs" value="true"/>
            <parameter name="sendXMLDeclaration" value="true"/>
            <parameter name="axis.sendMinimizedElements" value="true"/>
            <requestFlow>
                <handler type="java:org.apache.axis.handlers.JWSHandler">
                    <parameter name="scope" value="session"/>
                </handler>
                <handler type="java:org.apache.axis.handlers.JWSHandler">
                    <parameter name="scope" value="request"/>
                    <parameter name="extension" value=".jwr"/>
                </handler>
        <handler name="acegiAuthenticationHandler" type="java:{our}.AcegiAuthenticationHandler"/>
            </requestFlow>
         <responseFlow>
              <handler name="OutgoingSOAPMessageViewer" type="java:{our}.OutgoingSOAPMessageViewer"/>
         </responseFlow>
        </globalConfiguration>
        <!-- Handlers -->
        <handler name="LocalResponder"
                type="java:org.apache.axis.transport.local.LocalResponder"/>
        <handler name="URLMapper"
                type="java:org.apache.axis.handlers.http.URLMapper"/>
        <handler name="Authenticate"
                type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
        <!-- Axis services -->
        <service name="AdminService" provider="java:MSG">
            <parameter name="allowedMethods" value="AdminService"/>
            <parameter name="enableRemoteAdmin" value="true"/>
            <parameter name="className" value="org.apache.axis.utils.Admin"/>
            <namespace>http://xml.apache.org/axis/wsdd/</namespace>
        </service>
        <service name="Version" provider="java:RPC">
            <parameter name="allowedMethods" value="getVersion"/>
            <parameter name="className" value="org.apache.axis.Version"/>
        </service>
        <!-- Global config options -->
        <transport name="http">
            <requestFlow>
                <handler type="URLMapper"/>
                <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
            </requestFlow>
        </transport>
        <transport name="local">
            <responseFlow>
                <handler type="LocalResponder"/>
            </responseFlow>
        </transport>
        <service name="DiaryServices" provider="Handler" style="rpc">
            <parameter name="handlerClass" value="com.workingmouse.webservice.axis.SpringBeanRPCProvider"/>
            <parameter name="springBean" value="diaryServices"/>
            <parameter name="springBeanClass" value="uk.co.trisystems.morph.ta.diary.soap.DiaryService"/>
            <parameter name="allowedMethods" value="createDiary getDiary"/>
            <parameter name="scope" value="application"/>
            <beanMapping qname="ns:diary" xmlns:ns="urn:DiaryService" languageSpecificType="java:uk.co.trisystems.morph.ta.diary.soap.DiarySoapBean"/>
        </service>Cheers
    Tracey Annison

    Hi,
    I have solved the problem, I forgot a parameter in the select, so java tells the an error. But now I have another problem. The procedure doesn't execute the order by. I pass the couple column_name order_type in a string as ("provider_description desc") dinamically but the procedure doesn't execute the ordering. Why?
    Thanks, bye bye.

  • Updating a table entry when remoteexception occures

    Hi,
    We are having the requirement that if remoteexception happens from EJB 1.1 then we need to update one table with status set to false.
    Since remoteexception is a system exception the transaction is marked for rollback and when we catch remoteexception and try to update the table
    it is not getting updated because the client transaction is also rolledback.
    we are actually using Websphere commerce server and we saw that WCS is able to update some of its own DB tables even when remoteexception occurs but we are not able to do it.
    So is there a way that when remotexception happens from EJB 1.1 we can update one of our tables.
    if yes then how can we do it.
    Thanks
    Ravi

    Try by putting this update code in a separate EJB with REQUIRES_NEW transaction scope.
    The the update is done in it's own transaction, and will not get affected by the other transactions 'marked for rollback' setting.
    -Roy

  • Develop and Deploying Web Service

    I'am developing a web service whose interface has the following method signature
    public abstract boolean setValueChanged()
              throws RemoteException;
              and the implemnetation class implementing it.
    After building the classes wsdl and the mapping file when i try to deploy in J2EE server i get the following
    error message:
    D:\Sun\AppServer\domains\domain1\applications\j2ee-modules\WorkBook\WEB-INF\classes\com\easi\document\DocObject_SOAPSerializer.java:226:
    cannot resolve symbol
    symbol : method isValuechanged ()location: class com.easi.document.DocObject
    ns3_myns3__boolean__boolean_Boolean_Serializer.serialize(new Boolean(instance.isValuechanged()), ns1_valuechanged_QNAME, null, writer, context);
    can anyone help me. Thanks in advance

    Yes, you should be able to do it. Once you create the web service you can attach ws-policy file to enable ws-security
    Regards,
    Sunil P

  • Doubt: NullPointerException instead of RemoteException???

    Hi,
    Scenario:
    1. An external object (hosted by another process) registers itself in WebLogic
    JNDI by invoking bind
    2. WebLogic EJBs invoke the external object, everything is OK
    3. Process hosting the external object goes down
    4. Remote reference still exists in JNDI
    5. Invoking the remote object throws the following exception:
    2002-09-09 15:54:13,492 ERROR [ExecuteThread: '6' for queue: 'default'] cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean
    - Failed to send message to clientconnector: Test-SMSC
    java.lang.NullPointerException
         at weblogic.transaction.internal.PropagationContext.getVersion(PropagationContext.java:646)
         at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:165)
         at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:92)
         at weblogic.common.internal.ChunkedObjectOutputStream.writeObjectWL(ChunkedObjectOutputStream.java:113)
         at weblogic.rjvm.MsgAbbrevOutputStream.setTxContext(MsgAbbrevOutputStream.java:111)
         at weblogic.rmi.internal.BasicOutboundRequest.setTxContext(BasicOutboundRequest.java:143)
         at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:95)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:116)
         at cz.oskarmobil.is.bmg.connectivity.tcpip.UCPClientConnector_WLStub.sendMessage(Unknown
    Source)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:294)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:237)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.onMessage(UCPPostprocessorBean.java:177)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:348)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:282)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:263)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2309)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2232)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    Why not RemoteException??? Why NullPointerException??? Wouldn't be RemoteException
    the right exception in this case?
    Please clarify this, since I thought it is enough to catch only RemoteException
    and relookup the object but now seems NullPointerException is also needed to be
    catched.
    Or, do I miss something?
    /SB

    while inserting data inserted into Temp_EmployeeDetails1, but not inserting in EmployeeDetails1,
    Because it is an INSTEAD OF trigger; instead of directly inserting the data into the base table the Trigger is fired and you have to insert the data on your own, e.g. after validationg or modifying the data.
    See
    INSTEAD OF INSERT Triggers /
    Designing INSTEAD OF Triggers
    Use an AFTER Trigger instead or modify your INSTEAD OF Trigger =>
    create trigger [dbo].[tr_emp1]
    on [dbo].[Employeedetails1]
    instead of insert
    as
    begin
    insert into Emploeeydetails1
    [EmployeeID],
    [Employeename],
    [Deptname]
    select ins.[EmployeeID],
    ins.[Employeename],
    ins.[Deptname]
    from inserted ins
    insert into Temp_Emploeeydetails1
    [EmployeeID],
    [Employeename],
    [Deptname]
    select ins.[EmployeeID],
    ins.[Employeename],
    ins.[Deptname]
    from inserted ins
    end
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How can client determine cause of RemoteException

    My BMP entity bean includes an SQL statement to UPDATE a database row (this UPDATE is in the ejbStore method).
    The UPDATE statement includes the following syntax
    UDPATE ....
    SET ....,
    no_of_changes = :no_of_changes + 1
    WHERE ....
    AND no_of_changes = :no_of_changes
    This ensures the UPDATE only proceeds if no other user has updated the row between my ejbLoad and ejbStore.
    If the update fails, becuase another user has updated the row, I throw an exception DatabaseBusyException, which extends RemoteException.
    My problem is that my client only sees a RemoteException, and I am therefore unable to be sure what message to give to the client. Ideally I would be able to tell it was a DatabaseBusyException and would inform the user that the 'Database is busy. Please retry later'.
    Any suggestions?

    Hmm, not sure on this. If the session bean is using remote access (PortableRemoteObject.narrow), then yes, all exceptions to the client are wrapped in Remote. But you should be able to get the exception message straight from remote - I'm not sure about the originating exception type, e.g. MyException.
    I must admit I've been focusing more server side so far, and the limited client side stuff I've done seems to indicate that remote simply passses the exception message. I don't think remote is being wrapped twice as you suggest, also not sure why you feel you need to trundle through the exceptions to the original message. I'm getting exceptions thrown from the SQL level in the EJB right up to the client (through several other session bean layers), and the original exception details are being preserved in the message body. EMail if you want to discuss further off-line.
    Rgds, LB

  • Invoking multiple host web services from JCAPS web service (RemoteException

    I am trying to invoke 2 web services sequentially ( not JCAPS service , some host service exposed as web service ), from my jcd which is also exposed
    as a web service.Both the host service have incorporated basic http authentication scheme,and i am setting the security credentials in the enviornment.
    (ie SOAP/HTTP external systems - client).
    However when I deploy my web service and try to invoke the host services,the first host service being called is invoked successfully and i get the response back.But the second service throws a RemoteException and the SOAP response carries "Client not authorized" message in faultstring detail tag.
    I do have separate external SOAP/HTTP systems for both the services,also the external systems have been configured with
    the HTTP basic authentication credentials.
    Infact I tried creating 2 separate JCAPS service for calling the host services individually.I am able to get the expected output
    from the services.
    The issue only arises when the host services are invoked in a sequential manner from a single JCAPS service.
    Please do let me know if i can fill in some more gaps in the information i have provided.
    Could this possibly be an issue in JCAPS?

    I have couple of doubts in this context.
    a) Is this issue only restricted when web services not developed using JCAPS are invoked or it arises also when 2 JCAPS external services are invoked
    sequentially.(I tried a PoC where in i created 2 deployments for calling the host services and invoked the deployment using another JCAPS web service and it worked fine)
    b) Also if this issue only arises when the external web services being invoked have security credentials or just invoking any web services in sequence create
    this problem.
    PS : Any link to contact the sun support team?

  • Subclassing RemoteException

    Dear All,
    I want to differentiate between various errors that may happen on server side and then take appropriate actions on client side. I thought to do it by subclassing RemoteException and catching the appropriate subclasses. However, it is always RemoteException what is actually thrown, with subclass nested in it.
    The only thing that works is:
    catch (RemoteException re) {
       if (re.detail instanceof ASubclass)
         do what you want;
    }But is not too pretty.
    Can someone tell me why is RemoteException supposed to work this way?
    Thanks

    Know your dilemma.
    The getMessage()::RemoteException doesn't always return a message. Even when you get something it may not reflect the true error.
    Remote Exception is the superclass. Meaning everything under the sun is pushed into it.
    You have to trap the error on the Server side. This is not so easy. What we ended up doing was editing the _Stub Class by putting in printStackTrace(), (and other code), in the catch statements. It ain't pretty, but it worked.
    You can get the _Stub source by running rmic with the -keepgenerated option.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

  • RemoteException stacktrace

    Hello, ugly question:
    If I do:
    e.printStackTrace()
    where 'e' is a subclass of java.rmi.RemoteException, and then throw it to the client, when I catch it in the client side and do:
    e.printStackTrace()
    I get different output. It seems that some information of the stacktrace do not travel to the client. I need full loging of the exceptions.
    In the app server:
    com.sofrecom.frameworkExceptions.negocio.BusquedaExcepcion: Error en la busqueda.; nested exception is:
         com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1
    com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1
    javax.ejb.ObjectNotFoundException: No such entity: 1
         com.sofrecom.frameworkExceptions.aplicacion.OperacionLocal OperacionLocalHome_EntityHomeWrapper6.findByPrimaryKey(java.lang.Long)
              OperacionLocalHome_EntityHomeWrapper6.java:394
         java.lang.Long com.sofrecom.frameworkExceptions.logica.ejb.AccesoOperacionBean.obtenerOperacion(java.lang.Long)
              AccesoOperacionBean.java:44
         java.lang.Long AccesoOperacionLocal_StatelessSessionBeanWrapper2.obtenerOperacion(java.lang.Long)
              AccesoOperacionLocal_StatelessSessionBeanWrapper2.java:100
         java.lang.Long com.sofrecom.frameworkExceptions.negocio.ejb.MiFacadeBean.obtenerOperacion(java.lang.Long)
              MiFacadeBean.java:43
         java.lang.Long MiFacade_StatelessSessionBeanWrapper0.obtenerOperacion(java.lang.Long)
              MiFacade_StatelessSessionBeanWrapper0.java:101
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1
         java.lang.Long com.sofrecom.frameworkExceptions.logica.ejb.AccesoOperacionBean.obtenerOperacion(java.lang.Long)
              AccesoOperacionBean.java:58
         java.lang.Long AccesoOperacionLocal_StatelessSessionBeanWrapper2.obtenerOperacion(java.lang.Long)
              AccesoOperacionLocal_StatelessSessionBeanWrapper2.java:100
         java.lang.Long com.sofrecom.frameworkExceptions.negocio.ejb.MiFacadeBean.obtenerOperacion(java.lang.Long)
              MiFacadeBean.java:43
         java.lang.Long MiFacade_StatelessSessionBeanWrapper0.obtenerOperacion(java.lang.Long)
              MiFacade_StatelessSessionBeanWrapper0.java:101
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    In the client side:
    com.sofrecom.frameworkExceptions.negocio.BusquedaExcepcion: Error en la busqueda.; nested exception is:
         com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1
    com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1
    javax.ejb.ObjectNotFoundException: No such entity: 1
    com.sofrecom.frameworkExceptions.logica.EJBBuscarExcepcion: No se encontro la entidada con Clave=1; nested exception is: javax.ejb.ObjectNotFoundException: No such entity: 1No se busco el cliente:
    Thanks.

    Assuming the stack trace info is not serialized, then you will obviously have to send it separately some how. One way is to get it into a string as follows:
    StringWriter sWriter = new StringWriter();
    PrintWriter sPrintWriter = new PrintWriter( sWriter );
    e.printStackTrace( sPrintWriter );
    sPrintWriter.flush();
    String theStackTrace = sWriter .toString() ;And of course you already know that code like this will losse a stack trace
    catch( Exception e )
    throw new Exception();
    }Now may I go back to my politic thread please ;->

  • Method foo() must include java.rmi.RemoteException

    Here's the full exception:
    In EJB VWBaseUser, method setUsername(java.lang.String) defined in the remote
    interface must include java.rmi.RemoteException in its throws clause.
    The problem is, I am throwing RemoteExceptions in my remote interface! Here's
    the code:
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface VWBaseUser extends EJBObject
    public String getFirstName() throws java.rmi.RemoteException;
    public void setFirstName() throws java.rmi.RemoteException;
    public String getLastName() throws java.rmi.RemoteException;
    public void setLastName() throws java.rmi.RemoteException;
    public String getUserName() throws java.rmi.RemoteException;
    public void setUserName() throws java.rmi.RemoteException;
    public String getPassword() throws java.rmi.RemoteException;
    public void setPassword() throws java.rmi.RemoteException;
    What gives?!? The only thing I could think of was that I'm somehow using an old
    JDK to compile with, but I thought I checked that and it was pointing to JDK 1.3.1
    (unfortunately, we're still using VisualCafe, and an old version at that, since
    Webgain is imploding)

    Yup, that must've been it. I did have the classes elsewhere in 'exploded' format,
    in addition to my EJB jar. Got rid of them, and the problem went away.
    Thanks!
    Brian
    Rob Woollen <[email protected]> wrote:
    The usual cause is you have another version of this class in your
    classpath which doesn't contain the RemoteException, and ejbc is finding
    this version.
    -- Rob
    Brian Preston wrote:
    Here's the full exception:
    In EJB VWBaseUser, method setUsername(java.lang.String) defined inthe remote
    interface must include java.rmi.RemoteException in its throws clause.
    The problem is, I am throwing RemoteExceptions in my remote interface!Here's
    the code:
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface VWBaseUser extends EJBObject
    public String getFirstName() throws java.rmi.RemoteException;
    public void setFirstName() throws java.rmi.RemoteException;
    public String getLastName() throws java.rmi.RemoteException;
    public void setLastName() throws java.rmi.RemoteException;
    public String getUserName() throws java.rmi.RemoteException;
    public void setUserName() throws java.rmi.RemoteException;
    public String getPassword() throws java.rmi.RemoteException;
    public void setPassword() throws java.rmi.RemoteException;
    What gives?!? The only thing I could think of was that I'm somehowusing an old
    JDK to compile with, but I thought I checked that and it was pointingto JDK 1.3.1
    (unfortunately, we're still using VisualCafe, and an old version atthat, since
    Webgain is imploding)

  • Trouble with first RMI

    Hi,
    I just have written a simpliest RMI application with a help of a textbook.
    When I run both parts (server & client) on the same machine I get the expected output, but when I tried to run client on another machine - I got
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: SimpleRMIImpl_Stub (no security manager: RMI class loader disabled)
    I guess (no security manager: RMI class loader disabled) is the answer to my problem. But have no idea what with means and what should I do??
    C:\distr>java SimpleRMIClient my_other_machine
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: SimpleRMIImpl_Stub (no security manager: RMI class loader disabled)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Unknown Source)
    at SimpleRMIClient.main(SimpleRMIClient.java:13)
    Caused by: java.lang.ClassNotFoundException: SimpleRMIImpl_Stub (no security m
    ager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
    at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
    at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
    at java.io.ObjectInputStream.readClassDesc(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    ... 3 more
    C:\distr>

    Hello friend,
    I have the same problem have posted above, and I have try all them have showed but no way! so try my self.
    I will write in detail so you can understand our problem. but I am sorry, this is only for Windows
    This is may example from abook:
    Reverse.java file
    import java.rmi.*;
    import java.rmi.server.*;
    public class Reverse extends UnicastRemoteObject implements ReverseInterface
    public Reverse() throws RemoteException
    super();
    public String reverseString(String originalString) throws RemoteException
    int length = originalString.length();
    StringBuffer temp = new StringBuffer(length);
    for (int i = length ; i>0 ; i--)
    temp.append(originalString.substring(i-1,i));
    return temp.toString();
    public static void main(String[] args)
    if (System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    //String name = "//jamesh/com.wrox.rmi.Reverse";
    String name = "//localhost/Reverse";
    try
    Reverse r = new Reverse();
    Naming.rebind(name,r);
    System.out.println("Reverse object bound");
    catch (Exception e)
    System.out.println("Error while binding Reverse object");
    System.out.println(e.toString());
    and ReverseInterface.java file
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface ReverseInterface extends Remote
    String reverseString(String originalString) throws RemoteException;
    and there is the client file for testing, Client.java
    import java.rmi.*;
    //import ReverseInterface;
    public class Client
    public static void main(String[] args)
    try
    //ReverseInterface ri = (ReverseInterface) Naming.lookup("//localhost:1099/Reverse");
    ReverseInterface ri = (ReverseInterface) Naming.lookup("//localhost:1099/Reverse");
    String result = ri.reverseString(args[0]);
    System.out.println("The reverse of " + args[0] + " is " + result);
    catch (Exception e)
    System.out.println("Error accessing remote object.");
    System.out.println(e.toString());
    this is .java.police file
    /* AUTOMATICALLY GENERATED ON Tue Jan 13 12:55:40 GMT+07:00 2004*/
    /* DO NOT EDIT */
    grant codeBase "file:${java.home}/lib/ext/*" {
    permission java.security.AllPermission;
    grant {
    permission java.lang.RuntimePermission "stopThread";
    permission java.net.SocketPermission "localhost:1024-", "listen";
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";
    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";
    permission java.net.SocketPermission "*:1024-65535", "connect,accept";
    permission java.net.SocketPermission "*:80", "connect";
    grant {
    permission java.security.AllPermission;
    =======================end of code==============
    then there is the guide for building this example
    I save my example in:
    ReverseInterface.java file and Reverse.java
    c:\rmiexample
    client.java in c:\rmiexample\test and the policy in c:\rmiexample\policy
    1/Compile all class
    javac *.java
    2/ generate Stub and skeleton
    rmi Reverse
    3/ start RMI registry
    start rmiregistry
    4/execute remode object
    java -classpath c:\rmiexample\ -Djava.rmi.server.codebase=file:/C:\rmiExample\ -Djava.rmi.server.hostname=localhost -Djava.security.manager -Djava.security.policy=file:/C:\rmiExample\policy\.java.policy Reverse
    Reverse object bound
    5/ Run client
    java -classpath c:\rmiexample\test\ Client 123456789
    The reverse of 123456789 is 987654321
    If you system is config well you run it without any problem but, my computer have many problem with JVM, so I have to work very hard to pass this example ;-)
    The first problem is that:
    C:\rmiExample>java -classpath c:\rmiexample\test\ Client qerrewrw
    Error accessing remote object.
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: Reverse_Stub (no security manager: RMI class loader disabled)
    the second error when i change, policy folowing the guide in the book,
    C:\rmiExample>java -classpath c:\rmiexample\test\ Client qerrewrw
    Error accessing remote object.
    java.rmi.UnmarshalException: error unmarshalling return; nested exception
    java.lang.ClassNotFoundException: access to class loader denied
    as you see, I went to java.sun.com, I hope in there will help me pass my problem, but there are many guide, but you know , no thing fix with me... any way thank you very much, about the time you spend on writing the guide
    and there is the last I do myself, chand policy to
    grant {
    permission java.security.AllPermission;
    C:\rmiExample>java -classpath c:\rmiexample\test\ Client 123456789
    The reverse of 123456789 is 987654321
    of course , this is not the good solution, but I just want to show that to make it runfirst and will fine tune later.
    I hope you run all easily...
    vnnWeb.

Maybe you are looking for

  • Display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price  against each line number

    hello all, i have an ALV report requirement like this, on the initial screen i have displayed(for a given agreement number like in ME33K ) in the selection screen i have taken agreement number as EKPO-EBELN. purchase document number        item numbe

  • Can't use new harddisk

    Hello all, I have a Problem with my T30 (2366-88G). I want to use a bigger harddisk, but it doesn't work. When I've plugged the new harddisk, the computer doesn't boot. A lock symbol is shown on the screen and I have no idea, what to type in. The har

  • Passing context value to Popup Window

    Hi, I am having a list of Sales Order numbers in a table.  And if any one of the SO is clicked then a popup have to show its item details with in a table. I am having the values of item list in the main view context and how to pass this data to the p

  • Is it possible to debug a process flow?

    There are debug tools for mappings. Is there any equivalent for process flows? Does anyone have any ideas for how to monitor the values in variables while a process flow is running? Thanks, Tim

  • Install errors in IDCS5.5

    I am getting errors when I try to install the Folio Producer Tools and the Folio Builder Panel.  (Mac, ID CS5.5) I was working fine until this morning when the Folio Builder Panel had me update it. The install didn't work and I got an error. Then I w