<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>check what is going on at
this line (from your log):<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<pre><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'>at yu.nbs.opencms.test.ResponseForm.storePDF(ResponseForm.java:102)<o:p></o:p></span></font></pre>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Petr<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>Von:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
opencms-dev-admin@opencms.org [mailto:opencms-dev-admin@opencms.org] <b><span
style='font-weight:bold'>Im Auftrag von </span></b>Ivan Jelenic<br>
<b><span style='font-weight:bold'>Gesendet:</span></b> Donnerstag, 22. Januar
2004 10:20<br>
<b><span style='font-weight:bold'>An:</span></b> opencms-dev@opencms.org<br>
<b><span style='font-weight:bold'>Betreff:</span></b> [opencms-dev] Create
respurce problem. Please help.</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am using a small web-based form for uploading PDF file and
storing them VFS. Everything works fine except createResource method. This is a
code:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> //obradi PDF<br>
System.out.println("Pocetak obrade PDF file-a!!!");<br>
<br>
Enumeration files =
cms.getRequestContext().getRequest().getFileNames();<br>
//Upis PDF fajlova u CMS<br>
<br>
while (files.hasMoreElements()) {<br>
String fileName = (String) files.nextElement();<br>
fileName = fileName.toUpperCase();<br>
System.out.println("Ime: " + fileName);<br>
if (fileName.endsWith(".PDF")) {<br>
System.out.println("Usao i if (PDF)");<br>
byte[] filecontent = (byte[])
cms.getRequestContext().getRequest().getFile(fileName);<br>
//Prijava admin user-a<br>
try {<br>
cms.loginUser("Admin","opencms");<br>
System.out.println("Uspesno logovanje
Admin-a");<br>
Hashtable props = new Hashtable();<br>
props.put("Title",request.getParameter("Page"));<br>
props.put("Description",request.getParameter("Description"));<br>
props.put("Keywords",request.getParameter("Keywords"));<br>
props.put("NavText",request.getParameter("NavText"));<br>
System.out.println("Setovani Properties za
file-ove");<br>
CmsResource cmsres = null;<br>
System.out.println("Kreiranje PDF file-a u
CMS-u!!");<br>
pathVFS = request.getParameter("Path");<br>
try{<br>
//cms.lockResource(pathVFS);<br>
cms.getRequestContext().setCurrentProject(3);
//switch to offline <br>
System.out.println("Na putanji: "
+ pathVFS);<br>
cmsres = cms.createResource(pathVFS,
fileName, "binary", props, filecontent);<br>
System.out.println("PDF file je
uspesno kreiran u CMS-u !!"); <br>
}catch(CmsException e){<br>
System.out.println("Neuspesno
kreiranje !!!");<br>
out.println("Neuspesno kreiranje
PDF!!!");<br>
e.printStackTrace();<br>
}<br>
} catch(CmsException e){<br>
System.out.println("Neuspesno logovanje
!!!");<br>
}<br>
}<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>VFS path is OK.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I've got this error message:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>javax.servlet.ServletException: Resource loader error in
file '/intranet/jsp/Webhouse.jsp'<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Root cause:<br>
org.apache.jasper.JasperException<br>
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)<br>
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)<br>
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)<br>
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)<br>
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)<br>
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)<br>
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)<br>
at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:158)<br>
......<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>............<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Log file says this:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div><!--StartFragment --><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>2004-01-22 09:56:45 ApplicationDispatcher[/opencms] Servlet.service() for servlet jsp threw exception<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>java.lang.NullPointerException<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at java.io.FilterOutputStream.write(FilterOutputStream.java:80)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at yu.nbs.opencms.test.ResponseForm.storePDF(ResponseForm.java:102)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at yu.nbs.opencms.test.ResponseForm.proccessData(ResponseForm.java:37)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jsp.WEB_002dINF.jsp.online.intranet.jsp.Webhouse_jsp_jsp._jspService(Webhouse_jsp_jsp.java:117)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:158)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java:972)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:256)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.flex.CmsJspLoader.load(CmsJspLoader.java:577)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.flex.CmsJspLoader.initlaunch(CmsJspLoader.java:239)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.core.OpenCms.showResource(OpenCms.java:961)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at com.opencms.core.OpenCmsHttpServlet.doPost(OpenCmsHttpServlet.java:331)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> at java.lang.Thread.run(Thread.java:534)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Please, help.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Best regards, Ivan.<o:p></o:p></span></font></pre></div>
</div>
</div>
</body>
</html>