Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

cannot instantiate:com.sybase.ejb.InitialContextFactory

4 posts in EJB Client Last posting was on 2004-10-25 16:20:15.0Z
murat GUNESTAS Posted on 2004-10-22 09:13:11.0Z
From: "Murat GUNESTAS" <mgunestas@hotmail.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: cannot instantiate:com.sybase.ejb.InitialContextFactory
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 212.175.37.2
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <4178cf27$1@forums-1-dub>
Date: 22 Oct 2004 02:13:11 -0700
X-Trace: forums-1-dub 1098436391 212.175.37.2 (22 Oct 2004 02:13:11 -0700)
X-Original-Trace: 22 Oct 2004 02:13:11 -0700, 212.175.37.2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:383
Article PK: 424558

Hi Everyone!
im beat!!!! Please help meee!
Problem is not to be able to instantiate
com.sybase.ejb.InitialContextFactory .
My environment: PB10-EAS50-EJB:
Where is my fault?
PB code and classpaths are below:

Codes....................
boolean isdebug
string classpath = ""
if NOT gb_jvm_started then
g_jvm = create javavm
isdebug = false
choose case g_jvm.createJavaVM(classpath, isdebug)
case 0
gb_jvm_started = true
MessageBox("classpath",g_jvm.getjavaclasspath( ))
case -1
MessageBox("Error", "Failed to load JavaVM")
case -2
MessageBox("Error", "Failed to load EJBLocator")
end choose
end if

ejbconnection conn
string properties[] (values are all true)
properties[1]="javax.naming.Context.INITIAL_CONTEXT_FACTORY=
com.sybase.ejb.InitialContextFactory"
properties[2]="javax.naming.Context.PROVIDER_URL=iiop://int3pdbbiba25:9000"
properties[3]="javax.naming.Context.SECURITY_PRINCIPAL=jagadmin"
properties[4]="javax.naming.Context.SECURITY_CREDENTIALS=1"

conn = CREATE ejbconnection
TRY
conn.connectToServer(properties)
CATCH (exception e)
MessageBox("exception", e.getmessage()) --->getting exception at this
point....
END TRY
...............................

Classpaths.................
and also g_jvm.getjavaclasspath( ) returns below(these are my classpaths and
they are all valid):
C:\JBuilderX\jdk1.4\JRE\LIB\rt.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\build\fop.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\batik.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\xalan-2.3.1.jar;
C:\Program
Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\xercesImpl-2.1.0.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\xml-apis.jar;
C:\Program
Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\avalon-framework-cvs-2002031
5.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\logkit-1.0.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\jimi-1.0.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\pbejbclient100.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\pbjdbc12100.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\pbuddi100.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\pbwst100.jar;
C:\Program Files\Sybase\Shared\Web Targets\easerverdeploy100.jar;
C:\Program Files\Sybase\Shared\Web Targets\easclient.jar;
C:\Program Files\Sybase\Shared\Web Targets\easj2ee.jar;
C:\Program Files\Sybase\Shared\Web Targets\WTinfo100.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\classes;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\easj2ee.jar;
C:\Program
Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\commons-discovery.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\commons-logging.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\dom.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\jaxp-api.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\jaxrpc.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\log4j-1.2.8.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\saaj.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\servlet.jar;
C:\Program
Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\commons-httpclient.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\sybasewst.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\uddi4j.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\wsdl4j.jar;
C:\Program
Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\xercesImpl-2.1.0.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\xml-apis.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\axis.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\jdk14\lib\tools.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\crimson.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\deploy2ep.jar;
C:\Program Files\Sybase\Shared\PowerBuilder\WEB-INF\lib\epdeploy100.jar;
C:\sybase\EAServer\PowerBuilder\pbjdbc1290.jar;
C:\sybase\EAServer\PowerBuilder\pbjdbc1190.jar;
........................


Ben (bede) Posted on 2004-10-22 10:32:26.0Z
From: Ben (bede) <bedeNOSP@Msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: cannot instantiate:com.sybase.ejb.InitialContextFactory
Message-ID: <MPG.1be300d27c31f1d39896e0@forums.sybase.com>
References: <4178cf27$1@forums-1-dub>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-Trace: 22 Oct 2004 03:32:22 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 63
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Oct 2004 03:32:23 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Oct 2004 03:32:26 -0700
X-Trace: forums-1-dub 1098441146 10.22.108.75 (22 Oct 2004 03:32:26 -0700)
X-Original-Trace: 22 Oct 2004 03:32:26 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:384
Article PK: 424559

Hi,

