Hi.

I follow the tutorial instruction to create a web pages by JPA and Struts 2.
I can completed the PersonActionTest.
However, after I login at personList.jsp, the jsp throw a Null Pointer
Exception.
That Exception should be thrown from personManager.getAll() .
After couple days of tries, I still have no idea for how to fix this
problem.
Please give me some instruction to solve this problem.

Thank you.


Regards,
Kevin

The abstract of the exception:
Caused by: java.lang.NullPointerException
        at org.appfuse.dao.jpa.GenericDaoJpa.getAll(GenericDaoJpa.java:59)
        at
org.appfuse.service.impl.GenericManagerImpl.getAll(GenericManagerImpl.java:68)
        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:585)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy43.getAll(Unknown Source)
        at
org.appfuse.tutorial.webapp.action.PersonAction.list(PersonAction.java:22)
        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:585)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)


The applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";
       default-lazy-init="true">

    <!-- Add new DAOs here -->
        <bean id="personDao"
class="org.appfuse.tutorial.dao.jpa.PersonDaoJpa"/>
    <!-- Add new Managers here -->
        <bean id="personManager"
class="org.appfuse.tutorial.service.impl.PersonManagerImpl">
            <constructor-arg ref="personDao"/>
        </bean>
    <!-- Add new Actions here -->
</beans>

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-from-personList.jsp-tp15015765s2369p15015765.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to