简体   繁体   English

Heroku Webapp运行程序-启用命名

[英]Heroku webapp-runner --enable-naming

I've been facing with a combersome task: deploying a spring project ( using JNDI ). 我一直面临一项繁琐的任务:部署spring项目(使用JNDI)。

Right now the problem is related to the webapp-runner option "enable-naming". 现在,问题与webapp-runner选项“启用命名”有关。 My datasources are declared by jndi - using tomcar context.xml. 我的数据源由jndi声明-使用tomcar context.xml。 When i feed webapp-runner with the option referred i get this message: 当我使用提到的选项喂webapp-runner时,我得到以下消息:

Exception in thread "main" com.beust.jcommander.ParameterException:   
**Unknown option: --enable-naming** 
at com.beust.jcommander.JCommander.parseValues(JCommander.java:723)
at com.beust.jcommander.JCommander.parse(JCommander.java:275)
at com.beust.jcommander.JCommander.parse(JCommander.java:258)
at com.beust.jcommander.JCommander.(JCommander.java:203)
at webapp.runner.launch.Main.main(Main.java:74)

I've been digging the webapp-runner code and saw this condition: 我一直在挖掘webapp运行程序代码,并看到以下情况:

if (commandLineParams.enableNaming ||
commandLineParams.enableBasicAuth ||
commandLineParams.tomcatUsersLocation != null) {
tomcat.enableNaming();
}

So i've tried with --enable-basic-auth option and my app runs just fine... The problem is i don't want basic-auth in my site. 因此,我尝试使用--enable-basic-auth选项,我的应用程序运行正常...问题是我不希望在我的网站中使用basic-auth。

I'm using maven heroku-maven-plugin, and as WEBAPP_RUNNER_OPTS: --context-xml tomcat-heroku-server-conf/context.xml --enable-naming 我正在使用maven heroku-maven-plugin并作为WEBAPP_RUNNER_OPTS:--context-xml tomcat-heroku-server-conf / context.xml --enable-naming

Thanks in advance. 提前致谢。

This option was added in webapp-runner 8.0.33.1, but at the time of this writing the Heroku CLI WAR deployment plugin and the Heroku Maven plugin default to version 8.0.30.2 of webapp-runner. 此选项已添加到webapp-runner 8.0.33.1中,但在撰写本文时, Heroku CLI WAR部署插件Heroku Maven插件默认为webapp-runner版本8.0.30.2。

You can set the version like this for the CLI: 您可以为CLI设置如下版本:

$ heroku deploy:war --webapp-runner 8.0.33.3 path/to/app.war

Or like this for Maven: 或像这样的Maven:

$ mvn heroku:deploy-war -Dheroku.webappRunnerVersion=8.0.33.3

I maintain webapp-runner and those plugins, and I'll update them to use 8.0.33.3 shortly. 我维护了webapp-runner和那些插件,我将对其进行更新以很快使用8.0.33.3。

I've received a similar response from heroku support codefinger 我从heroku支持Codefinger收到了类似的回复

For future notice i've added 为了将来通知,我添加了

<webappRunnerVersion>8.0.33.1</webappRunnerVersion>

to the heroku-maven-plugin in the pom.xml file. 到pom.xml文件中的heroku-maven-plugin。

So the heroku-maven-plugin is now: 所以heroku-maven-plugin现在是:

<plugin>
     <groupId>com.heroku.sdk</groupId>
     <artifactId>heroku-maven-plugin</artifactId>
     <version>1.1.1</version>           
     <configuration>               
         <includes>
             <include>tomcat-heroku-server-conf/</include>
         </includes>
         <jdkVersion>1.8</jdkVersion>
         <configVars>
            <CATALINA_OPTS>-XX:MaxPermSize=512M -Xmx1024M -Ddatabase.url=** -Ddatabase.user=** -Ddatabase.password=** -Ddatabase.driver=com.mysql.jdbc.Driver</CATALINA_OPTS>
             <JAVA_OPTS></JAVA_OPTS>
          </configVars>      
          <webappRunnerVersion>8.0.33.1</webappRunnerVersion>
          <warFile>admin/target/admin.war</warFile>
      </configuration>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Heroku Webapp运行程序JNDI命名,资源不可用 - Heroku webapp-runner JNDI naming, resource not available Java Web App在带有webapp-runner的Heroku上崩溃 - Java Web App Crashes on Heroku with webapp-runner webapp运行程序错误(NoInitialContextException) - webapp-runner error (NoInitialContextException) 需要帮助Java Web App(webapp运行程序,tomcat)heroku(应用程序崩溃) - Need Help Java Web App (webapp-runner, tomcat) heroku (app crashed) 在webapp-runner中运行的对Heroku Web-app的API调用最终失败,并出现google.common中的NoSuchMethodError和NoClassDefFoundError - API calls to Heroku web-app running in webapp-runner eventually fail with NoSuchMethodError then NoClassDefFoundError in google.common Spymemcached与hibernate-memcached和webapp-runner发生冲突 - Spymemcached conflict with hibernate-memcached and webapp-runner 上下文路径与 webapp-runner 中的 Spring UrlTag 冲突? - Context path conflict with Spring UrlTag in webapp-runner? 使用&#39;webapp-runner&#39;运行Spring Boot应用后,它在“ INFO:Starting ProtocolHandler [“ http-nio-8080”]”行中停止 - After running Spring boot app with 'webapp-runner' it's stoping on a line “INFO: Starting ProtocolHandler [”http-nio-8080“]” 在gradle中为Heroku创建webapp-runner.jar - Creating webapp-runner.jar for Heroku in gradle Heroku 找不到 webapp-runner.jar - Heroku can't find webapp-runner.jar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM