2

開発環境(Eclipse使用)でVRaptorを使用してプロジェクトを開発しても問題ありませんでした。

しかし、Heroku でデプロイしようとすると、開発環境でプレイできないというエラーが発生します。

2013-02-13T13:36:01+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-13T13:36:05+00:00 heroku[web.1]: Starting process with command `${PRE_JAVA}java ${JAVA_OPTS} -jar webapp-runner-7.0.34.0.jar --port ${PORT} ${WEBAPP_RUNNER_OPTS} teste.war`
2013-02-13T13:36:06+00:00 app[web.1]: Adding Context / for teste.war
2013-02-13T13:36:08+00:00 app[web.1]: Feb 13, 2013 1:36:08 PM org.apache.coyote.AbstractProtocol init
2013-02-13T13:36:08+00:00 app[web.1]: INFO: Initializing ProtocolHandler ["http-nio-57620"]
2013-02-13T13:36:08+00:00 app[web.1]: Feb 13, 2013 1:36:08 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
2013-02-13T13:36:08+00:00 app[web.1]: INFO: Using a shared selector for servlet write/read
2013-02-13T13:36:08+00:00 app[web.1]: Feb 13, 2013 1:36:08 PM org.apache.catalina.core.StandardService startInternal
2013-02-13T13:36:08+00:00 app[web.1]: INFO: Starting service Tomcat
2013-02-13T13:36:08+00:00 app[web.1]: Feb 13, 2013 1:36:08 PM org.apache.catalina.core.StandardEngine startInternal
2013-02-13T13:36:08+00:00 app[web.1]: INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
2013-02-13T13:36:09+00:00 app[web.1]: Feb 13, 2013 1:36:09 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
2013-02-13T13:36:09+00:00 app[web.1]: INFO: validateJarFile(/app/target/tomcat.57620/work/Tomcat/localhost/_/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2013-02-13T13:36:09+00:00 app[web.1]: Feb 13, 2013 1:36:09 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
2013-02-13T13:36:09+00:00 app[web.1]: INFO: No global web.xml found
2013-02-13T13:36:09+00:00 heroku[web.1]: State changed from starting to up
2013-02-13T13:36:17+00:00 app[web.1]: log4j:ERROR No appender named [rolling-file] could be found.
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,288  INFO [BasicConfiguration  ] Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,288 [localhost-startStop-1] INFO  BasicConfiguration - Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,303  INFO [DefaultSpringLocator] No application context found
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,303 [localhost-startStop-1] INFO  DefaultSpringLocator - No application context found
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,367  INFO [BasicConfiguration  ] br.com.caelum.vraptor.scanning = null
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,367 [localhost-startStop-1] INFO  BasicConfiguration - br.com.caelum.vraptor.scanning = null
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,367  INFO [WebAppBootstrapFactory] Dynamic WebAppBootstrap found.
2013-02-13T13:36:17+00:00 app[web.1]: 13:36:17,367 [localhost-startStop-1] INFO  WebAppBootstrapFactory - Dynamic WebAppBootstrap found.
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.catalina.core.StandardContext filterStart
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: Exception starting filter vraptor
2013-02-13T13:36:17+00:00 app[web.1]: br.com.caelum.vraptor.scan.ScannerException: Could not determine WEB-INF/classes location
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.WebBasedClasspathResolver.findWebInfClassesLocation(WebBasedClasspathResolver.java:58)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.ScannotationComponentScanner.scan(ScannotationComponentScanner.java:50)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.WebAppBootstrapFactory.scannerFor(WebAppBootstrapFactory.java:81)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.WebAppBootstrapFactory.create(WebAppBootstrapFactory.java:51)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.ioc.spring.SpringProvider.start(SpringProvider.java:83)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:108)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:102)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
2013-02-13T13:36:17+00:00 app[web.1]:  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
2013-02-13T13:36:17+00:00 app[web.1]:  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
2013-02-13T13:36:17+00:00 app[web.1]:  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
2013-02-13T13:36:17+00:00 app[web.1]:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
2013-02-13T13:36:17+00:00 app[web.1]:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
2013-02-13T13:36:17+00:00 app[web.1]:  at java.lang.Thread.run(Thread.java:636)
2013-02-13T13:36:17+00:00 app[web.1]: Caused by: br.com.caelum.vraptor.scan.ScannerException: Could not locate web.xml. Please use the proper argument in command-line.
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.StandaloneClasspathResolver.getWebxml(StandaloneClasspathResolver.java:139)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.StandaloneClasspathResolver.findWebInfClassesLocation(StandaloneClasspathResolver.java:72)
2013-02-13T13:36:17+00:00 app[web.1]:  at br.com.caelum.vraptor.scan.WebBasedClasspathResolver.findWebInfClassesLocation(WebBasedClasspathResolver.java:55)
2013-02-13T13:36:17+00:00 app[web.1]:  ... 20 more
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.catalina.core.StandardContext startInternal
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: Error filterStart
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.catalina.core.StandardContext startInternal
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: Context [/] startup failed due to previous errors
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: Context [/] failed in [org.apache.catalina.core.StandardContext] lifecycle. Allowing Tomcat to shutdown.
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: The web application [/] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
2013-02-13T13:36:17+00:00 app[web.1]: SEVERE: The web application [/] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2013-02-13T13:36:17+00:00 app[web.1]: Feb 13, 2013 1:36:17 PM org.apache.coyote.AbstractProtocol start
2013-02-13T13:36:17+00:00 app[web.1]: INFO: Starting ProtocolHandler ["http-nio-57620"]
2013-02-13T13:36:19+00:00 heroku[web.1]: Process exited with status 0
2013-02-13T13:36:19+00:00 heroku[web.1]: State changed from up to crashed
4

2 に答える 2

2

war を生成する前に、静的スキャンを生成する必要があります。

于 2013-02-20T00:21:48.263 に答える
0

Vraptor で Heroku を使用することはまだ試していません。しかし、heroku にデプロイするために作成されたこのvraptor-blank-projectを見ると、助けが得られます。お役に立てば幸いです。

于 2013-02-20T00:32:30.330 に答える