Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.44对象扫描异常 #214

Closed
albinhdk opened this issue May 9, 2012 · 2 comments
Closed

1.44对象扫描异常 #214

albinhdk opened this issue May 9, 2012 · 2 comments
Assignees
Milestone

Comments

@albinhdk
Copy link

albinhdk commented May 9, 2012

异常如下
2012-05-09 10:29:34,686 [main] INFO org.nutz.mvc.impl.NutLoading - Build URL ma
pping by org.nutz.mvc.impl.UrlMappingImpl ...
2012-05-09 10:29:34,702 [main] INFO org.nutz.resource.Scans - Fail to registerL
ocation --> file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps
/ROOT/WEB-INF/classes/com/dt/module/MainModule.class
java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Pro
gram Files/Apache Software Foundation/Tomcat 6.0/webapps/ROOT/WEB-INF/classes/co
m/dt/module/MainModule.class
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at org.nutz.resource.Scans.registerLocation(Scans.java:91)
at org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:101)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:152)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:89)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:50)
……

可能的原因是路径中带有空格,虽然对应用没有影响,但是最好是处理一下。

@ywjno
Copy link
Member

ywjno commented May 16, 2012

如果uri不符合RFC 2396的话就会出现以上错误,包括空格
而用URLEncoder.encode(str, "utf-8");事先进行encoding的话空格不会是%20这个值而是自动变成+这个符号,结果跟JavaScript的encodeURI方法的结果还不同
这稍微有些麻烦。。。

update1:
这里找到个解决方法

@wendal
Copy link
Member

wendal commented May 17, 2012

fixed

@wendal wendal closed this as completed May 17, 2012
@ghost ghost assigned wendal May 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants