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.

Dynamo 35 -> Array argument -> EJB -> Invalid object for method

4 posts in General Discussion (old) Last posting was on 2000-03-09 03:14:32.0Z
<=one way=> Posted on 2000-03-08 01:29:06.0Z
Newsgroups: sybase.public.easerver
From: "<=one way=>" <oneway_111@yahoo.com>
Subject: Dynamo 35 -> Array argument -> EJB -> Invalid object for method
Date: Tue, 7 Mar 2000 20:29:06 -0500
Lines: 129
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01BF8873.C8F773A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
NNTP-Posting-Host: oppenheimer163.oppenheimerfunds.com 216.44.5.163
Message-ID: <347_ZGh6c7Ji$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26922
Article PK: 157877

An array is prepared in Dynamo script and passed to an EJB function (findOrCreate()) as an argument.
Attempt to call findOrCreate() results in the "Invalid method for object" error. The script and the output are enclosed.
The Ebb's function signature is as the following:
    public Security FindOrCreate(String[] test) throws java.rmi.RemoteException, javax.ejb.FinderException;
Thanks for any help.
 
Output:
Invalid object for method findOrCreate near line 28 in "/impexp/iz_test.htm"
_____TEST ticker = IBM______
About to call EJB
 

Code:
....
   // List of securities
   idType = java.CreateObject("java.lang.String", "TICKER");
 
   String_Class = java.CallStaticMethod( "java/lang/Class", "forName", "java.lang.String" );
   arrSec = java.CallStaticMethod( "java/lang/reflect/Array","newInstance", String_Class, 1 );
   java.CallStaticMethod( "java/lang/reflect/Array", "set", arrSec, 0, "IBM");
  
   testTicker = java.CallStaticMethod( "java/lang/reflect/Array", "get", arrSec, 0 );
document.WriteLn("<BR>\n" + "_____TEST ticker = " +  testTicker.toString() + "______<BR>\n");
 
   secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
   if (secHome == null) {
     f_showMsg( "ERROR in java.GetHomeInterface: '" + site.GetErrorInfo() );
   }
  
document.WriteLn("About to call EJB" + "<BR>\n");
secObj = secHome.findOrCreate(arrSec);
...


Dave Wolf [Sybase] Posted on 2000-03-08 01:53:00.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Dynamo 35 -> Array argument -> EJB -> Invalid object for method
Date: Tue, 7 Mar 2000 20:53:00 -0500
Lines: 635
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_NextPart_000_000F_01BF8877.1FE99230"
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: PPPa26-City-2R7207.saturn.bbn.com 4.54.158.151
Message-ID: <347_cKJpeGKi$GA.285@forums.sybase.com>
References: <347_ZGh6c7Ji$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26919
Article PK: 157874

I believe this is a bug.  Please open a case.  You might try with my reflection classes
 
import JavaWrappers.ssc;
 
array = new JavaArrayHelper("java.lang.String",1);
array[0] = "HelloWorld";
array = array.save();
 
Dave Wolf
Internet Applications Division
 
"<=one way=>" <oneway_111@yahoo.com> wrote in message news:ZGh6c7Ji$GA.74@forums.sybase.com...
An array is prepared in Dynamo script and passed to an EJB function (findOrCreate()) as an argument.
Attempt to call findOrCreate() results in the "Invalid method for object" error. The script and the output are enclosed.
The Ebb's function signature is as the following:
    public Security FindOrCreate(String[] test) throws java.rmi.RemoteException, javax.ejb.FinderException;
Thanks for any help.
 
Output:
Invalid object for method findOrCreate near line 28 in "/impexp/iz_test.htm"
_____TEST ticker = IBM______
About to call EJB
 

Code:
....
   // List of securities
   idType = java.CreateObject("java.lang.String", "TICKER");
 
   String_Class = java.CallStaticMethod( "java/lang/Class", "forName", "java.lang.String" );
   arrSec = java.CallStaticMethod( "java/lang/reflect/Array","newInstance", String_Class, 1 );
   java.CallStaticMethod( "java/lang/reflect/Array", "set", arrSec, 0, "IBM");
  
   testTicker = java.CallStaticMethod( "java/lang/reflect/Array", "get", arrSec, 0 );
document.WriteLn("<BR>\n" + "_____TEST ticker = " +  testTicker.toString() + "______<BR>\n");
 
   secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
   if (secHome == null) {
     f_showMsg( "ERROR in java.GetHomeInterface: '" + site.GetErrorInfo() );
   }
  
document.WriteLn("About to call EJB" + "<BR>\n");
secObj = secHome.findOrCreate(arrSec);
...


<=one way=> Posted on 2000-03-09 00:44:38.0Z
Newsgroups: sybase.public.easerver
From: "<=one way=>" <oneway_111@yahoo.com>
Subject: Re: Dynamo 35 -> Array argument -> EJB -> Invalid object for method
Date: Wed, 8 Mar 2000 19:44:38 -0500
Lines: 236
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01BF8936.BD60F2F0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
NNTP-Posting-Host: oppenheimer163.oppenheimerfunds.com 216.44.5.163
Message-ID: <347_mSkLTHWi$GA.251@forums.sybase.com>
References: <347_ZGh6c7Ji$GA.74@forums.sybase.com> <347_cKJpeGKi$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26845
Article PK: 157812

Tried the JavaWrappers.ssc It appears to result in the same error message (Invalid object for method findOrCreateByAK near line 23 in "...")
In any case, thanks for the effort.
 
--------------------------------------------------------------------------------------------
// findOrCreateByAK is a working function, another EJB calls it without any problems.
 
