After upgrading to Servoy 2.2 I can no longer save Insert

Hi there,

After upgrading to Servoy 2.2 I can no longer save Insert records into the database.

Here is the error I get:

Cannot save form data:

java.lang.ArrayIndexOutOfBoundsException null

I use the following method:

//Save any outstanding change
controller.saveData();

Attached is the Servoy log file.

Thanks for any help.

Abrahim

There seems a bug in the driver from microsoft:
2005-08-17 19:05 : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The DBMS returned an unspecified error.
at com.microsoft.jdbc.base.BaseExceptions.createException
2005-08-17 19:05 : java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.write

Strange Servoy 2.2 shows this bug as 2.1 did not… are you using the latest driver version from microsoft?

Jan,

Driver from MS in Servoy Driver director?
If the MS driver in Servoy Driver director, then I probebly need the new one. Do you know where can I get one?

Thanks,

Abrahim

Jan,

More info about the Cannot save form data: error

java.lang.ArrayIndexOutOfBoundsException null "

If I don’t run the below method that calculates the users age:
mln_age = ((mln_date - beh_mln_to_id.id_birthdate)/31557600000).toFixed(2)

Then Im able to insert the record.

However, if I run the users age method then removed the calculated user age from mln_age field then Im able to insert the record.

Strange!!

Somehow Servoy 2.2 and 2.2.1 rc does not like the above method.

I fund another minor problem in Servoy Developer menu Window\more..

If I select Window\more then nothing happens.

I dont know if this is only happening in my Servoy developer or this is a bug.

So, please let me know what we can do to fix the above issues.

Thanks in advance,

Abrahim

akalehzan:
Driver from MS in Servoy Driver director?
If the MS driver in Servoy Driver director, then I probebly need the new one. Do you know where can I get one?

Check the MS website, there you must have downloaded the current one.

akalehzan:
I fund another minor problem in Servoy Developer menu Window\more..

Is there anything in your .log.txt file when you select “more” menu?

JJan,

No there is nothing in Servoy log file.
I’m attaching it anyway.

About MS Driver.

Should I look for ms.jar update driver that is located within Servoy\Driver directory?
Or do you mean something else?
What do this about age calculation method that I sent you?
Please let me know.

Thanks,

Abrahim

Can you try to use JTDS for the connection to Microsoft sql server? It’s better and faster than Microsofts own (!) driver. In the next full install of Servoy we will also be shipping it as default. Until then you can download it here:

http://downloads.servoy.com/downloads/jdbc/jtds-1.1.jar

Place in your drivers, relaunch Servoy, create a new connection with the following settings:

Database Server URL: jdbc:jtds:sqlserver://SERVERIP/DATABASENAME
Driver: net.sourceforge.jtds.jdbc.Driver

don’t forget to replace serverip and databasename with the correct values.

Jan,

After downloading the driver “jtds-1.1.jar”, placed it in Servoy driver directory.

Then ran Servoy Developer.

Then set the driver:

For Database Server url:
jdbc:jtds:sqlserver://localhost/capdb

For Driver:
net.sourceforge.jtds.jdbc

Then click on OK to test the connection.
Got the following error:

JDBC Driver ‘net.sourceforge.jtds.jdbc’ not found in classpath or drivers directory : java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc net.sourceforge.jtds.jdbc

Attached is the Driver setting screenshot.

Thanks,

Abrahim

Did you relaunch servoy after placing the driver in the folder? Can you see in the pulldown of drivers anything that contains jtds?

Jan,

After pull down of drivers Was able to see jtds, and I was able to establish the connection.

The jtds driver works and fixed the problem that we had.

Thank you so much to both of you for the wonderful support.

Best regards,

Abrahim