0

I'm getting this error "Error accessing product object method" on Call mySqlTableObj.init(url,user,password)

here is the lotusscript script library:

Dim jsDU As New JAVASESSION
Dim mySqlTable As JAVACLASS
Dim mySqlTableObj  As JAVAOBJECT

Set mySqlTable = jsDU.GetClass("org.piu.MySQLTable.MySQLObject")
Set mySqlTableObj = mySqlTable.Createobject()
Call mySqlTableObj.init(url,user,password)
Set getMySQLTableObject = mySqlTableOBJ

here's the java script library:

public void init( String url, String un,String pd) {

    this.url = url;
    this.un = un;
    this.pd = pd;
}

I do not get this error all the time. Sometimes it does not appear sometimes it does. Can anyone help me with this?

Thanks!

  • 1
    What line does the error occur on? If you don't already know, you can find that out either by using the LotusScript debugger, or by using an `On Error` statement to catch the error with the `Erl` function to get the line number. – Scott Leis Oct 13 '20 at 23:49
  • Hi! I've mentioned what line it errors out. I'm getting this error "Error accessing product object method" on Call mySqlTableObj.init(url,user,password) – Bernadette Famy Oct 14 '20 at 18:32
  • That suggests that the Createobject method in your class is failing, so it isn't returning a valid JAVAOBJECT for mySqlTableObj. I doubt that anyone can tell you why. You haven't shown the entire class. You haven't said what version of Notes or Domino you are using. You haven't said anything about the context where this code runs -- what kind of script it is, where it runs, whether this piece of code is called only once or repeatedly, etc. You've only said that sometimes it fails, and sometimes it doesn't. That's not enough to go on. – Richard Schwartz Oct 14 '20 at 20:38
  • Sorry for asking something redundant; I somehow missed where you said the error line at the start of your question. One thing you could try, though I don't know if it will help, is replacing the dots in your `GetClass` call with slashes, like `jsDU.GetClass("org/piu/MySQLTable/MySQLObject")`. Designer Help recommends using slashes because GetClass can fail on some platforms when using dots. – Scott Leis Oct 14 '20 at 23:47

0 Answers0