JNDI bind of SybDataStore to Jaguar Naming Service

Dear All,

I would like to ask the following question and I appreciate in advance
any prompt but detailed answer that you can give me:

We have been trying to code SybDataSource from JConnect 5.x.
However, the requirement is that the SybDataSource will be accessible
not only by the servlet but by standalone java class or a web page.
In order to do that there is one obvious implementation contender and
that is to bind the generated SybDataStore to Jaguar Naming Service
(instead of LDAP) and reuising it later from almost anywhere.

As such after initializing JNDI properties we get the InitialContext
and try to bind SybDataSource to Jaguar Naming Service.
However, we receive the following stacktrace:

java.lang.IncompatibleClassChangeError: class 
org.omg.CosNaming._NamingContextStub does not implement interface 
org.omg.CosNaming.NamingContextOperations
        at 
com.sybase.jaguar.jndi.CosNaming.JaguarContext.<init>(JaguarContext.java:118)
        at 
com.sybase.jaguar.jndi.CosNaming.JaguarInitialContextFactory.getInitialContext(JaguarInitialContextFactory.java:17)
        at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:747)
        at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:181)
        at javax.naming.InitialContext.<init>(InitialContext.java:158)
        at 
com.koger.etas.sql.conn.ConfigDataStore.<init>(ConfigDataStore.java:47)
        at 
com.koger.etas.sql.conn.ConfigDataStore.main(ConfigDataStore.java:59)
Exception in thread "main" 

After restarting the server, we get the following in the srv.log:

(null String)
Feb 28 22:09:29 2001: org.omg.CosNaming.NamingContextPackage.NotFound
Feb 28 22:09:29 2001:   at 
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:16)
Feb 28 22:09:29 2001:   at 
org.omg.CosNaming._st_NamingContext.bind(_st_NamingContext.java:47)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming.NamingContextImpl.loadPackages(NamingContextImpl.java:840)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming.NamingContextImpl.loadObjectBindings(NamingContextImpl.java:684)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming.NamingContextImpl.load(NamingContextImpl.java:581)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming.NamingContextImpl.refresh(NamingContextImpl.java:212)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming.NamingContextImpl.run(NamingContextImpl.java:155)
Feb 28 22:09:29 2001:   at 
com.sybase.CosNaming._sk_CosNaming_NamingContext.invoke(_sk_CosNaming_NamingContext.java:454)
*******************
and there is no new package\component entry in the Jaguar Server.

Maybe an explanation of the whole JNDI binding and lookup and what
is the exact step for binding SybDataStore to Jaguar Naming Service
is in order here since no one ever explain it anywhere.

We are running EAS 3.6  WinNT Server SP 6.0 and JConnect 5.2.
Here is also the code that we have:
************************
public ConfigDataStore() {
 
  // create a SybDataStore and configure it
  SybDataSource ds = new com.sybase.jdbc2.jdbc.SybDataSource();
  ds.setUser("dba");
  ds.setPassword("sql");
  ds.setDatabaseName("taweb");
  ds.setServerName("darwin.kogerusa.com");
  ds.setPortNumber(2638);
  ds.setDescription("This DataStore represents Adaptive Server Anywhere 
7.0.1 " +
                    "running db [taweb] on darwin.kogerusa.com at port 
2638.");
  Properties props = new Properties();
  props.put("REPEAT_READ", "false");
  props.put("REQUEST_HA_SESSION", "true");
  props.put(Context.PROVIDER_URL, 
"iiop://localhost:9000/com/koger/etas/jc");
 
props.put(Context.OBJECT_FACTORIES,"com.sybase.jdbc2.jdbc.SybObjectFactory");
  props.put("java.naming.object.factory", 
"com.sybase.jdbc2.jdbc.SybObjectFactory");
  props.put("java.naming.factory.initial", 
"com.sybase.jaguar.jndi.CosNaming.JaguarInitialContextFactory");
  //props.put(Context.INITIAL_CONTEXT_FACTORY, 
"com.sybase.jaguar.jndi.CosNaming.JaguarInitialContextFactory");

  // storing the DataSource object.  Done by setting JNDI properties
  // specific to the type of JNDI service provider we are
  // using (Jaguar Naming Service).  Then, initialize the context
  // and bind the object.
  try {
    ds.setConnectionProperties(props);
    Context ctx = new InitialContext(props);
    ctx.bind("jdbc/myASA", ds);
    // you would substitute this for ctx.bind to get the ds instance back 
???
    //DataSource ds2 = (DataSource) ctx.lookup("jdbc/myASA");
  }
  catch (Exception e)   {
    dbg.p(dbg.ERROR, "[ConfigDataStore]: Could not bind the SybDataStore to 
Jag Naming Service " +
                     "\n " + e);
  }
 }

