SmartGWT: v8.2p_2012-10-04/PowerEdition Deployment (built 2012-10-04)
Browser: FF 15, Chrome 22
Scenario: I'm loading up images from MySQL into an Img using SQLDataSource:
Here is the snippet of code where I call getFileURL. The customer_id is a FK in the customer_photo table. So I do a fetch on the customer_photo DataSource to retrieve the actual record (the record is returned correctly, without the binary "photo" field)
I have also tried calling getFileURL with a manually crafted record containing a test customer_photo PK.
Here is my stacktrace on the getFileURL line:
Notes:
1) I know that the data in the DB is correct as I can use ViewFileItem to load the image up correctly.
2) The exception occurs at the getFileURL line, only in development mode. This appears to work fine in compiled mode.
3) I know the usual route is to have a standalone example, but I'm hoping that this is something where I might just be misusing getFileURL.
4) I did not see anything of interest in the developer console.
Any pointers on something I could try?
Browser: FF 15, Chrome 22
Scenario: I'm loading up images from MySQL into an Img using SQLDataSource:
Code:
<DataSource ID="customer_photo" serverType="sql" tableName="customer_photo" autoDeriveSchema="true"> <fields> <field name="photo" type="imageFile"/> </fields> <operationBindings> <!-- always get the newest photo --> <operationBinding operationType="fetch"> <orderClause>photo_date DESC LIMIT 1</orderClause> </operationBinding> </operationBindings> </DataSource>
I have also tried calling getFileURL with a manually crafted record containing a test customer_photo PK.
Code:
Criteria criteria = new Criteria(); criteria.addCriteria("customer_id", customerId); photoDetailsForm.fetchData(criteria, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { Record record = response.getData()[0]; String url = customerPhotoDS.getFileURL(record, "photo"); photo.setSrc(url); } });
Code:
23:07:22.742 [ERROR] [xxx] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (InternalError): too much recursion at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) 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.GeneratedMethodAccessor42.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.invokeNativeVoid(ModuleSpace.java:289) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.google.gwt.user.client.Window.alert(Window.java) at com.smartgwt.client.SmartGwtEntryPoint$1.onUncaughtException(SmartGwtEntryPoint.java:249) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:215) at sun.reflect.GeneratedMethodAccessor42.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)
1) I know that the data in the DB is correct as I can use ViewFileItem to load the image up correctly.
2) The exception occurs at the getFileURL line, only in development mode. This appears to work fine in compiled mode.
3) I know the usual route is to have a standalone example, but I'm hoping that this is something where I might just be misusing getFileURL.
4) I did not see anything of interest in the developer console.
Any pointers on something I could try?
Comment