This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sybase JNDI lookup woes  RSS feed

Yoo-Jin Lee
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've successfully deployed an ejb jar to Sybase (Jaguar 4.0) through JBuilder 6 Enterprise but cannot get a client to lookup the ejb successfully. I can get a context but get the following exception:
Errorjavax.naming.NamingException [Root exception is com.sybase.ejb.CosNaming.NamingContextPackage.NotFound]
Anyone have any ideas?
Here's the client code:
import javax.naming.*;
import javax.ejb.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
import welcome.*;

public class Client {
private static Enterprise1Home enterprise1Home = null;
private static Enterprise1 enterprise1 = null;
public static void main(String[] args) {
try {
Context jndiContext = getSybInitialContext();
if(jndiContext !=null) {
System.out.println("Context Not Null");
} else {
System.out.println("Null Context");
Object obj= jndiContext.lookup("Jaguar/Enterprise1");
if (obj !=null) {
System.out.println("Object Not Null");
}else {
System.out.println("Null Object");
enterprise1Home = (Enterprise1Home) PortableRemoteObject.narrow(obj, Enterprise1Home.class);
if(enterprise1Home != null){
System.out.println("Home available");
} catch(Exception e) {
public static InitialContext getSybInitialContext() throws NamingException
java.util.Properties p = new java.util.Properties();
// Sybase implementation of InitialContextFactory
// URL for the Server's IIOP port
p.put(Context.PROVIDER_URL, "iiop://localhost:9000");
p.put(Context.SECURITY_PRINCIPAL, "jagadmin");
p.put(Context.SECURITY_CREDENTIALS, "");
// Now create an InitialContext that uses the properties
return new InitialContext(p);
Jaguar Server startup
2 Phase Commit Option Licensed
Clustering Option Licensed
High Availability Option Licensed
Application Integrator for CICS Option Licensed
Invalid listen port number: 8787
Transport dt_socket failed to initialize, rc = -1.
FATAL ERROR in native method: No transports initialized
Starting services...
Accepting connections.
Exception in thread "Thread-5"
Manoj had a similar problem at sybase.public.easerver.j2ee JNDI lookup problems. The solution was a combo of wrong JNDI name and a patch for JBuilder 5. I'm using JBuilder 6 so would think the patch would be included and tried every combo of the JNDI name possible....
[ January 04, 2002: Message edited by: Yoo-Jin Lee ]
Steven De Groote
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having the exact same problem but with EAServer 5.2.0
Has anyone found a solution?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!