Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
汉德勒里http://AAA.BBB.CCC.DDD:8080/myapp/ uri:“”返回不明确的结果(Vaadin 6)_Vaadin_Vaadin6 - Fatal编程技术网

汉德勒里http://AAA.BBB.CCC.DDD:8080/myapp/ uri:“”返回不明确的结果(Vaadin 6)

汉德勒里http://AAA.BBB.CCC.DDD:8080/myapp/ uri:“”返回不明确的结果(Vaadin 6),vaadin,vaadin6,Vaadin,Vaadin6,在我的Vaadin 6应用程序中,有时会出现以下错误: SEVERE: Terminal error: java.lang.RuntimeException: handleURI for http://AAA.BBB.CCC.DDD:8080/myapp/ uri: '' returns ambigious result. at com.vaadin.ui.Window.handleURI(Window.java:432) at com.vaadin.terminal.gwt.server.Ab

在我的Vaadin 6应用程序中,有时会出现以下错误:

SEVERE: Terminal error:
java.lang.RuntimeException: handleURI for http://AAA.BBB.CCC.DDD:8080/myapp/ uri: '' returns ambigious result.
at com.vaadin.ui.Window.handleURI(Window.java:432)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleURI(AbstractCommunicationManager.java:2291)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleURI(CommunicationManager.java:370)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleURI(AbstractApplicationServlet.java:1099)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:535)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
按照以下方法进行修改:

public DownloadStream handleURI(URL context, String relativeUri) {

    DownloadStream result = null;
    if (uriHandlerList != null) {
        Object[] handlers;
        synchronized (uriHandlerList) {
            handlers = uriHandlerList.toArray();
        }
        for (int i = 0; i < handlers.length; i++) {
            final DownloadStream ds = ((URIHandler) handlers[i]).handleURI(
                    context, relativeUri);
            if (ds != null) {
                if (result != null) {
                    throw new RuntimeException("handleURI for " + context
                            + " uri: '" + relativeUri
                            + "' returns ambigious result.");
                }
                result = ds;
            }
        }
    }
    return result;
}
getImageData是一个字节数组byte[]和图像数据,我从web服务获取

MyApplication.getInstance的定义如下:

public class MyApplication extends Application implements ApplicationContext.TransactionListener
{
    private static ThreadLocal<MyApplication> currentApplication =
            new ThreadLocal<MyApplication> ();

    public static MyApplication getInstance()
    {
        return currentApplication.get ();
    }
}

我能做些什么来修复上述严重错误?

只要没有人回答。我一点也不擅长上面的内容,但是-试着找出这个错误出现在什么类型的URL上,并在将它们提供给DownloadStream之前对它们进行处理

public class MyApplication extends Application implements ApplicationContext.TransactionListener
{
    private static ThreadLocal<MyApplication> currentApplication =
            new ThreadLocal<MyApplication> ();

    public static MyApplication getInstance()
    {
        return currentApplication.get ();
    }
}