Liferay com.liferay.portal.kernel.dao.orm.ORMException:java.lang.NullPointerException

时间:2013-07-16 15:47:18

标签: liferay-ide

我在服务器控制台上遇到了错误。我在提交表单后创建了一个表单,告知您的请求已成功处理。打开数据库后未插入数据。任何人都可以解决这个异常吗?

com.liferay.portal.kernel.exception.SystemException:com.liferay.portal.kernel.dao.orm.ORMException:java.lang.NullPointerException     at com.employee.slayer.service.persistence.EMPFinderImpl.insertEmployees(EMPFinderImpl.java:39)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     在org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)     在org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)     在org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)     在com.liferay.portal.dao.shard.ShardAdvice.invokePersistence(ShardAdvice.java:241)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     在org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)     在org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)     在org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)     在org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)     在org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)     在$ Proxy244.insertEmployees(未知来源)     at com.employee.slayer.service.persistence.EMPFinderUtil.insertEmployees(EMPFinderUtil.java:26)     at com.employee.slayer.service.impl.EMPLocalServiceImpl.insertEmployees(EMPLocalServiceImpl.java:48)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     在org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)     在org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)     在org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)     在

1 个答案:

答案 0 :(得分:2)

请检查在EntityFinderImpl类中声明的custom-sql和字符串变量的id名称。如果它不匹配则显示如上所述的错误