-
1. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
hchiorean Mar 15, 2016 2:45 AM (in response to rishianand50)That example does not take into account that your classpath has multiple javax.jcr implementations.
From the stacktrace it seems like you need to qualify your injected Repository instances, because there are multiple javax.jcr.Repository instances available to Spring via your configuration. So essentially you need to tell Spring which bean is which when injecting it.
-
2. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
rishianand50 Mar 15, 2016 6:31 AM (in response to hchiorean)I removed autowiring and now I am getting below error: (have a look at last error lines)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jcrService' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/cliqr-mgmt-content-repository-context.xml]: Cannot resolve reference to bean 'distributedJobTemplateContentReadWrite' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distributedJobTemplateContentReadWrite' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/cliqr-mgmt-content-repository-context.xml]: Cannot resolve reference to bean 'modeshapeDistributedJobTemplateContentReadWriteImpl' while setting bean property 'modeshape'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modeshapeDistributedJobTemplateContentReadWriteImpl' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/cliqr-mgmt-content-repository-context.xml]: Cannot resolve reference to bean 'modeshapeSession' while setting bean property 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modeshapeSession': FactoryBean threw exception on object creation; nested exception is javax.jcr.RepositoryException: Error while starting 'sample' repository: Name [infinispan-configuration-mysql-async-eviction.xml] is not bound in this Context. Unable to find [infinispan-configuration-mysql-async-eviction.xml].
-
3. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
rishianand50 Mar 15, 2016 6:42 AM (in response to rishianand50)I made a smiliar dummy project in Eclipse and I am getting below warning :
15:01:17,514 WARN The repository 'sample' cannot be bound/unbound in JNDI at 'java:jcr/local/sample' because the JNDI context is read-only.
While googling, I found "Name ... is not bound in this Context " is somewhat related to JNDI. May be I am not correct. Please suggest what to do ?
-
4. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
rishianand50 Mar 15, 2016 8:49 AM (in response to hchiorean)I am getting below errors now.
Caused by: javax.jcr.RepositoryException: Error while starting 'sample' repository: SQL error while fetching stored entry with key: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*, lockingKey: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:657)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:616)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:145)
at com.osmosix.mgmt.modeshape.jcr.ModeShapeSessionFactory.getObject(ModeShapeSessionFactory.java:52)
at com.osmosix.mgmt.modeshape.jcr.ModeShapeSessionFactory.getObject(ModeShapeSessionFactory.java:33)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
... 195 more
Caused by: org.infinispan.persistence.spi.PersistenceException: SQL error while fetching stored entry with key: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*, lockingKey: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*
-
5. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
rishianand50 Mar 17, 2016 1:57 AM (in response to hchiorean)I am using that only. Later I thought to check my application is working or not. So, I enforced simpler repository configuration.
repository-configuration.json :
{ "name" : "sample", "jndiName" : "", "monitoring" : { "enabled" : true }, "storage" : { "transactionManagerLookup" : { "name" : "org.modeshape.example.spring.jcr.AtomikosTransactionManagerLookup" }, "binaryStorage" : { "type" : "file", "directory": "${java.io.tmpdir}/modeshape_spring_sample/binaries", "minimumBinarySizeInBytes" : 40 } }, "workspaces" : { "default" : "default", "allowCreation" : true }, "security" : { "anonymous" : { "roles" : ["readonly","readwrite","admin"], "useOnFailedLogin" : false } } } Error is :
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modeshapeSession' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/cliqr-mgmt-content-repository-context.xml]: Cannot resolve reference to bean 'repositoryFactory' while setting bean property 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryFactory': Invocation of init method failed; nested exception is org.modeshape.jcr.ConfigurationException: The configuration for the 'sample' repository has problems: ERROR: Error at storage.transactionManagerLookup : Field value for 'storage.transactionManagerLookup' expected to be of type string but was of type object
WARNING: The 'storage.transactionManagerLookup' field in the repository configuration file is deprecated and is no longer used. { "name" : "sample" , "jndiName" : "" , "monitoring" : { "enabled" : true } , "storage" : { "transactionManagerLookup" : { "name" : "com.osmosix.mgmt.modeshape.jcr.AtomikosTransactionManagerLookup" } , "binaryStorage" : { "type" : "file" , "directory" : "/usr/local/tomcat/temp/modeshape_spring_sample/binaries" , "minimumBinarySizeInBytes" : 40 } } , "workspaces" : { "default" : "default" , "allowCreation" : true } , "security" : { "anonymous" : { "roles" : [ "readonly" , "readwrite" , "admin" ] , "useOnFailedLogin" : false } }
-
6. Re: Already using jackrabbit, parallely I want to save data using Modeshape, I have some problem in config?
rishianand50 Mar 21, 2016 3:12 AM (in response to hchiorean)I am getting below error :
'repositoryFactory' while setting bean property 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atomikosTransactionManagerLookup' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/cliqr-mgmt-content-repository-context.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'atomikosTransactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [/usr/local/apache-tomcat-8.0.29/webapps/ROOT/WEB-INF/classes/spring/service/mgmt-content-repository-context.xml]: Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: UserTransactionServiceImp: property not defined: com.atomikos.icatch.service
repository-configuration.json :
{
"name" : "sample",
"jndiName" : "",
"monitoring" : {
"enabled" : true
},
"storage" : {
"transactionManagerLookup" : {
"name" : "com.abc.mgmt.modeshape.
jcr.AtomikosTransactionManagerLookup"
},
"binaryStorage" : {
"type" : "file",
"directory": "${java.io.tmpdir}/modeshape_spring_sample/binaries",
"minimumBinarySizeInBytes" : 40
}
},
"workspaces" : {
"default" : "default",
"allowCreation" : true
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
}
}
}What should I do ?