You need to add a filter to the class to filter out the many-to-many and many-to-one relationships in the hibernate configuration file.
Jsonconfig Config = new jsonconfig ();
Config. setjsonpropertyfilter (New propertyfilter (){
Public Boolean apply (Object source, string name, object Value ){
If (name. Equals ("emistpersonorgs ")){
Return true;
} Else {
Return false;
}
}
});
Jsonobject JSON = jsonobject. fromobject (reader, config );
This problem also involves the following exceptions:
15:24:25 org. Apache. Catalina. Core. standardwrappervalve invoke
Severe: servlet. Service () for servlet action threw exception
Java. Lang. abstractmethoderror: Oracle. JDBC. Driver. t4cconnection. getclientinfo () ljava/util/properties;
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. logicalcobwebs. proxool. proxyconnection. Invoke (proxyconnection. Java: 68)
At org. logicalcobwebs. cglib. Proxy. Proxy $ proxyimpl $ enhancerbycglib $ b7939e3d. getclientinfo (<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. Apache. commons. beanutils. propertyutilsbean. invokemethod (propertyutilsbean. Java: 2155)
At org. Apache. commons. beanutils. propertyutilsbean. getsimpleproperty (propertyutilsbean. Java: 1323)
At org. Apache. commons. beanutils. propertyutilsbean. getnestedproperty (propertyutilsbean. Java: 762)
At org. Apache. commons. beanutils. propertyutilsbean. getproperty (propertyutilsbean. Java: 837)
At org. Apache. commons. beanutils. propertyutils. getproperty (propertyutils. Java: 426)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 918)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 265)
At net. SF. JSON. jsonarray. _ processvalue (jsonarray. Java: 2514)
At net. SF. JSON. jsonarray. processvalue (jsonarray. Java: 2539)
At net. SF. JSON. jsonarray. addvalue (jsonarray. Java: 2526)
At net. SF. JSON. jsonarray. _ fromarray (jsonarray. Java: 982)
At net. SF. JSON. jsonarray. fromobject (jsonarray. Java: 133)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 237)
At net. SF. JSON. jsonarray. _ processvalue (jsonarray. Java: 2514)
At net. SF. JSON. jsonarray. processvalue (jsonarray. Java: 2539)
At net. SF. JSON. jsonarray. addvalue (jsonarray. Java: 2526)
At net. SF. JSON. jsonarray. _ fromcollection (jsonarray. Java: 1057)
At net. SF. JSON. jsonarray. fromobject (jsonarray. Java: 123)
At net. SF. JSON. abstractjson. _ processvalue (abstractjson. Java: 237)
At net. SF. JSON. jsonobject. _ processvalue (jsonobject. Java: 2808)
At net. SF. JSON. jsonobject. processvalue (jsonobject. Java: 2874)
At net. SF. JSON. jsonobject. setinternal (fig. Java: 2889)
At net. SF. JSON. jsonobject. setvalue (jsonobject. Java: 1577)
At net. SF. JSON. jsonobject. _ frombean (jsonobject. Java: 934)
At net. SF. JSON. jsonobject. fromobject (jsonobject. Java: 168)
At cn.gov. cepb. EMIS. emcase. Struts. casetask. casetaskaction. getpersonlist (casetaskaction. Java: 109)
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. Apache. Struts. Actions. dispatchaction. dispatchmethod (dispatchaction. Java: 269)
At org.apache.struts.actions.dispatchaction.exe cute (dispatchaction. Java: 170)
At org. Apache. Struts. Action. requestprocessor. processactionperform (requestprocessor. Java: 425)
At org. Apache. Struts. Action. requestprocessor. Process (requestprocessor. Java: 228)
At org. Apache. Struts. Action. actionservlet. Process (actionservlet. Java: 1913)
At org. Apache. Struts. Action. actionservlet. dopost (actionservlet. Java: 462)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 637)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 717)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. springframework. Web. Filter. characterencodingfilter. dofilterinternal (characterencodingfilter. Java: 96)
At org. springframework. Web. Filter. onceperrequestfilter. dofilter (onceperrequestfilter. Java: 76)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 378)
At org. springframework. Security. Intercept. Web. filtersecurityinterceptor. Invoke (filtersecurityinterceptor. Java: 99)
At org. springframework. Security. Intercept. Web. filtersecurityinterceptor. dofilter (filtersecurityinterceptor. Java: 83)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. Intercept. Web. filtersecurityinterceptor. Invoke (filtersecurityinterceptor. Java: 109)
At org. springframework. Security. Intercept. Web. filtersecurityinterceptor. dofilter (filtersecurityinterceptor. Java: 83)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. sessionfixationprotectionfilter. dofilterhttp (sessionfixationprotectionfilter. Java: 67)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. exceptiontranslationfilter. dofilterhttp (exceptiontranslationfilter. Java: 101)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. providers. Anonymous. anonymouspusprocessingfilter. dofilterhttp (anonymousprocessingfilter. Java: 105)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. rememberme. remembermeprocessingfilter. dofilterhttp (remembermeprocessingfilter. Java: 116)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. wrapper. securitycontextholderawarerequestfilter. dofilterhttp (securitycontextholderawarerequestfilter. Java: 91)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. basicauth. basicprocessingfilter. dofilterhttp (basicprocessingfilter. Java: 174)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. abstractprocessingfilter. dofilterhttp (abstractprocessingfilter. Java: 277)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. UI. logout. logoutfilter. dofilterhttp (logoutfilter. Java: 89)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. Context. httpsessioncontextintegrationfilter. dofilterhttp (httpsessioncontextintegrationfilter. Java: 235)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. Concurrent. concurrentsessionfilter. dofilterhttp (concurrentsessionfilter. Java: 99)
At org. springframework. Security. UI. springsecurityfilter. dofilter (springsecurityfilter. Java: 53)
At org. springframework. Security. util. filterchainproxy $ virtualfilterchain. dofilter (filterchainproxy. Java: 390)
At org. springframework. Security. util. filterchainproxy. dofilter (filterchainproxy. Java: 175)
At org. springframework. Web. Filter. delegatingfilterproxy. invokedelegate (delegatingfilterproxy. Java: 236)
At org. springframework. Web. Filter. delegatingfilterproxy. dofilter (delegatingfilterproxy. Java: 167)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. springframework. Orm. hibernate3.support. opensessioninviewfilter. dofilterinternal (opensessioninviewfilter. Java: 198)
At org. springframework. Web. Filter. onceperrequestfilter. dofilter (onceperrequestfilter. Java: 76)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 191)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 286)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 845)
At org. Apache. Coyote. http11.http11protocol $ http11connectionhandler. Process (http11protocol. Java: 583)
At org.apache.tomcat.util.net. jioendpoint $ worker. Run (jioendpoint. Java: 447)
At java. Lang. thread. Run (thread. Java: 619)
I checked this issue on the Internet. Many people say it is an oracle-driven problem. The exception I encountered was that other object relationships in the object were not filtered out during JSON filtering, therefore, an exception is thrown.