1

Struts2 と Hibernate を使用する Web アプリケーションがあります。ビルド スクリプトを実行してプロジェクトをデプロイすると、ローカルにエラーなくデプロイされます。しかし、サーバーにデプロイしようとすると、次の奇妙なエラーが発生しました。

INFO: Deploying web application directory IsobolCurator
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from org.hibernate.util.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:73)
recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
-----
WARN from com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(CommonsLogger.java:56)
Unable to load config class com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor at interceptor - jar:file:/usr/local/apache-tomcat-6.0.35-ontowebapi/webapps/IsobolCurator/WEB-INF/lib/struts2-fullhibernatecore-plugin-2.2.1-GA.jar!/struts-plugin.xml:16:173 probably due to a missing jar, which might be fine if you never plan to use the hibernateValidatorInterceptor interceptor
-----
ERROR from com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error(CommonsLogger.java:38)
Actual exception
Could not load class com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor. Perhaps it exists but certain dependencies are not available? - interceptor - jar:file:/usr/local/apache-tomcat-6.0.35-ontowebapi/webapps/IsobolCurator/WEB-INF/lib/struts2-fullhibernatecore-plugin-2.2.1-GA.jar!/struts-plugin.xml:16:173
        at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:81)
        at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:70)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:998)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStack(XmlConfigurationProvider.java:817)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStacks(XmlConfigurationProvider.java:830)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptors(XmlConfigurationProvider.java:853)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
        at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NoClassDefFoundError: javax/validation/spi/ValidationProvider
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor.configValidator(HibernateValidatorInterceptor.java:44)
        at com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor.<clinit>(HibernateValidatorInterceptor.java:24)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:130)
        at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:161)
        at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:150)
        at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:52)
        ... 40 more
Caused by: java.lang.ClassNotFoundException: javax.validation.spi.ValidationProvider
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        ... 61 more

提案や考えはありますか?

4

1 に答える 1

1

bean-validator.jar を lib フォルダーに追加することで解決しました。ヒントをくれたRoman Cに感謝します。

于 2013-01-29T21:04:31.017 に答える