On Fri, Apr 3, 2009 at 5:40 PM, Kooper <[email protected]> wrote: > > > > Kooper wrote: >> >> Hi does anyone know what can cause nullpointer exception inside jackrabbit >> framework and how it could be solved? Here is stacktrace: >> java.lang.NullPointerException >> at >> org.apache.jackrabbit.core.value.InternalValue.toString(InternalValue >> .java:531) >> at >> org.apache.jackrabbit.core.nodetype.StringConstraint.check(ValueConst >> raint.java:224) >> at >> org.apache.jackrabbit.core.nodetype.EffectiveNodeType.checkSetPropert >> yValueConstraints(EffectiveNodeType.java:615) >> at >> org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.j >> ava:493) >> at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1060) >> at >> org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846) >> at >> org.apache.jackrabbit.rmi.server.ServerSession.save(ServerSession.jav >> a:210) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >> java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >> sorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) >> at sun.rmi.transport.Transport$1.run(Transport.java:159) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.rmi.transport.Transport.serviceCall(Transport.java:155) >> at >> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:5 >> ... >> >> Thanks for reply in advance. >> > Seems the problem is in > EffectiveNodeType.checkSetPropertyValueConstraintsEffectiveNodeType.java:615) > it checks constraints but if propdef is not mandatory field it could be left > blank but no check for null is presented in the method and then nullpointer > is thrown. May be it could be classified as bug and should be placed to > jira?
in JCR (and jackrabbit of course) a property must always have a non-null value. whether it's mandatory or not doesn't matter in this case. what jackrabbit version are you using? can you provide a simple test case for reproducing this issue? did you perhaps manually edit the custom_nodetypes.xml? cheers stefan > Thanks > > -- > View this message in context: > http://www.nabble.com/NullPointer-in-JackRabbit-InternalValue-class-tp22870428p22871016.html > Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > >
