cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Luzyanin <i...@ProZa.Lviv.UA>
Subject AbstractDatabaseAction Exception : java.io.FileNotFoundException !!!! A BUG???!!!
Date Tue, 11 Jun 2002 15:15:01 GMT
Hi!

When i trying to use "now" datatype in my descriptor file

<value dbcol="last_mod_date" param="lastUpdated" type="now"/>

i got very interesting error:

The org.apache.cocoon.www.sitemap_xmap notifies that
org.apache.cocoon.ProcessingException says:

Could not update record :position = 7

More precisely:

org.apache.cocoon.ProcessingException: Could not update record :position
= 7: java.io.FileNotFoundException: 2002-06-11 17:55:02.089 (No such
file or directory)

Full stacktrace:

org.apache.cocoon.ProcessingException: Could not update record :position
= 7: java.io.FileNotFoundException: 2002-06-11 17:55:02.089 (No such
file or directory)
at
org.apache.cocoon.acting.DatabaseUpdateAction.act(DatabaseUpdateAction.java:137)
at
org.apache.cocoon.www.sitemap_xmap.action_set_adminStoryEdit(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2002)
at
org.apache.cocoon.www.sitemap_xmap.matchN10344(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2899)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2141)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2062)
at
org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:277)
at
org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:197)
at
org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:96)
at
org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:176)
at
org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:346)
at
org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:304)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:202)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:142)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:320)
at
org.apache.cocoon.www.sitemap_xmap.matchN1051A(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:4879)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2161)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/proza/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2047)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:484)
java.io.FileNotFoundException: 2002-06-11 17:55:02.089 (No such file or
directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:64)
at java.io.FileInputStream.<init>(FileInputStream.java:95)
at
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:605)
at
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:393)
at
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:379)
at
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:355)
at
org.apache.cocoon.acting.DatabaseUpdateAction.act(DatabaseUpdateAction.java:117)
at
org.apache.cocoon.www.sitemap_xmap.action_set_adminStoryEdit(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2002)
at
org.apache.cocoon.www.sitemap_xmap.matchN10344(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2899)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2141)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2062)
at
org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:277)
at
org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:197)
at
org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:96)
at
org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:176)
at
org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:346)
at
org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:304)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:202)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:142)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:320)
at
org.apache.cocoon.www.sitemap_xmap.matchN1051A(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:4879)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2161)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/java/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/website/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2047)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:484)tack trace:

Than i have look into DatabaseAbsractAction source and found this :

...
constants.put("now", new Integer(Types.LONGVARBINARY));
...

and this
...
case Types.LONGVARBINARY:
                statement.setTimestamp(position, new Timestamp((new
java.util.Date()).getTime()));   // NO "BREAK" AFTER THIS LINE
            case Types.VARCHAR:
                if ("string".equals(typeName)) {
                   statement.setString(position, (String) value);
                   break;
                } else if ("image-mime-type".equals(typeName)) {
                    String imageAttr = param.substring(0,
(param.length() - "-mime-type".length()));
                    file = (File) request.get(imageAttr);
                    synchronized (this.files) {
                        Parameters parameters = (Parameters)
this.files.get(file);
                        String imageMimeType =
parameters.getParameter("image-mime-type",
                                                                      
(String) settings.get("image-mime-type",""));
                        statement.setString(position, imageMimeType);
                        /** Store the image mime type in the request
attributes.
                            Why do we do this? **/
                        setRequestAttribute(request, param,
imageMimeType);
                    }
                    break;
                }
            case Types.BLOB:
                if (value instanceof File) {
                    file = (File)value;
                } else if (value instanceof String) {
                    file = new File((String)value); //HERE THROWS
Exception !!!!
                } else {
                    throw new SQLException("Invalid type for blob:
"+value.getClass().getName());
                }
                //InputStream input = new BufferedInputStream(new
FileInputStream(file));
                FileInputStream input = new FileInputStream(file);
                statement.setBinaryStream(position, input,
(int)file.length());
                if ("image".equals(typeName)) {
                    /** If this column type is an image, store the
                        size, width, and height in a static table **/
                    Parameters parameters = new Parameters();
                    parameters.setParameter("image-size",
Long.toString(file.length()));
                    int [] dimensions =
ImageDirectoryGenerator.getSize(file);
                    String type =
ImageDirectoryGenerator.getFileType(file);
                    parameters.setParameter("image-width",
Integer.toString(dimensions[0]));
                    parameters.setParameter("image-height",
Integer.toString(dimensions[1]));
                    parameters.setParameter("image-mime-type",type);
                    synchronized (this.files) {
                        this.files.put(file, parameters);
                    }
                }
                break;
...

Is it a BUG or i missed something again?????

Cocoon 2.0.2, Tomcat 4.0.4b3, JDK1.3.1 (Blackdown), Linux RedHat 7.3

Mime
View raw message