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.

Createjavainstance with package name?

7 posts in EJB Client Last posting was on 2005-10-12 13:31:43.0Z
Murat Yelkovan Posted on 2004-10-11 15:23:55.0Z
From: "Murat Yelkovan" <muratyelkovan@yahoo.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Createjavainstance with package name?
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <416aa587@forums-2-dub>
X-Original-Trace: 11 Oct 2004 08:23:51 -0700, 212.175.37.2
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 11 Oct 2004 08:23:52 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 11 Oct 2004 08:23:55 -0700
X-Trace: forums-1-dub 1097508235 10.22.108.75 (11 Oct 2004 08:23:55 -0700)
X-Original-Trace: 11 Oct 2004 08:23:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:377
Article PK: 424552

I can call any java class from powerbuilder 10 successly. But if class is in
a package then i am getting error message "Failed to create Java Class"

Package name is "gov/egm/personel"
Class name is "test"

jvm.CreateJavaVM("",false)
IEJBConn = Create EJBConnection
IEJBConn.CreateJavaInstance(test, "gov/egm/personel/test")
can anybody help me?Thanks.


Ben (bede) Posted on 2004-10-12 07:56:45.0Z
From: Ben (bede) <bedeNOSP@Msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Createjavainstance with package name?
Message-ID: <MPG.1bd5ad4be524b0839896d6@forums.sybase.com>
References: <416aa587@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
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-Trace: 12 Oct 2004 00:56:40 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 36
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Oct 2004 00:56:42 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Oct 2004 00:56:45 -0700
X-Trace: forums-1-dub 1097567805 10.22.108.75 (12 Oct 2004 00:56:45 -0700)
X-Original-Trace: 12 Oct 2004 00:56:45 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:378
Article PK: 424554

Some questions:
* What app. server are you trying to reach? EAServer, Weblogic,
WebSphere, ...?
* You're not using a classpath when initializing the JVM?? you need to
include the client jars(for easerver: eas*.jar) and your own component
classes in the classpath
* createJavaInstance(): how have you declared your test variable?
a proxy needs to exist for it in PB, that proxy class you can use to
declare the object and the classname should also be used as the second
argument. example:

MyJavaProxy_test lnv_test
IEJBConn.CreateJavaInstance(lnv_test, "MyJavaProxy_test")

* a package name usually doesn't have slashes in it, i think. if using
EAServer start Jaguar Manager and look for installed packages, see what
package this component resides in and use that.

HTH,

Ben

In article <416aa587@forums-2-dub>, muratyelkovan@yahoo.com says...

> I can call any java class from powerbuilder 10 successly. But if class is in
> a package then i am getting error message "Failed to create Java Class"
>
> Package name is "gov/egm/personel"
> Class name is "test"
>
> jvm.CreateJavaVM("",false)
> IEJBConn = Create EJBConnection
> IEJBConn.CreateJavaInstance(test, "gov/egm/personel/test")
> can anybody help me?Thanks.
>
>
>


Murat Yelkovan Posted on 2004-10-12 14:31:05.0Z
From: "Murat Yelkovan" <muratyelkovan@yahoo.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <416aa587@forums-2-dub> <MPG.1bd5ad4be524b0839896d6@forums.sybase.com>
Subject: Re: Createjavainstance with package name?
Lines: 81
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 212.175.37.2
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <416beaa9@forums-1-dub>
Date: 12 Oct 2004 07:31:05 -0700
X-Trace: forums-1-dub 1097591465 212.175.37.2 (12 Oct 2004 07:31:05 -0700)
X-Original-Trace: 12 Oct 2004 07:31:05 -0700, 212.175.37.2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:379
Article PK: 424553

sorry!

I don't use any application server.
I want to call java class from powerbuilder without using app server. I have
used in Powerbuilder 9 pb2java.pbd to call java class. But now I could not
find new version of this pbd. So i am going to use now pbejbclient100.pbd.

I don't use classpath because my class is in same folder with my
application. In this case must I use it?
I created my test proxy in powerbuilder 9 and now I migrated it to Power 10.

Now
I have a class in folder "\gov\egm\personel\test.class"
There is one proxy object for this class in pb library and following code.


The following code work fine but when i use my test class instade of
converter class than I am getting error message "Failed to create Java
class"
The difrerence of test class is its package.
/**************************************/
converter con
EJBConnection lEJBConn
javavm jvm

jvm = create javavm
jvm.CreateJavaVM("", FALSE)
lEJBConn = CREATE EJBConnection

if lEJBConn.CreateJavaInstance(con, "converter" ) < 0 then
messagebox("Hata","Failed to create Java class ")
end if


con.x ...
/***************************************/

"Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
news:MPG.1bd5ad4be524b0839896d6@forums.sybase.com...
> Some questions:
> * What app. server are you trying to reach? EAServer, Weblogic,
> WebSphere, ...?
> * You're not using a classpath when initializing the JVM?? you need to
> include the client jars(for easerver: eas*.jar) and your own component
> classes in the classpath
> * createJavaInstance(): how have you declared your test variable?
> a proxy needs to exist for it in PB, that proxy class you can use to
> declare the object and the classname should also be used as the second
> argument. example:
>
> MyJavaProxy_test lnv_test
> IEJBConn.CreateJavaInstance(lnv_test, "MyJavaProxy_test")
>
> * a package name usually doesn't have slashes in it, i think. if using
> EAServer start Jaguar Manager and look for installed packages, see what
> package this component resides in and use that.
>
> HTH,
>
> Ben
>
> In article <416aa587@forums-2-dub>, muratyelkovan@yahoo.com says...
> > I can call any java class from powerbuilder 10 successly. But if class
is in
> > a package then i am getting error message "Failed to create Java Class"
> >
> > Package name is "gov/egm/personel"
> > Class name is "test"
> >
> > jvm.CreateJavaVM("",false)
> > IEJBConn = Create EJBConnection
> > IEJBConn.CreateJavaInstance(test, "gov/egm/personel/test")
> > can anybody help me?Thanks.
> >
> >
> >


Ben (bede) Posted on 2004-10-13 08:37:36.0Z
From: Ben (bede) <bedeNOSP@Msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Createjavainstance with package name?
Message-ID: <MPG.1bd7055028f013819896d7@forums.sybase.com>
References: <416aa587@forums-2-dub> <MPG.1bd5ad4be524b0839896d6@forums.sybase.com> <416beaa9@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
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 13 Oct 2004 01:37:36 -0700
X-Trace: forums-1-dub 1097656656 194.7.38.226 (13 Oct 2004 01:37:36 -0700)
X-Original-Trace: 13 Oct 2004 01:37:36 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 57
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:380
Article PK: 424555

i still think you should add the complete location of "\gov\egm
\personel" (eg: c:\program files\myApp\gov\egm\personel") to the
classpath

Ben

In article <416beaa9@forums-1-dub>, muratyelkovan@yahoo.com says...

> sorry!
>
> I don't use any application server.
> I want to call java class from powerbuilder without using app server. I have
> used in Powerbuilder 9 pb2java.pbd to call java class. But now I could not
> find new version of this pbd. So i am going to use now pbejbclient100.pbd.
>
> I don't use classpath because my class is in same folder with my
> application. In this case must I use it?
> I created my test proxy in powerbuilder 9 and now I migrated it to Power 10.
>
> Now
> I have a class in folder "\gov\egm\personel\test.class"
> There is one proxy object for this class in pb library and following code.
>
>
> The following code work fine but when i use my test class instade of
> converter class than I am getting error message "Failed to create Java
> class"
> The difrerence of test class is its package.
> /**************************************/
> converter con
> EJBConnection lEJBConn
> javavm jvm
>
> jvm = create javavm
> jvm.CreateJavaVM("", FALSE)
> lEJBConn = CREATE EJBConnection
>
> if lEJBConn.CreateJavaInstance(con, "converter" ) < 0 then
> messagebox("Hata","Failed to create Java class ")
> end if
>
>
> con.x ...
> /***************************************/
>
>
>
>
> "Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
> news:MPG.1bd5ad4be524b0839896d6@forums.sybase.com...
> > Some questions:
> > * What app. server are you trying to reach? EAServer, Weblogic,
> > WebSphere, ...?
> > * You're not using a classpath when initializing the JVM?? you need to
> > include the client jars(for easerver: eas*.jar) and your own component
> > classes in the classpath
> > * createJavaInstance(): how have you declared your test variable?
> > a proxy needs to exist for it in PB, that proxy class you can use to


