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

Object instantiation exception

Participant ,
Nov 22, 2011 Nov 22, 2011

Copy link to clipboard

Copied

Intermittently i am getting the below error.

Object instantiation exception.

  An exception occurred while instantiating a Java object. The class must not be an interface or an abstract class. If the class has a constructor that accepts an argument, you must call the constructor explicitly using the init(args) method. Error

I have an web service and using the java i am invkoing it. in CF i am creating object and calling the menthod which in turn invoke the web service. but i am getting the above error.

TOPICS
Advanced techniques

Views

4.5K

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

correct answers 1 Correct answer

Participant , Nov 24, 2011 Nov 24, 2011

i was getting the error because it cant able to find the proporties file from the given location. once i gave the physical path its working fine.

Votes

Translate

Translate
Explorer ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

Hi vkunirs,

I am also getting the same error message. I am trying to call API written in java by some trird party. It seems that you are passing some wrong parameter(I want say type mismatch) when you are calling init() method of the function. 

Thanks,

Saurav

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
Advocate ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

When working with Java Objects directly, its generally a good idea to use the JavaCast() method to force your CF data into the correct corresponding Java data type.  If you are not already doing that, I would recommend trying that and let us know what happens

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
Valorous Hero ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

     > Object instantiation exception.

Also post the full stack trace. With java objects the relevant error is usually contained in the stack trace, not the generic header you see.

-Leigh

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
Participant ,
Nov 24, 2011 Nov 24, 2011

Copy link to clipboard

Copied

i was getting the error because it cant able to find the proporties file from the given location. once i gave the physical path its working fine.

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 ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

LATEST

Make sure u pass  not empty value. I had same problem with this function and my IDS var was empty :


FUNCTION ISEVEN(IDS){

   EVENS = FALSE;

        

  

   QO = createObject('java', 'java.math.BigInteger').init(IDS);

   QB = precisionEvaluate((QO/2)).toString();

   

   TRY{

     QO = createObject('java', 'java.math.BigInteger').init(QB);

     EVENS = TRUE;

   }CATCH(any e){

   }

   

   

   RETURN EVENS;

}

When empty value pass to this function it's create error. Hope it will help to some one there.

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