could not insert

I fired up my nice shiny new Jaspersoft 5.0.3 instance in Amazon EC2, and the first thing that I tried to do was add a JDBC data source. 

So I went to Create and then Data Source, and filled out all the information to point to a mySQL database that resides in another AWS instance. 

I clicked the "Test Connection" button and got the message "Connection passed" at the top of the screen. 

When I hit Submit to save the data source, I get a many-pages-long exception and stack trace. 

Looking at the stack trace, it looks like the main cause is:  "org.postgresql.util.PSQLException: ERROR: value too long for type character varying(100)"

Which value is too long? There's nothing unusual about this data source. And Test Connection was happy with it.

Any ideas of what to do would be greatly appreciated! 




mr.john.lynn's picture
Joined: Mar 4 2013 - 3:18pm
Last seen: 6 years 7 months ago

just updated to 8.0.0 and trying to create an Azure SQL datasource. The "Azure user Certificate Password" is throwing me the value too long for type character varying(100). The value i am populating is less than 50 characters

paparajuphani_1 - 1 year 9 months ago

2 Answers:

Problem is solved. The password for the data source is 50 characters long, which I guess is expanded because of encryption before storing it. 

The Password field on that data source web form should limit the field to some maximum length, in my opinion. 

For now, I changed my datasource password to be a short string. 

mr.john.lynn's picture
Joined: Mar 4 2013 - 3:18pm
Last seen: 6 years 7 months ago

I resolved this by altering the table in the jasperserver database.  I increased the field size from 100 to 500, although I don't think this is a very good solution at all.

alter table jijdbcdatasource alter column password type varchar(500);

I agree with mr.john.lynn that if there is a true limit, then it should be reflected in the datasource creation web interface.

egeorge's picture
Joined: Jun 5 2012 - 2:36pm
Last seen: 5 years 2 weeks ago