我的系统里用hibernate +spring +struts2 +json 报以下的错,找了一天没有找出来 郁闷了 希望各位大虾帮忙指点一下
javax.servlet.ServletException: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: java.lang.IllegalAccessException: Class com.googlecode.jsonplugin.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)root cause
com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: java.lang.IllegalAccessException: Class com.googlecode.jsonplugin.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"
com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:206)
com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:143)
com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:113)
com.googlecode.jsonplugin.JSONWriter.write(JSONWriter.java:81)
com.googlecode.jsonplugin.JSONUtil.serialize(JSONUtil.java:62)
com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:118)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
javax.servlet.ServletException: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: java.lang.IllegalAccessException: Class com.googlecode.jsonplugin.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)root cause
com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: com.googlecode.jsonplugin.JSONExeption: java.lang.IllegalAccessException: Class com.googlecode.jsonplugin.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"
com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:206)
com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:143)
com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:113)
com.googlecode.jsonplugin.JSONWriter.write(JSONWriter.java:81)
com.googlecode.jsonplugin.JSONUtil.serialize(JSONUtil.java:62)
com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:118)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
解决方案 »
- java自动画线段,关于sleep
- 关于IBM 和金蝶MQ 的问题
- equals如何判断长字符串相等
- 读取CAD图数据!
- jsp高手帮忙啊
- 紧急求助:AXIS+Weblogic6.1+Jbuilder9开发WebService报错
- struct 中 一个表单里 如何提交到多个action
- 字符串的替换问题, 请帮忙!
- 什么时候用web 层的HttpSession保持会话状态,什么时候用有状态的会话bean保持会话状态?
- 求助!JAVA编程在WEB上"立方体旋转"程序???
- 请教一下为什么我把项目加入到SVN上时,总提示svn 提交 99%,然后N久没有反映,CPU占用率100% ?
- Exception in thread "main" org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not al
<result type="json"></result>
<struts>
<package name="json-default" extends="struts-default">
<result-types>
<result-type name="json" class="com.googlecode.jsonplugin.JSONResult"/>
</result-types>
<interceptors>
<interceptor name="json" class="com.googlecode.jsonplugin.JSONInterceptor"/>
</interceptors>
</package>
</struts>
,应该没什么错吧
<struts>
<include file="struts-default.xml"/>
<package name="com.json" extends="json-default" namespace="/jsp/fangtan">
<action name="fangtanroomJson" class="com.founder.edu.action.FangtanroomJson">
<result type="json"/>
</action>
</package> </struts>