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.

Warning: undefined variable

4 posts in General Discussion (old) Last posting was on 2000-02-25 06:50:53.0Z
Jerry Leckness Posted on 2000-02-25 04:41:16.0Z
Newsgroups: sybase.public.easerver
From: "Jerry Leckness" <jleckness@protective.com>
Subject: Warning: undefined variable
Date: Thu, 24 Feb 2000 22:41:16 -0600
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: proxy2.protective.com 204.17.150.155
Message-ID: <347_xstN9auf$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27918
Article PK: 159613

I've deployed a Powerbuilder built component to Jaguar. The package is
dcbweb and the component is test. A component method named hello() return a
string "Hello World". I've created stubs and the compiled the classes.

<!--SCRIPT
import /system/utils/javaqry.ssc;
comp =
java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","co
m.sybase.jaguar.sample.dcbweb.test");
resultset = comp.hello();
query = new JavaQuery(resultset)
while(query.MoveNext())
document.writeln(query.GetValue(2) + "<BR>");
-->

When the script executes, I get the following error:

Warning: undefined variable comp.hello[hello] near line 5 in "/test.ssc"

Jerry


Jim O'Neil [Sybase] Posted on 2000-02-24 17:00:09.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 24 Feb 2000 12:00:09 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Warning: undefined variable
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 30
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38B56399.515AA4A5@sybase.com>
References: <347_xstN9auf$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27911
Article PK: 159609


Jerry Leckness wrote:

> I've deployed a Powerbuilder built component to Jaguar. The package is
> dcbweb and the component is test. A component method named hello() return a
> string "Hello World". I've created stubs and the compiled the classes.
>
> <!--SCRIPT
> import /system/utils/javaqry.ssc;
> comp =
> java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","co
> m.sybase.jaguar.sample.dcbweb.test");
> resultset = comp.hello();
> query = new JavaQuery(resultset)
> while(query.MoveNext())
> document.writeln(query.GetValue(2) + "<BR>");
> -->
>
> When the script executes, I get the following error:
>
> Warning: undefined variable comp.hello[hello] near line 5 in "/test.ssc"
>
> Jerry

Your component instantiation likely failed. For this particular example set the
last argument in CreateComponent to an empty string and give it another shot.
You could also add a call to document.write(site.GetErrorInfo()) after the
CreateComponent call to get more information on the failure (or take a look at
the Jaguar server log).


--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


Jerry Leckness Posted on 2000-02-25 06:50:53.0Z
Newsgroups: sybase.public.easerver
From: "Jerry Leckness" <jleckness@protective.com>
Subject: Re: Warning: undefined variable
Date: Fri, 25 Feb 2000 00:50:53 -0600
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: proxy2.protective.com 204.17.150.155
Message-ID: <347_$VNmXjvf$GA.265@forums.sybase.com>
References: <347_xstN9auf$GA.251@forums.sybase.com> <347_38B56399.515AA4A5@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27904
Article PK: 159602

OK.. I made the suggested modifications and now I get the following error:

Exception thrown: java.lang.ClassNotFoundException: Helper in method
loadClass of class DynamoClassLoader.
Unable to find class: HelperUnable to narrow the component to the required
interface: "Helper".

<!--SCRIPT
import /system/utils/javaqry.ssc;
comp =
java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","")
;
document.write(site.GetErrorInfo())
-->

"Jim O'Neil [Sybase]" <joneil@sybase.com> wrote in message
news:38B56399.515AA4A5@sybase.com...
> Jerry Leckness wrote:
>
> > I've deployed a Powerbuilder built component to Jaguar. The package is
> > dcbweb and the component is test. A component method named hello()
return a
> > string "Hello World". I've created stubs and the compiled the classes.
> >
> > <!--SCRIPT
> > import /system/utils/javaqry.ssc;
> > comp =
> >
java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","co
> > m.sybase.jaguar.sample.dcbweb.test");
> > resultset = comp.hello();
> > query = new JavaQuery(resultset)
> > while(query.MoveNext())
> > document.writeln(query.GetValue(2) + "<BR>");
> > -->
> >
> > When the script executes, I get the following error:
> >
> > Warning: undefined variable comp.hello[hello] near line 5 in "/test.ssc"
> >
> > Jerry
>
> Your component instantiation likely failed. For this particular example
set the
> last argument in CreateComponent to an empty string and give it another
shot.
> You could also add a call to document.write(site.GetErrorInfo()) after the
> CreateComponent call to get more information on the failure (or take a
look at
> the Jaguar server log).
>
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>


Jim O'Neil [Sybase] Posted on 2000-02-25 03:56:55.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 24 Feb 2000 22:56:55 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Warning: undefined variable
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 68
NNTP-Posting-Host: nomad6-15.sybase.com 157.133.176.15
Message-ID: <347_38B5FD87.24C9DFBC@sybase.com>
References: <347_xstN9auf$GA.251@forums.sybase.com> <347_38B56399.515AA4A5@sybase.com> <347_$VNmXjvf$GA.265@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27846
Article PK: 154593


Jerry Leckness wrote:

> OK.. I made the suggested modifications and now I get the following error:
>
> Exception thrown: java.lang.ClassNotFoundException: Helper in method
> loadClass of class DynamoClassLoader.
> Unable to find class: HelperUnable to narrow the component to the required
> interface: "Helper".
>
> <!--SCRIPT
> import /system/utils/javaqry.ssc;
> comp =
> java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","")
> ;
> document.write(site.GetErrorInfo())
> -->
>
> "Jim O'Neil [Sybase]" <joneil@sybase.com> wrote in message
> news:38B56399.515AA4A5@sybase.com...
> > Jerry Leckness wrote:
> >
> > > I've deployed a Powerbuilder built component to Jaguar. The package is
> > > dcbweb and the component is test. A component method named hello()
> return a
> > > string "Hello World". I've created stubs and the compiled the classes.
> > >
> > > <!--SCRIPT
> > > import /system/utils/javaqry.ssc;
> > > comp =
> > >
> java.CreateComponent("dcbweb/test","iiop://localhost:9000","jagadmin","","co
> > > m.sybase.jaguar.sample.dcbweb.test");
> > > resultset = comp.hello();
> > > query = new JavaQuery(resultset)
> > > while(query.MoveNext())
> > > document.writeln(query.GetValue(2) + "<BR>");
> > > -->
> > >
> > > When the script executes, I get the following error:
> > >
> > > Warning: undefined variable comp.hello[hello] near line 5 in "/test.ssc"
> > >
> > > Jerry
> >
> > Your component instantiation likely failed. For this particular example
> set the
> > last argument in CreateComponent to an empty string and give it another
> shot.
> > You could also add a call to document.write(site.GetErrorInfo()) after the
> > CreateComponent call to get more information on the failure (or take a
> look at
> > the Jaguar server log).
> >
> >
> > --
> > Jim O'Neil
> > Senior Technical Support Engineer
> > Sybase, Inc
> >
> >

Ooops, I think I gave you bum advice the first time, just omit the last argument
there and it will default to interface dcbweb::test which was created when you
deployed your customized component. Now, did you actually add new public
methods to the component or just modify the existing methods? If it's the
latter you can change to component to implement the existing
DataWindow::HTMLGenerator interface (and the last argument of the
CreateComponent as well); otherwise, keep in mind that the new interface you
deployed will have all methods in the IDL in lowercase so existing code examples
that you find with the shipped HTMLGenerator won't work, because the DynaScript
is case-sensitive.

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc