2014年5月22日星期四

When SSI practice , Action error , we seek to help the younger look

error message :
message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
com.action.action.execute (action.java: 29)
sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
java.lang.reflect.Method.invoke (Method.java: 597)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction (DefaultActionInvocation.java: 441)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (DefaultActionInvocation.java: 280)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 243)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (DefaultWorkflowInterceptor.java: 165)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (ValidationInterceptor.java: 252)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (AnnotationValidationInterceptor.java: 68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java: 122)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java: 195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java: 195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java: 179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept (MultiselectInterceptor.java: 75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java: 94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept (FileUploadInterceptor.java: 235)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (ModelDrivenInterceptor.java: 89)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (ScopedModelDrivenInterceptor.java: 130)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (DebuggingInterceptor.java: 267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (ChainingInterceptor.java: 126)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (PrepareInterceptor.java: 138)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (I18nInterceptor.java: 165)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (ServletConfigInterceptor.java: 164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (AliasInterceptor.java: 179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (ExceptionMappingInterceptor.java: 176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 237)
org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java: 52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java: 488)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java: 395)

Action Code:
private IssiService IssiService;

public IssiService getIssiService () {
return IssiService;
}

public void setIssiService (IssiService issiService) {
IssiService = issiService;
}
public String execute () throws Exception {
String c = IssiService.test ();
if (c! = null) {
System.out.println (c);
}
else {
System.out.println (" the result is empty ! " ) ;

}
There test () method in the service and dao , returns a character . When
debug: Display String c = IssiService.test (); IssiService is NULL

------ Solution ------------------------------------ --------
IssiService spring is not configured right.
------ Solution ---------------------------------------- ----
IssiService not inject Well , the test for the null test is certainly a call reporting a null pointer.
------ Solution ---------------------------------------- ----
null, null pointer ;
------ Solution ---------------------------- ----------------
check spring for this action , there is no injection IssiService
------ Solution ---------- ----------------------------------
IssiService object is not configured inject it.
------ Solution ---------------------------------------- ----

  
In the spring has injected over  
This configuration is only instantiated ssiService, and is not injected into action , that is private IssiService IssiService not been assigned .
you add @ Atutowired try
------ Solution in this sentence above ------------------------ --------------------

  
injected ah   
See # 6L  

    
    
In the spring has injected over          
This configuration is only instantiated ssiService, and is not injected into action , that is private IssiService IssiService not been assigned .   @
you try to add a sentence in the above Atutowired  
worse line configuration, it should IssiService ACTION instance injected into the action of IssiService this property up .
------ Solution ---------------------------------------- ----
you depends on your configuration, you configure the LssiService not . No configuration is a null pointer
------ Solution ---------------------------------- ----------
above wrong @ Autowired; I do not know with spring struts integration time is how to add annotations , but the problem should be identified
------ For reference only ---------------------------------------


In the spring is so configured , do not know right




classpath: application.properties





















<-! cited sqlMapConfig ->









->

<-! business Bean Configuration - >







------ For reference only ----------------------------- ----------


injected ah
See # 6L
------ For reference only ------------------------------- --------


In the spring has injected over
------ For reference only ---------------------------- -----------
thank you greatly, I found
public void setIssiService (IssiService issiService) {
IssiService = issiService;
}
less of this, plus normal after the operation.
sprinkle of it!
------ For reference only -------------------------------------- -

whoops feed ;
------ For reference only ---------------------------------------

whoops feed ;      This Whoops Hey, let me not sure ah
------ For reference only ------------------------------------ ---

whoops feed ;                This Whoops Hey, let me not sure ah  
Welcome to the Java version , Java version you are welcome ;
------ For reference only ---------------------------------------
sent me to you this item I also need ah ! Just learning ibatis mail liyanfenking@sina.com beg ah !

没有评论:

发表评论