Connect ro remote object from ejb

Hi all!
I try to do subj but get exception java.io.IOException: Peer disconnected socket
on client.
Trace file contain next:
oracle.aurora.vm.ReadOnlyObjectException
at java.security.AccessControlContext.getDebug(AccessControlContext.java)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java)
at java.security.AccessController.checkPermission(AccessController.java)
at java.lang.SecurityManager.checkPermission(SecurityManager.java)
at java.lang.SecurityManager.checkAccess(SecurityManager.java)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java)
at java.lang.Thread.init(Thread.java)
at java.lang.Thread.<init>(Thread.java)
at sun.rmi.transport.RMIThreadAction.run(RMIThreadAction.java)
at java.security.AccessController.doPrivileged(AccessController.java)
at sun.rmi.transport.tcp.TCPChannel.free(TCPChannel.java)
at sun.rmi.server.UnicastRef.free(UnicastRef.java)
at sun.rmi.server.UnicastRef.done(UnicastRef.java)
at sun.rmi.registry.RegistryImpl_Stub.lookup
at java.rmi.Naming.lookup(Naming.java)
at com.retailpro.rda.ejb.RDAUtilsBean.ejbCreate(RDAUtilsBean.java:42)
at oracle.aurora.ejb.gen.test_cms_RDAUtils.EjbHome_RDAUtilsHome.create(oracle/aurora/ejb/gen/test_cms_RDAUtils/EjbHome_RDAUtilsHome:62)
at com.retailpro.rda.ejb._tie_RDAUtilsHome.create(_tie_RDAUtilsHome.java:53)
at com.retailpro.rda.ejb._RDAUtilsHomeImplBase._execute(_RDAUtilsHomeImplBase.java:66)
at com.retailpro.rda.ejb._RDAUtilsHomeImplBase._execute(_RDAUtilsHomeImplBase.java:54)
at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
at oracle.aurora.server.GiopServer._service(GiopServer.java)
at oracle.aurora.server.GiopServer.service(GiopServer.java)
at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
I set permission like:
call dbms_java.grant_permission('CMS', 'java.lang.RuntimePermission', 'setSecurityManager', '*');
commit;
call dbms_java.grant_permission('CMS', 'java.net.SocketPermission', '127.0.0.1:*', 'resolve,connect');
commit;
call dbms_java.grant_permission('CMS', 'java.net.NetPermission', '127.0.0.1:*', 'resolve,connect');
commit;
Can anybody say me whats wrong?
Mike

when you logged into sqlplus what user did you use to do the following :
I set permission like:
call dbms_java.grant_permission('CMS', 'java.lang.RuntimePermission', 'setSecurityManager', '*');
commit;
call dbms_java.grant_permission('CMS', 'java.net.SocketPermission', '127.0.0.1:*', 'resolve,connect');
commit;
call dbms_java.grant_permission('CMS', 'java.net.NetPermission', '127.0.0.1:*', 'resolve,connect');
commit;
also check the following :
http://technet.oracle.com:89/ubb/Forum18/HTML/001104.html
null

Similar Messages

  • Losing database connections in remote objects

    Hi,
    I have an interesting problem. I have a couple of remote objects that bear database connections. They are pooled in another remote object and provided by registry on request to the client. However, when I check the connections after a while, all of them are closed except the last client. I enabled logging and discovered that all clients except the last one connected get disconnected at the same moment when the method clean() of the DGC gets invoked. I can even predict the moment, e.g. when I start the server at XX:XX:31, the connections get closed at YY:YY:31, always after whole minutes. Strange thing is, that even active clients currently querying data get disconnected.
    Jezevec
    Has anybody met such a problem already? My configuration is Java 1.3.0_02, database is Oracle 8i. Thanx for any hints.

    My colleague solved it. If anyone interested, the problem was caused by the class com.borland.dx.sql.dataset.Database which is provided in Borland JBuilder libraries. We used it to create connections to the Oracle db. Do not use this class for RMI applications if you want to avoid problems. It's better to rely on standard JDBC classes.
    Jezevec

  • Connect to remote database from forms

    hi,
    I installed 10g developer suite on windows.I have a 10g database running on HPUX server.
    I need to connect to this database from forms ( i,e from windows ).
    Do i need to install an Oracle client so that forms can talk to a remote database?
    I edited C:\Forms_Dev\NETWORK\ADMIN/tnsnames.ora to include the remote database entry. It's not working. So I am thinking maybe I need to install oracle client as a go between.
    Thanks

    Do i need to install an Oracle client so that forms can talk to a remote database?No, Tnsnames (NET8) is enough.
    Write us you tnsnames.ora or try
    tnsping <serverdb> from client, and check.

  • Error connecting to CLOUDSCAPE database from EJB

    Hi All,
    I am working on Sun's reference implementation App Server verson 1.3.1. It comes shipped with cloudscape database. When I write try to connect to this App Server through JSP that calls methods through Enterprise Java Beans I get this Error Message:
    java.net.ConnectException: Connection refused: connect
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to
    connect to database. Connection refused to host: XXXXXXXX; nested exception
    is:
    java.net.ConnectException: Connection refused: connect; nested exception
    is:
    javax.ejb.EJBException: Unable to connect to database. Connection refuse
    d to host: XXXXXXXXX; nested exception is:
    java.net.ConnectException: Connection refused: connect
    javax.ejb.EJBException: Unable to connect to database. Connection refused to hos
    t: XXXXXXXXX; nested exception is:
    java.net.ConnectException: Connection refused: connect
    <<no stack trace available>>
    Can any one help me solve this problem.
    Regards,
    Venky.

    Hi,
    check the following points.
    1.Make sure that Cloudscape is up.u can start this using teh command cloudscape -start
    2.set the datasorce properly.u can change this from deploy tool,tools->Server->datasources->standard configuration.
    use the default datasource jdbc/Cloudscape by leaving user/pwd as blank.
    HTH
    -asharafkk

  • Connect to remote VPN from a network with its own VPN

    I have a Mac OS X Server v10.6 running L2TP behind a D-Link DIR-625 router.
    I have client with a similar setup - Mac OS X Server v10.7 running L2TP behind a Time Capsule.
    I want to be able to connect to my client's VPN from inside my network, but I get an error, "The L2TP-VPN server did not respond..."
    When I disable the virutal server entries on my D-Link for VPN IKE (UDP Port 500) and VPN ESP (Protocol 50), I am able to connect to the remote VPN, but then obviously nobody can connect to my VPN.
    Is this normal? Is it not possible to connect to remote VPNs if you are on a network that has a VPN server running behind a router?

    You can still use SSH to connect from a UNIX platform to your DB Server (the same way you do in your desktop).
    There's a few tutorials in making an active SSH tunnel for database activities, however, I think this kind of solution requieres more administration effort and in some environments could be cumbersome; if security is a concern, you can purchase ASO from Oracle, it handles the network encryption for you.
    Regards!
    P.D. If you use PuTTy on your desktop, you could try the -L parameter for the ssh command.

  • Access to local DataSource tries to connect to remote server after ejb call to remote server

    I've run into a problem with code that worked fine under WebLogic 6.1 SP4, but I'm having difficulty migrating it to WebLogic 8.1 SP2.
              I have two weblogic instances running in separate domains (InstanceA and InstanceB). The two domains have the same crentential configured to setup the trust relationship.
              InstanceA runs on my local machine. It contains Stateless Session Beans StatelessSessionBeanA1, StatelessSessionBeanA2, and DataSourceA1
              InstanceB runs on a different machine. It contains StatelessSessionBeanB1.
              A function A1Func1 in StatelessSessionBeanA1
              1) creates an initial context to connect to InstanceB
              2) calls a method B1Func1 on StatelessSessionBeanB1
              3) closes that context to InstanceB
              4) Calls a method A2Func1 on StatelessSessionBeanA2
              5) manipulates several entity beans
              6) returns
              A1Func1, A2Func1, B1Func1 have the "Required" transaction attribute set.
              Steps 1,2,3 work fine, but on step 4, when A2Func1 attempts to get a Connection from the DataSourceA1, it gets an exception:
              java.sql.SQLException: Could not get remote server connection url = t3://(IP/port of InstanceB)
              at weblogic.jdbc.jts.Driver.createRemoteConnection(Driver.java:305)
              at weblogic.jdbc.jts.Driver.connect(Driver.java:157)
              at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
              ... enters my application code
              A2Func1 works fine elsewhere, so on a hunch, I tried making A2Func1 have the "RequiresNew" transaction attribute. This causes steps 1,2,3,4 to work, but in step 5, when the entity beans attempt to get a connection from DataSourceA1, it runs into the same exception
              java.sql.SQLException: Could not get remote server connection url = t3://(IP/port of InstanceB)
              at weblogic.jdbc.jts.Driver.createRemoteConnection(Driver.java:305)
              at weblogic.jdbc.jts.Driver.connect(Driver.java:157)
              at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
              at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
              Any ideas why calling out to StatelessSessionBeanB1 would cause things inside the same transaction to try to get their datasource from InstanceB? Again, this code worked fine under WebLogic 6.1
              And ideas would be appreciated.
              Thanks,
              --Andy
              

              As a follow up, no solution, but a workaround - we changed the transaction setting
              on B1Func1 (which was a read type method) on InstanceB's StatelessSessionBeanB1
              to NotSupported, and everything started working again.
              --Andy
              Andrew Delpha <[email protected]> wrote:
              >I've run into a problem with code that worked fine under WebLogic 6.1
              >SP4, but I'm having difficulty migrating it to WebLogic 8.1 SP2.
              >
              >I have two weblogic instances running in separate domains (InstanceA
              >and InstanceB). The two domains have the same crentential configured
              >to setup the trust relationship.
              >
              >InstanceA runs on my local machine. It contains Stateless Session Beans
              >StatelessSessionBeanA1, StatelessSessionBeanA2, and DataSourceA1
              >
              >InstanceB runs on a different machine. It contains StatelessSessionBeanB1.
              >
              >
              >A function A1Func1 in StatelessSessionBeanA1
              >1) creates an initial context to connect to InstanceB
              >2) calls a method B1Func1 on StatelessSessionBeanB1
              >3) closes that context to InstanceB
              >4) Calls a method A2Func1 on StatelessSessionBeanA2
              >5) manipulates several entity beans
              >6) returns
              >
              >A1Func1, A2Func1, B1Func1 have the "Required" transaction attribute set.
              >
              >
              >Steps 1,2,3 work fine, but on step 4, when A2Func1 attempts to get a
              >Connection from the DataSourceA1, it gets an exception:
              >java.sql.SQLException: Could not get remote server connection url = t3://(IP/port
              >of InstanceB)
              > at weblogic.jdbc.jts.Driver.createRemoteConnection(Driver.java:305)
              > at weblogic.jdbc.jts.Driver.connect(Driver.java:157)
              > at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
              > ... enters my application code
              >
              >A2Func1 works fine elsewhere, so on a hunch, I tried making A2Func1 have
              >the "RequiresNew" transaction attribute. This causes steps 1,2,3,4
              >to work, but in step 5, when the entity beans attempt to get a connection
              >from DataSourceA1, it runs into the same exception
              >java.sql.SQLException: Could not get remote server connection url = t3://(IP/port
              >of InstanceB)
              > at weblogic.jdbc.jts.Driver.createRemoteConnection(Driver.java:305)
              > at weblogic.jdbc.jts.Driver.connect(Driver.java:157)
              > at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
              > at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
              >
              >Any ideas why calling out to StatelessSessionBeanB1 would cause things
              >inside the same transaction to try to get their datasource from InstanceB?
              > Again, this code worked fine under WebLogic 6.1
              >
              >And ideas would be appreciated.
              >Thanks,
              >--Andy
              

  • Returning cloned objects from EJB Local Interfaces

    We'd like to let our WAS 5/J2EE container manage our transactions/unit of work. However, we don't want to have our objects serialized, so we intend to use LocalInterfaces. Additionally, we want to return value objects that support Toplink indirection such that we are not returning the actual cache object but instead a clone.Our question is, how do we return a cloned object that supports indirection from Toplink that we can later do a deepMergeClone on in an explicit update method?

    Additional Information on the first post:
    The pattern we've been testing is as follows:
    1. We set up LocalInterfaces on our EJB's
    2. The EJB Getters are using acquireNonSynchronizedUnitOfWork() to get a NON-JTS transaction to perform a readQuery. This results in a Cloned Bis object being generated. We then release the UOW and return the object.
    3. The Returned Biz object Getters are using Indirection (probably using the released non-synchronized UOW).
    4. The pattern for UPDATE is that we allow the Web Container code (servlet) to change the Cloned Biz Object, they then submit the CLONED and changed object to an EJB update() method where we use getClientSession().getActiveUnitOfWork() to link to the JTS transaction and perform a uow.deepMergeClone(bizObjectClone);
    We are trying to use the pattern for the following reasons:
    1. Isolation of the Cache to upper layers
    2. Transaction Boundry is the EJB Container
    3. We understand that there is a performance overhead with CLoned Biz Objects but this more mirrors the ValueObject Pattern then anything else we've tried.
    BIG Question:
    1. Is this a supported TopLink Pattern?
    2. If its not supported, can it be?
    3. Do you have any other suggested patterns?

  • Registry.lookup() return Remote object from different ip address

    I've got this error using
    Registry reg = LocateRegistry.getRegistry(serverName, Registry.REGISTRY_PORT);
    service = (ILogin) reg.lookup("service");and when I use debugger I've got this
    RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[10.240.161.66:1099](remote),objID:[0:0:0, 0]]]]
    Proxy[ILogin,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[10.240.161.54:2074](remote),objID:[-4308ea07:116adade605:-7fff, 9133145996543447416]]]]]Why the Registry return a service from different IP address ?
    I've run this code for several times and it works. But today it cannot connect to the RMIServer.
    Any idea ?

    Thanks, i found my missing prppertis is
    // optional. Defaults to localhost. Only needed if web server is running
    // on a different host than the appserver
    props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
    // optional. Defaults to 3700. Only needed if target orb port is not 3700.
    props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
    to set the port and host back

  • How can i connect to remote database from netbeans

    Hi,
    I have got MySQL database server installed and running on a different machine. Is there any way to connect and browse database remotely using netbeans 5.5?
    I have added connector/driver for that database. i can connect and browse the database with host: "localhost" and port number. But when i specified the ip address of that machine, it gives me error.
    Can anyone help please.
    cheers.

    well, its not working in App server either.
    In App server admin console, on that connection pool if i define servername as "localhost", it works fine. If i change it to the remote machine's ip address, then it doesn't work.
    Any idea will be appreciated.
    cheers.

  • Airport Express has green light but won't connect to remote speakers from Macbook or iPhone

    Hi,
    I have a 6-7 year old airport express that I have used frequently as remote speakers for my macbook and 2 iphones. I am currently having problems with getting this to work in my new flat. It worked for a few weeks and now he green light is on but the remote speakers time out when i try to connect to it.
    Sometimes the airport is visible in itunes/iphone and sometimes it isn't. when it isn't if i unplug it and leave it a while it appears again but i cant connect but the green light is always on.
    It's all set up properly so I don't know if it is just getting old and I need a new one or whether this can be solved.
    I have reset this numerous times
    Thanks in advance!

    I've solved this by resetting my wireless internet connection at the box and then setting up airport express again.
    I don't know whether that will help you.....

  • AbstractMethodError while connecting with Remote Object

    Hi,
    I've an issue when my client calls the remote method.
    When my client calls the remote method (through interface)
    which returns me a class object i get an AbstractMethodError.
    My Interface method is something similar to this
    public GTTerminalMaster getRefreshedDetails() throws RemoteException;
    My client calls the method as follows
    GTTerminalMaster = (GTTerminalMaster ) getRefreshedDetails();
    When my client Executes, i get the following Error
    java.lang.AbstractMethodError: com.eaglelot.gametransis.GTSendAndReceiveImpl_Stu
    b.updateTerminalDetails(Ljava/lang/String;Ljava/lang/String;)Lcom/eaglelot/globa
    l/GTTerminalMaster;
    at com.eaglelot.gamehawker.login.RefreshTerminal$1.run(RefreshTerminal.j
    ava:38)
    Thanks for your reply in advance

    Your remote interface, stub, and implementation classes are out of sync.
    Delete all .class files, recompile, and redeploy.

  • How to pass remote objects from server to server?

    hi,
    if you
    1) have two servers, A and B
    2) one client, C
    3) and B obtains a reference to an object in A
    is it possible to pass that reference to C, in such a way that once C has the reference it no longer needs to know B even exists, and can communicate directly with A?
    thanks
    asjf

    It sounds like you are having A server as some kind of a cross-server registry for B.
    Your problem can be broken into two steps:
    1. Either A looks up B (via RMI), and keeps a reference (to later be handed to C), or B looks up A and makes some kind of a "register" call, again A then holding a reference to B which will be passed to C.
    2. C asks A for the reference and A returns it.
    The mechanics OUGHT TO BE pretty simple; B is declared as a UnicastRemoteObject, so any attempt to pass or return a B passes or returns a remote reference.
    I say OUGHT TO because I haven't tried this scheme.

  • RMI: connection refused error while invoking remote method from client mac.

    Hi All,
    when i run client program, which is calling remote object from other system, it shows the below error.
    please help me solving this issue, i also have policy file and installed security manager.
    Exception in Cliendjava.rmi.ConnectException: Connection refused to host: 10.66.
    112.137; nested exception is:
    java.net.ConnectException: Connection refused: connect
    thanks in advance.
    Regards,
    Anand.

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • Tomcat shutdowing when remote object is calling secondtime from flex to blazeds

    Hi All,
    I am new to flex and started working on that.now i called one remote object from flex through blazeds.its working fine but when i call second time tomcat isĀ  shutdowing .again if i start tomcat it is working fine.
    what is the problem does any one helps?
    sudheer

    Thanks for the tip Joe.
    It's not quite what I was looking for, but it gave me some ideas.
    The blog post describes how to create your own server to handle the file stream. With BlazeDS & Java EE app server there's no need to implement the low level stuff.
    One option would be to read the data on Flex side in chunks and make a request to send each chunk at a time, but I don't know whether this helps at all. Might just slow down the network.
    Another option is to write a custom adapter for BlazeDS endpoint, but I don't know enough details on this to say is it possible or not.
    Third option is to use regular servlet code and Apache Commons FileUpload module.
    Still interested hearing opinions from people working with BlazeDS.

  • Connection to remote database failed

    I have configured the cman.ora file and changed the connection
    string for the java applet, but I encountered the error
    "The NT Adapter could not establish the connection" when I tried
    to connect to remote database from JDev2.0(beta).
    Any ideas of what are the possible causes for this?
    At the cman.ora file, the setting are:
    cman = (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=<web_host_ip>)(PORT=1610))
    (ADDRESS=(PROTOCOL=tcp)(HOST=<db_host_ip>)(PORT=1521))
    cman_profile = (parameter_list=
    (MAXIMUM_RELAYS=1024)
    (LOG_LEVEL=1)
    (TRACING=yes)
    (RELAY_STATISTICS=yes)
    (SHOW_TNS_INFO=yes)
    (USE_ASYNC_CALL=yes)
    (AUTHENTICATION_LEVEL=0)
    At the java applet the connection statement are:
    DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:thin:" +
    "@(description=(address_list=" +
    "(address=(protocol=tcp)(host=<web_host_ip>)(port=1610))" +
    "(address=(protocol=tcp)(host=<db_host_ip>)(port=1521)))" +
    "(source_route=yes)" +
    "(connect_data=(sid=<orasid>)))", "<user>", "<id>");
    The error at the dos prompt running from JDev2 are:
    java.sql.SQLException: The NT Adapter could not establish the
    connection
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled
    Code)
    at oracle.jdbc.driver.OracleConnection.<init>(Compiled
    Code)
    at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at test.Applet1.jbInit(Compiled Code)
    at test.Applet1.init(Compiled Code)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    Thanks,
    Eye Gee
    null

    I am able to connect to the remote database using SQL*plus but
    does it means it is using CMAN connection?
    How do I test the CMAN connection from SQL*plus? Any example for
    me to follow?
    Thanks,
    Eye Gee
    mark tomlinson (guest) wrote:
    : Have you tried using the CMAN connection from something like
    : SQL*plus to verify that it is configured correctly? Everything
    : looks correct, so it might be hiding an actual NET error
    : underneath.
    null

