问题标签 [malformedurlexception]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
79 浏览

malformedurlexception - MalformedURLException:找不到协议

我的网址有什么问题,为什么格式错误?当我尝试加载谷歌图像时,它很好。

这是我的网址

0 投票
2 回答
1448 浏览

java - Java 异常:未知协议:udp

我正在尝试运行一个基本的 java 程序作为对应用程序进行逆向工程的一部分。我正进入(状态

java.net.MalformedURLException:未知协议:udp

运行以下代码时出现异常

提前致谢。

0 投票
1 回答
48 浏览

java - JTable 中的 java.net.malformedURLexception

我有这段代码,当我单击 jtable 时,我的数据库中的图片将显示在我的界面中。但每次我点击 malformedUrlexception 时都会弹出。可以请人帮助我吗?

0 投票
2 回答
175 浏览

android - AndroJena 测试应用程序中的畸形 url 异常

我尝试使用 AndroJena Api 在 Android 项目中查询 DBpedia。这是我的功能:

但是当我在我的 mainActivity 类中调用这个函数时,这会产生一个 MalformedUrlException :

请帮我

0 投票
1 回答
496 浏览

javascript - 为什么我的 catch 块没有捕获“跨源请求仅支持协议方案:http...”

我有一个 JavaScript 脚本,它使用 jquerypost命令登录服务器并获取令牌。我已经将我的代码包装在一个try块中,其catch块如下所示:

我的代码运行良好,但为了彻底测试,我特意更改了协议,使 url 看起来像这样:

我的代码没有捕捉到错误并显示警报。相反,Chrome 控制台显示以下错误:

XMLHttpRequest 无法加载 htt://some.domain:8080/jsonrpc。跨源请求仅支持协议方案:http、data、chrome、chrome-extension、https、chrome-extension-resource。

我希望出现某种格式错误的 url 异常,而不是控制台中的错误。

其他故意错误(例如密码错误)的结果会导致捕获异常。

谢谢

0 投票
3 回答
2231 浏览

java - JAVA url = new URL () malformedURLexception

我试图构建一个从网站收集 HTML 源代码的爬虫,我在 .csv 文件中有这些源代码。每当我将链接放入时,一切似乎都运行良好

但是每当我尝试将链接放在一个变量中(本例中为“文本”)时,我都会收到一个错误,告诉我有一个 malformedURLException。

这是我的代码:

0 投票
0 回答
765 浏览

java - java.net.MalformedURLException 试图检索保存在我的 Android 设备上的照片

我正在尝试在我的应用程序中添加一个使用相机在我的设备中存储照片的功能。一开始我是这样使用相机的:

然后对于 OnActivityResult:

直到这里一切都很好,但是当我尝试使用以下方法检索照片时:

它不会返回日志所说的任何照片:

java.net.MalformedURLException:找不到协议:/storage/emulated/0/Pictures/

我正在尝试一切,但没有结果。

0 投票
0 回答
472 浏览

facebook - 使用 scribe 登录 Facebook

我正在使用 scribe 获取用户 ID,但是我收到此错误:OAuthConnectionException:创建与远程服务的连接时出现问题。

我按照这个使用 javax 过滤器增强的示例(正确获取参数代码) https://github.com/fernandezpablo85/scribe-java/blob/master/src/test/java/org/scribe/examples/FacebookExample.java

I also tried doing things manually and i got the access token which looks somehow like this ( i changed it a bit ) CAAHZCFE7YllgBAAZAenKbvZBrMZAZBkDGgydU2vAekwsM1V0StpZAgHXukEYWIDSpc5ZCXc4LB6suFeaPagcpj2ju6ayvAgrxYttvCQg9i7ZAdcF2ZCvhMNqTddsDUkNq1c1cX47U9KwutS5t6xpbV0cRabaVpgZCZAo4ZCTEtgckFmMajsb3zYWTH9LEfKj3CgcJ39lD2x1yRoXyAds0lKARmHZC

and while asking for user id like this: https://graph.facebook.com/me?access_token=CAAHZCFE7YllgBAAZAenKbvZBrMZAZBkDGgydU2vAekwsM1V0StpZAgHXukEYWIDSpc5ZCXc4LB6suFeaPagcsj2ju6aYvYgrxYttvCQg9i7ZAdcF2ZCvhMNqTddsDUkNq1c1cX47U9KwutS5t6xpbV0cRabaVpgZCZAo4ZCTEtgckFmMajsb3zYWTH7LEfKj3CycJ39lD2x1yRoXyAds0lWLRmHZC%20,%20458856e03b909f426ec5d3791f0af466?fields=id,name

我得到格式错误的访问令牌。你对我做错了什么有什么建议吗?网址是一样的,不知道我的错误是什么:/

0 投票
1 回答
4019 浏览

android - 使用 Volley 时出现格式错误的 URL 异常

在 android 中使用 Android-Volley 时出现以下错误。同样的问题在这里也没有解决......




0 投票
1 回答
2029 浏览

jaxb - Using maven jaxb2 plugin, modular compilation using episode and catalog throws Malformed URL error

My project contains A.xsd which imports schema as follows from B.xsd which is part of another project:

I am trying to use the episode from the project which contains B.xsd so that classes related to B.xsd do not get re-generated when A.xsd is parsed. So I referred this and this to come up with the following configuration: Here is the pom.xml

Here is the catalog file:

There is some configuration in the xjb file to make sure that XmlRootElement is written into some generated classes:

Inspite of providing the episode to the xjc execution and the location of the schema for B.xsd in the catalog file, the classes for B.xsd is getting generated.

The issue is that the maven artifact referred to by the catalog file is not being picked up. I see the following error in the maven build logs:

Can anyone help tell me why am I hitting this malformed URL error for the artifact that contains B.xsd? Any help will be really appreciated.