I want to remove the flash object from the session in Grails Application. I am doing with
session.removeAttribute('org.codehaus.groovy.grails.FLASH_SCOPE')
in the filter but it is throwing the following error:
com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: org.codehaus.groovy.grails.web.servlet.GrailsFlashScope
java.util.concurrent.ExecutionException: com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: org.codehaus.groovy.grails.web.servlet.GrailsFlashScope
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_51]
at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_51]
Is there any way better solution for removing the flash object from session?
Related
I'm getting a NullPointerException in Hashtable when calling WSDLToJava after upgrading to CXF 3.4.1.
Full stack trace:
org.apache.cxf.tools.common.ToolException: Tools can not load the frontend plugin class org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AntGenerator
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndGenerators(PluginLoader.java:275)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndProfile(PluginLoader.java:385)
at org.apache.cxf.tools.wsdlto.WSDLToJava.loadFrontEnd(WSDLToJava.java:64)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:96)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
... 19 more
Caused by: org.apache.cxf.tools.common.ToolException: Failed to initialize velocity engine
at org.apache.cxf.tools.common.VelocityGenerator.initVelocity(VelocityGenerator.java:91)
at org.apache.cxf.tools.common.VelocityGenerator.<init>(VelocityGenerator.java:53)
at org.apache.cxf.tools.wsdlto.core.AbstractGenerator.<init>(AbstractGenerator.java:47)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AbstractJAXWSGenerator.<init>(AbstractJAXWSGenerator.java:30)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AntGenerator.<init>(AntGenerator.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndGenerators(PluginLoader.java:270)
... 24 more
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:460)
at org.apache.commons.collections.ExtendedProperties.addPropertyInternal(ExtendedProperties.java:723)
at org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProperties.java:671)
at org.apache.commons.collections.ExtendedProperties.setProperty(ExtendedProperties.java:737)
at org.apache.commons.collections.ExtendedProperties.convertProperties(ExtendedProperties.java:1693)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:645)
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:226)
at org.apache.velocity.app.Velocity.init(Velocity.java:97)
at org.apache.cxf.tools.common.VelocityGenerator.initVelocity(VelocityGenerator.java:87)
... 34 more
What's wrong? How can I fix this?
AbstractGenerator calls VelocityGenerator(false) which sets the field log to false.
The code in initVelocity() will then create an instance of org.slf4j.helpers.NOPLogger (if it can) and put that into the Properties instance.
Eventually, org.apache.commons.collections.ExtendedProperties.convertProperties(Properties) will be called. This line
c.setProperty(s, props.getProperty(s));
results in call to Hashtable.put(s, null) because Properties.getProperty() will return null for non-String elements in the map like the NOPLogger instance.
The culprit is that you have two implementations of Velocity on the classpath. One has version 1.x with the coordinate org.apache.velocity:velocity and one org.apache.velocity:velocity-engine-core with version 2.2.
Exclude the dependency to Velocity 1.x to fix this error. Velocity 2.x uses ExtProperties instead of ExtendedProperties which contains a patch for this bug.
I have moved to Neo4j 3.1.2 and already a few times I have encountered the following database issue with no any changes in my application:
Caused by: java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89)
at org.neo4j.ogm.autoindex.AutoIndexManager.assertIndexes(AutoIndexManager.java:170)
at org.neo4j.ogm.autoindex.AutoIndexManager.build(AutoIndexManager.java:92)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:45)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:62)
at com.example.domain.api.configuration.Neo4jConfig.sessionFactory(Neo4jConfig.java:26)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91.CGLIB$sessionFactory$0(<generated>)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91$$FastClassBySpringCGLIB$$8bc180c.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91.sessionFactory(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 131 common frames omitted
What can be a reason of this ?
UPDATED
This is my Neo4j database logs
Oh, this time this was caused by a known (although considered very rare) issue:
org.neo4j.graphdb.TransactionFailureException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:181)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:578)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:383)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.beginTransaction(TransactionStateMachineSPI.java:95)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:184)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:77)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:396)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:196)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:80)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.execute(RunnableBoltWorker.java:135)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run(RunnableBoltWorker.java:89)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.neo4j.kernel.api.exceptions.TransactionFailureException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at sun.reflect.GeneratedConstructorAccessor46.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.neo4j.kernel.internal.DatabaseHealth.assertHealthy(DatabaseHealth.java:62)
at org.neo4j.kernel.impl.api.Kernel.newTransaction(Kernel.java:99)
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:173)
... 11 more
Caused by: java.lang.IllegalStateException: Concurrent drop() while updates have not completed
at org.neo4j.kernel.impl.api.index.ContractCheckingIndexProxy.ensureNoOpenCalls(ContractCheckingIndexProxy.java:187)
at org.neo4j.kernel.impl.api.index.ContractCheckingIndexProxy.drop(ContractCheckingIndexProxy.java:144)
at org.neo4j.kernel.impl.api.index.IndexingService.dropIndex(IndexingService.java:611)
at org.neo4j.kernel.impl.transaction.command.IndexBatchTransactionApplier$SingleTransactionApplier.visitSchemaRuleCommand(IndexBatchTransactionApplier.java:248)
at org.neo4j.kernel.impl.transaction.command.Command$SchemaRuleCommand.handle(Command.java:645)
at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:61)
at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:35)
at org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:69)
at org.neo4j.kernel.impl.api.TransactionToApply.accept(TransactionToApply.java:111)
at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:349)
at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.applyToStore(TransactionRepresentationCommitProcess.java:78)
at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.commit(TransactionRepresentationCommitProcess.java:51)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.commit(KernelTransactionImplementation.java:608)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.closeTransaction(KernelTransactionImplementation.java:484)
at org.neo4j.kernel.api.KernelTransaction.close(KernelTransaction.java:135)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.closeTransaction(TransactionStateMachine.java:325)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$2.run(TransactionStateMachine.java:229)
... 7 more
Ideally it will be fixed soon. And I'm not sure how to get out of it w/o restarting server.
I am trying to migrate an old grails app to grails 3. I am using grails 3.0.10. I was using the rendering plugin in my old app to generate PDFs and have a bunch of PDFs built this way which I would like to keep intact, so I'm trying to get this rendering plugin installed in my grails 3 app. As suggested, I have added the following line to my build.gradle under the dependencies:
compile "org.grails.plugins:rendering:2.0.0-SNAPSHOT"
This seems to correctly pull this plugin .jar file and the run-app works. However, when I try to render a gsp as a PDF through my controller I'm getting a NullPointerException that is being thrown by some code in the rendering plugin.
Here's my code to generate a PDF from a controller method:
renderPdf(template: "/pdfs/test", model: [name : 'Amarish'], filename: 'Hello-There.pdf')
Since the above did not work, I also tried it separately a different way by including the pdfRenderingService in the controller through dependency injection and then tried the following:
ByteArrayOutputStream bytes = pdfRenderingService.render(template: "/pdfs/test", model: [name: 'Amarish'])
response.setContentLength(bytes.length)
response.setContentType('application/pdf')
response.outputStream.write(bytes)
I am including the stack trace below. Can you please let me know how I could correct this issue?
ERROR org.grails.web.errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [GET] /test/testPDF
Stacktrace follows:
java.lang.reflect.InvocationTargetException: null
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.lang.NullPointerException: null
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1281) ~[na:1.7.0_79]
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1141) ~[na:1.7.0_79]
at java.beans.Introspector.getBeanInfo(Introspector.java:416) ~[na:1.7.0_79]
at java.beans.Introspector.getBeanInfo(Introspector.java:163) ~[na:1.7.0_79]
at grails.plugins.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:31) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:68) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:60) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:65) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:35) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:36) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:35) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:65) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at grails.plugins.rendering.RenderingTrait$Trait$Helper.renderPdf(RenderingTrait.groovy:47) ~[rendering-2.0.0-SNAPSHOT.jar:na]
at com.svp.controller.TestController$_closure1.doCall(TestController.groovy:14) ~[main/:na]
... 3 common frames omitted
What you need in your build.gradle dependencies is
runtime "org.springframework:spring-test:4.2.1.RELEASE"
and your code will just work just fine. Good luck!
You can also add the latest version from here
I am trying to use Jackson 2.x annotations on a Spring Data Neo4j 4.0.0RC1 entity but am seeing failures in my application context starting. I have two #NodeEntities that implement an interface and I've annotated the interface as such:
#JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
#JsonSubTypes({
#Type(value = SimpleNode.class, name="simple"),
#Type(value = OtherNode.class, name="other")
})
public interface Node {
}
I believe this is correct usage but when I start my application, the Spring context fails to load due to a problem creating the Neo4j session factory.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getSessionFactory' defined in class path resource [com/example/TestApplication$Neo4jConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.ClassFormatError: Invalid annotation element type tag: 0x0
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.getSessionFactory(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at org.springframework.data.neo4j.config.Neo4jConfiguration.getSession(Neo4jConfiguration.java:49) ~[spring-data-neo4j-4.0.0.RC1.jar:na]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.CGLIB$getSession$12(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5$$FastClassBySpringCGLIB$$a7919784.invoke(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.getSession(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 94 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.ClassFormatError: Invalid annotation element type tag: 0x0
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 115 common frames omitted
When playing around with my config I was able to determine that the OGM code (version 1.1.0) seems to choke on the #JsonSubTypes. This error also occurs if I replace my interface with an abstract class. Lastly, I noticed in org.neo4j.ogm.metadata.info.AnnotationsInfo constructor (line 89) that there is a TODO that says // todo: maybe register just the annotations we're interested in.
My questions are:
Is there an elegant workaround? I'm of the opinion that polymorphic deserialization is not an entirely uncommon use case?
Is my usage of the Jackson annotations correct?
This is most likely the issue fixed in https://jira.spring.io/browse/DATAGRAPH-674
It'll be available in neo4j-ogm 1.1.1 but till that's released, you can use a snapshot version 1.1.1-SNAPSHOT
You'll need to also include the snapshot repository-
<repository>
<id>neo4j-snapshots</id>
<url>http://m2.neo4j.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
i'm trying to open a neo4j database by using blueprints implementation, but i got the following exceptions:
Neo4jGraph graph = new Neo4jGraph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db");
this cause
Caused by: javax.faces.el.EvaluationException: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
... 32 more
Caused by: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:165)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:135)
at org.pipe.java.web.netnografica.persistenza.graphdb.DAONodo.toGraphml(DAONodo.java:204)
at org.pipe.java.web.netnografica.controllo.ControlloGenerale.esportaGraphml(ControlloGenerale.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 33 more
Caused by: java.lang.IllegalArgumentException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:782)
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:702)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:215)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:189)
at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50)
at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:339)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:253)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:155)
... 44 more
there seems to be a need to provide a properties file. Is correct?
*Edited to answer to Michael Hunger:
Well .. I changed the version of blueprints, now is 2.5.0-SNAPSHOT, but nothing changed. So i provided the configs using the map ask asked by the constructor
Map<String, String> configurazione = new HashMap<String, String>();
configurazione.put("neostore.propertystore.db.strings.mapped_memory", "250M");
configurazione.put("neostore.propertystore.db.arrays.mapped_memory", "100M");
configurazione.put("neostore.relationshipstore.db.mapped_memory", "3845M");
configurazione.put("neostore.nodestore.db.mapped_memory", "350M");
configurazione.put("neostore.propertystore.db.mapped_memory", "350M");
configurazione.put("neostore.nodestore.db.mapped_memory", "769M");
Neo4j2Graph grafo = new Neo4j2Graph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db", configurazione);
Now the exception is changed, and i really don't know what is wrong.. I linked in paste bin to report the complete stack.
http://pastebin.com/XpipSysp
at last a NoSuchMethodError is thrown. What am I missing?
Thanks a lot.
Which blueprints version are you using?
Blueprints 2.5-SNAPSHOT is compatible with Neo4j 2.0.0.
Please note there is a separate module for Neo4j 2.0 called blueprints-neo4j2
And the classes are called Neo4j2Graph Neo4j2Vertex etc.
You should also be able to provide config to the Neo4j2Graph.