• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

COM dll : Argument Is Not A Remote Object

New Here ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

Hey All,

I'm using a COM object to retrieve formatted information from a database and move it into another query - long story.... I'm able to retrieve 90% of the variables from the object class, but 3 or 4 variables error out when I try to access them; they throw the following exception:

"The cause of this exception was that: java.lang.IllegalArgumentException: Argument is not a remote object: 3"

The value "3" is the correct value for the parameter I'm calling so it's getting the information back; I don't know what's causing the error. I think it might be that the com "get" function is not returning a variant datatype - maybe it's specifying a datatype... Could that cause this error?

Code..
***************
QuerySetCell(dataStore,"yrd_analyst","#dLA.Analyst#",currRow);
/*
QuerySetCell(dataStore,"ysd_cpd_rdl","#dLA.IniMRL#",currRow);
QuerySetCell(dataStore,"ysd_RdlValue","#dLA.IniMRL#",currRow);
*/

QuerySetCell(dataStore,"ysd_cpd_rdl","#dLA.MRL#",currRow);
QuerySetCell(dataStore,"ysd_RdlValue","#dLA.MRL#",currRow);

QuerySetCell(dataStore,"ysd_mdlValue","#dLA.nMDL#",currRow);
QuerySetCell(dataStore,"ysd_cpdParmWetValue","#dLA.WetResult#",currRow);
*****************

dLA is the com object and all lines that aren't commented out work... The dla.IniMRL always throws.... A few others in the object have the same problem...I'm including a cfdump (some lines removed '....' indicates) of the dla object so you can see that variable IniMRL is in the the object under "get" and "put" properties...

cfdump of dLA
*******************************
object of coldfusion.runtime.com.ComProxy
{7e14dd06-47b9-4177-bbb6-f9b212f7e481}

Methods :

QueryInterface([in]USERDEFINED, [out]VOID, [out, retval]VOID)
AddRef([out, retval]UI4)
GetIDsOfNames([in]USERDEFINED, [in]I1, [in]UINT, [in]UI4, [out]I4, [out, retval]VOID)
GetAnalyteQuals([out, retval]VARIANT)
GetTypeInfoCount([out]UINT, [out, retval]VOID)
Invoke([in]I4, [in]USERDEFINED, [in]UI4, [in]UI2, [in]USERDEFINED, [out]VARIANT, [out]USERDEFINED, [out]UINT, [out, retval]VOID)
GetTypeInfo([in]UINT, [in]UI4, [out]VOID, [out, retval]VOID)
Release([out, retval]UI4)