Please HELP !!!!
0
Robert_Sipko
3/1/2001 3:56:32 AM
sybase.easerver 11371 articles. 0 followers. Follow

0 Replies
597 Views

Similar Articles

[PageSpeed] 31
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

Can the Jaguar naming service be used to store other name value pairs?
Can the Jaguar naming service be used to store other name value pairs? If so, do you have an example or can you give the particulars. I would especially like to know if I can use the JNDI methods to look up and set my own name/value pairs. Eventually I would like to use this with JDBC to do a JNDI look up of hosts. Thanks. Alan, You can do this through the use of environment properties for your EJBs and WARs. You can then look up the name value pairs using JNDI. -- Steve Finck Corporate Technology Partners www.ctpartners.com Join The Team - hr@ctpartners.com -- "...

To use Naming Service...or not to use Naming Service?
That is my question. I want to use clustering and load balancing on my jag servers, so I'm not sure if I need to do this or if the connection object handles this "behind the scenes". In PB does the connection object use the nameservice to do this for you, or do you have to use the JaguarORB.Resolve_Initial_References(), and narrow everything down to the component to take advantage of this? What is "the best way" to instantiate Jag components in PB if you want clustering, fail-over, and load balancing? Thanks for any help. Erik T. The connection ...

Jaguar Naming Service
We have several EA Server components I have written using Powerbuilder 7.0. We have also written two clients that fire off these components - one in Active X and one in Java. I have the naming service working, but only if I cluster the machines. Has anyone been able to do this without clustering? Thanks, Paula Yes, I just did it w/o clustering, although they are all java objects though. You will need to set the following properties in your non name server, let's say your name server is C: com.sybase.jaguar.server.nameservice=iiop://C:9000 com.sybase.jaguar.server.CosNaming=fa...

Naming Service not running in Jaguar
I am attempting to invoke Jaguar components via the CORBA Naming services available through Jaguar CTS 3.0 I am successful in calls to the orb.resolve_initial_references. However, attempts to resolve a valid NameComponent give me a NameNotFound error. When I check the server log, I discover that consistently there is an error message: Oct 20 09:16:04 1999: Running services... Oct 20 09:16:04 1999: Running: CosNaming/NamingContext Oct 20 09:16:04 1999: Running: Jaguar/GarbageCollector Oct 20 09:16:04 1999: Running: CtsServlet/ServletService Oct 20 09:16:04 1999: Running: SurfS...

Jaguar Naming Service not running....
I am still having problems trying to figure out if the Naming Service in Jaguar CTS 3.0 is even configured correctly. I get the following log from Jaguar: Oct 20 11:08:38 1999: NameServiceURL: iiop://0:0 Oct 20 11:11:04 1999: Refresh: CosNaming/NamingContext Oct 20 11:11:04 1999: Binding operations require a password. Password not supplied. Attempted to stop() Oct 20 11:11:46 1999: Jaguar/Management refresh Server Jaguar Oct 20 11:11:46 1999: Refresh: Jaguar/Management Oct 20 11:11:46 1999: Refresh: Jaguar1/SAFadm Oct 20 11:11:47 1999: Jaguar/Management control NameService Server:Jag...

CORBA Naming Service in EAServer?
I would like to implement a 3rd party CORBA component with an application I'd like to deploy with EAServer. I read that EAServer has a Naming service that can be used to register the component. Q: Where can I find the instructions on how to register the CORBA component? Q: Is this Naming service similar to a naming service that would come with and ORB such as Visibroker? Q: How can an outside client app interface with the naming service to obtain a reference to our CORBA component? I already understand that I could just use something like VisiBroker's naming service to re...