Murat Yelkovan Posted on 2004-10-13 14:27:14.0Z
From: "Murat Yelkovan" <muratyelkovan@yahoo.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <416aa587@forums-2-dub> <MPG.1bd5ad4be524b0839896d6@forums.sybase.com> <416beaa9@forums-1-dub> <MPG.1bd7055028f013819896d7@forums.sybase.com>
Subject: Re: Createjavainstance with package name?
Lines: 70
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 212.175.37.2
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <416d3b42@forums-1-dub>
Date: 13 Oct 2004 07:27:14 -0700
X-Trace: forums-1-dub 1097677634 212.175.37.2 (13 Oct 2004 07:27:14 -0700)
X-Original-Trace: 13 Oct 2004 07:27:14 -0700, 212.175.37.2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:381
Article PK: 424557

I tried but it is fail.
Thanks.

"Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
news:MPG.1bd7055028f013819896d7@forums.sybase.com...
> i still think you should add the complete location of "\gov\egm
> \personel" (eg: c:\program files\myApp\gov\egm\personel") to the
> classpath
>
> Ben
>
> In article <416beaa9@forums-1-dub>, muratyelkovan@yahoo.com says...
> > sorry!
> >
> > I don't use any application server.
> > I want to call java class from powerbuilder without using app server. I
have
> > used in Powerbuilder 9 pb2java.pbd to call java class. But now I could
not
> > find new version of this pbd. So i am going to use now
pbejbclient100.pbd.
> >
> > I don't use classpath because my class is in same folder with my
> > application. In this case must I use it?
> > I created my test proxy in powerbuilder 9 and now I migrated it to Power
10.
> >
> > Now
> > I have a class in folder "\gov\egm\personel\test.class"
> > There is one proxy object for this class in pb library and following
code.
> >
> >
> > The following code work fine but when i use my test class instade of
> > converter class than I am getting error message "Failed to create Java
> > class"
> > The difrerence of test class is its package.
> > /**************************************/
> > converter con
> > EJBConnection lEJBConn
> > javavm jvm
> >
> > jvm = create javavm
> > jvm.CreateJavaVM("", FALSE)
> > lEJBConn = CREATE EJBConnection
> >
> > if lEJBConn.CreateJavaInstance(con, "converter" ) < 0 then
> > messagebox("Hata","Failed to create Java class ")
> > end if
> >
> >
> > con.x ...
> > /***************************************/
> >
> >
> >
> >
> > "Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
> > news:MPG.1bd5ad4be524b0839896d6@forums.sybase.com...
> > > Some questions:
> > > * What app. server are you trying to reach? EAServer, Weblogic,
> > > WebSphere, ...?
> > > * You're not using a classpath when initializing the JVM?? you need to
> > > include the client jars(for easerver: eas*.jar) and your own component
> > > classes in the classpath
> > > * createJavaInstance(): how have you declared your test variable?
> > > a proxy needs to exist for it in PB, that proxy class you can use to


Murat Yelkovan Posted on 2004-10-13 15:06:27.0Z
From: "Murat Yelkovan" <muratyelkovan@yahoo.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <416aa587@forums-2-dub> <MPG.1bd5ad4be524b0839896d6@forums.sybase.com> <416beaa9@forums-1-dub> <MPG.1bd7055028f013819896d7@forums.sybase.com> <416d3b42@forums-1-dub>
Subject: Re: Createjavainstance with package name?
Lines: 88
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 212.175.37.2
Message-ID: <416d446f@forums-2-dub>
X-Original-Trace: 13 Oct 2004 08:06:23 -0700, 212.175.37.2
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 13 Oct 2004 08:06:24 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 13 Oct 2004 08:06:27 -0700
X-Trace: forums-1-dub 1097679987 10.22.108.75 (13 Oct 2004 08:06:27 -0700)
X-Original-Trace: 13 Oct 2004 08:06:27 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:382
Article PK: 424556

okey I solved it.
I exported my migrated proxy object and added following code and than import
again.
string test_javaname = "gov/egm/personel/test"

Thanks.