Put Properties:
SourceResult([in]VARIANT, [out, retval]VOID)
SurLL([in]VARIANT, [out, retval]VOID)
SurrType([in]VARIANT, [out, retval]VOID)
ResultSolids([in]VARIANT, [out, retval]VOID)
RT([in]VARIANT, [out, retval]VOID)
tResult([in]VARIANT, [out, retval]VOID)
....
SpikeID([in]VARIANT, [out, retval]VOID)
UNC([in]VARIANT, [out, retval]VOID)
Storet([in]VARIANT, [out, retval]VOID)
SurrAID([in]VARIANT, [out, retval]VOID)
SurrAType([in]VARIANT, [out, retval]VOID)
nResult([in]VARIANT, [out, retval]VOID)
SpikeAAmount([in]VARIANT, [out, retval]VOID)
PrepRatio([in]VARIANT, [out, retval]VOID)
SurrAmount([in]VARIANT, [out, retval]VOID)
isQC([in]VARIANT, [out, retval]VOID)
cfpf([in]VARIANT, [out, retval]VOID)
HazLevel([in]VARIANT, [out, retval]VOID)
cfpi([in]VARIANT, [out, retval]VOID)
Alias0([in]VARIANT, [out, retval]VOID)
SurrAAmount([in]VARIANT, [out, retval]VOID)
Instrument([in]VARIANT, [out, retval]VOID)
FlagLevel3([in]VARIANT, [out, retval]VOID)
RpToMDL([in]VARIANT, [out, retval]VOID)
SurrAUnit([in]VARIANT, [out, retval]VOID)
Wrk([in]VARIANT, [out, retval]VOID)
AnalyteQuals([in]USERDEFINED, [out, retval]VOID)
AnalyteInfo1([in]VARIANT, [out, retval]VOID)
FlagLevel([in]VARIANT, [out, retval]VOID)
AnalyteOrder([in]VARIANT, [out, retval]VOID)
Analysis([in]VARIANT, [out, retval]VOID)
Units([in]VARIANT, [out, retval]VOID)
Decimals([in]VARIANT, [out, retval]VOID)
Analyzed([in]VARIANT, [out, retval]VOID)
Analyte([in]VARIANT, [out, retval]VOID)
Batch([in]VARIANT, [out, retval]VOID)
FiniVV([in]VARIANT, [out, retval]VOID)
FlagLevel4([in]VARIANT, [out, retval]VOID)
FlagLow([in]VARIANT, [out, retval]VOID)
SpikeType([in]VARIANT, [out, retval]VOID)
InitialUnits([in]VARIANT, [out, retval]VOID)
SurrConc([in]VARIANT, [out, retval]VOID)
cfi([in]VARIANT, [out, retval]VOID)
UseAirFactor([in]VARIANT, [out, retval]VOID)
InitialResult([in]VARIANT, [out, retval]VOID)
FlagLevel2([in]VARIANT, [out, retval]VOID)
Detect([in]VARIANT, [out, retval]VOID)
CSVQuals([in]VARIANT, [out, retval]VOID)
nMRL([in]VARIANT, [out, retval]VOID)
Extraction([in]VARIANT, [out, retval]VOID)
IniMDL([in]VARIANT, [out, retval]VOID)
EXTRACT([in]VARIANT, [out, retval]VOID)
IniVV([in]VARIANT, [out, retval]VOID)
MDL([in]VARIANT, [out, retval]VOID)
AnalyteInfo4([in]VARIANT, [out, retval]VOID)
NoDilMDL([in]VARIANT, [out, retval]VOID)
NoDilResult([in]VARIANT, [out, retval]VOID)
nMDL([in]VARIANT, [out, retval]VOID)
Alias4([in]VARIANT, [out, retval]VOID)
AnalyteInfo3([in]VARIANT, [out, retval]VOID)
CASNumber([in]VARIANT, [out, retval]VOID)
AnalyteInfo5([in]VARIANT, [out, retval]VOID)
AnalyteInfo2([in]VARIANT, [out, retval]VOID)
MDA([in]VARIANT, [out, retval]VOID)
Initial([in]VARIANT, [out, retval]VOID)
MRLSolids([in]VARIANT, [out, retval]VOID)
nWetResult([in]VARIANT, [out, retval]VOID)
Matrix([in]VARIANT, [out, retval]VOID)
MSolvent([in]VARIANT, [out, retval]VOID)
SpikeAUnit([in]VARIANT, [out, retval]VOID)
MolWt([in]VARIANT, [out, retval]VOID)
...
Analyst([in]VARIANT, [out, retval]VOID)
TInitial([in]VARIANT, [out, retval]VOID)
RESP([in]VARIANT, [out, retval]VOID)
TrueValue([in]VARIANT, [out, retval]VOID)
.....
isSurr([in]VARIANT, [out, retval]VOID)
FlagLevel1([in]VARIANT, [out, retval]VOID)
QDecimals([in]VARIANT, [out, retval]VOID)
MRL([in]VARIANT, [out, retval]VOID)
Sample([in]VARIANT, [out, retval]VOID)
isISTD([in]VARIANT, [out, retval]VOID)
IniMRL([in]VARIANT, [out, retval]VOID)
Extracted([in]VARIANT, [out, retval]VOID)

Get Properties
SourceResult([out, retval]VARIANT)
SurLL([out, retval]VARIANT)
SurrType([out, retval]VARIANT)
ResultSolids([out, retval]VARIANT)
RT([out, retval]VARIANT)
tResult([out, retval]VARIANT)
SurrUnit([out, retval]VARIANT)
Rpt([out, retval]VARIANT)
WetResult([out, retval]VARIANT)
....
UNC([out, retval]VARIANT)
Storet([out, retval]VARIANT)
SurrAID([out, retval]VARIANT)
SurrAType([out, retval]VARIANT)
nResult([out, retval]VARIANT)
......
RESP([out, retval]VARIANT)
TrueValue([out, retval]VARIANT)
Dilution([out, retval]VARIANT)
Solids([out, retval]VARIANT)
PrepRatio([out, retval]VARIANT)
Result([out, retval]VARIANT)
SpikeUnit([out, retval]VARIANT)
SpikeConc([out, retval]VARIANT)
SurrAConc([out, retval]VARIANT)
SpikeAmount([out, retval]VARIANT)
SpikeAType([out, retval]VARIANT)
SpikeAID([out, retval]VARIANT)
tWetResult([out, retval]VARIANT)
Alias3([out, retval]VARIANT)
SigFigs([out, retval]VARIANT)
PrepIUnit([out, retval]VARIANT)
SpikeAConc([out, retval]VARIANT)
isSurr([out, retval]VARIANT)
FlagLevel1([out, retval]VARIANT)
QDecimals([out, retval]VARIANT)
MRL([out, retval]VARIANT)
Sample([out, retval]VARIANT)
isISTD([out, retval]VARIANT)
IniMRL([out, retval]VARIANT)
Extracted([out, retval]VARIANT)
TOPICS
Advanced techniques

Views

921

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2007 Feb 24, 2007

Copy link to clipboard

