google-code-export / nutz

Automatically exported from code.google.com/p/nutz
Apache License 2.0
1 stars 1 forks source link

使用MVC的疑惑 #444

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
您好,我今天使用Nutz框架中的MVC,按照下面的地址进行的配�
��: 
http://code.google.com/p/nutz/wiki/mvc_hello 

启动项目: 
2011-4-14 18:45:35 org.apache.catalina.core.AprLifecycleListener init 
信息: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: C:\Program 
Files\Java\jre7\bin;F:\Greensoft\Myeclipse6.6\myplugins\MyEclipse6.6\eclipse\plu
gins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.6.0.zmyeclipse660200810\tomca
t\bin 
2011-4-14 18:45:35 org.apache.coyote.http11.Http11Protocol init 
信息: Initializing Coyote HTTP/1.1 on http-8080 
2011-4-14 18:45:35 org.apache.catalina.startup.Catalina load 
信息: Initialization processed in 327 ms 
2011-4-14 18:45:35 org.apache.catalina.core.StandardService start 
信息: Starting service Catalina 
2011-4-14 18:45:35 org.apache.catalina.core.StandardEngine start 
信息: Starting Servlet Engine: Apache Tomcat/6.0.13 
2011-04-14 18:45:36  INFO (NutLoading.java:46) - Nutz Version : 1.b.37 RC 
2011-04-14 18:45:36  INFO (NutLoading.java:47) - Nutz.Mvc[nutz] is initializing 
... 
2011-04-14 18:45:36  INFO (NutLoading.java:127) - Build URL mapping by 
org.nutz.mvc.impl.UrlMappingImpl@b1cc87 ... 
2011-04-14 18:45:36  INFO (NutLoading.java:108) - Nutz.Mvc[nutz] is up in 251ms 
2011-4-14 18:45:36 org.apache.coyote.http11.Http11Protocol start 
信息: Starting Coyote HTTP/1.1 on http-8080 
2011-4-14 18:45:36 org.apache.jk.common.ChannelSocket init 
信息: JK: ajp13 listening on /0.0.0.0:8009 
2011-4-14 18:45:36 org.apache.jk.server.JkMain start 
信息: Jk running ID=0 time=0/16  config=null 
2011-4-14 18:45:36 org.apache.catalina.startup.Catalina start 
信息: Server startup in 1419 ms 

没有报错,这应该是正常启动了 
但是当我访问页面时候,控制台报了个警告,访问地址: 
http://localhost:8080/nutz_hello/hello 

控制台警告: 

2011-04-14 18:47:25  INFO (WebResourceScan.java:95) - Try to search in 
classpath : 
F:\Greensoft\Myeclipse6.6\myplugins\MyEclipse6.6\eclipse\plugins\com.genuitec.ec
lipse.easie.tomcat.myeclipse_6.6.0.zmyeclipse660200810\tomcat/bin/bootstrap.jar;
C:\Program Files\Java\jre7/lib/tools.jar 
2011-04-14 18:47:25  WARN (AbstractResourceScan.java:51) - Fail to scan path 
'C:\Program Files\Java\jre7/lib/tools.jar'! 
java.io.FileNotFoundException: C:\Program Files\Java\jre7\lib\tools.jar 
(系统找不到指定的文件。) 
at java.util.zip.ZipFile.open(Native Method) 
at java.util.zip.ZipFile.<init>(ZipFile.java:198) 
at java.util.zip.ZipFile.<init>(ZipFile.java:129) 
at java.util.jar.JarFile.<init>(JarFile.java:150) 
at java.util.jar.JarFile.<init>(JarFile.java:87) 
at 
org.nutz.resource.impl.AbstractResourceScan.scanInJar(AbstractResourceScan.java:
31) 
at org.nutz.resource.impl.WebResourceScan.list(WebResourceScan.java:100) 
at org.nutz.resource.Scans.scanPackage(Scans.java:109) 
at org.nutz.resource.Scans.scanPackage(Scans.java:117) 
at org.nutz.castor.Castors.reload(Castors.java:163) 
at org.nutz.castor.Castors.resetPaths(Castors.java:109) 
at org.nutz.castor.Castors.<init>(Castors.java:142) 
at org.nutz.castor.Castors.<clinit>(Castors.java:38) 
at org.nutz.lang.util.SimpleContext.getAs(SimpleContext.java:64) 
at org.nutz.mvc.ActionContext.getRequest(ActionContext.java:155) 
at org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:95) 
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:26) 
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:66) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
30) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
75) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:581) 
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
at java.lang.Thread.run(Thread.java:717) 

我没有阅读源码,想问下,为什么AbstractResourceScan类要扫描too
ls.jar? 
很明显jre下面不存在toos.jar ,这个jar 应该在jdk下面。 

Original issue reported on code.google.com by mamacmm....@gmail.com on 14 Apr 2011 at 12:42

GoogleCodeExporter commented 9 years ago
JRE7 ? 还真没测试过

Original comment by wendal1985@gmail.com on 14 Apr 2011 at 1:41

GoogleCodeExporter commented 9 years ago
扫描这个文件,是因为你的classpath配置成 
F:\Greensoft\Myeclipse6.6\myplugins\MyEclipse6.6\eclipse\plugins\com.genuitec.ec
lipse.easie.tomcat.myeclipse_6.6.0.zmyeclipse660200810\tomcat/bin/bootstrap.jar;
C:\Program Files\Java\jre7/lib/tools.jar

看到没,最后的就是tools.jar

Original comment by wendal1985@gmail.com on 14 Apr 2011 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 16 Apr 2011 at 11:19