[syncope-dev] Issue 172 in syncope: Create user without resource - NullPointerException

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[syncope-dev] Issue 172 in syncope: Create user without resource - NullPointerException

syncope
Status: New
Owner: [hidden email]
Labels: Type-Defect Priority-Medium Source-trunk Component-Logic

New issue 172 by [hidden email]: Create user without resource -  
NullPointerException
http://code.google.com/p/syncope/issues/detail?id=172

Make the following steps:

1. Checkout Syncope Project from svn
2. Insert content.xml into core/src/test/resources/
3. mvn clean install -DskipTests
4. cd core
5. mvn -P dev
6. curl -v -u admin:password -H "Content-Type: application/json" --data  
@/tmp/new_user.txt http://localhost:9080/syncope/rest/user/create.json

What is the expected output?

The creation of a new user

What do you see instead?

Oct 7, 2011 9:55:42 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [syncope-core-rest] in context with  
path [/syncope] threw exception [Request processing failed; nested  
exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
        at java.util.regex.Matcher.reset(Matcher.java:291)
        at java.util.regex.Matcher.<init>(Matcher.java:211)
        at java.util.regex.Pattern.matcher(Pattern.java:888)
        at  
org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.replaceVariables(ResourceBundleMessageInterpolator.java:188)
        at  
org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.interpolateMessage(ResourceBundleMessageInterpolator.java:148)
        at  
org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.interpolate(ResourceBundleMessageInterpolator.java:112)
        at  
org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator.interpolate(LocaleContextMessageInterpolator.java:49)
        at  
org.hibernate.validator.engine.StandardValidationContext.createConstraintViolation(StandardValidationContext.java:49)
        at  
org.hibernate.validator.engine.ValidationContext.createConstraintViolations(ValidationContext.java:196)
        at  
org.hibernate.validator.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:286)
        at  
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:153)
        at  
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:117)
        at  
org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:84)
        at  
org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:452)
        at  
org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:397)
        at  
org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:361)
        at  
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:313)
        at  
org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139)
        at  
org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:145)
        at  
org.syncope.core.persistence.validation.entity.EntityValidationInterceptor.save(EntityValidationInterceptor.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at  
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at  
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at  
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at  
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at  
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy103.save(Unknown Source)
        at org.syncope.core.rest.controller.UserManager.create(UserManager.java:88)
        at  
org.syncope.core.workflow.NoOpUserWorkflowAdapter.create(NoOpUserWorkflowAdapter.java:56)
        at  
org.syncope.core.rest.controller.UserController.create(UserController.java:264)
        at  
org.syncope.core.rest.controller.UserController$$FastClassByCGLIB$$185da3bf.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at  
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
        at  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at  
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:67)
        at  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at  
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at  
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
        at  
org.syncope.core.rest.controller.UserController$$EnhancerByCGLIB$$e55b828a_2.create(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at  
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        at  
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
        at  
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
        at  
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
        at  
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at  
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
        at  
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
        at  
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        at  
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
        at  
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        at  
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
        at  
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at  
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at  
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
        at  
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at  
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at  
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
        at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at  
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
        at  
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
        at  
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
        at  
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)




Reply | Threaded
Open this post in threaded view
|

[syncope-dev] Re: Issue 172 in syncope: Create user without resource - NullPointerException

syncope

Comment #1 on issue 172 by [hidden email]: Create user without  
resource - NullPointerException
http://code.google.com/p/syncope/issues/detail?id=172

Forgot attchments

Attachments:
        new_user.txt  267 bytes
        content.xml  64.5 KB

Reply | Threaded
Open this post in threaded view
|

[syncope-dev] Re: Issue 172 in syncope: Create user without resource - NullPointerException

syncope

Comment #2 on issue 172 by [hidden email]: Create user without  
resource - NullPointerException
http://code.google.com/p/syncope/issues/detail?id=172

The problem does not happen if you define a password policy in the console.

Reply | Threaded
Open this post in threaded view
|

[syncope-dev] Re: Issue 172 in syncope: Create user without resource - NullPointerException

syncope
Updates:
        Status: Started
        Owner: [hidden email]

Comment #3 on issue 172 by [hidden email]: Create user without  
resource - NullPointerException
http://code.google.com/p/syncope/issues/detail?id=172

(No comment was entered for this change.)

Reply | Threaded
Open this post in threaded view
|

[syncope-dev] Re: Issue 172 in syncope: Create user without resource - NullPointerException

syncope
Updates:
        Status: Fixed

Comment #4 on issue 172 by [hidden email]: Create user without  
resource - NullPointerException
http://code.google.com/p/syncope/issues/detail?id=172

This issue was closed by revision r1181.