Copied

"The cause of this exception was that: java.lang.IllegalArgumentException: Argument is not a remote object: 3"

The value "3" is the correct value for the parameter I'm calling so it's getting the information back;


I think the exception is telling us that an incorrect value was sent as an argument, not received.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2007 Feb 25, 2007

Copy link to clipboard

Copied

Thanks for your response.

The error is happening several lines after I have passed values to the com object, the code is using the data that is returned and is using the same object instance and its returned variables that the working lines are using above and below. I am looping through the returned data and when it hits this line in the loop it errors out. The lines directly above and below are accessing variables in the same object inside the same iteration of the loop. No data is being passed as an argument to the object between these lines...

Further advice would be greatly appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2007 Feb 25, 2007

Copy link to clipboard

Copied

Which line throws an error? If it is one of the QuerySetCell() invocations then check the datatype that you're attributing to dLA.IniMRL. In fact, I would dump dLA.IniMRL even before the query code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2007 Feb 25, 2007

Copy link to clipboard

Copied

Hey,

This is the line of code causing the problems... The column "ysd_cpd_rdl" is set to float and I've tried it with varchar, etc...

QuerySetCell(dataStore,"ysd_cpd_rdl","#dLA.IniMRL#",currRow);

I can't do a dump of dLA.IniMRL b/c it gives me the same error... I've tried the following and they all generate the same error:

<cfdump var="#dLA.IniMRL#">
<cfset Variable.test = "#dLA.IniMRL#">
<cfset Variable.test = dLA.IniMRL>

It only happens when I access the IniMRL variable inside of dLA... If I access dLA.result or dLA.analyte it works fine on cfdump and variable setting, but whenever I try to access IniMRL I hit the error. It's as if ColdFusion can't process the variable that inside the object even though it can see the value?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

So, we may assume dLA.IniMRL is causing the error. What happens when you make it an integer rather than a float?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

The error is happening several lines after I have passed values to the com object, the code is using the data that is returned and is using the same object instance and its returned variables that the working lines are using above and below.

Could you let us see the object creation code? It seems to invoke a method on a remote object, if we're to believe the error message Argument is not a remote object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

Sure, here is the code that creates the object DLA... All of this code works except for the line that call IniMRL... I've filtered out some of the QuerySetCells there is about 50 of them in all....

<cfset objResults = Application.elementDLL.GetResults("#WRK#","#tSA.Sample#","#tSA.Analysis#")>
<cfset objDLA = objResults.DataLine>
<cfloop collection="#objDLA#" item="dLA">
<cfset currRow = currRow + 1>
<cfset QueryAddRow(dataStore)>

QuerySetCell(dataStore,"cpd_parm_syn","#dLA.Analyte#",currRow);
QuerySetCell(dataStore,"ysd_parm_stored","#dLA.Analyte#",currRow);
QuerySetCell(dataStore,"ysd_analyst","#dLA.Analyst#",currRow);
QuerySetCell(dataStore,"yrd_analyst","#dLA.Analyst#",currRow);
/*
QuerySetCell(dataStore,"ysd_cpd_rdl","#dLA.IniMRL#",currRow);
QuerySetCell(dataStore,"ysd_RdlValue","#dLA.IniMRL#",currRow);
*/

QuerySetCell(dataStore,"ysd_cpd_rdl","#dLA.MRL#",currRow);
QuerySetCell(dataStore,"ysd_RdlValue","#dLA.MRL#",currRow);

QuerySetCell(dataStore,"ysd_mdlValue","#dLA.nMDL#",currRow);
......

</cfloop>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

What happens when you leave out the Application scope, and use just elementDLL instead?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

Same thing happens... I use the application scope so that the COM object doesn't have to be re-instantiated each time I need to use it...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

LATEST
I think the try-catch should stay. But, before that, dump objDLA. Use the try-catch to output the value of currRow when the code breaks. That should tell us which culprit to look for in the dump. It seems an object is making RMI calls.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

Should there really be a loop? dLA is obviously a structure. Moreover, it is a key in objDLA, which is itself a complex type.

However, the code <cfloop collection="#objDLA#" item="dLA"> means we're not talking about one dLA object, but possibly a sequence of dLA objects. Is it therefore possible that the code worked for currRow=1, but failed when currRow=2, with the next value of dLA? An interesting dump would be that of objDLA.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

You are correct in that I am looping through a collection of dLA objects contained in the parent object -> objDLA.. objDLA contains a series of enumerated collections all representing different sets of data. The collection in which I am interested is an enumerated list of the object DataLine. So I instantiate objDLA and then loop through the DataLine objects it contains... When I was initially trying to get this to work, I tried enclosing the errant code in <cftry>/<cfcatch> block to see if maybe a null value was causing the problem and maybe a different row in the collection would work.. I never got a hit within cftry - it always went into cfcatch...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation