1

I've been facing with a combersome task: deploying a spring project ( using JNDI ).

Right now the problem is related to the webapp-runner option "enable-naming". My datasources are declared by jndi - using tomcar context.xml. When i feed webapp-runner with the option referred i get this message:

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:

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.

I'm using maven heroku-maven-plugin, and as WEBAPP_RUNNER_OPTS: --context-xml tomcat-heroku-server-conf/context.xml --enable-naming

Thanks in advance.

Gonçalo
  • 561
  • 5
  • 14

2 Answers2

1

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.

You can set the version like this for the CLI:

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

Or like this for 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.

codefinger
  • 10,088
  • 7
  • 39
  • 51
0

I've received a similar response from heroku support codefinger

For future notice i've added

<webappRunnerVersion>8.0.33.1</webappRunnerVersion>

to the heroku-maven-plugin in the pom.xml file.

So the heroku-maven-plugin is now:

<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>

Gonçalo
  • 561
  • 5
  • 14