unable to write tofind reso...

查看: 6466|回复: 1
sw2007的安装问题出现unable to find an appropriate resource DLL
主题帖子积分
学徒工, 积分 3, 距离下一级还需 97 积分
学徒工, 积分 3, 距离下一级还需 97 积分
sw2007的安装问题出现unable to find an appropriate resource DLL,这个说明什么呢,是什么东西缺省了呢??很急!请教~~~~
主题帖子积分
学徒工, 积分 3, 距离下一级还需 97 积分
学徒工, 积分 3, 距离下一级还需 97 积分
我也碰到过这样的问题,但是也一直没有人回答我,到现在我也不清楚
主题帖子积分
提示: 作者被禁止或删除 内容自动屏蔽
郑重声明:本论坛属技术交流,非赢利性论坛。 本论坛言论纯属发表者个人意见,与“中国机械CAD论坛”立场无关。 涉及政治言论涉黄涉枪涉毒一律删除,请所有会员注意. 论坛资源由会员从网上收集整理所得,版权属于原作者. 论坛所有资源是进行学习和科研测试之用,请在下载后24小时删除, 本站出于学习和科研的目的进行交流和讨论,如有侵犯原作者的版权, 请来信告知,我们将立即做出整改,并给予相应的答复,谢谢合作!我们的邮件地址是QQ:下次自动登录
现在的位置:
& 综合 & 正文
NVelocity错误 Unable to find resource
Unable to find resource ''XXXXX
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及中导致错误的出处的详细信息。
异常详细信息: NVelocity.Exception.ResourceNotFoundException: Unable to find resource 'XXXXt.htm'
VelocityContext velocityContext = new VelocityContext(modelTable); 行 63:
VelocityEngine velocityEngine = ctx.GetObject("VelocityEngine") as VelocityE行 64:
string mergedTemplate = VelocityEngineUtils.MergeTemplateIntoString(velocityEngine, "PersonList.htm", Encoding.UTF8.WebName, modelTable); 行 65:
string data=velocityEngine.GetTemplate("TemplatePage", Encoding.UTF8.WebName).Data.ToString(); 行 66:
Response.Write(data);
f:\XXXX\GerateHTML.aspx.cs
解决办法:把文件的生成操作改为“嵌入的资源”
&&&&推荐文章:
【上篇】【下篇】Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I am making a webapplication with Java EE 6 and Primefaces on a Glassfish 4 server. I keep getting the same annoying error more and more often. I have tried to Google this problem, but I hav not yet found a solution that works. Sometimes the application will perform with no problems at all, but then suddenly this same error occurs over and over again. This is my Stack trace:
JSF1064: Unable to find or serve resource, charts/charts.js, from library, primefaces.
java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.utils.Exceptions.makeIOException(Exceptions.java:81)
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:958)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:682)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:343)
at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
at org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:99)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:258)
at java.util.concurrent.FutureTask.get(FutureTask.java:119)
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:951)
... 36 more
The same error will occur several times, but then being unable to serve resources like: jquery/jquery-plugins.js, layout/layout.js, jquery/jquery.js, primefaces.js. All from Primefaces library.
This error have been bugging me for quite some time, and answers would be greatly appreciated!
This is most likely a bug with grizzly framework.
Possible causing bug:
In that Jira, there is a jar patch. Copy to modules directory, clear the OSGI cache (delete glassfish4\glassfish\domains\domain1\osgi-cache) and restart. This worked for me.
Please note that the client gets resources from the server as HTTP GET requests. This means that for each CSS, JS or HTML file, you get an HTTP request.
Open you browser web console and click on network. Then go to any site and you will see how many requests you get.
Here are some suggestions regarding your problem.
Try to increase the Maximum Pool Size of your server. Read here
-> tuning the EJB Pool Settings
Try to analyse your web app and see if there are too many requests for the same resource. You can do this in you browser as mentioned above.
Analyse your JSPs for useless imports, includes or iFrames
I hope this helps
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledapplicationContext.xml
&!-- 配置velocity引擎 --&
&bean id="velocityConfigurer"
class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"&
&property name="resourceLoaderPath" value="/WEB-INF/templates/" /&&!-- 模板存放的路径 --&
&property name="configLocation" value="classpath:velocity.properties" /&
&!-- 配置视图的显示 --&
&bean id="ViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver"&
&property name="prefix" value="/" /&&!-- 视图文件的前缀,即存放的路径 --&
&property name="suffix" value=".vm" /&&!-- 视图文件的后缀名 --&
&property name="toolboxConfigLocation" value="/WEB-INF/tools.xml" /&&!--toolbox配置文件路径--&
&property name="dateToolAttribute" value="date" /&&!--日期函数名称--&
&property name="numberToolAttribute" value="number" /&&!--数字函数名称--&
&property name="contentType" value="text/charset=UTF-8" /&
&property name="exposeSpringMacroHelpers" value="true" /&&!--是否使用spring对宏定义的支持--&
&property name="exposeRequestAttributes" value="true" /&&!--是否开放request属性--&
&property name="requestContextAttribute" value="req"/&&!--request属性引用名称--&
&!--指定layout文件--&
&property name="layoutUrl" value="layout/default.vm"/&
velocity.properties (配置了很多,只列有关路径的)
input.encoding=UTF-8
output.encoding=UTF-8
file.resource.loader.description = Velocity File Resource Loader
file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
#file.resource.loader.path = .
file.resource.loader.cache = false
file.resource.loader.modificationCheckInterval = 2
java类使用
public class VelocityUtil {
private static final String DEFAULT_CHARSET = "UTF-8";
public static String parseVm(String target, VelocityContext context) {
StringWriter writer = new StringWriter(1024);
if (null == context)
context = new VelocityContext();
Velocity.mergeTemplate(target, DEFAULT_CHARSET, context, writer);
return writer.toString();
public static String parseVm(String target, Map&String, Object& map) {
StringWriter writer = new StringWriter(1024);
VelocityContext context = new VelocityContext();
if (null != map) {
for (String key : map.keySet()) {
context.put(key, map.get(key));
return parseVm(target, context);
@RequestMapping(value = "/test2.rpc", method = RequestMethod.POST)
@ResponseBody
public String test3(HttpServletRequest req, HttpServletResponse res)
throws Exception{
String content = VelocityUtil.parseVm("/error.vm", new VelocityContext());
return AjaxUtils.makeJson(res, false, content);
} catch (Exception e) {
("---------------------" + AjaxUtils.makeExceptionJson(res, e));
return AjaxUtils.makeExceptionJson(res, e);
异常信息如下:
Unable to find resource '/index.vm'
我调试过,发现它使用的配置,不是我在springMVC里配置好的,而是一个初始化的配置,所以我想问一下,我如果想手动渲染一个vm,得到一段html,在springMVC里我应该怎么做呢。还是说我哪里配置有问题,麻烦讲下。
目前还没有答案
已解决问题
未解决问题java jsp 通过在在网上看到一个例子HelloVelocity.java 和.VM 我建了个web工程,运行main方法报错。_百度知道
java jsp 通过在在网上看到一个例子HelloVelocity.java 和.VM 我建了个web工程,运行main方法报错。
main&quot.java.java.velocity:49 at org.apache.RuntimeInstance.velocity.ResourceNotFoundException.apache: ResourceManager .monsLogLogChute log严重.velocity.Exception in thread &quot.vm&#39.apache.app. in any resource loader:373) at HelloVelocity.velocity:1533) at org.java.exception。 14大侠:04.runtime.apache: Unable to find resource &#39.java.vm&#39.hellovelocity:474) at org: unable to find resource &#39.getTemplate(RuntimeInstance.getResource(ResourceManagerI org.getTemplate(VelocityEngine.apache:1514) at org.apache.ResourceManagerIhellovelocity.java.velocity.runtime.RuntimeInstance.velocity.resource.velocity.loadResource(ResourceManagerImpl.resource.ResourceManagerImpl.runtime:352) at org.runtime.VelocityEngine.main(HelloVelocity.java,指点一下
我有更好的答案
按默认排序
首先你的'hellovelocity.vm' 要放在src下面,然后代码里面ve.init();前面加上如下两句:ve.setProperty(RuntimeConstants.RESOURCE_LOADER, &classpath&);ve.setProperty(&classpath.resource.loader.class&, ClasspathResourceLoader.class.getName());希望能帮到大家
'hellovelocity.vm 你的这个资源没法去加载..
我再src和web-root中都加这个vm了,就是加载不到,我看了编译之后这个class文件和这个hellovelocity.vm文件都是在classes目录下,为什么还是加载不到?大侠,指点、public static void main(String[] args) throws Exception {
// 初始化并取得Velocity引擎
VelocityEngine ve = new VelocityEngine();
ve.init();
// 取得velocity的模版
Template t = ve.getTemplate(&hellovelocity.vm&);}
不是说找不到你的这个东西,是说你的这个没法去加载进去,,还有 你这个是什么.vm的东西是什么呢 ,你确定你这个能被使用么..
hellovelocity.vm没有找到
Properties p = new Properties();
p.put(&file.resource.loader.class&,&org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader&);
VelocityEngine ve = new VelocityEngine();//初始化引擎
ve.init(p);
Template t = ve.getTemplate(&hellovelocity.vm&);//取得模板
找不到你写的东西啊这是,代码怎么写的呢?
其他类似问题
jsp的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 unable to write to 的文章

 

随机推荐