Jaguar Naming Service Configuration
I have a web application which uses Dynamo/Jaguar. Dynamo/Jaguar are hosted on an NT Box in a ethernet segment on our lan. A specific web page of the application calls a server side script which calls a Jaguar component using the java.CreateComponent function. If I run the web page within my ethernet segment I can execute the Jaguar component. If I go outside of the ethernet seqment where Dynamo/Jaguar are hosted, clients can bring up the web page, but they cannot execute the serverside script, because they cannot connect (find) to the server. The NT box is setup in the etherne...

Using Naming Service in EAServer
I have two EAServer X and Y. I want to configure EAServer X to be the name server and contains all name space infomation including both EAServer X and Y. But I don't want to create cluster in these EAServer. Can I do that? I read the "Jaguar CTS System Administration Guide" and it said I can configure my EAServer to use another EAServer as its name server. How? If I want to use PowerDynamo connecting to name server, how do I write the script? I can't find any lookup method, or I can just use java.CreateComponent()? You can do this, its just kinda a long manual p...

Jaguar User name for services
I have a service component that does an intercomponent call to another component that saves the Jaguar user name in a persistent layer. I have found that the service component is defined some uid type of user id. Is there anyway to change the user id of the service component in Jag Manager or in some ini file? Thanks/Victor Grazi BNY ESI 1633 Broadway New York, NY 10019 Office - 732-531-4531 Email: vgrazi@superlink.net This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information period. No confidentiality o...

Name service setting of Jaguar 3.5
I have installed two Jaguar server, I want one to be a name server, and the next bind to it. As the manual, in the <Naming Service Properties> tab of the <Server Properties>: If the server is not enable as a name server, the URL for the Jaguar server acting as the name server. Where can I set this URL? Thanks. Jack, Have you read the white paper by Dave Wolf on clustering and high availability? This should give you all the info. you need: http://my.sybase.com/detail?id=1001689 -- Steve Finck Corporate Technology Partners www.ctpartners.com Join ...

need to find jaguar server/service name
I need to know how in powerscript to find the name of the jaguar server/service name from within the contstuctor event of a jaguar component. This is a general component that will be used throughout serveral jaguar services on the same physical server. Additionally, if I can also find the name of the service name that called this component that would even be better. The reason for this is so that I can get registry entries for database connections and other such information using the existing base registry path plus the name of the service calling this component or at least t...

Error EAServer initialization, Jaguar/JCM Service
My localhost EAServer developed an initialization failure, starting the Jaguar/JCM service at some point after deploying something. I'm working on a WEB application and a service component. As a result I deleted the WEB app and the service component, but I still get the intialization error. I also deleted all but my needed connection caches (just 2 Oracle caches) which both ping just fine. On initailization I get a NoSuchMethodError in java.io.FileInputStream init. This seems to make the server generally useless. Any idea on what to correct? It seems my alternative is to rein...

EAServer Jaguar service startup error 1067 solved
To: Anyone using Jaguar 3.5 or later Case number: 10804699 If trying to start Jaguar as NT or Windows 2000 service you got Error 1067 then the workaround is: Open the registry and locate the following key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services and locate in the subkeys the name of your Jaguar Service. There you will find a key which name is "parameters" edit the bootclasspath and the path and ensure it's complete and not truncated. For EAServer 4.0 the BOOTCLASSPATH value should be: ..;G:\appl\Sybase\Jaguar CTS 4.0\java\lib\easclient.jar;G:\ap...

Jaguar Messaging Service -- EAServer 3.6.1
hi, Is there any example for Jaguar Messaging Service in the Documentation/on web site? I am having hard time finding it. EAServer: 3.6.1 thank u raji Raji, There are some whitepapers on sybase.com on using JMS and MDB. Also, the programmers guide talks about creating an application using the messaging service Scott "Raji" <Rajeswari.Chukka@unisys.com> wrote in message news:NmG3H$7YBHA.374@forums.sybase.com... > hi, > Is there any example for Jaguar Messaging Service in the Documentation/on > web site? I am having hard time finding it...

Web resources about - JNDI bind of SybDataStore to Jaguar Naming Service - sybase.easerver

Resources last updated: 12/25/2015 12:08:57 AM