jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go canal <goca...@yahoo.com>
Subject can only uplaod text file, error on uploading binary files
Date Mon, 20 Jul 2009 15:26:29 GMT
this is strange...I am able to upload text files only. When uploading a binary file, like PDF
or PNG file, got error messages (I am using jcrom, so I am not sure if I need to look into
jcrom or jackrabbit):
---------


Apache Tomcat/6.0.20 - Error report
root cause 
javax.jcr.RepositoryException: Could not read from stream: Read error: Read error
	org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:631)
	org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:125)
	org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:634)
	org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:549)
	org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2437)
	org.jcrom.FileNodeMapper.setFileNodeProperties(FileNodeMapper.java:81)
	org.jcrom.FileNodeMapper.addFileNode(FileNodeMapper.java:129)
	org.jcrom.Mapper.addNode(Mapper.java:417)
	org.jcrom.FileNodeMapper.addFileNode(FileNodeMapper.java:113)
	org.jcrom.FileNodeMapper.addSingleFileToNode(FileNodeMapper.java:156)
	org.jcrom.FileNodeMapper.setFiles(FileNodeMapper.java:312)
	org.jcrom.FileNodeMapper.addFiles(FileNodeMapper.java:347)
	org.jcrom.Mapper.addNode(Mapper.java:436)
	org.jcrom.Mapper.addNode(Mapper.java:364)
	org.jcrom.Jcrom.addNode(Jcrom.java:301)
	org.jcrom.Jcrom.addNode(Jcrom.java:283)
	net.canal.dao.FileDaoImpl.saveFile(FileDaoImpl.java:84)
	net.canal.service.FileServiceImpl.saveFile(FileServiceImpl.java:42)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	$Proxy65.saveFile(Unknown Source)
	net.canal.controller.FileUploadController.onSubmit(FileUploadController.java:70)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
	org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause 

 java.io.IOException: Read error 
java.io.FileInputStream.readBytes(Native Method)
 java.io.FileInputStream.read(FileInputStream.java:199) org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:623)
org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:125) org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:634)
org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:549) org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2437)
org.jcrom.FileNodeMapper.setFileNodeProperties(FileNodeMapper.java:81) org.jcrom.FileNodeMapper.addFileNode(FileNodeMapper.java:129)

org.jcrom.Mapper.addNode(Mapper.java:417) 
org.jcrom.FileNodeMapper.addFileNode(FileNodeMapper.java:113) org.jcrom.FileNodeMapper.addSingleFileToNode(FileNodeMapper.java:156)
org.jcrom.FileNodeMapper.setFiles(FileNodeMapper.java:312) org.jcrom.FileNodeMapper.addFiles(FileNodeMapper.java:347)

org.jcrom.Mapper.addNode(Mapper.java:436) 
org.jcrom.Mapper.addNode(Mapper.java:364)
 org.jcrom.Jcrom.addNode(Jcrom.java:301) 
org.jcrom.Jcrom.addNode(Jcrom.java:283)
......

appreciate any advice!

rgds,
canal



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message