Sidebar

How do I resolve "TypeError: ... is not a function, it is object"?

0 votes
2.5K views
asked Sep 6, 2013 by rich-c-2789 (16,630 points)
How do I resolve "TypeError: ... is not a function, it is object"?

1 Answer

0 votes
 
Best answer

Here are a couple ways you might see this type of error:

Error running scheduled script: 'Split Large Files':
[line: 74] TypeError: [JavaPackage com.qvera.Potter] is not a function, it is object. in <Unknown Source> at line number 74

In this case the jar that contains the class Potter needs to be configured in QIE so it is available in the classpath.  

Note: Any dependant jars to the jar containing the class also need to be included.  The only exception is if the dependency is already included in QIE.

See the "Managing External Libraries" section of the"QIE Reference Manual"  This question provides a brief explanation: https://www.qvera.com/kb/index.php/256/what-are-external-libraries-or-jar-files

TypeError: [JavaPackage java.io.StringBuffer] is not a function, it is object.

In this case the package name is incorrect.  It should be java.lang.StringBuffer.

answered Sep 6, 2013 by rich-c-2789 (16,630 points)
edited Jan 23, 2015 by rich-c-2789
...