我在 Config.groovy 中添加了本地 Tomcat 服务器的用户名和密码:
tomcat.deploy.username="admin"
tomcat.deploy.password="password"
tomcat.deploy.url="http://127.0.0.1:8080/manager/text"
这是错误:
| Done creating WAR target\Alojamiento-0.1.war
Deploying application /Alojamiento to Tomcat
| Error : java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
| Error at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| Error at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
| Error at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
| Error at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
| Error at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
| Error at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
如果我运行“grails dev war”,我会生成一个完美的战争,我可以在 Tomcat6 或 Tomcat7 中手动部署它。这个问题可能是相关的:命令“grails run-war” throws Error java.lang.NullPointerException