Jboss 7.1.1 final で Web アプリケーションをデプロイしているときに問題に直面しています。展開中に、以下のような多くの警告が表示されます。
12:41:29,961 INFO [org.springframework.web.context.ContextLoader] (MSC service thread 1-6) Root WebApplicationContext: initialization completed in 132 ms
12:41:30,169 WARN [com.opensymphony.xwork2.util.FileManager] (MSC service thread 1-6) Could not create JarEntryRevision for [vfs:/content/Gurukul.war/WEB-INF/lib/struts2-core-2.2.1.1]!: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.6.0_24]
at java.util.zip.ZipFile.<init>(ZipFile.java:131) [rt.jar:1.6.0_24]
at java.util.jar.JarFile.<init>(JarFile.java:150) [rt.jar:1.6.0_24]
at java.util.jar.JarFile.<init>(JarFile.java:114) [rt.jar:1.6.0_24]
at com.opensymphony.xwork2.util.FileManager$JarEntryRevision.build(FileManager.java:307) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:145) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:105) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179) [xwork-core-2.2.1.1.jar:2.2.1.1]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) [xwork-core-2.2.1.1.jar:2.2.1.1]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) [struts2-core-2.2.1.1.jar:2.2.1.1]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415) [struts2-core-2.2.1.1.jar:2.2.1.1]
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) [struts2-core-2.2.1.1.jar:2.2.1.1]
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) [struts2-core-2.2.1.1.jar:2.2.1.1]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
しかし、最終的に戦争が展開され、Jboss 7.1.1 final で URL を開くことができました。しかし、アプリケーションにログインしようとすると、次のエラーが表示されます。
コンソール出力:
12:42:08,199 INFO [com.ericsson.tni.action.AuthorizationAction] Entered login
12:42:08,201 INFO [com.ericsson.tni.action.AuthorizationAction] Authentication Started For User : etapguh
12:42:08,201 INFO [com.ericsson.tni.action.AuthorizationAction] Authentication Result : success
12:42:08,202 INFO [com.ericsson.tni.action.AuthorizationAction] Initiating authorisation :
12:42:08,202 ERROR [stderr] java.lang.NullPointerException
12:42:08,203 ERROR [stderr] at com.ericsson.tni.action.AuthorizationAction.login(AuthorizationAction.java:92)
12:42:08,203 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:42:08,203 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
12:42:08,204 ERROR [stderr] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:42:08,204 ERROR [stderr] at java.lang.reflect.Method.invoke(Method.java:616)
12:42:08,204 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
12:42:08,205 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
12:42:08,205 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
12:42:08,205 ERROR [stderr] at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
12:42:08,206 ERROR [stderr] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
12:42:08,206 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,206 ERROR [stderr] at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
12:42:08,207 ERROR [stderr] at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
12:42:08,207 ERROR [stderr] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
12:42:08,208 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,208 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
12:42:08,208 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,209 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
12:42:08,209 ERROR [stderr] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
12:42:08,209 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,210 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
12:42:08,210 ERROR [stderr] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
12:42:08,210 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,211 ERROR [stderr] at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
12:42:08,211 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,212 ERROR [stderr] at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
12:42:08,212 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,212 ERROR [stderr] at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
12:42:08,213 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,213 ERROR [stderr] at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
12:42:08,213 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,214 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
12:42:08,214 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,215 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
12:42:08,215 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,216 ERROR [stderr] at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
12:42:08,216 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,217 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
12:42:08,217 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,218 ERROR [stderr] at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
12:42:08,218 ERROR [stderr] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
12:42:08,219 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,219 ERROR [stderr] at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
12:42:08,219 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,219 ERROR [stderr] at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
12:42:08,220 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,220 ERROR [stderr] at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
12:42:08,220 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,221 ERROR [stderr] at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
12:42:08,221 ERROR [stderr] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
12:42:08,222 ERROR [stderr] at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
12:42:08,222 ERROR [stderr] at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
12:42:08,222 ERROR [stderr] at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
12:42:08,222 ERROR [stderr] at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
12:42:08,223 ERROR [stderr] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
12:42:08,223 ERROR [stderr] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
12:42:08,224 ERROR [stderr] at com.ericsson.tni.web.interceptor.LoginFilter.doFilter(LoginFilter.java:47)
12:42:08,224 ERROR [stderr] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
12:42:08,224 ERROR [stderr] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
12:42:08,224 ERROR [stderr] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
12:42:08,225 ERROR [stderr] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
12:42:08,225 ERROR [stderr] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
12:42:08,225 ERROR [stderr] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
12:42:08,226 ERROR [stderr] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
12:42:08,226 ERROR [stderr] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:42:08,226 ERROR [stderr] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
12:42:08,227 ERROR [stderr] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
12:42:08,227 ERROR [stderr] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
12:42:08,227 ERROR [stderr] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
12:42:08,227 ERROR [stderr] at java.lang.Thread.run(Thread.java:679)
12:42:08,228 ERROR [com.ericsson.tni.action.AuthorizationAction] null
Tomcat 7 では、同じプロジェクトが問題なく動作します。
コードスニペット:
@Action(TNIBeans.AUTHORIZATION_ACTION)
@Scope(TNIBeans.BEAN_SCOPE)
public class AuthorizationAction extends ActionSupport implements SessionAware,ServletRequestAware {
private InputStream inputStream;
/**
* Logger for this class
*/
private static final Logger logger = Logger
.getLogger(AuthorizationAction.class);
@Autowired
private XStream xstream;
public void logException(String message) {
logger.error(message);
}
public void log(String msg) {
logger.info(msg);
}
HttpServletRequest request = null;
@Autowired
@Qualifier(TNIBeans.EMPLOYEE_SERVICE_IMPL)
private EmployeeService employeeServiceImpl;
@Autowired
@Qualifier(TNIBeans.CODE_SERVICE_IMPL)
private CodeMasterService codeMasterService;
Map<String,Map<String,String>> codeMaster = null;
private String strResult = null;
private static final long serialVersionUID = -8517227229292215672L;
private Map<String, Object> session = null;
private Employee emp = null;
private String userName;
private String password;
private String roles;
private String responseMsg;
public String login () throws Exception {
log("Entered login");
if (logger.isDebugEnabled()) {
logger.debug("execute() - start.....");
}
try {
log("Authentication Started For User : "+userName);
// employeeServiceImpl.authenticate(userName, password);
inputStream = new ByteArrayInputStream("success".getBytes("UTF-8"));
log("Authentication Result : success");
log("Initiating authorisation : "); // This is printed in Console output if u observe (ie, till here the code executed properly)
// It couldn't create instance of "employeeServiceImpl" interface defined above.....
emp = employeeServiceImpl.authorize(userName);
authorize 関数の別のコード スニペット:
@Override
public Employee authorize(String signum) throws BusinessException {
System.out.println("Hi Tapo..."+signum); // this is not printed in console output if u observe (ie, controller doesn't enter authorize function)
logger.info("authorize : "+signum);
Employee emp = null;
try{
emp = findRoles(signum);
if (WebConstants.adminSignum.equalsIgnoreCase(signum)) {
emp.setSignum(signum);
emp.setName("System Administrator");
emp.setRoles(Role.LnCD_ADMIN);
emp.setRoles(Role.LnCD_DELEGATE);
emp.setRoles(Role.SYS_ADMIN);
}
return emp;
}catch(BusinessException e){
throw new BusinessException(e.getMessage());
}catch(Exception e){
throw new BusinessException(e.getMessage());
}
}