some ideas:
* what is the exact exception error msg?
* maybe start the JVM with debug=true (and check the vm.out)
* credentials is by default empty! are you sure you can connect (eg. try
with jaguar manager)
* can you try running the server and client on the same machine to rule
out network issues.

PS: I'm still on PB9 so can't really verify.

In article <4178cf27$1@forums-1-dub>, mgunestas@hotmail.com says...

> Hi Everyone!
> im beat!!!! Please help meee!
> Problem is not to be able to instantiate
> com.sybase.ejb.InitialContextFactory .
> My environment: PB10-EAS50-EJB:
> Where is my fault?
> PB code and classpaths are below:
>
> Codes....................
> boolean isdebug
> string classpath = ""
> if NOT gb_jvm_started then
> g_jvm = create javavm
> isdebug = false
> choose case g_jvm.createJavaVM(classpath, isdebug)
> case 0
> gb_jvm_started = true
> MessageBox("classpath",g_jvm.getjavaclasspath( ))
> case -1
> MessageBox("Error", "Failed to load JavaVM")
> case -2
> MessageBox("Error", "Failed to load EJBLocator")
> end choose
> end if
>
> ejbconnection conn
> string properties[] (values are all true)
> properties[1]="javax.naming.Context.INITIAL_CONTEXT_FACTORY=
> com.sybase.ejb.InitialContextFactory"
> properties[2]="javax.naming.Context.PROVIDER_URL=iiop://int3pdbbiba25:9000"
> properties[3]="javax.naming.Context.SECURITY_PRINCIPAL=jagadmin"
> properties[4]="javax.naming.Context.SECURITY_CREDENTIALS=1"
>
> conn = CREATE ejbconnection
> TRY
> conn.connectToServer(properties)
> CATCH (exception e)
> MessageBox("exception", e.getmessage()) --->getting exception at this
> point....
> END TRY
> ...............................
>
> Classpaths.................
> and also g_jvm.getjavaclasspath( ) returns below(these are my classpaths and
> they are all valid):
> C:\JBuilderX\jdk1.4\JRE\LIB\rt.jar;
> C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\build\fop.jar;
> C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\batik.jar;
> C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\xalan-2.3.1.jar;
> C:\Program


murat GUNESTAS Posted on 2004-10-22 11:49:57.0Z
From: "Murat GUNESTAS" <mgunestas@hotmail.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <4178cf27$1@forums-1-dub> <MPG.1be300d27c31f1d39896e0@forums.sybase.com>
Subject: Re: cannot instantiate:com.sybase.ejb.InitialContextFactory
Lines: 86
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <4178f3e1@forums-2-dub>
X-Original-Trace: 22 Oct 2004 04:49:53 -0700, 212.175.37.2
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Oct 2004 04:49:54 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Oct 2004 04:49:57 -0700
X-Trace: forums-1-dub 1098445797 10.22.108.75 (22 Oct 2004 04:49:57 -0700)
X-Original-Trace: 22 Oct 2004 04:49:57 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:385
Article PK: 424560

Hi again!
Here are my replies for ques:
* what is the exact exception error msg: "Failed to connect to the EJB
server.Cannot instantiate class: com.sybase.ejb.InitialContextFactory"
* maybe start the JVM with debug=true (and check the vm.out):"i tried but
couldnt find "wm.out" file"
* credentials is by default empty! are you sure you can connect (eg. try
with jaguar manager):"my jagadmin pwd is 1; so it is true i can connect
through a java client"
* can you try running the server and client on the same machine to rule
out network issues.:"They are all on the same machine"

Do you have any other idea?

"Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
news:MPG.1be300d27c31f1d39896e0@forums.sybase.com...
> Hi,
>
> some ideas:
> * what is the exact exception error msg?
> * maybe start the JVM with debug=true (and check the vm.out)
> * credentials is by default empty! are you sure you can connect (eg. try
> with jaguar manager)
> * can you try running the server and client on the same machine to rule
> out network issues.
>
> PS: I'm still on PB9 so can't really verify.
>
> In article <4178cf27$1@forums-1-dub>, mgunestas@hotmail.com says...
> > Hi Everyone!
> > im beat!!!! Please help meee!
> > Problem is not to be able to instantiate
> > com.sybase.ejb.InitialContextFactory .
> > My environment: PB10-EAS50-EJB:
> > Where is my fault?
> > PB code and classpaths are below:
> >
> > Codes....................
> > boolean isdebug
> > string classpath = ""
> > if NOT gb_jvm_started then
> > g_jvm = create javavm
> > isdebug = false
> > choose case g_jvm.createJavaVM(classpath, isdebug)
> > case 0
> > gb_jvm_started = true
> > MessageBox("classpath",g_jvm.getjavaclasspath( ))
> > case -1
> > MessageBox("Error", "Failed to load JavaVM")
> > case -2
> > MessageBox("Error", "Failed to load EJBLocator")
> > end choose
> > end if
> >
> > ejbconnection conn
> > string properties[] (values are all true)
> > properties[1]="javax.naming.Context.INITIAL_CONTEXT_FACTORY=
> > com.sybase.ejb.InitialContextFactory"
> >
properties[2]="javax.naming.Context.PROVIDER_URL=iiop://int3pdbbiba25:9000"
> > properties[3]="javax.naming.Context.SECURITY_PRINCIPAL=jagadmin"
> > properties[4]="javax.naming.Context.SECURITY_CREDENTIALS=1"
> >
> > conn = CREATE ejbconnection
> > TRY
> > conn.connectToServer(properties)
> > CATCH (exception e)
> > MessageBox("exception", e.getmessage()) --->getting exception at this
> > point....
> > END TRY
> > ...............................
> >
> > Classpaths.................
> > and also g_jvm.getjavaclasspath( ) returns below(these are my classpaths
and
> > they are all valid):
> > C:\JBuilderX\jdk1.4\JRE\LIB\rt.jar;
> > C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\build\fop.jar;
> > C:\Program Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\batik.jar;
> > C:\Program
Files\Sybase\Shared\PowerBuilder\fop-0.20.4\lib\xalan-2.3.1.jar;
> > C:\Program


Ben (bede) Posted on 2004-10-25 16:20:15.0Z
From: Ben (bede) <bedeNOSP@Msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: cannot instantiate:com.sybase.ejb.InitialContextFactory
Message-ID: <MPG.1be746df78857a039896e2@forums.sybase.com>
References: <4178cf27$1@forums-1-dub> <MPG.1be300d27c31f1d39896e0@forums.sybase.com> <4178f3e1@forums-2-dub>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 25 Oct 2004 09:20:15 -0700
X-Trace: forums-1-dub 1098721215 194.7.38.226 (25 Oct 2004 09:20:15 -0700)
X-Original-Trace: 25 Oct 2004 09:20:15 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 60
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:386
Article PK: 424562

doublecheck the classpath and environment variables (CLASSPATH, PATH)
=> start a dos-prompt and type java -version (is it the version you
expect?)

i suppose you're trying this from the IDE, right? (or from the final
exe? if so, check the Sybase/PB/java LOCAL_MACHINE registry settings

Ben

In article <4178f3e1@forums-2-dub>, mgunestas@hotmail.com says...

> Hi again!
> Here are my replies for ques:
> * what is the exact exception error msg: "Failed to connect to the EJB
> server.Cannot instantiate class: com.sybase.ejb.InitialContextFactory"
> * maybe start the JVM with debug=true (and check the vm.out):"i tried but
> couldnt find "wm.out" file"
> * credentials is by default empty! are you sure you can connect (eg. try
> with jaguar manager):"my jagadmin pwd is 1; so it is true i can connect
> through a java client"
> * can you try running the server and client on the same machine to rule
> out network issues.:"They are all on the same machine"
>
> Do you have any other idea?
>
>
>
> "Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
> news:MPG.1be300d27c31f1d39896e0@forums.sybase.com...
> > Hi,
> >
> > some ideas:
> > * what is the exact exception error msg?
> > * maybe start the JVM with debug=true (and check the vm.out)
> > * credentials is by default empty! are you sure you can connect (eg. try
> > with jaguar manager)
> > * can you try running the server and client on the same machine to rule
> > out network issues.
> >
> > PS: I'm still on PB9 so can't really verify.
> >
> > In article <4178cf27$1@forums-1-dub>, mgunestas@hotmail.com says...
> > > Hi Everyone!
> > > im beat!!!! Please help meee!
> > > Problem is not to be able to instantiate
> > > com.sybase.ejb.InitialContextFactory .
> > > My environment: PB10-EAS50-EJB:
> > > Where is my fault?
> > > PB code and classpaths are below:
> > >
> > > Codes....................
> > > boolean isdebug
> > > string classpath = ""
> > > if NOT gb_jvm_started then
> > > g_jvm = create javavm
> > > isdebug = false
> > > choose case g_jvm.createJavaVM(classpath, isdebug)
> > > case 0
> > > gb_jvm_started = true
> > > MessageBox("classpath",g_jvm.getjavaclasspath( ))
> > > case -1