Reputation: 11
I am trying to import a xml file with metadata to a pdf file which is in a repo
target file: test.pdf
xml file: test.pdf.metadata.properties.xml
When I am trying to import xml, I get this errors:
java.lang.NullPointerException
at org.alfresco.repo.bulkimport.metadataloaders.AbstractMapBasedMetadataLoader.loadMetadata(AbstractMapBasedMetadataLoader.java:116)
at org.alfresco.repo.bulkimport.impl.DirectoryAnalyserImpl.isMetadataValid(DirectoryAnalyserImpl.java:293)
at org.alfresco.repo.bulkimport.impl.DirectoryAnalyserImpl.analyseDirectory(DirectoryAnalyserImpl.java:241)
at org.alfresco.repo.bulkimport.impl.AbstractFilesystemTracker.getImportableItemsInDirectory(AbstractFilesystemTracker.java:63)
at org.alfresco.repo.bulkimport.impl.StripingFilesystemTracker.getImportableItems(StripingFilesystemTracker.java:147)
at org.alfresco.repo.bulkimport.impl.StripingFilesystemTracker$1.getNextWork(StripingFilesystemTracker.java:203)
at org.alfresco.repo.batch.BatchProcessor$WorkProviderIterator.hasNext(BatchProcessor.java:587)
at org.alfresco.repo.batch.BatchProcessor.process(BatchProcessor.java:392)
at org.alfresco.repo.bulkimport.impl.StripingBulkFilesystemImporter.bulkImportImpl(StripingBulkFilesystemImporter.java:65)
at org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter$3.execute(AbstractBulkFilesystemImporter.java:391)
at org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter$3.execute(AbstractBulkFilesystemImporter.java:1)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter.bulkImport(AbstractBulkFilesystemImporter.java:366)
at org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter$2$1.doWork(AbstractBulkFilesystemImporter.java:347)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter$2.run(AbstractBulkFilesystemImporter.java:343)
at java.lang.Thread.run(Thread.java:745)
Any ideas are helpful. Thanks!
Upvotes: 0
Views: 350
Reputation: 634
Please share your XML file to debug further. Looks like a data issue from the exception point of view. If you were using a custom content model ,check your xml files data once again . Also check the content model which is registered properly or not.
With the key being the qualified name of the property and the value being the value of that property. Multi-valued properties are comma-delimited. However, these values are not trimmed so it’s recommended you do not place a space character either before or after the comma, unless you want that in the value of the property.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="key1">value1</entry>
<entry key="key2">value2</entry>
...
</properties>
Upvotes: 1