Rmi to Oc4j Problem

Hi,
we have the following problem:
We want to call an Enterprise Java Bean from an Oracle10g DataBase. The Ejb is deployed in an Oc4j-ApplicationServer.
When we try to get the Initial-Context on the DataBase, then we get an error which tells us that the class which implements this Functionallity is not found:
.javax.naming.NoInitialContextException: Cannot instantiate class: oracle.j2ee.rmi.RMIInitialContextFactory [Root exception is java.lang.ClassNotFoundException: oracle.j2ee.rmi.RMIInitialContextFactory]
I think that it is in the oc4jclient.jar file which comes with the jDeveloper installation.
When we try to send the oc4jclient.jar via loadjava to the database we get some errors during the deployment. When we look at the deployed classes we see that many classes are invalid because of missing classes.
Has anybody an Idea how to fix this?
(This is really urgent)
Regards
Jan

hi Jan,
I have few links which may help u .
1. http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/howtoORMIS/doc/how-to-ORMIS.html
2.
http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-rmi-iiop.html
3.
re:Accessing EJB on OC4J from Oracle 8.1.7.3
Trinath Somanchi,
Hyderabad.

Similar Messages

  • RMI with SSL problem (cross post under RMI too)

    Hi,
    I'm having problems using RMI with SSL. I posted in the RMI forum originally but now realise the problems are with the SSL really.
    Perhaps someone who follows this forum could help.
    See post:
    http://forum.java.sun.com/thread.jsp?forum=58&thread=409347
    Thanks.

    There's more dukes in the other thread too.

  • Rmi rebind's problem,dynamic rebind object!

    hi,everyone
    I have a problem,i know a class's name and this class have implement remoteobject,
    what can i rebind this class on the RMI registry .
    I write code like this:
    Class temp = Class.forName("Test");
    Naming.rebind("test",temp.newInstance());
    the "Test" is my class name,but cann't compile this code ,it's say:
    rebind(java.lang.String,java.rmi.Remote) in java.rmi.Naming cannot be applied to (java.lang.String,java.lang.Object)
    what can i do? help me

    You might try downcasting your newly created Object to a Remote. If you give a method a java.lang.Object reference, it won't figure out if it's really pointing to a java.rmi.Remote.

  • Clustered Oracle 9i AS and OC4J Problem

    Hi,
    I am working with two Oracle 9i AS (9.0.2.0.1), serverA and serverB, in a clustered environment. I have published a servlet to the cluster under the URL of /MyApp and the main servlet is MyServlet. I have noticed that when I go to either URL:
    http://serverA/MyApp/MyServlet
    or
    http://serverB/MyApp/MyServlet
    my servlet will show up fine but sometimes when going to serverA it will actually use the servlet running on serverB, and vice versa. I am able to verify this by looking at the log files. At first I wasn't sure why it would do this but it makes sense that in a clustered environment it would pick either of the servers to load balance the application. After reading some Oracle documentation it re-enforced the way the AS works.
    Recently I have noticed some problems with the cluster though but can't seem to pin-point the problem. When I go to either URL it will sometimes bring up the servlet web page but other times it will give an error of:
    No Response from Application Web Server
    Upon further investigation I noticed that the page would come up fine any time it tried to use the servlet on serverA but it seems that when it tries to use the servlet on serverB it returns the error. The problem is I am having a hard time verifying that serverB is causing problems or if it is something with the communication between the two servers. As far as I can tell in the Oracle EM it shows both OC4J containers running fine and all the other standard containers are running as well. Some testing that I have done is turning off the OC4J container on serverB. When I do this I stop getting any errors. Checking the opmn log for the containers doesn't give any information on the errors.
    Has anyone had similar problems? Might someone know how to properly test / troubleshoot the problem to see where things are messing up? Anyone have a solution?
    Thanks

    This is the way it works in 903 as well.
    There is a more general forum for 9iAS questions on this site, where other product managers who look after other areas of the product answer questions. It might be worth your while to post your question there and one of the PMs from the management team might be able to shed some light on the issue with respect to a future release.
    -steve-

  • RMI application policy problem..

    Hi;
    Because i am very new in eclipse and java i will ask you an easy question which is realy hard to find out for me.
    I created an RMI project in eclipse and i put the codes inside. When i am trying to run it is says
    Security Manager loaded
    Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    I searched a solution and they are saying create a policy file with same code inside and run with it .
    But i got no clue about how i will write
    java -Djava.security.policy=policy.all SampleServerImpl
    java -Djava.security.policy=policy.all SampleClient
    in eclipse to run code . And i put the policy inside of project folder but id didn't recognize it automaticly.
    Thank you ...
    Edited by: seray.uzgur on Jul 10, 2008 6:55 AM

    Hi,
    What i could see the solution to your problem is.
    create a file name policy.all having the code
    grant {
    // Allow everything for now
    permission java.security.AllPermission;
    & when u call a client call like if u r calling a client through Ant
    do llike this
    <target name="run" >
              <java classname="test.Sample" fork="yes" failonerror="true">
                   <jvmarg value="-Djava.security.manager"/>
         <jvmarg value="-Djava.security.policy=policy.all"/>
                   <classpath refid="src.classpath" />
              </java>
         </target>
    See if that works for you.

  • OC4J problem and End of TNS data channel

    We are using Oralce 9iAS with OC4J to host our java application. Recently, we kept having problem with the application. The problem is when user enters username and password to login, the application doesn't do anything until we restart OC4J instance. After tracking down all the error log files, it looks like problem happened whenever the application get "SQL Exception: End of TNS data channel" error. I don't know why are we getting this "End of TNS data channel" error. I don't think it is the application's problem.
    1)Does anybody have any idea why?
    2)Does OC4J server need to be restarted every once a while.
    Thanks in advance.

    Hi Liya -
    "End of TNS data channel" is usually a message sent by the database when something erroneous is occuring.
    What version of the database, JDBC, and JDK are you using?
    Are you getting any dump files from the database?
    Can you describe a little more about what the application code is doing?
    There is some good information on this error message at the following URL
    http://forum.java.sun.com/thread.jsp?thread=280338&forum=48&message=1090056
    -steve-

  • WebLogic RMI UNIX Performance problem

    Hi.
    I'm experiencing problems with the performance of RMI calls from within session
    beans to external RMI services. I have a system running 4 RMI services in separate
    JVMs to weblogic 6.1 instance on Solaris 2.6 on SPARC boxes with 1+ Gb of RAM.
    The system was developed on NT and deployed to UNIX. A typical request is serviced
    in 70-90 ms on the NT development box (Desktop 512Mb RAM) but when deployed to
    the UNIX box takes anywhere between 500-4000 ms. Performance metrics in the code
    indicate that 'crunch' times are similar but remote RMI calls are orders of magnitude
    greater.
    Has anybody had similar problems? I have checked the tuning guides wrt TCP/IP
    configurations but would not expect such a large difference using the default
    Solaris configuration. Memory and CPU utilisation on the SPARC are low as are
    I/O and other metrics available from vmstat.
    Cheers
    Pete

    Hi.
    The JVMs are running on the same machine thus should be looking in /etc/hosts
    and not going via DNS.
    I have read there is a performance gain by tying WL to a single CPU, any insight?
    Pete
    Andy Piper <[email protected]> wrote:
    "Pete Harris" <[email protected]> writes:
    I'm experiencing problems with the performance of RMI calls from withinsession
    beans to external RMI services. I have a system running 4 RMI servicesin separate
    JVMs to weblogic 6.1 instance on Solaris 2.6 on SPARC boxes with 1+Gb of RAM.
    The system was developed on NT and deployed to UNIX. A typical requestis serviced
    in 70-90 ms on the NT development box (Desktop 512Mb RAM) but whendeployed to
    the UNIX box takes anywhere between 500-4000 ms. Performance metricsin the code
    indicate that 'crunch' times are similar but remote RMI calls are ordersof magnitude
    greater.
    Has anybody had similar problems? I have checked the tuning guideswrt TCP/IP
    configurations but would not expect such a large difference using thedefault
    Solaris configuration. Memory and CPU utilisation on the SPARC arelow as are
    I/O and other metrics available from vmstat.Its possible that you are getting a DNS lookup for each request or
    worse a reverse lookup. You might want to try using IP addresses in
    your config to see if that helps.
    andy

  • Jdeveloper + OC4J Problem

    Hi all,
    I have an application that runs fine on tomcat and any other app server. When I try to run it from within Jdeveloper, for some reason I get all sort of class-loader or xml parsing problems.
    So it turns out that embedded oc4j tries to use its own xml parser, its own struts jar and this causes a lot of problems and it throws errors and I can't run this app.
    Please how do I turn off jdeveloper/embedded OC4J from using its own jars and rather just run the app, since the app has all needed libraries ?
    Here's a sample error -
    SEVERE: MessageResourcesFactory.createFactory
    oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: org.apache.struts.util.PropertyMessageResourcesFactory
         Dependent class: org.apache.struts.util.RequestUtils
         Loader: current-workspace-app.web.zeims-c:0.0.0
         Code-Source: /C:/devtools/java/jdeveloper/jdev/mywork/zeims/customer/lib/struts.jar
         Configuration: <classpath> in C:\devtools\java\jdeveloper\jdev\mywork\zeims\customer\public_html
    This load was initiated at current-workspace-app.root:0.0.0 using the loadClass() method.
    Pls help !!!

    I think that i they works is lucky, because your two modules get managed through the same class loader in your standalone oc4j
    Correct if I'm wrong, but you should not trust using local references if they aren't implemented in the same instance of the classloader, which you can control

  • Mapviewer OC4J problem

    I installed OC4J, Mapviewer and the mapviewer demo
    Now some Mapviewer demos and examles work, I can connect to the database, but I cannot start any OC4J-jsp or Mapviewer-jsp demo.
    Selecting a jsp demo (i.e. •     jview.jsp A simple no hassle spatial data viewer) in the internet explorer I get the message:
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.
    The OC4J process reports the following error:
    04/09/22 11:50:46 IOException in compile: CreateProcess: javac.exe -J-Xmx1024m -
    classpath oc4j.jar;D:\oc4j\j2ee\home\lib/ejb.jar;D:\oc4j\j2ee\home\lib/servlet.j
    ar;D:\oc4j\j2ee\home\lib/ojsp.jar;D:\oc4j\j2ee\home\lib/jndi.jar;D:\oc4j\j2ee\ho
    me\lib/jdbc.jar;D:\oc4j\j2ee\home\iiop.jar;D:\oc4j\j2ee\home\iiop_gen_bin.jar;D:
    \oc4j\j2ee\home\lib/jms.jar;D:\oc4j\j2ee\home\lib/jta.jar;D:\oc4j\j2ee\home\lib/
    jmxri.jar;D:\oc4j\j2ee\home\lib/javax77.jar;D:\oc4j\j2ee\home\lib/javax88.jar;D:
    \oc4j\j2ee\home\../../opmn/lib/ons.jar;D:\oc4j\j2ee\home\../../opmn/lib/optic.ja
    r;D:\oc4j\j2ee\home\../../lib/dms.jar;D:\oc4j\j2ee\home\../../dms/lib/dms.jar;D:
    \oc4j\j2ee\home\lib/connector.jar;D:\oc4j\j2ee\home\lib/cos.jar;D:\oc4j\j2ee\hom
    e\lib/jsse.jar;D:\oc4j\j2ee\home\../../oracle/lib/jsse.jar;D:\oc4j\j2ee\home\lib
    /jnet.jar;D:\oc4j\j2ee\home\lib/jcert.jar;D:\oc4j\j2ee\home\lib/activation.jar;D
    :\oc4j\j2ee\home\lib/mail.jar;D:\oc4j\j2ee\home\../../javavm/lib/jasper.zip;D:\o
    c4j\j2ee\home\../../lib/xmlparserv2.jar;D:\oc4j\j2ee\home\../../oracle/lib/xmlpa
    rserv2.jar;D:\oc4j\j2ee\ho?
    Has anybody an idea what is wrong?
    The operating system is Windows 2000, German version.
    The OC4J is the latest version (dowloaded last week),
    the database is Oracle 10g, 10.1.0.2 enterprise edition.

    this is definately caused by using the wrong java program. Please check the following:
    1. Are you using Java 1.4 or higher? to check, do 'java -version' from command line.
    2. Are you using the java executable located directly under a J2SDK's bin folder? If you are using any jre (Java Runtime Environment) java executable, OC4J wont be able to run the JSP pages.
    Also dont use the java that comes with your oracle database, as that is also a JRE only program. Instead, download the full j2sdk 1.4.2 from Sun.
    LJ

  • OC4J Problem

    Hello
    I have created Servlet Application.
    Now when i run JDeveloper and run the BIController (by default it starts OC4J i.e. :-
    Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    D:\jdev\jdk\bin\javaw.exe -ojvm -classpath D:\jdev\j2ee\home\oc4j.jar;D:\jdev\jdev\lib\jdev-oc4j.jar -Doc4j.userThreads=true -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 com.evermind.server.OC4JServer -config D:\jdev\jdev\system9.0.3.4.1247\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 17109 ms.
    Target URL -- http://192.168.1.243:8988/Proj-Workspace-Profitable-Products-context-root/mypackage1.BIController1
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    When this is done clients can access through browser using url: -
    http://192.168.1.243:8988/Proj-Workspace-Profitable-Products-context-root/mypackage1.BIController1
    I want that client can access this in a scenarion that i don't have to run JDeveloper (OC4J)
    Plz some one tell me that how to run embedded OC4J without JDevloper with configuration same as in JDeveloper i.e.
    Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    D:\jdev\jdk\bin\javaw.exe -ojvm -classpath D:\jdev\j2ee\home\oc4j.jar;D:\jdev\jdev\lib\jdev-oc4j.jar -Doc4j.userThreads=true -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 com.evermind.server.OC4JServer -config D:\jdev\jdev\system9.0.3.4.1247\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 17109 ms.
    Target URL -- http://192.168.1.243:8988/Proj-Workspace-Profitable-Products-context-root/mypackage1.BIController1
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    In simple words i want to do all that (above) without opening Jdeveloper so that clients can access through browser. (Note:- i don't want to deploy it to application server or to any other tech,.....)

    hi
    usually the application is deployed to an application server, please note that the oc4j itself is intended only for development purpose and not ment for a production system. this is because it lacks the clustering/failover/etc features
    if you want to try the "deployment", here is what you can do:
    either download the oc4j (just for testing) or use the one supplied with jdeveloper.
    if using the one from jdeveloper do the following (assuming you run under windows):
    open a dos prompt and set the path the following way:
    set path=YOUR_JDEV_HOME\jdk\bin;%PATH%
    cd YOUR_JDEV_HOME\j2ee\home
    java -jar oc4j.jar -install
    you now get prompted for the admin password
    start your oc4j:
    java -jar oc4j.jar
    o)afterwards, create a "deployment profile" within your project
    o)put all the files together
    o)create a new delopyment connection (oc4j standalone) and deploy it to your recently configured oc4j
    o) thats it
    note: i recommend you tune the deployment profile and change the name of your webapp and the context as well
    "Proj-Workspace-Profitable-Products-context-root" isnt very fancy ;)
    regards,
    thomas

  • CMB accessing remote OC4J problem

    I create a CMBean from table, before using this CMB accesses remote OC4J,all are right (deploy is ok,testing in embedded oc4j is ok,even using session bean accessing remote OC4J is ok)
    the client code is:
    try
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.PROVIDER_URL, "ormi://cly:23791/emp");
    Context ctx = new InitialContext(env);
    EmpHome empHome = (EmpHome)ctx.lookup("Emp");
    Emp emp;
    The console displays:
    javax.naming.NamingException: Lookup error: java.io.IOException: Class Not Found: com.evermind.server.ejb.DummyRemote; nested exception is:
         java.io.IOException: Class Not Found: com.evermind.server.ejb.DummyRemote
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
         void Samplepk.EmpClient2.main(java.lang.String[])
    Process exited with exit code 0.
    How can solve this problem

    Hi Chen,
    I assume you mean CMP entity bean (when you talk about a "CMB").
    However, what I cannot deduce is, what OC4J are you referring to:
    1. OC4J in JDeveloper
    2. OC4J stand-alone
    3. OC4J in 9iAS
    [and which version(s) of the above]
    I'm only guessing, but perhaps you have developed your (CMP entity) bean in JDeveloper, and are trying to deploy it in either OC4J stand-alone or 9iAS, correct?
    If this is the case, you may have a compatibility mismatch between the various products (JDeveloper, OC4J, 9iAS).
    Personally, I only use OC4J stand-alone. I don't use JDeveloper, and I use the tools that come with OC4J stand-alone to deploy my EJBs.
    Hope this helps.
    Good Luck,
    Avi.

  • OC4J - PROBLEM 10g ( 9.0.4 ) - exception: ORA-01002

    I have application perfectly running in the version 9ias (OC4J 9.0.3) when I migrated for 10g (OC4J 9.0.4) I obtained the following mistake stopping my application.
    exception: ORA-01002: fetch out of sequence
    Data of the application:
         EJB CMP
         Version Database: Oracle 9.02
         Operating system: Solaris 64 bits
    I already made several researches and I verified the following problem:
    The table TB_CARDS have a lock-mode = "Pessimistic" in the file orion-ejb.xml. In the 9.0.4 we Monitored the access in the database and have syntax : select * from tb_carts for update ("select for update"), but in the version OC4J 9.0.3 it doesn't have the syntax "for update"
         Some people talk to me to put the autocommit equal false, however where i put this option because I´m using using CMP?
         Am I following the correct manageable ?
    I await suggestions
    Respectfully

    opps "originator" was suposed to read "workingDirectory"

  • RMI Server Basic Problem

    Hi,
    I have a special problem for which I have no idea at the moment how to solve, although I am pretty new to RMI.
    I get this error message
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: rmikochbuch.RemoteDateImpl_Stub
    when I try to start an executable jar-file.
    What I have is:
    On my development PC (Win2k WS) I run
    java -jar RMI_Server_Test_01.jar
    (of course after "start rmiregistry") and it works. Now I take this jar file and copy it to two other PCs (Win XP / Win2k Server). So when I try to start my jar file on these machines too, I get the error messages you see above. All three machines have the same SDK 1.4.2_07 installed.
    I have neither an explanation why it does not work on the other machines nor do I have any idea how to solve this problem. :(
    Additional info:
    The error message occurs in this code block:
          RemoteDateImpl im = new RemoteDateImpl();
          System.out.println( "DateServer starting..." );
          Naming.rebind( RemoteDate.LOOKUPNAME, im );The "DateServer starting..." gets displayed but then the program crashes and exits.

    Got this problem solved now.
    What I had to do - and this is not mentioned in the Java cookbook (O'Reilly):
    Copy the Interface, the Implementation plus Stub + Skel .class files to the CLASSPATH on the server.
    Now comes the second part - connect from a client to this server...

  • RMI class file problem

    I have already write a RMI example for self-study successfully, but there are a little class file problem that I'm not able fix it.
    In my RMI example there are 3 .java files (RMIServer.java, RMIClient.java and a MethodImpl.java)
    After I have javac and rmic them, I got RMIServer_Skel.class, RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
    In order to run the RMI in a local envirnment, I divide them into 2 folders as listed below:
    Server - RMIServer_Skel.class, RMIServer_Stub.class and the MethodImpl.class
    Client - RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
    Then when I start to run them in a DOC envirnment...
    start rmiregistry........(run successful and another rmiregistry DOC window created)
    java RMIServer.........Exception in thread "main" java.lang.NoClassDefFoundError: RMIServer
    Oops? Class not found? How can that be? And after that, I tried something.......to add the RMIServer.class into the Server folder.
    Again, I start to run them in a DOC envirnment...
    start rmiregistry........(run successful and another rmiregistry DOC window created)
    java RMIServer.........The server is instantiated(run successful and print out a String)
    Um...is the RMI have to run with a RMIServer.class file? But the RMI notes I refered from is not seems to be telling me to do this, are there any one can give me a helping hand?

    please, go here, read thoroughly
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

  • RMI dynamic classloading problems

    I wanted to know if you could help me answer this particular case,
    which i still haven't been able to solve in days:
    1>RMI Client and Server are on different hosts.
    2>the Client makes a RMI method call to a Server who has to execute
    dynamically a particular classfile specified by the client itself and
    return the result to the client
    PROBLEM IS:
    at the beginning only the client has the classfile to be executed by
    server and needs to transfer him the information in order to have its
    RMI method executed,and no ohter protocols except for RMI are
    allowed.
    QUESTION IS:
    how could i solve this case with the use of codebases and
    URLClassLoader Objects?
    hoping i've clearly made the point,thanXalot
    nicholas

    The client can set its own codebase. The client class that the server will call needs to implement an interface the server knows. Then the client will pass this object to the server, and the server will make its call on that object. Since this object is not exported it will be serialized to the server, and the call will run on the server.
    Quite insecure. But it should work just that simply I do believe.
    You do know how to use codebase?

Maybe you are looking for

  • Delete Requests (Except Compressed ones) in Cube in Process Chain's Routine

    Hi all,     We load an InfoCube on weekdays and we compress the Month-End load request. My request is to keep the latest SEVEN requests and DELETE all other requests EXCEPT the Compressed requests.  I should not delete the COMPRESSED Requests. I want

  • Google map widget

    Is there a way to put multiple pins on a google map when you insert it?

  • Create cost center only can use the fixed controlling area ?

    Hi all, When i create a cost center, i find the controlling area is fixed. How  to change it ? Regards, Yinyan Lu

  • IDVD project won't play audio in media player

    I created a movie in Final Cut Pro 6 and used iDVD version 7.04 to burn the video project. DVD player on my MAC plays it fine. When I try to play it in Windows Media Player, there is no audio, only video. In exploring the CD, there is an Audio TS fol

  • Yosemite OS X: Application issues

    My messages and notes applications will not open from the desktop. When i try to open them a window pops up that states, "Notes cant be opened because of a problem. Check with the developer to make sure notes works with this version of OS X. You may