jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE FELIX HERNANDEZ BARRIO <jose.hernan...@isthari.com>
Subject Exception set binary property
Date Sun, 11 Apr 2010 12:07:18 GMT
When setting a binary property with this code:

            pdf = factura.addNode(invoice.getNombre()+".pdf", "nt:file");
            bin = pdf.addNode("jcr:content", "nt:resource");
            bin.setProperty("jcr:mimeType", "application/pdf");
            bin.setProperty("jcr:data",new FileInputStream("file.pdf") );


i get this exception, any tip?
java.lang.IllegalArgumentException: null value
    at
org.apache.jackrabbit.spi.commons.value.AbstractQValue.<init>(AbstractQValue.java:58)
    at
org.apache.jackrabbit.core.value.InternalValue.<init>(InternalValue.java:561)
    at
org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:353)
    at
org.apache.jackrabbit.core.value.InternalValueFactory.create(InternalValueFactory.java:94)
    at
org.apache.jackrabbit.core.value.ValueFactoryImpl.createValue(ValueFactoryImpl.java:107)
    at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2232)
    at
com.isthari.sgd.invoice.batch.writer.InvoiceXmlJcrWriter.adjuntarArchivo(InvoiceXmlJcrWriter.java:154)
    at
com.isthari.sgd.invoice.batch.writer.InvoiceXmlJcrWriter.insert(InvoiceXmlJcrWriter.java:111)
    at
com.isthari.sgd.invoice.batch.writer.InvoiceXmlJcrWriter.write(InvoiceXmlJcrWriter.java:67)
    at
org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:156)
    at
org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:137)
    at
org.springframework.batch.core.step.item.SimpleChunkProcessor.write(SimpleChunkProcessor.java:252)
    at
org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:178)
    at
org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:74)
    at
org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:268)
    at
org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
    at
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
    at
org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
    at
org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
    at
org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:242)
    at
org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)
    at
org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:348)
    at
org.springframework.batch.core.job.flow.FlowJob.access$100(FlowJob.java:43)
    at
org.springframework.batch.core.job.flow.FlowJob$JobFlowExecutor.executeStep(FlowJob.java:135)
    at
org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
    at
org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)
    at
org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
    at
org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:103)
    at
org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:250)
    at
org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:110)
    at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
    at
org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:105)
    at com.isthari.sgd.invoice.batch.TestBatch.main(TestBatch.java:37)
INFO [ExceptionHandler.java] java.lang.IllegalArgumentException: null value

-- 
Jose Hernandez
675599600
Isthari
http://www.isthari.com

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