[opencms-dev] Strange Error

mmihaili at csc.com.au mmihaili at csc.com.au
Wed Jan 14 23:59:01 CET 2004


You may want to use the getFilesInFolder method in the CmsObject class.

Later,
Moris Mihailidis
__________________________________________________
CSC
EBS-BSS Web Services e-Business South
58 Queensbridge St, Southbank, VIC 3006, Australia
Ph: +61-3-8695-1527    Fax:+61-3-8695-1540
Email: mmihaili at csc.com.au
----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------




                                                                                                                                          
                      "Alexander                                                                                                          
                      Kandzior"                  To:      <opencms-dev at opencms.org>                                                       
                      <alex at opencms.org>         cc:                                                                                      
                      Sent by:                   Subject: RE: [opencms-dev] Strange Error                                                 
                      opencms-dev-admin@                                                                                                  
                      opencms.org                                                                                                         
                                                                                                                                          
                                                                                                                                          
                      07/01/2004 03:29                                                                                                    
                      AM                                                                                                                  
                      Please respond to                                                                                                   
                      opencms-dev                                                                                                         
                                                                                                                                          
                                                                                                                                          




Resources must have either the NavPos or NavText property set to be
included
in the navigation. I assue your pdfs or images don't have these.

The error: Dor some types the propery "NavPos" appers to be undefined, use
"define" in the property dialog to define the property for a type first.
Check file types "image", "binary" and "plain".

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

> -----Original Message-----
> From: opencms-dev-admin at opencms.org
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of Raza Naqvi
> Sent: Tuesday, January 06, 2004 4:47 PM
> To: OpenCMS
> Subject: [opencms-dev] Strange Error
>
>
> I have developed a small JSP template which displays a list
> of files in the current directory (Directory Navigation).
>
> The filename is displaying in the template only when I change
> it's navigation position explicitly. More over Iam unable to
> display pdf's and Image files(which is important for me)
>
> Eventhough I logged in as "Admin" with password "admin",
> sometimes Iam facing an error while changing the Nav-Pos.
>
> Below Iam Pasting the Source-code and Error.
>
> Hopefully waiting for any solution..
>
> Thanks in advance,
> It's Raza Naqvi...
>
> ************
> Source Code
> ************
> <%@ page
> import="com.opencms.core.*,java.util.*,com.opencms.flex.jsp.*" %>
> <%
>     //test
>     // Create a JSP action element
>     com.opencms.flex.jsp.CmsJspActionElement cms = new
> CmsJspActionElement(pageContext, request, response);
>
>     // Get the current file and folder name
>     String filename = cms.getCmsObject().getRequestContext().getUri();
>     String foldername =
> com.opencms.file.CmsFile.getPath(filename);
>
>     boolean examplefolder =
> "true".equals(cms.property("examplefolder", "search", "false"));
>
>
>
>     // Get a list of all pages / subfolders in the folder
> (sorted by NavPos property)
>     ArrayList list = cms.getNavigation().getNavigationForFolder();
>
>     Iterator i = list.iterator();
>
>     while (i.hasNext())
>     {
>         CmsJspNavElement ne = (CmsJspNavElement)i.next();
>         String description = ne.getDescription();
>
>           String target = ne.getProperty("target");
>         if (! "external".equals(target))
>             target = "_self";
>         if (! ne.getResourceName().equals(filename))
>         {
>             out.println("<p><b><a href=\"" +
> cms.link(ne.getResourceName()) + "\" target=\"" + target +
> "\" >");
>             out.println(ne.getTitle() + "</a></b>");
>
>         }
>         out.println("</p>");
>     }
>
>   %>
>
>
> ************
> Error
> ************
> com.opencms.core.CmsException: 2 Not found. Detailed error:
> [com.opencms.file.mySql.CmsDbAccess] NavPos.
>     at
> com.opencms.file.genericSql.CmsDbAccess.writeProperty(CmsDbAcc
> ess.java:11766)
>     at
> com.opencms.file.mySql.CmsDbAccess.writeProperty(CmsDbAccess.java:969)
>     at
> com.opencms.file.genericSql.CmsResourceBroker.writeProperty(Cm
> sResourceBroker.java:7724)
>     at com.opencms.file.CmsObject.writeProperty(CmsObject.java:3914)
>     at
> com.opencms.workplace.CmsChnav.updateNavPos(CmsChnav.java:412)
>     at com.opencms.workplace.CmsChnav.getContent(CmsChnav.java:111)
>     at
> com.opencms.template.cache.CmsElementXml.getContent(CmsElement
> Xml.java:171)
>     at
> com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)
>     at
> com.opencms.template.cache.CmsElementCache.callCanonicalRoot(C
> msElementCache.java:149)
>     at
> com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLaunc
> her.java:285)
>     at
> com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)
>     at
> com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)
>     at com.opencms.core.OpenCms.showResource(OpenCms.java:956)
>     at
> com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:1125)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:247)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:193)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:243)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
>     at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:215)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
>     at
> org.apache.catalina.valves.CertificatesValve.invoke(Certificat
> esValve.java:246)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
>     at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2366)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:164)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
>     at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:462)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
>     at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:163)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
>     at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java:1005)
>     at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:1098)
>     at java.lang.Thread.run(Thread.java:536)
>
> _____________________________________________________________
> I use Krify Mail - http://mail.krify.com  Get  Yourname at
> Krify today! _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list,
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list