Rmi against tomcat

I just wonder...what would be the plus using tomcat instead a simple rmi based system for a thick client and server database?
if anyone has an idea!

Just a couple of pros/cons"
Tomcat pro: HTTP-based - will work over the internet.
RMI-pro: A lot easier than defining your own prototcol atop HTTP.

Similar Messages

  • Invoking RMI using Tomcat

    Hello
    i have a question but i do not know how to solve it.
    i tried to implement a small Client and Server RMI standalone application and is working fine.
    However know I would like to change the implementation and use Tomcat as the Server for the application.
    i have implemented this and it does not work and i have no idea why..
    i have a feeling i don't know how RMI works and I am turning if someone has an example of how to do it in Tomcat.
    my sample implementation is below:
    HelloWorldServer
    public class HelloWorldServer extends UnicastRemoteObject implements HelloWorld {
         private static final long serialVersionUID = 1128707054026502754L;
         public HelloWorldServer() throws RemoteException {
              super();
         public String helloWorld() {
              return "Hello World from RMI server!";
         public static void main(String args[]) {
              System.out.println("HelloWorldServer main");
              try {
                   if (System.getSecurityManager() == null) {
                        System.out.println(" System.getSecurityManager "
                                  + System.getSecurityManager());
                        System.setSecurityManager(new RMISecurityManager());
                   HelloWorldServer obj = new HelloWorldServer();
                   Registry registry = LocateRegistry.getRegistry("localhost");
                   registry.rebind("HelloWorld", obj);
              } catch (Exception e) {
                   e.printStackTrace();
    }init for Servlet
    public class ServerMain extends HttpServlet {
         public void init() {
              try {
                   HelloWorld mainServerClass = HelloWorldServer.class.newInstance();
              } catch (InstantiationException e) {
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   e.printStackTrace();
    }correct me..because i get error: RegistryImpl.lookup(RegistryImp.java:106)
    can some please shed a light...
    thnx

    Hello
    Actually I have not been able to do it.
    And i have not understood what you meant when you said that
    ejp wrote:
    Your main() does a Naming.bind(). Your ServerMain doesn't.could you please elaborate more..
    new to RMI..tried it for few hours. :-) thnx

  • Exception when using RMI in tomcat 5.5, after reloading webapp

    When I freshly start tomcat and deploy my web app, I can use RMI by creating a local registry and binding my objects.
    However, as soon as I reload the web application, RMI no longer works and gives me this exception:
    RMI error: error unmarshalling return; nested exception is:
            java.io.EOFException
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.io.EOFException
            at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
            at java.rmi.Naming.lookup(Naming.java:84)
            at nl.heliotrope.tropebiz.tools.NutchRestarter.main(NutchRestarter.java:33)
    Caused by: java.io.EOFException
            at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2498)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1273)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
            at sun.rmi.server.MarshalInputStream.readLocation(MarshalInputStream.java:285)
            at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:167)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
            ... 3 moreThe code to register my RMI object:
            logger.debug("Setting up RMI");
            //bind remote manager object to rmi resource
            RemoteManager remoteManager = new RemoteManager();
            try {
                Naming.rebind(rmiResource, remoteManager);
            } catch (MalformedURLException e) {
                throw new RuntimeException("Cannot happen: " + e.getMessage());
            } catch (RemoteException e) {
                /* perhaps the registry was not started yet? Attempt.
                 * Cannot create registry automatically at web application startup,
                 * because another app may have done so already.
                logger.debug("Error registering remote manager to RMI, " +
                        "service not running? Starting the registry.");
                try {
                    LocateRegistry.createRegistry(1099);
                    Naming.rebind(rmiResource, remoteManager);
                    logger.debug("RMI Registry started and remote manager registered");
                } catch (RemoteException e2) {
                    logger.error("Failed to start RMI registry or register RemoteManager!");
                    throw new RemoteException("rebind: " + e2.getMessage());
                } catch (MalformedURLException e2) {
                    throw new RuntimeException("Cannot happen: " + e.getMessage());
            logger.debug("RMI set up successfully");And client code:
                IRemoteManager remoteManager = (IRemoteManager)Naming.lookup(RemoteManager
                        .getRMIResource("127.0.0.1", 1099));Trying set a RMISecurityManager breaks tomcat horribly by the way, but since RMI works with a fresh tomcat startup, I suppose there's no problems there.

    Hi all!
    I get the same Exception using Tomcat 5.5. When registering an object outside tomcat lookup works fine. Only when registering an object inside a webapp!
    Would be great if anyone got a tip to solve it!
    Greetings...

  • RMI with Tomcat

    If I run my java-application the Naming.lookup works correctly and also a following call to a method of this object.
    But when I put this sequence to the Tomcat4.1.12 packed up in a Servlet, the Naming.lookup works correctly again, but the following call to a method of this object throws an exception.
    Does I need any property-settings on my standalone WebServer?
    Thanks for your help.
    Kind regards
    Exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.net.MalformedURLException: no protocol: Group/Tomcat
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
    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:536)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
    at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:116)
    at mmch.bod.session.pcmmmi.MmmiImpl_Stub.addListener(Unknown Source)
    at mmap.TrCtrl.myTest.init(myTest.java:72)
    at ConnectionTest.doPost(ConnectionTest.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
    ava:247)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
    ...

    I guess there is a whitespace in your Tomcat path, which caused the URL-related exception.

  • Tomcat & RMI

    Hi,
    I'm new in rmi.
    I'm tring to run this: http://java.sun.com/docs/books/tutorial/rmi/running.html
    I have one computer:
    server side: Tomcat = port 80
    c:\Tomcat\webapps\rmi\WEB-INF\classes\compute.jar
    c:\Tomcat\webapps\rmi\WEB-INF\classes\ComputeEngine.class
    c:\Tomcat\webapps\rmi\WEB-INF\classes\server.policy
    c:\Tomcat\webapps\rmi\WEB-INF\classes\client\Pi.class
    client side:
    D:\MyJava\RMI\compute.jar
    D:\MyJava\RMI\client.policy
    D:\MyJava\RMI\engine\ComputeEngine.class
    D:\MyJava\RMI\compute\compute.class
    D:\MyJava\RMI\compute\task.class
    D:\MyJava\RMI\client\Pi.class
    D:\MyJava\RMI\client\ComputePi.class
    server.policy:
    grant codeBase "file:/c:/MyJava/RMI/"  {
         permission java.security.AllPermission;
    };client.policy:
    grant codeBase "file:/c:/MyJava/RMI/" {
        permission java.security.AllPermission;
    };CLASSPATH in my computer:
    D:\Programs\Java\jdk-1_5_0_08\bin;
    C:\Tomcat\webapps\rmi\WEB-INF\classes\compute.jar;
    I'm runing this:
    start rmiregistry
    java -cp D:\MyJava\RMI;c:\Tomcat\webapps\rmi\WEB-INF\classes\compute.jar
    -Djava.rmi.server.codebase=file:/c:/Tomcat/webapps/rmi/WEB-INF/classes/compute.jar
    -Djava.rmi.server.hostname=localhost
    -Djava.security.policy=c:\Tomcat\webapps\rmi\WEB-INF\classes\server.policy engine.ComputeEngine
    I get this error:
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    And in this link write:
    "Before you execute rmiregistry, you must make sure that the shell or window in which you will run rmiregistry either has no CLASSPATH environment variable set or has a CLASSPATH environment variable that does not include the path to any classes that you want downloaded to clients of your remote objects. "
    I have one computer for server & client..
    Thank's alotttt
    Yael

    Hi,
    The server is running good to me now, but I get error in the client runing:
    java -cp D:\MyJava\RMI;c:\Tomcat\webapps\rmi\WEB-INF\classes\compute.jar
         -Djava.rmi.server.codebase=file:/c:/Tomcat/webapps/rmi/WEB-INF/classes/
         -Djava.security.policy=client.policy
         client.ComputePi localhost 45java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    this line:
    Compute comp = (Compute) registry.lookup(name);
    package client;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    import java.math.BigDecimal;
    import compute.Compute;
    public class ComputePi {
        public static void main(String args[]) {
            if (System.getSecurityManager() == null) {
                System.setSecurityManager(new SecurityManager());
            try {
                String name = "Compute";
                Registry registry = LocateRegistry.getRegistry(args[0]);
                Compute comp = (Compute) registry.lookup(name);
                Pi task = new Pi(Integer.parseInt(args[1]));
                BigDecimal pi = comp.executeTask(task);
                System.out.println(pi);
            } catch (Exception e) {
                System.err.println("ComputePi exception:");
                e.printStackTrace();
    }Could you show me what to write please? I'm new in this topic.
    Yael

  • NB upgrade - from tomcat to glassfish

    I upgraded NetBeans from 5.5b to 6.1. There is no longer a bundled tomcat, instead there is glassfish.
    My old web projects (written against tomcat) build correctly but they no longer run under glassfish. I get a 404 when I try to access them. I do not know glassfish well enough to troubleshoot via gf log messages whey they are not running under gf.
    Should these old tomcat projects run orrectly in glassfish or do i have to configure a file like web.xml in order to get them to run under glassfsh?

    duffymo wrote:
    qt4x11 wrote:
    I upgraded NetBeans from 5.5b to 6.1. There is no longer a bundled tomcat, instead there is glassfish.
    My old web projects (written against tomcat) build correctly but they no longer run under glassfish. I get a 404 when I try to access them. I do not know glassfish well enough to troubleshoot via gf log messages whey they are not running under gf.404 suggests that you just have a deployment or URL issue. What URL do you use to invoke the web app? Do you package it in a WAR file? Tomcat's default port is 8080; what port is Glassfish listening to for HTTP requests?
    I hit 'run main project' - the main project builds, then glassfish is started, and a browser window starts up with the web app.
    I am new to glassfish - I checked Services/Servers/GlassfishV2/Properties - it says
    Location: localhost:8484
    is that the port you are asking about?
    duffymo wrote:
    qt4x11 wrote:
    Should these old tomcat projects run orrectly in glassfish or do i have to configure a file like web.xml in order to get them to run under glassfsh?%

  • Re: CSRFGuard failing to initialize in WebLogic 12c

    Hi,
    has this issue been solved meanwhile ?
    I'm asking because we have run into the same problem: We needed to 'harden' an older web application against Cross-Site Request Forgeries and we used OWASP's CSRFGuard (V 3.0.0.503) for the task. While developing and testing against Tomcat (V 7.0.15), everything works fine . The application starts, loads the Servlet and JavaScript, and I can see Tokens being passed back and forth during Requests.
    Now I have to make it productive, and Production is on a BEA/Oracle Weblogic 10.3 under Solaris 9.
    An there, the application won't start. I'm running into the same NullPointerException as mentioned above:
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "JavaScriptServlet" failed to preload on startup in Web application: "Fendt.war". java.lang.NullPointerException          at java.io.FileInputStream.(FileInputStream.java:103)          at java.io.FileInputStream.(FileInputStream.java:66)          at org.owasp.csrfguard.servlet.JavaScriptServlet.readFileContent(JavaScriptServlet.java:227)          at org.owasp.csrfguard.servlet.JavaScriptServlet.init(JavaScriptServlet.java:89)          at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)   ...
    As you mentioned, I have expanded the weblogic.Chunksize and weblogic.utils.io.chunkpoolsize in the JAVA_PROPERTIES in setDomainEnv.sh to 8192, the values mentioned above, but to no avail.
    What else can I try to get the application started? I would not like to let go of the CSRFGuard as I think it a valuable tool for protecting my application.
    Any help is highly appreciated.
    Thanks in advance,
    Stephan

    Hi Sarathy,
    Try this option with in your startup script like setDomainEnv.sh file.
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dweblogic.Chunksize=8192 -Dweblogic.utils.io.chunkpoolsize=8192
    and try to access it seems to input stream issue.
    Regards,
    Kal

  • No ocijdbc9 in java.library.path

    I am running an app against Oracle 8.17 with an OCI connection using ocijdbc8.dll. The web server is Tomcat 3.2.3. The app has no problem connecting to the database.
    If I run against Tomcat 4 I get the error
    java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:294)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    I do not have Oracle 9i installed so don't know why it is trying to use ocijdbc9.
    When I switch back to Tomcat 3 there is no problem.
    The Classpath has the Classes12.zip for Oracle 8.1.7
    Can anybody shed any light on this??

    What is the platform this product is running on? Is LD_LIBRARY_PATH (through wrapper.env) or java.library.path set in jserv.properties?

  • Classpath issue for Derby DB

    Hi,
    I'm having issues with a classpath. I've made an rmi chat app running on tomcat 5. I started using Derby recently but I'm having problems with where to place the derby.jar or how to specify the classpath for it.
    I've tried:
    CLASSPATH=.;%DERBY_HOME%\lib\derby.jarI also tried putting the derby.jar file in the bin directory and in commons/lib in tomcat and chat/lib (my own folder) but again no luck. I've also tried other options of the classpath but nothing.
    The java code for the Class.for... is:
        public static Connection getConnection()
            dbURL = "jdbc:derby://localhost:1527/dsChatTestDB;create=true;user=admin;password=admin";
            try
    *Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();*
                // Get a connection
                conn = DriverManager.getConnection(dbURL);
            catch(ClassNotFoundException cNFEx)
              .....I tried out a test app (non rmi or tomcat) in eclipse using the same connection strings above and they work fine.
    Can anyone help on where to put the jar file or what classpath to specify. Tis wrecking my head :D
    Thanks,
    Brian
    Edited by: Rebels_Mascot on 07-Mar-2008 01:34

    Hey ejb,
    Well I can't be a 100% sure but when I had <b>set classpath=%DERBY_HOME%\lib\derby.jar</b> it didn't work and as soon as I changed from that classpath to the java classpath, it worked fine.
    I have all the commands in a bat file:
    'originally - set classpath=%DERBY_HOME%\lib\derby.jar
    set CLASSPATH=
    del Chat.jar
    rd /S /Q .\chat\bin\ds
    javac -d .\chat\bin chat\src\ds\rmi\client\*.java
        chat\src\ds\rmi\common\*.java
        chat\src\ds\rmi\common\domain\*.java
        chat\src\ds\rmi\factory\*.java chat\src\ds\rmi\server\*.java
        chat\src\ds\rmi\server\services\*.java
        chat\src\ds\rmi\server\services\persistence\*.java
    jar cvf  Chat.jar .\chat\bin .\chat\policy
    rmic -classpath .\chat\bin -d .\chat\bin ds.rmi.server.ChatServerImpl
    start rmiregistry
    start rmid -J-Djava.security.policy=.\chat\policy &
    pause
    start java -cp .\chat\bin;.\chat\lib\derby.jar;.\chat\lib\derbyclient.jar
      -Djava.rmi.server.codebase=http://localhost:8080/dschatActivate/chat/bin/
      -Djava.security.policy=chat\policy ds.rmi.server.Server&
    rmic -classpath .\chat\bin -d .\chat\bin ds.rmi.client.ClientUII tried a few variations with the set classpath by putting the derby.jar file in different locations, e.g. chat/lib and changing the classpath to there but that didn't work either.
    Thanks,
    Brian
    Edited by: Rebels_Mascot on 08-Mar-2008 01:39

  • JSP Home Interface Problems

    Hi, I am havin some problems trying to create a home interface in a JSP from an enterprise bean, i am using the following code :
    <%!
         private AddressBook addressbook = null;
         public void jspInit()
              try
                   InitialContext ic = new InitialContext();
                   Object objRef = ic.lookup("java:comp/env/ejb/TheAddressBook");
                   AddressBookHome home = (AddressBookHome)PortableRemoteObject.narrow(objRef, AddressBookHome.class);
                   %> <%!
                   addressbook = home.create("a","a","a","a","a","a","a");               
              catch (RemoteException ex)
                System.out.println("Couldn't create AddressBook bean."+ ex.getMessage());
            catch (CreateException ex)
                System.out.println("Couldn't create AddressBook bean."+ ex.getMessage());
            catch (NamingException ex)
                System.out.println("Unable to lookup home: "+ "AddressBook "+ ex.getMessage());
         public void jspDestroy()
         addressbook = null;
    %>
         <%
         addressbook01 = home.create("b","a","a","a","a","a","a");
         %>However i cannot access the home interface in the body of the JSP, i.e. where addressbook01 is trying to be created. Does anyone know a way around creating the home interface so that it is accessible in the body of the JSP?
    cheers

    Milan,
    I will attempt to answer some of your questions. Others I need a little more detail on:
    1. There isn't a way to run a JSP directly from JDeveloper to TomCat. Our internal server, Web-to-Go, is what we provide for local testing and debugging.
    We do, however, support remote debugging JSPs against TomCat. You can find out more about how to set this up from the online help, and also from the JDev 3.1 Remote Debugging Online Demo Walkthroughs available on the JDeveloper OTN page.
    2. I'm not sure why this is happening, but I would just answer 'No', if your edits are getting wiped out. I have not experienced this problem myself when I select 'Yes'.
    3. Are these JSP files that JDeveloper has created (i.e. via the JSP Web Application Wizard), or ones you created yourself? Does this happen each time you open the project? What are your HTML source and root directories set to in your Project Properties? Are the JSP files located there?

  • Guinea Pigs Needed ;-)

              Faced with web based reporting issues? Need to support multi-lingual site development.
              Sessions and URL rewritting spoiling your day?
              JSPFrame virtually eliminates Java in your JSP. A series of Tags (Dreamweaver extensions
              avail.) provide access to JSPFrames comprehensive features such as:
              Form Management &#8211; Stateful, and logical definitions
              Report Writer &#8211; Calculation engine, grouping, sub-totalling etc.
              Internationalization features
              JSP&#8217;s built against JSPFrame produce significantly less Java code and can be
              easily understood by both HTML and Java developers.
              Built on the MVC approach, JSPFrame is a developer extensible framework with user
              configurable .XML files
              JSPFrame works across any Servlet 2.2 compliant AppServer and has been tested against
              TomCat 3.2x, WebLogic 6 and OrionServer.
              Fully documented, JSPFrame includes a demonstration application to get you started.
              We are urgently looking for developers to review/evaluate/implement in partnership
              with Monowai. Visit http://www.monowai.com/jspframe for further information or send
              an email to jspframe@monowai to register your interest.
              HaH
              

    Alice when you use HyperlinkShader, are you shading just your CSS files or the iWeb file too. I would not use this application on your iWeb file as the "file" they're referring to here is the index.xml file within your domain file. Eeek. I don't want any third-party messing with that.
    I reviewed the source code they posted at their web site and nowhere did I find any reference to manipulation of the TemplatesInfo.plist file. That's the file that would have to be altered to remove registration of your third-party templates. Well, that's the file that tells iWeb to include the template in the list. The actual files have to be installed to the template directory as well.
    If it isn't too much trouble, recreate the situation on your machine and send me your PLIST file once the templates have been booted out of the list. Also, check this path and let me know if the actual template files are missing:
    /Applications/iWeb/Contents/Resources/Shared/
    All of my templates are installed to this folder, but other developers may not be using the 1.1 installation location so theirs may be in the old location:
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/About Me/
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/Blog/
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/Movie/
    ...and so on...
    If the templates are still in the folder(s) that's one thing. If they've been unregistered in the TemplatesInfo.plist, that's another. There's no reason that HyperlinkShader should be going anywhere near either of these things. They're totally unrelated.
    Suz

  • Is Parallel GC still experimental?

    I have been running our app against tomcat 4.1.18 with JRockit SP2 1.4.1 with option
    -XGC:gencon
    Under load we get to a point where the CPU jumps to 100% and server throughput
    drops. (4CPU 1GB mem)
    Using the Sun JDK 1.4.1 with options JAVA_OPTS=-Xms1024m -Xmx1024m -XX:+UseParallelGC
    -XX:+UseAdaptiveSizePolicy our testing runs fine
    Any pointers on where to look to see whats going on? and Is the option to use
    Parallel garbage collection in Sp2 still experimental?

    An update to the JRockit 7.0 SP2 release are available from the FTP server,
    and are certified to work with WebLogic Server 7.0 SP2. This update
    contains the improvements that were implemented in JRockit 8.0, but is J2SE
    1.3.1 compatible. So, it can be used with WebLogic Server 7.0 SP2.
    The update version is called JRockit 7.0 SP2 RP1, and is certified to be
    compatible with J2SE 1.3.1.
    ftp://ftpna.beasys.com/pub/releases/jrockit/7.0/win32_jrockit70sp2rp1.zip
    ftp://ftpna.beasys.com/pub/releases/jrockit/7.0/linux32_jrockit70sp2rp1.tar.
    gz
    These updates will be rolled into a subsequent JRockit 7.0 SP3 release later
    this year.
    Thanks
    Arvind
    "BeLong" <[email protected]> wrote in message
    news:[email protected]..
    >
    We would like to use JRockit 8.0 but we need to support Weblogic 7 which Igather
    is only certified for JRockit 7SP2. Is Jrockit 8.0 due to be certifiedagainst
    Weblogic 7 SP2?
    "Staffan Larsen" <[email protected]> wrote:
    I think you should upgrade to JRockit 8.0. It supports both parallel
    and
    concurrent GCs and includes a lot of performance and stability fixes.
    Regards,
    /Staffan
    "BeLong" <[email protected]> skrev i meddelandet
    news:[email protected]..
    I have been running our app against tomcat 4.1.18 with JRockit SP21.4.1
    with option
    -XGC:gencon
    Under load we get to a point where the CPU jumps to 100% and serverthroughput
    drops. (4CPU 1GB mem)
    Using the Sun JDK 1.4.1 with optionsJAVA_OPTS=-Xms1024m -Xmx1024m -XX:+UseParallelGC
    -XX:+UseAdaptiveSizePolicy our testing runs fine
    Any pointers on where to look to see whats going on? and Is the optionto
    use
    Parallel garbage collection in Sp2 still experimental?

  • RMI issue with Tomcat

    Hi All,
    I have an RMI system, that in command line works perfectly, as expected. However, I have transferred my Client to Servlet and am running it though Tomcat. Now when ever I try and invoke a remote method I receive an error message.
    The error is generated as a result of catch statement for the following:
    server = (Server)Naming.lookup(fullname);I know the Client code is being evaluated as it generates the HTML error message from the catch. Using a System.out.println and the Tomcat log files I caught the error and wrote it to a log file. It was as follows:
    Caught an exception doing name lookup on rmi://localhost/Bank-Server: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: ServerImpl_Stub (no security manager: RMI class loader disabled)
    Caught an exception doing name lookup on rmi://localhost/Bank-Server: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
         java.net.ConnectException: Connection refused: connect
    Caught an exception doing name lookup on rmi://localhost/Bank-Server: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
         java.net.ConnectException: Connection refused: connect
    Caught an exception doing name lookup on rmi://localhost/Bank-Server: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
         java.net.ConnectException: Connection refused: connect
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: ServerImpl_Stub (no security manager: RMI class loader disabled)
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: ServerImpl_Stub (no security manager: RMI class loader disabled)
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: ServerImpl_Stub (no security manager: RMI class loader disabled)I can see from the error that it might have something to do with a security manager? I have read a little about it and when running the security manager a special command needs to be entered at runtime to invoke the policy? How on earth is this done in a Web application situation?

    Connection refused: connectIt could be some configuration problem.

  • Problems with RMI tutorials using Tomcat 4.1.24

    Hi
    I have some problem when I try the rmi Hello example tutorial (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/getstart.doc.html)
    When I start rmi server as follows:
    java -Djava.rmi.server.useCodebaseOnly=true -Djava.security.policy=file:E:\Rmi\Hello\mysrc\bin\policy.policy -Djav
    a.rmi.server.codebase=http://127.0.0.1/classes/ examples.hello.HelloImpl
    I got the following errors:
    HelloImpl err: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
    at java.net.Socket.connect(Socket.java:420)
    at java.net.Socket.connect(Socket.java:376)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    at examples.hello.HelloImpl.main(HelloImpl.java:67)
    I have granted all permission in the policy file. I have put all the classes in a subfolder call classes just after the Root directoy Can someone enlighten me. Thanks.

    i don't know if it helps but i had the following problem:
    an rmi-component software plus a servlet contacting the system.
    and rmi from the servlet in tomcat did not seem to work ...
    java.rmi.MarshalException: error marshalling arguments; nested exception is:
         java.net.SocketException: Software caused connection abort: socket write error
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at net.metamagix.essence.Agents.DataAgentI_Stub.storeObjects(Unknown Source)
         at net.metamagix.essence.CAgents.ParameterSaviour.save(ParameterSaviour.java:1556)
    finaly i changed back to tomcat 4.0.x but it still was not any better, when i found out that most of the problems resulted from pathnames...
    tomcat 4.1.24 had a problem with pathnames getting too long (2k on win 2000) and tomcat 4.0 produced errors because of the blank in it's path name "Tomcat 4.0" so i made a new installation with C:\Tomcat4 as home directory and - what a surprise - things turned out fine and rmi worked.

  • Error in re-creating RMI registry when reloading Tomcat server.

    Hi,
    I use LocateRegistry.createRegistry() in a servlet which is load-on-startup. I've unexport the registered remote object in the HttpServlet.destroy().
    But when I reload the tomcat server, such an exception ocurrs:
    java.rmi.server.ExportException: internal error: ObjID already in use
            at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:168)
            at sun.rmi.transport.Transport.exportObject(Transport.java:69)
            at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:190)
            at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
            at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
            at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:145)
            at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
            at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
            at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:164)
            at RmiUtils.rebindLocal(RmiUtils.java:86)Here is the binding code in RmiUtils.rebindLocal:
            try {
                Naming.rebind(url, rmiImpl);
            } catch (RemoteException ce) {
                if (!ru.isLocalhost()) {
                    ce.printStackTrace();
                    // cannot cache
                    return;
                } else {
                    // try to create the registry in local machine if not created
                    try {
                        LocateRegistry.createRegistry(ru.getPort());
                        Naming.rebind(url, rmiImpl);
                    } catch (RemoteException e) {
                        System.err.println("Failure in create Registry on port "
                                + ru.getPort() + ", maybe it's been created already!");
                        e.printStackTrace();// handle exception
            }Can anybody help?
    Thanks.

    Hi
    I havent code for quite a while.
    I would think that this wont work.
    The registry is created on startup (possibly init method in ur servlet) but it is never destroyed.
    You are better off starting the registry externally to ur servlet engine, and then use do a bind/rebind on startup, unbind on destroy.
    Hope this helps.

Maybe you are looking for

  • My iTouch says it needs to sync but my computer won't let it sync because of my passcode.

    My iPod stopped working for a bit. I tried it again 4 days later and it works but says I need to sync it (White usb cord pointing an arrow to the itunes sign). I'm trying to sync it but it won't sync becuase it says that there is an error (Itunes can

  • How to find out changes in order in APO

    Hi, I have with me order number. I want to know what changes are done in APO in particular time period through which transactions. I mean I want to see changes particular order in particular time period. I tried with /SAPAPO/C3 But in 24 hours period

  • Bundling of Idocs

    hi all, i need to configure a scenario as: SAP system sends IDOC to XI. Depending on the value of 1 particular Feild BPM will collect IDOCs in seperate messages and send them to File. plz help. Thanks. Azfar sadiq

  • Work arounds for XMP sidecar import problems?

    Hi, I was wondering if anyone has figured out a workaround for the fact the Aperture 2.x doesn't support importing EXIF data with pictures that have sidecar .xmp files. Applescript? Something else? If not, I was thinking about trying to solve it myse

  • Unable to switch between Tabs in a af:panelTabbed component

    Hi all, Good Day, I am working on a POC which has 6 tabs in an af:panelTabbed component. All the tabs (af:showDetailItem components) are with the default properties. While running the application it is working fine till one or two tab clicks but afte