Hi Patrik,
The problem is resolved by itself,with the new jar file(as you
suggested).
Thanks
Ravi.P
On Aug 4, 8:08 pm, Patrik Nordwall <
patrik.nordw...@gmail.com> wrote:
> The NPE comes
> from com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:
> 276)
> see source:
http://grepcode.com/file/repo1.maven.org/maven2/org.mongodb/mongo-jav...
>
> Could you try the latest mongo-java-driver. Version 2.5.3
> Something has at least bean changed in that method.
http://grepcode.com/file/repo1.maven.org/maven2/org.mongodb/mongo-jav...
>
> /Patrik
>
>
>
> On Thu, Aug 4, 2011 at 7:48 AM, ravi <
motr...@gmail.com> wrote:
> > Hi,
> > I am using sculptor tool to design my model for MongoDB
> > implementation(Restful API talking to sculptor api for db).My
> > Functional testing executed successfully.However when i run the load
> > testing(by pumping request via my Restful API) i am getting some null
> > pointer exception repeatedly inside the sculptor code.
> > I thorougly checked my part that my handwritten code in the
> > respository implementation will not thru any null pointer
> > exception.Can somebody help me to find out whether this is the problem
> > with any jar issues or i need to do some configuration to tune my
> > sculptor/mongodb configuration for load testing?
>
> > Stack Trace:-
> > ***************
> > 1) 2011-08-02 10:31:25,332 ERROR Exception thrown while trying to
> > handle request
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.UnexpectedRuntimeException[org.fornax.cartridges.sculptor.framework.errorhandling.UnexpectedRuntimeException]:java.lang.NullPointerException
> > at
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.BasicErrorHandlingAdvice.afterThrowing(BasicErrorHandlingAdvice.java:
> > 95)
> > 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.framework.adapter.ThrowsAdviceInterceptor.invokeHandlerMethod(ThrowsAdviceInterceptor.java:
> > 144)
> > at
>
> > org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:
> > 129)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.ServiceContextStoreAdvice.invoke(ServiceContextStoreAdvice.java:
> > 51)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:
> > 89)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:
> > 202)
> > at $Proxy33.findAndModify(Unknown Source)
>
> > Source for findAndModify
> > ************************
> > public Long findAndModify(EntityType entityType) {
>
> > Sequence sequence=super.findByKey(entityType);
> > if(sequence!=null) {
> > if(sequence.getLastEntityId()!=null) {
>
> > sequence.setLastEntityId(sequence.getLastEntityId()+1);
> > }else {
> > sequence.setLastEntityId(1L);
> > }
> > super.save(sequence);
> > return sequence.getLastEntityId();
> > }
> > sequence=new Sequence(entityType);
> > sequence.setLastEntityId(1L);
> > super.save(sequence);
> > return sequence.getLastEntityId();
>
> > }
>
> > 2.a) 2011-08-02 10:31:26,113 ERROR Exception thrown while trying to
> > handle request
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.UnexpectedRuntimeException[org.fornax.cartridges.sculptor.framework.errorhandling.UnexpectedRuntimeException]:java.lang.NullPointerException
> > at
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.BasicErrorHandlingAdvice.afterThrowing(BasicErrorHandlingAdvice.java:
> > 95)
> > 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.framework.adapter.ThrowsAdviceInterceptor.invokeHandlerMethod(ThrowsAdviceInterceptor.java:
> > 144)
> > at
>
> > org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:
> > 129)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.ServiceContextStoreAdvice.invoke(ServiceContextStoreAdvice.java:
> > 51)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:
> > 89)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:
> > 202)
> > at $Proxy13.findApplicationByKey(Unknown Source)
>
> > 2.b) 2011-08-02 10:31:26,508 ERROR
>
> > [org.fornax.cartridges.sculptor.framework.errorhandling.UnexpectedRuntimeException]
> > user-id=tuvista, session-id=TuVistaDao, application-id=Tuvista :
> > java.lang.NullPointerException
> > java.lang.NullPointerException
> > at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:
> > 276)
> > at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:205)
> > at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:
> > 266)
> > at com.mongodb.DBCursor._check(DBCursor.java:309)
> > at com.mongodb.DBCursor._hasNext(DBCursor.java:431)
> > at com.mongodb.DBCursor.hasNext(DBCursor.java:456)
> > at
>
> > org.fornax.cartridges.sculptor.framework.accessimpl.mongodb.MongoDbFindByConditionAccessImpl.performExecute(MongoDbFindByConditionAccessImpl.java:
> > 112)
> > at
>
> > org.fornax.cartridges.sculptor.framework.accessimpl.mongodb.MongoDbAccessBaseWithException.execute(MongoDbAccessBaseWithException.java:
> > 56)
> > at
>
> > org.fornax.cartridges.sculptor.framework.accessimpl.mongodb.MongoDbAccessBase.execute(MongoDbAccessBase.java:
> > 34)
> > at
>
> > com.tuvista.model.repositoryimpl.ApplicationRepositoryBase.findByCondition(ApplicationRepositoryBase.java:
> > 65)
> > at
>
> > com.tuvista.model.repositoryimpl.ApplicationRepositoryImpl.findApplicationByKey(ApplicationRepositoryImpl.java:
> > 24)
> > at
>
> > com.tuvista.model.serviceimpl.ApplicationServiceImpl.findApplicationByKey(ApplicationServiceImpl.java:
> > 33)
> > at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown
> > Source)
> > at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> > 25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
>
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:
> > 309)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:
> > 183)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 150)
> > at
>
> > org.fornax.cartridges.sculptor.framework.accessimpl.mongodb.DbManagerAdvice.invoke(DbManagerAdvice.java:
> > 40)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:
> > 124)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.fornax.cartridges.sculptor.framework.errorhandling.ServiceContextStoreAdvice.invoke(ServiceContextStoreAdvice.java:
> > 51)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:
> > 89)
> > at
>
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:
> > 89)
> > at
>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
> > 172)
> > at
>
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:
> > 202)
> > at $Proxy13.findApplicationByKey(Unknown Source)
>
> > Source for findApplicationByKey
> > *******************************
> > public Application findApplicationByKey(String appKey) {
>
> > List<ConditionalCriteria> condition =
> > ConditionalCriteriaBuilder.criteriaFor(Application.class)
> > .withProperty(ApplicationProperties.appKey()).eq(appKey).build();
> > List<Application> applicationList = findByCondition(condition);
>
> > if(applicationList.isEmpty())
> > {
> > return null;
> > }
> > else
> > {
> > return applicationList.get(0);
> > }
>
> > }- Hide quoted text -
>
> - Show quoted text -