RMI classloading mechanism:unable to bind an object

hai all,
I am facing a problem when i use rmi classloading mechanism.
I am using suns ClassFileServer to load classes dynamiclly into my server and client.
In my server i want to load the class and and get a static object of the same class and bind it to registry so that clents can access it.
but i am unable to do that.
I have a doubt regarding what happens to the static variables when class loading is done.

I am posting my validateImpl and DynamicServer here .please look into it
validateImpl.java:
import java.io.FileInputStream;
import java.io.PrintStream;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.*;
public class validateImpl extends UnicastRemoteObject
implements validate
public static validateImpl getInstance()
return validateInst;
public validateImpl()
throws RemoteException
System.out.println("Inside validateimpl constructor");
try
Naming.rebind(new String("myserverObj"), this);
catch(Exception exception)
System.out.println("Exception occurred: " + exception);
public boolean validateUser(String s, String s1)
System.out.println("user name"+s);
String s2 = propFile.getProperty(s);
System.out.println("from records /t"+s2);
if(s2 == null)
String s3 = " User Name: " + s + " is Not Configured \n";
System.out.println("username not found");
StringTokenizer stringtokenizer = new StringTokenizer(s2, "~");
PFusername = (String)stringtokenizer.nextElement();
PFpassword = (String)stringtokenizer.nextElement();
return PFusername.equals(s) && PFpassword.equals(s1);
private static Hashtable cache;
private static String PFusername;
private static String PFpassword;
private static Properties propFile;
private static validateImpl validateInst;
static
propFile = new Properties();
try
     System.out.println("In Static Block");
validateInst = new validateImpl();
propFile.load(new FileInputStream("usersandpasswords.properties"));
catch(Exception exception)
System.out.println("Exception in creating an instance" + exception);
DynamicServer.java
import java.rmi.Naming;
import java.rmi.Remote;
import java.rmi.RMISecurityManager;
import java.rmi.server.RMIClassLoader;
import java.util.Properties;
public class DynamicServer {
public static void main(String args[]) {
// Create and install a security manager
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
Properties p = System.getProperties();
String url = p.getProperty("java.rmi.server.codebase");
Class serverclass = RMIClassLoader.loadClass(url, "validateImpl");
Naming.rebind("/myserverObj", (Remote)serverclass.newInstance());
/*here is the problem.instead of creating a newInstance i want to bind thevalidateinstance in validateImpl class to be bound to the registry.
but how can i access it.*/
System.out.println("HelloServer bound in registry");
} catch (Exception e) {
System.out.println(e);
}

Similar Messages

  • Unable to bind an object

    Hi,
    I am trying to bind a java object and am getting a Naming Exception. I have a
    few questions
    1. does this java object have to be remote.. if I am trying to use the weblogic
    service provider..
    2. if it has to be remote, where do i have to put the stub class?
    I tried putting in the classpath of the weblogic server but it still complains
    My example works fine if the object is a String.
    I would appreciate your help.
    Thanks,
    Kamps

    If it is not a remote object then you have to make it Serializable as well.
    Sam
    "kamps" <[email protected]> wrote in message
    news:3b44c80f$[email protected]..
    >
    Hi,
    I am trying to bind a java object and am getting a Naming Exception. Ihave a
    few questions
    1. does this java object have to be remote.. if I am trying to use theweblogic
    service provider..
    2. if it has to be remote, where do i have to put the stub class?
    I tried putting in the classpath of the weblogic server but it stillcomplains
    >
    My example works fine if the object is a String.
    I would appreciate your help.
    Thanks,
    Kamps

  • Please help : Unable to bind to Network Layer object

    We have installed BO Edge 3.1 on a server and all happened successfully.
    We have installed the client applicatons on the local PC (laptop) and all was fine.
    From the Client, we can open any default universes and test successfully its conection. It works also with SAP connection.
    On the other hand, when connected on remote on the Server, and trying to make a basic report with existing sample universe, we have an error "Unable to bind to Network Layer object".
    He tries to open a dll in a Drive e:\...dataaccess\ConnectionServer\dbd_sap.dll but it happens it is not able to see the dll.
    We trye with the connection of club, fashion and it is the same issue.
    We connecting through the infoview, we have the same issue.
    Any idea?
    Thanks for your help
    Best regards,
    Here is the txt message we receive:
    CS: DBDriver failed to load : E:\Business Objects\Edge 3.1\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\dbd_sap.dll (The specified module could not be found.

    Either SAP GUI wasn't properly installed or SAP Interation Kit wasn't properly installed.
    However, if even efashion based universe is not working - this means installation wasn't succesfull.
    Did you installed the product using local Administrator Account ?

  • Unable to bind to properties of actionscript object

    Hello Forum Folks,
    I built a bread crumb object that extends UIComponent:
    package com.XXX.bidboard
    import mx.core.UIComponent;
    public class BreadCrumb extends UIComponent
    [Bindable]
    private var _pageTitle:String;
    [Bindable]
    private var _component:String;
    [Bindable]
    private var _order:Number;
    [Bindable]
    private var _pageVisited:Boolean;
    [Bindable]
    private var _notLast:Boolean;
    public function BreadCrumb()
    super();
    public function get pageTitle():String {
    return _pageTitle
    public function set pageTitle(value:String):void {
    _pageTitle = value;
    public function get component():String {
    return _component
    public function set component(value:String):void {
    _component = value;
    public function get order():Number {
    return _order
    public function set order(value:Number):void {
    _order = value;
    public function get pageVisited():Boolean {
    return _pageVisited
    public function set pageVisited(value:Boolean):void {
    _pageVisited = value;
    public function get notLast():Boolean {
    return _notLast
    public function set notLast(value:Boolean):void {
    _notLast = value;
    Then in an application object I try to create a BreadCrumb
    object:
    <bidboard:BreadCrumb
    id="onePersonal"
    pageTitle="Start"
    component="personal_companies_wizard_start"
    order="0"
    pageVisited="true"
    notLast="true" />
    however, I get strange warnings:
    warning: unable to bind to property 'notLast' on class
    'com.XXX.bidboard::BreadCrumb'
    warning: unable to bind to property 'pageTitle' on class
    'com.XXX.bidboard::BreadCrumb'
    warning: unable to bind to property 'pageVisited' on class
    'com.XXX.bidboard::BreadCrumb'
    Why? Everything seems to look correct. What is really strange
    is that it only gives the warnings on notLast, pageTitle, and
    pageVisited but not order or component. The only difference I can
    tell betweeen the two groups are the fact that one group has
    capital letters and other doesn't - However I can imagine this is
    the cause of the problem. (I tried everything in lowercase and the
    warning still appeared).
    Any ideas? I'm willing to try anything to solve this mystery.
    Did I miss something?
    Thanks in advance!
    --Andy

    Allow me to answer my own question. I found on Daniel's blog
    http://life.neophi.com/danielr/2006/08/binding_error.html)
    the answer to the unconverted Bindable metadata warning. Appearntly
    if I switch the order of the setters and getters, such that the
    setter show up first, the warning disappears. Not sure why the
    flash engine needs it that way, but it does. All works now!
    Thanks,
    --Andy

  • Javax.naming.NameAlreadyBoundException: Failed to bind remote object

    I am getting an error while deploying wli-ejbs.ear file. This ear uses oracle thin drivers to connect to database. But while deploying i am receiving an error as below. Can anyone please help me to solve this problem?
    Deployer:149033]preparing application wli-ejbs on managed2_cvf01
    [Deployer:149033]preparing application wli-ejbs on managed1_cvf01
    [Deployer:149033]prepared application wli-ejbs on managed1_cvf01
    [Deployer:149033]prepared application wli-ejbs on managed2_cvf01
    [Deployer:149033]activating application wli-ejbs on managed1_cvf01
    [Deployer:149033]activating application wli-ejbs on managed2_cvf01
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application wli-ejbs on cvf01_cluster.: weblogic.management.DeploymentException:
    Exception:weblogic.management.ApplicationException: activate failed for calendar/oracle
    Module: calendar/oracle Error: Exception activating module: EJBModule(calendar/oracle,status=PREPARED)
    Unable to deploy EJB: RemoteCalendarBean from calendar/oracle:
    [EJB:011008]Unable to bind EJB Home Interface to the JNDI name: RemoteCalendarBean.
    javax.naming.NameAlreadyBoundException: Failed to bind remote object (ClusterableRemoteRef(704752282736664516S:172.24.206.163:[7003,7003,7004,7004,7003,7004,-1,0,0]:172.24.206.163:7003,172.24.206.163:7003:cvf01:managed1_cvf01 null)/948 [com.bea.wli.calendar.api.BusinessCalendarHome+javax.ejb.EJBHome+weblogic.ejb20.interfaces.RemoteHome]) to replica aware stub at RemoteCalendarBean(ClusterableRemoteRef(704752282736664516S:172.24.206.163:[7003,7003,7004,7004,7003,7004,-1,0,0]:172.24.206.163:7003,172.24.206.163:7003:cvf01:managed1_cvf01 [704752282736664516S:172.24.206.163:[7003,7003,7004,7004,7003,7004,-1,0,0]:172.24.206.163:7003,172.24.206.163:7003:cvf01:managed1_cvf01/944, -8505871579836432025S:172.24.206.163:[7005,7005,7006,7006,7005,7006,-1,0,0]:172.24.206.163:7003,172.24.206.163:7003:cvf01:managed2_cvf01/1008])/944 [com.bea.wli.calendar.api.BusinessCalendarHome+javax.ejb.EJBHome+weblogic.ejb20.interfaces.RemoteHome]); remaining name ''
    at weblogic.rmi.cluster.ClusterableRemoteObject.onBind(ClusterableRemoteObject.java:177)
    at weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNode.java:347)
    at weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:124)
    at weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
    at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:279)
    at weblogic.jndi.internal.WLContextImpl.bind(WLContextImpl.java:386)
    at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:1141)
    at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1385)
    at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:631)
    at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3315)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2194)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2167)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2503)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2421)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2138)
    at weblogic.management.deploy.slave.SlaveDeployer.commitUpdate(SlaveDeployer.java:676)
    at weblogic.drs.internal.SlaveCallbackHandler$2.execute(SlaveCallbackHandler.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    run the sync.bat file as mentioned in the instructions...
    or through EBCC(select sampleportal-project dir, app name "sampleportal")...
    good luck
    Vijay
    "ellen" <[email protected]> wrote:
    >
    I installed sampleportal and did all the changes according to the documents,
    when
    the server started, there is this error:
    Unable to deploy EJB: CatalogWebService from catalogwe.jar:
    Unable to bind EJB Home Interface to the JNDI name: sampleportal.BEA_commerce.CatalogWebService.
    The error was: javax.naming.nameAlreadyBoundException: Failed to bind remote
    object...to
    replica aware stub at CatalogWebService; remaining name'sampleportal.BEA_commerce'
    After the server started with the above error, I tried to run the app, here
    is what
    occured:
    PortalPersistenceManager: portal'sampleportal/sampleportal' not found.
    Has anybody seen this before?
    Ellen

  • Error starting ORMI-Server.  Unable to bind socket: Address already in use:

    hi,
    I run the folowing command "start_oc4j.bat" to start Oc4j.
    It starts successfully.
    Then I start "BPEL PM Server".
    I get the following error,
    "Error starting ORMI-Server. Unable to bind socket: Address already in use: JVM_Bind".
    I understand the above errror because both of them are trying to bind to the same port. And both of them are trying to start ORMI server. Can some one suggest how to get rid of this problem.
    I tried giving different port numbers for them, but that did not work. Let me know, how to over come this problem.
    with regards
    shaila

    You may have another OC4J running on your computer.
    You should change the port number in the file config/rmi.xml.

  • GetResources() gives null's after using RMI (ClassLoader problem???)

    Hi
    I have just put RMI into my app and it works fine, connects to a remote server, runs a method on the server and returns the results.
    The problem is when I try to use a line like:
    URL url = MyClass.class.getResources("image/save.gif");
    The url is null. This code will work before my RMI function is run. Also, every dialog the application opens after running RMI has a line at the top of the pane saying: "Java Applet Window".
    Is RMI playing with the Classloader?
    Do I have to instaniate the ClassLoader or do something else to get my resources again and get rid of the text on each of the dialog boxes???
    Thanks in advance.

    if your class is Remote object, you use the RMI CLassLoader when you do:
    URL url = MyClass.class.getResources("image/save.gif");you shoud use instead:
    URL url = Classloader.getSystemResources("image/save.gif");

  • Error starting ORMI-Server. Unable to bind socket...

    One of our BPEL App Servers was moved from a local network to a LAN. I believe it's IP was changed. When we start it with opmnctl startall we get the following error message:
    bq. Error starting ORMI-Server. Unable to bind socket: Cannot assign requested address
    There does not seem to be a resource issue with regard to ports. A netstat -p doesn't show any potential port conflicts. In a WEB search I came across the following suggested check:
    bq. Solution: \\ *A) Check if your IP address or hostname is changed or if there is a conflict of resources in the network*
    Can someone explain what needs to be fixed if the IP Address or hostname of the BPEL App Server has changed? What files need to be corrected to get the install to startup.

    You may have another OC4J running on your computer.
    You should change the port number in the file config/rmi.xml.

  • Unable to bind socket: Address already in use

    Hi,
    I get the following error whenever I start my Application Server on Linux machine.
    If I deploy the EJB application onto a OC4J instance, the server is refusing the connection by throwing Connection Refused error.
    Any insight about this issue will be helpful.
    Thanks,
    Mohan
    04/07/08 17:14:42 Error starting ORMI-Server. Unable to bind socket: Address already in use
    04/07/08 17:14:44 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized
    04/07/08 17:14:44 java.lang.NullPointerException
    04/07/08 17:14:44 at com.evermind.server.rmi.RMIServer.run(RMIServer.java:470)
    04/07/08 17:14:44 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasabl
    eResourcePooledExecutor.java:186)
    04/07/08 17:14:44 at java.lang.Thread.run(Thread.java:534)

    have you checked to see what is running before you start your oracle app server on your ports? you can use netstat for one

  • What's with the "unable to bind"?

    I have a list that originally was created in Flash Catalyst.  I modified the repeating item component to have the text bound to data.label to accomodate my data source:
    <s:RichText d:userLabel="0" fontFamily="Helvetica" color="0x252525" fontSize="12" kerning="off" whiteSpaceCollapse="preserve" y="4" x="5" text="{data.label}">
    My data source is an array collection of objects, each object with a label and data:
    <mx:ArrayCollection>
    <mx:source>
    <fx:Object label="No insulation" data="0"/>
    <fx:Object label="Fiberglass Batts" data="4.30"/>
    <fx:Object label="Vermiculite" data="2.4"/>
    <fx:Object label="Rock/Mineral Wool" data="4"/>
    <fx:Object label="Urea-formaldehyde foam" data="4.5"/>
    <fx:Object label="Balsam Wool" data="3"/>
    <fx:Object label="Cotton Batts" data="4"/>     
    </mx:source>
    </mx:ArrayCollection>
    It seems to work fine except for the warning:
    warning: unable to bind to property ’label’ on class ’Object’ (class is not an IEventDispatcher)
    From past experience, perhaps I need to cast data.label, but as what?

    Hi Handycam,
    This warning shows up when you try binding to an object that doesn't implement IEventDispatcher.
    Object does not implement IEventDispatcher so any time you bind to a property of that object you will get a warning.
    If you define a subclass of EventDispatcher with the properties you want:
    MyBindableObject.as:
    package {
      import flash.events.EventDispatcher;
      public class MyBindableObject extends EventDispatcher {
        [Bindable] public var label:String;
        [Bindable] public var data:Number;
    And then replace the objects in your ArrayCollection with instances of MyBindableObject then the warnings should go away.
    SampleList.mxml:
    <s:Application
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:local="*">
        <s:List>
            <s:ArrayCollection>
                <local:MyBindableObject label="No insulation" data="0"/>
                <local:MyBindableObject label="Fiberglass Batts" data="4.30"/>
                <local:MyBindableObject label="Vermiculite" data="2.4"/>
                <local:MyBindableObject label="Rock/Mineral Wool" data="4"/>
                <local:MyBindableObject label="Urea-formaldehyde foam" data="4.5"/>
                <local:MyBindableObject label="Balsam Wool" data="3"/>
                <local:MyBindableObject label="Cotton Batts" data="4"/> 
            </s:ArrayCollection>
        </s:List>
    </s:Application>
    Message was edited by: Shongrunden (adding sample code for SampleList.mxml)

  • Unable to bind ":OB_SCHEMA"

    I am getting this when I try to view a table in the Object Browser. Data view seems to work ok, as do all the other sub-headings. Only the Table view is affected. Using FireFox. It was working fine earlier in the day for dev.
    Couldn't find anything in Google search, nothing in this forum. Any ideas?
    Unable to bind ":OB_SCHEMA"
    report error:
    ORA-01008: not all variables bound

    And the error persists - for just one table or for any table using table view since the error occured for the first time?
    My first guess is that your database has got the shared_pool messed up some way. Try alter system flush shared_pool as dba, if you have one. If it's not the shared pool, it could also be the buffer cache. Try flushing it as well.
    I don't know how to trace which item(s) cause this "messing up". We had such strange errors (though not exactly the one you had) and got it fixed that way.
    -Udo

  • Unable to bind to property

    Here is a snippit from my main.MXML.
    <mx:DataGrid id="StructGrid"
    dataProvider="{ArrayofStructs}" x="322" y="293" editable="true"
    itemEditEnd="processData1(event);">
    <mx:columns>
    <mx:DataGridColumn headerText="Name" dataField="NAME"
    />
    <mx:DataGridColumn headerText="Last Name"
    dataField="LASTNAME" />
    <mx:DataGridColumn headerText="Age" dataField="AGE" />
    <mx:DataGridColumn headerText="Sex" dataField="SEX"
    itemEditor="valueObjects.HumanSex" sortable="false">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Text selectable="false" width="100%"
    text="{data.SelectedSEX}"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>
    Here is my HumanSex.mxml:
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300">
    <mx:ComboBox id="comboBox"
    selectedItem="{data.SelectedSEX}">
    <mx:dataProvider>
    <mx:String>Male</mx:String>
    <mx:String>Female</mx:String>
    <mx:String>Other</mx:String>
    </mx:dataProvider>
    </mx:ComboBox>
    </mx:VBox>
    Why do I keep getting this waring when I am running in
    Debug?
    unable to bind to property 'SelectedSEX' on class 'Object'
    (class is not an IEventDispatcher)

    You're referencing a property SelectedSEX on an object called
    'data'. Where is this property defined? I don't see it in your
    snippet.
    Tim

  • Unable to bind EEPersistenceManagerFactory to JNDI

    I get the following exception trying to bind EEPersistenceManagerFactory to
    JNDI with Kodo 2.2.3 (running with Weblogic 6.1 SP1):
    javax.naming.ConfigurationException. Root exception is
    java.rmi.MarshalException: failed to marshal
    bind(Ljava.lang.String;Ljava.lang.Object;Ljava.util.Hashtable;); nested
    exception is:
    java.io.NotSerializableException:
    com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
    java.io.NotSerializableException:
    com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    Anyone else run into this?

    Sasha-
    That exception indicates that your PersistenceManagerFactory has not
    yet been configured with the proper driver information. Note that the
    JDOConnectionFactory does not use the system.prefs information by
    default: it is designed to be configured internally as per
    the JCA specification.
    I'm sorry to say, but it actually looks like there is no way to bind
    either the EEPersistenceManagerFactory or the JDOConnectionFactory into
    JNDI (unless you extends the EEPersistenceFactory with your own
    Referenceable implementation).
    I have made a bug report about this:
    https://bugzilla.solarmetric.com/show_bug.cgi?id=117
    We will certainly try to have this fixed as soon as possible. Can you
    please add a comment to the bug report with how urgently this is
    affecting you?
    Sasha Haghani <[email protected]> wrote:
    Patrick,
    I get a different problem with JDOConnectionFactory (in 2.2.3)...calling
    getPersistenceManager() on it throws this exception:
    Exception in thread "main" javax.jdo.JDODataStoreException: The JDBC driver
    name "null" is not a valid class.
    NestedThrowables:
    java.lang.NullPointerException
    at com.solarmetric.kodo.impl.jdbc.schema.DB.<init>(DB.java:62)
    at com.solarmetric.kodo.impl.jdbc.schema.DB.getInstance(DB.java:37)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.initConfigurati
    on(JDBCPersistenceManagerFactory.java:155)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.setup(JDBCPersi
    stenceManagerFactory.java:265)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.privateSetup(Pers
    istenceManagerFactoryImpl.java:810)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:53)
    "Patrick Linskey" <[email protected]> wrote:
    Sasha,
    This is a known problem with Kodo JDO 2.2.3 EE, caused by a bug in our
    JCA implementation.
    You should be able to work around this problem by binding a
    JDOConnectionFactory instead of an EEPersistenceManagerFactory.
    com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory extends
    EEPersistenceManagerFactory.
    Unfortunately, JDOConnectionFactory implements Serializable although it
    is not actually serializable. However, as JDOConnectionFactory also
    implements javax.resource.Referenceable, the JNDI bind should succeed.
    Finally, one other alternative is to use Kodo's JCA support to locate
    the PersistenceManagerFactory. Unfortunately, you are using WebLogic 6.1
    SP1, which has a flaky JCA implementation. Weblogic 6.1 SP2 resolves
    these problems. So, your best option is probably to upgrade your
    Weblogic install to SP2 and use JCA (as outlined in our docs).
    JDBCPrefsConfiguration will properly serialize in the next patch release
    of Kodo JDO.
    -Patrick
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • How to bind an object to JNDI tree in iAS?

    Hi all,
    When I try to bind a string object to jndi tree, the following exception
    occurs:
    javax.naming.NamingException: Unable to get object instance from reference.
    Roo
    t exception is javax.naming.NamingException: Can't bind instance of class
    java.lang.String
    at com.netscape.server.jndi.RootContext.bindCtx(Unknown Source)
    at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
    at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
    at javax.naming.InitialContext.rebind(InitialContext.java:385)
    at jsp.APPS.bmx.test2._jspService(test2.java:76)
    at jsp.APPS.bmx.test2.service(test2.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    The code fragment is:
    Context ctx = new InitialContext();
    String str = "hell,every one!";
    ctx.rebind("abc", str);
    Can anyone give some help? Thanks in advance.
    Johnson

    To bind an object into the JNDI tree check the documentation here:
    http://e-docs.bea.com/wls/docs81/jndi/jndi.html#475702
    If this is to be used by all your applications that you deploy on the server check out the startup/shutdown class documentation here:
    http://edocs.bea.com/wls/docs81/ConsoleHelp/startup_shutdown.html
    Cheers
    IV

  • Binding an object to a remote registry. Can it be done?

    I am having problems vending an object to a remote registry. Most of the examples that I have seen vend the object to a local registry which is not really what I need to do.
    I was trying to do:
    <PRE>
    Remote myObject = ...
    Registry r = LocateRegistry.getRegistry("someMachineOnTheNetwork");
    r.bind("rmi://mymachine/objectName", myObject);
    </PRE>
    This fails every time with an AccessException. It seems that the RMI registry only allows binding of objects that are local to it (I don't know of a way of enabling permissions for this. Seems reasonable to expect that not everyone should have the ability to register objects on any registry, but there must be a workaround.
    Any ideas?

    considering the security reasons the rules of the game is that registry must be in the same host as the probram doing the binding.
    So what is LocateRegistry for in that case? Basically it is to be noted that a getRegistry call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore, a subsequent method invocation to a remote registry returned as a result of this method may fail.
    I hope I answered your question.

Maybe you are looking for