-
Bug
-
Resolution: Done
-
Major
-
3.6.0.Final
-
None
When I try to add a new nodetype with for example the type as LONG, I try to add another property definition with constraints. But now I add this constraint as a non-long type (f.e. a simple string like 'hello'). I expected to receive an exception.
However the registration succeeds (validation?) and now I try to unregister the node type, or any other JCR action, Modeshape completely blocks due to the NumberFormatException. I believe the registration of the node type should fail.
java.lang.NumberFormatException: For input string: "fqdsf" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:410) at java.lang.Long.parseLong(Long.java:468) at org.modeshape.jcr.JcrPropertyDefinition$LongConstraintChecker.parseValue(JcrPropertyDefinition.java:846) at org.modeshape.jcr.JcrPropertyDefinition$LongConstraintChecker.parseValue(JcrPropertyDefinition.java:826) at org.modeshape.jcr.JcrPropertyDefinition$RangeConstraintChecker.parseValueConstraint(JcrPropertyDefinition.java:692) at org.modeshape.jcr.JcrPropertyDefinition$RangeConstraintChecker.<init>(JcrPropertyDefinition.java:620) at org.modeshape.jcr.JcrPropertyDefinition$LongConstraintChecker.<init>(JcrPropertyDefinition.java:831) at org.modeshape.jcr.JcrPropertyDefinition.createChecker(JcrPropertyDefinition.java:470) at org.modeshape.jcr.JcrPropertyDefinition.getMinimumValue(JcrPropertyDefinition.java:332) at org.modeshape.jcr.NodeTypeSchemata.addAllNodesTable(NodeTypeSchemata.java:230) at org.modeshape.jcr.NodeTypeSchemata.<init>(NodeTypeSchemata.java:138) at org.modeshape.jcr.RepositoryNodeTypeManager.getRepositorySchemata(RepositoryNodeTypeManager.java:293) at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.indexingMonitor(JcrRepository.java:1917) at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.createMonitor(JcrRepository.java:1912) at org.modeshape.jcr.txn.Transactions.newMonitor(Transactions.java:243) at org.modeshape.jcr.txn.SynchronizedTransactions$SynchronizedTransaction.<init>(SynchronizedTransactions.java:165) at org.modeshape.jcr.txn.SynchronizedTransactions.begin(SynchronizedTransactions.java:77) at org.modeshape.jcr.cache.RepositoryCache.runInTransaction(RepositoryCache.java:468) at org.modeshape.jcr.cache.RepositoryCache.workspace(RepositoryCache.java:836) at org.modeshape.jcr.cache.RepositoryCache.getWorkspaceCache(RepositoryCache.java:1047) at org.modeshape.jcr.JcrSession.<init>(JcrSession.java:180) at org.modeshape.jcr.JcrXaSession.<init>(JcrXaSession.java:49) at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:693) at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:155) at be.admb.jcr.modeshape.manager.jcr.impl.JcrSessionFactory.getSession(JcrSessionFactory.java:77) at be.admb.jcr.modeshape.manager.jcr.util.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:77) at be.admb.jcr.modeshape.manager.jcr.util.SessionFactoryUtils.getSession(SessionFactoryUtils.java:109) at be.admb.jcr.modeshape.manager.jcr.impl.JcrTemplate.execute(JcrTemplate.java:77) at be.admb.jcr.modeshape.manager.dao.impl.JcrDaoImpl.getCompleteNode(JcrDaoImpl.java:77) at be.admb.jcr.modeshape.manager.service.impl.JcrServiceImpl.getNode(JcrServiceImpl.java:67)
I believe this issue is not only applied on the LONG type but also other types. I think the validation is the issue.
A data wipe is neccesary to let Modeshape run again.
Reproducible log and error in unit test using file system, directory gets cleaned up after every tearDown.