arrSec = new JavaArrayHelper("java.lang.String",2);
arrSec[0] = "NPLS";
arrSec[1] = "PALM";
arrSec = arrSec.save();
 
secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
secHome.findOrCreateByAK(arrSec, "TICKER", 1);
 

 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:cKJpeGKi$GA.285@forums.sybase.com...
I believe this is a bug.  Please open a case.  You might try with my reflection classes
 
import JavaWrappers.ssc;
 
array = new JavaArrayHelper("java.lang.String",1);
array[0] = "HelloWorld";
array = array.save();
 
Dave Wolf
Internet Applications Division
 
"<=one way=>" <oneway_111@yahoo.com> wrote in message news:ZGh6c7Ji$GA.74@forums.sybase.com...
An array is prepared in Dynamo script and passed to an EJB function (findOrCreate()) as an argument.
Attempt to call findOrCreate() results in the "Invalid method for object" error. The script and the output are enclosed.
The Ebb's function signature is as the following:
    public Security FindOrCreate(String[] test) throws java.rmi.RemoteException, javax.ejb.FinderException;
Thanks for any help.
 
Output:
Invalid object for method findOrCreate near line 28 in "/impexp/iz_test.htm"
_____TEST ticker = IBM______
About to call EJB
 

Code:
....
   // List of securities
   idType = java.CreateObject("java.lang.String", "TICKER");
 
   String_Class = java.CallStaticMethod( "java/lang/Class", "forName", "java.lang.String" );
   arrSec = java.CallStaticMethod( "java/lang/reflect/Array","newInstance", String_Class, 1 );
   java.CallStaticMethod( "java/lang/reflect/Array", "set", arrSec, 0, "IBM");
  
   testTicker = java.CallStaticMethod( "java/lang/reflect/Array", "get", arrSec, 0 );
document.WriteLn("<BR>\n" + "_____TEST ticker = " +  testTicker.toString() + "______<BR>\n");
 
   secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
   if (secHome == null) {
     f_showMsg( "ERROR in java.GetHomeInterface: '" + site.GetErrorInfo() );
   }
  
document.WriteLn("About to call EJB" + "<BR>\n");
secObj = secHome.findOrCreate(arrSec);
...


Dave Wolf [Sybase] Posted on 2000-03-09 03:14:32.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Dynamo 35 -> Array argument -> EJB -> Invalid object for method
Date: Wed, 8 Mar 2000 22:14:32 -0500
Lines: 265
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_002B_01BF894B.ADE39930"
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: vpn-eme-033.sybase.com 130.214.8.33
Message-ID: <347_7E7lrYXi$GA.202@forums.sybase.com>
References: <347_ZGh6c7Ji$GA.74@forums.sybase.com> <347_cKJpeGKi$GA.285@forums.sybase.com> <347_mSkLTHWi$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:26840
Article PK: 157808

Right as I said its a bug.  Please contact support.

Dave Wolf
Internet Applications Division
 
"<=one way=>" <oneway_111@yahoo.com> wrote in message news:mSkLTHWi$GA.251@forums.sybase.com...
Tried the JavaWrappers.ssc It appears to result in the same error message (Invalid object for method findOrCreateByAK near line 23 in "...")
In any case, thanks for the effort.
 
--------------------------------------------------------------------------------------------
// findOrCreateByAK is a working function, another EJB calls it without any problems.
 
arrSec = new JavaArrayHelper("java.lang.String",2);
arrSec[0] = "NPLS";
arrSec[1] = "PALM";
arrSec = arrSec.save();
 
secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
secHome.findOrCreateByAK(arrSec, "TICKER", 1);
 

 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:cKJpeGKi$GA.285@forums.sybase.com...
I believe this is a bug.  Please open a case.  You might try with my reflection classes
 
import JavaWrappers.ssc;
 
array = new JavaArrayHelper("java.lang.String",1);
array[0] = "HelloWorld";
array = array.save();
 
Dave Wolf
Internet Applications Division
 
"<=one way=>" <oneway_111@yahoo.com> wrote in message news:ZGh6c7Ji$GA.74@forums.sybase.com...
An array is prepared in Dynamo script and passed to an EJB function (findOrCreate()) as an argument.
Attempt to call findOrCreate() results in the "Invalid method for object" error. The script and the output are enclosed.
The Ebb's function signature is as the following:
    public Security FindOrCreate(String[] test) throws java.rmi.RemoteException, javax.ejb.FinderException;
Thanks for any help.
 
Output:
Invalid object for method findOrCreate near line 28 in "/impexp/iz_test.htm"
_____TEST ticker = IBM______
About to call EJB
 

Code:
....
   // List of securities
   idType = java.CreateObject("java.lang.String", "TICKER");
 
   String_Class = java.CallStaticMethod( "java/lang/Class", "forName", "java.lang.String" );
   arrSec = java.CallStaticMethod( "java/lang/reflect/Array","newInstance", String_Class, 1 );
   java.CallStaticMethod( "java/lang/reflect/Array", "set", arrSec, 0, "IBM");
  
   testTicker = java.CallStaticMethod( "java/lang/reflect/Array", "get", arrSec, 0 );
document.WriteLn("<BR>\n" + "_____TEST ticker = " +  testTicker.toString() + "______<BR>\n");
 
   secHome = java.GetHomeInterface( "Security", "iiop://host:9000", "jagadmin", "" );
   if (secHome == null) {
     f_showMsg( "ERROR in java.GetHomeInterface: '" + site.GetErrorInfo() );
   }
  
document.WriteLn("About to call EJB" + "<BR>\n");
secObj = secHome.findOrCreate(arrSec);
...