Maybe you are looking for

  • InDesign CS4 Export and PDF Printing Problem

    Whenever we print PDFs created from InDesign CS4 documents that contain transparencies, drop shadows or gradients we've been having issues. White boxes will appear instead of the drop shadows and transparencies, and the colors of the gradient images

  • Create a Blu-Ray with Chapters

    I have created a project in FCPX. I want to add Chapter Markers, Create a Chapter Menu, Burn to Blu-Ray, and finally be able to play the Blu-ray on my Blu-Ray player and be able to "jump" from Chapter to Chapter while watching the Blu-ray. As I under

  • Multiple threads issue

    here's the issue: if there was a Thread.waitFor() method I wouldn't have an issue. here's the situation: I have a method (M) that calls a thread (T). Inside T there is a JOptionPane (JOP) that is called inside a try-catch. After the call to M there i

  • Buttons actioning in different movie clips?

    So ive set up some buttons into a movie clip, but i want to get them performing actions in a movie clip that is within another clip. For example, the code below is what I have attached to one of my buttons. The Movieclip 2photosMC2 is inside a DIFFER

  • Execute in order

    I have stuck with a following problem for my system. I have a CORBA server programmed in Java, which receives message from other several applications. Lets say there are two applications(A and B) that send message to my CORBA server. What CORBA serve