"Murat Yelkovan" <muratyelkovan@yahoo.com> wrote in message
news:416d3b42@forums-1-dub...
> I tried but it is fail.
> Thanks.
>
>
> "Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
> news:MPG.1bd7055028f013819896d7@forums.sybase.com...
> > i still think you should add the complete location of "\gov\egm
> > \personel" (eg: c:\program files\myApp\gov\egm\personel") to the
> > classpath
> >
> > Ben
> >
> > In article <416beaa9@forums-1-dub>, muratyelkovan@yahoo.com says...
> > > sorry!
> > >
> > > I don't use any application server.
> > > I want to call java class from powerbuilder without using app server.
I
> have
> > > used in Powerbuilder 9 pb2java.pbd to call java class. But now I
could
> not
> > > find new version of this pbd. So i am going to use now
> pbejbclient100.pbd.
> > >
> > > I don't use classpath because my class is in same folder with my
> > > application. In this case must I use it?
> > > I created my test proxy in powerbuilder 9 and now I migrated it to
Power
> 10.
> > >
> > > Now
> > > I have a class in folder "\gov\egm\personel\test.class"
> > > There is one proxy object for this class in pb library and following
> code.
> > >
> > >
> > > The following code work fine but when i use my test class instade of
> > > converter class than I am getting error message "Failed to create Java
> > > class"
> > > The difrerence of test class is its package.
> > > /**************************************/
> > > converter con
> > > EJBConnection lEJBConn
> > > javavm jvm
> > >
> > > jvm = create javavm
> > > jvm.CreateJavaVM("", FALSE)
> > > lEJBConn = CREATE EJBConnection
> > >
> > > if lEJBConn.CreateJavaInstance(con, "converter" ) < 0 then
> > > messagebox("Hata","Failed to create Java class ")
> > > end if
> > >
> > >
> > > con.x ...
> > > /***************************************/
> > >
> > >
> > >
> > >
> > > "Ben (bede)" <bedeNOSP@Msofico.be> wrote in message
> > > news:MPG.1bd5ad4be524b0839896d6@forums.sybase.com...
> > > > Some questions:
> > > > * What app. server are you trying to reach? EAServer, Weblogic,
> > > > WebSphere, ...?
> > > > * You're not using a classpath when initializing the JVM?? you need
to
> > > > include the client jars(for easerver: eas*.jar) and your own
component
> > > > classes in the classpath
> > > > * createJavaInstance(): how have you declared your test variable?
> > > > a proxy needs to exist for it in PB, that proxy class you can use to
>
>


Muhammad Khurram Hanif Posted on 2005-10-12 13:31:43.0Z
From: "Muhammad Khurram Hanif" <khurramhanif@hotmail.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
Organization: 84.177.229.195
References: <416aa587@forums-2-dub>
X-Newsreader: AspNNTP 1.50 (Takeshi Eto)
Subject: Re: Createjavainstance with package name?
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: web110.discountasp.net
Message-ID: <434d0f80$1@forums-2-dub>
X-Original-Trace: 12 Oct 2005 06:28:32 -0700, web110.discountasp.net
Lines: 39
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Oct 2005 06:28:35 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Oct 2005 06:31:43 -0700
X-Trace: forums-1-dub 1129123903 10.22.108.75 (12 Oct 2005 06:31:43 -0700)
X-Original-Trace: 12 Oct 2005 06:31:43 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!forums-2-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:583
Article PK: 424713

On 11 Oct 2004 08:23:55 -0700,
in sybase.public.powerbuilder.ejbclient

Murat Yelkovan <muratyelkovan@yahoo.com> wrote:
>I can call any java class from powerbuilder 10 successly. But if class is in
>a package then i am getting error message "Failed to create Java Class"
>
>Package name is "gov/egm/personel"
>Class name is "test"
>
>jvm.CreateJavaVM("",false)
>IEJBConn = Create EJBConnection
>IEJBConn.CreateJavaInstance(test, "gov/egm/personel/test")
>can anybody help me?Thanks.
>
>

I also came accross this problem and was unable to find any solution for it
directly but then I did a work around which did the job for me and hope will
also do for you this is how...

Create an Generic interface so that your pb app can use it i.e.
/**
*
* @author mhanif
*/
public interface MyGenericHome {

}
Now simplay create a
import your.package.required;
Class MyGeneric{
public void yourfunctioninpackage(){
call your function from package
}
}
Now generate proxies from Powerbuilder for this Generic class and call functions
from this Generic class rather than directly from your packeage... this approch
will help you call a nr of functions witout generating proxies for each class...
This is how you can get rid of the problem!!!