Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Error: Must be no more than 255 characters long

$
0
0
Hi, I am getting this error when uploading mulitple image files using the FileItem approach. When I select multiple file it seems to reach a point beyond which if the file name string is longer than 255 chars it errors out. If I give it a smaller number of files to upload it does it happily. Do I need to change my datasource definition file in any way?

I am using SmartGwt Pro 5.0p.

Thanks.

Code:

21:29:54.569 [ERROR] [appname] 21:29:54.563:WARN:validation:isc_DynamicForm_5:Validation errors occurred for the following fields with no visible form items:
imgfile_filename:- Must be no more than 255 characters long
com.smartgwt.client.core.JsObject$SGWT_WARN: 21:29:54.563:WARN:validation:isc_DynamicForm_5:Validation errors occurred for the following fields with no visible form items:
imgfile_filename:- Must be no more than 255 characters long
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.widgets.form.DynamicForm.showErrors(DynamicForm.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
    at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Unknown Source)

My datasource definition

Code:

                <field name="ser_no" type="integer" primaryKey="true" hidden="true"></field>
                <field name="caller" length="50" type="text" hidden="true"></field>
                <field name="type" type="text" hidden="true"></field>
                <field name="sessionId" type="text" hidden="true"></field>
                <field name="signedUser" type="text" hidden="true"></field>
                <field name="mbrId" type="text" hidden="true"></field>
                <field name="imgfile" type="binary" length="512"> </field> <!-- I set the length attr to see if that would avoid the error -->
                <field name="status" type="text" hidden="true"></field>
                <field name="errorMsg" length="255" type="text" hidden="true"></field>

The file name string when I select all the files that I want to upload. The length of this string is 219 chars. This is the scenario where it errors out. If I remove files 16-20 then it works fine.

Code:

"Sample01" "Sample02" "Sample03" "Sample04" "Sample05" "Sample06" "Sample07" "Sample08" "Sample09" "Sample10" "Sample11" "Sample12" "Sample13" "Sample14" "Sample15" "Sample16" "Sample17" "Sample18" "Sample19" "Sample20"

Viewing all articles
Browse latest Browse all 4756

Trending Articles