Hello,
i have a problem integrating spring-data and neo4j i did'nt have before:
every startup of the system i get this error i don't know where does it comes from, does anybody have any idea?
"java.lang.IllegalStateException: Unable to lock store [....\heroku\stark-spring-4279\target\db\graph\neostore], this is usually a result of some other Neo4j kernel running using the same store."
I don't have any other process using this store and what i do i only startup the application.
i attach my relevant informations:
from pom.xml
<properties>
<org.springframework.version>3.1.1.RELEASE</org.springframework.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.jsimone</groupId>
<artifactId>webapp-runner</artifactId>
<version>7.0.22.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j-rest</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
<type>jar</type>
</dependency>
</dependencies>
my AppllicationContext
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schem...ng-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schem...spring-mvc.xsd
http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd">
<context:annotation-config/>
<context:spring-configured />
<context:component-scan base-package="com.example.controller"/>
<!-- <context:component-scan base-package="com.example.controller">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Control ler" />
</context:component-scan>-->
<mvc:annotation-driven/>
<mvc:resources mapping="/images/**" location="/images/"/>
<mvc:resources mapping="/resources/**" location="/resources/"/>
<mvc:resources mapping="/favicon.ico" location="/images/favicon.ico"/>
<tx:annotation-driven/>
<neo4j:repositories base-package="com.example.service" />
<bean id="jspViewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlVi ew" />
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- <bean id="findtoothUserDetailsService" class="com.example.service.UserRepositoryImpl"/>-->
<beans profile="default">
<neo4j:config storeDirectory="target/db/graph"/>
</beans>
<beans profile="prod">
<bean class="org.springframework.data.neo4j.rest.SpringR estGraphDatabase" id="graphDatabaseService">
<constructor-arg index="0" value="#{systemEnvironment['NEO4J_REST_URL']}"/>
<constructor-arg index="1" value="#{systemEnvironment['NEO4J_LOGIN']}"/>
<constructor-arg index="2" value="#{systemEnvironment['NEO4J_PASSWORD']}"/>
</bean>
<neo4j:config graphDatabaseService="graphDatabaseService"/>
</beans>
</beans>
my security.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<global-method-security pre-post-annotations="enabled">
<!-- AspectJ pointcut expression that locates our "post" method and applies security that way
<protect-pointcut expression="execution(* bigbank.*Service.post*(..))" access="ROLE_TELLER"/>
-->
</global-method-security>
<http pattern="/resources/**" security="none" />
<http pattern="/images/**" security="none" />
<http pattern="/css/**" security="none" />
<http pattern="/login" security="none" />
<http auto-config="true" use-expressions="false">
<intercept-url pattern="/**" access="ROLE_USER" />
<intercept-url pattern="/user/*" access="ROLE_USER"/>
<intercept-url pattern="/populate/**" access="ROLE_ADMIN" />
<intercept-url pattern="/auth/login" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/auth/register" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<form-login login-page="/login" default-target-url="/user" authentication-failure-url="/auth/login?login_error=true"/>
</http>
<authentication-manager>
<!-- <authentication-provider user-service-ref="findtoothUserDetailsService">
<password-encoder hash="md5">
<salt-source system-wide="cewuiqwzie"/>
</password-encoder>
</authentication-provider>-->
<authentication-provider>
<password-encoder hash="md5"/>
<user-service>
<user name="rod" password="pwd" authorities="ROLE_ADMIN, ROLE_USER, ROLE_TELLER" />
<user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" />
<user name="scott" password="pwd" authorities="ROLE_USER" />
<user name="peter" password="pwd" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>
this is the entire stack trace
INFO: Initializing Spring FrameworkServlet 'spring'
org.neo4j.graphdb.TransactionFailureException: Could not create data source [nioneodb], see nested exception for cause of error
at org.neo4j.kernel.impl.transaction.TxModule.registe rDataSource(TxModule.java:161)
at org.neo4j.kernel.GraphDbInstance.start(GraphDbInst ance.java:104)
at org.neo4j.kernel.EmbeddedGraphDbImpl.<init>(Embedd edGraphDbImpl.java:190)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(Embe ddedGraphDatabase.java:77)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(Embe ddedGraphDatabase.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:147)
at ....
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Unable to lock store [....\houla\heroku\stark-spring-4279\target\db\graph\neostore], this is usually a result of some oth
er Neo4j kernel running using the same store.
...
16-mag-2012 14.45.17 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
.......
thank you for any help


Reply With Quote
