When I run my grails application locally under Tomcat, I get no errors. When I deploy my WAR on my remote web server, I get this exception when I try to make an AJAX request that uses HTTPBuilder.
How could this be happening?
Are you running your application is an IDE like STS? if so maybe the Jars for HTTPBuilder are in your build/run path but are not in your lib directory for the Grails app OR not listed as a "Production" Dependency.
Related
I installed gvm and grails on the C9 environment. Everything seems ok.
I run the app using this command :
grails -Dgrails.server.host=$IP -Dgrails.server.port.https=$PORT -Dapp.context=/ run-app -https
It looks like the server is launched, no error message.
But the app isn't accessible on the app-username.c9.io url
Has anyone managed to run a grails app on Cloud9 ?
I have two grails(2.1.1) project deploy on the one tomcat(7.0.39).
I deployed a project on tomcat server, its worked but when i deployed other project on same tomcat , its generates heap Space error and and stop the tomcat server.
I have some idea to ignore this error by setting JAVA_OPTS. But I didn't have any rights to access Tomcat/bin directory.
I've been upgrading a Grails 1.3.7 project to Grails 2.0. Everything was going smoothly until I hit integration (first non-local deployment). The gist of the problem is that it appears the Resource plugin always prepends the app name to the static CSS/JS URLs it generates, regardless of the grails.serverURL or grails.app.context specified for the environment. What's strange is image resources are hosted with the appropriate URL "/static/foo.png" but CSS/JS files attempt to be served as "/AppName/static/foo.js". Tracking this issue in ResourceTagLib, this initially looks like a issue in Resource Plugin but I don't want to jump to conclusions.
Our integration environment is setup with Apache proxy passing all traffic from "/" to ":8080/AppName" hosted on Tomcat. Therefore, all traffic to "http://int.sitename.com" is hitting the app running on Tomcat. Previously, in 1.3.7, grails.serverURL="http://int.sitename.com" was all that was required to get resources to served correctly.
Does anyone know a way to resolve this issue or does this look like a bug present in Resource plugin.
I'm using Grails 2.0 too. There is a line app.context=/ in the application.properties. As application is deployed to Tomcat, it's also on renamed to ROOT.war on deployment, so Tomcat will use a ROOT ie / context for this application. As result I don't have the described issue.
I'm using Jasper with the Struts2 plugin to generate PDF reports for my web application, as described in this tutorial.
The application uses Weblogic as app server and Apache as webserver in development environment, IIS in testing and production environments.
Locally I put the .jasper files under WEB-INF of the WAR section, which is then put in a EAR after compilation.
PDF generation works locally, passing a relative path (namely WEB-INF/jasper/template.jasper) to the result parameters of the "jasper" result in struts.xml . This does not work when the application is deployed as an EAR.
How can I get my application to find the .jasper template even when deployed as an EAR? I tried to pass in an absolute path pointing to a directory in the same server the EAR is in, but it doesn't work.
And by the way, is there a comprehensive guide to the Struts2 plugin for Jasper? I couldn't find anything except for that tutorial.
In weblogic domain home's webapplications tab; enable the option called Archived Real Path Enabled
works for me in weblogic 11g or later versions
I am attempting to deploy a war (a grails 1.3.7 app) to an jboss 6 which had been in a jboss 5 environment. The war is not dependent on jboss services or j2ee (it could have been deployed straight to tomcat). When deploying to jb6, I get the following error message:
14:54:17,281 ERROR [AbstractKernelController] Error installing to Real:
name=vfs:///opt/jboss-6.0.0.Final/server/jbossweb-standalone/deploy/pip.war
state=PreReal mode=Manual requiredState=Real:
org.jboss.deployers.spi.DeploymentException: Error during deploy:
vfs:///opt/jboss-6.0.0.Final/server/jbossweb-standalone/deploy/app.war
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.0.GA]
...
...
...
Caused by: java.lang.RuntimeException: Neither any mapped-name/lookup/jndi-name
specified nor any ResourceProvider could process resource-env-ref named env/cxf
of type org.apache.cxf.Bus
It seems as though JBoss support services are not able to get created, but don't see any underlying problems preventing the service creation. Also some other web apps are deployed to this instance of jboss, so the overall installation is "sound". I've done some investigation, but not sure where to go next. Any ideas as or pointers as to the likely problem?
This looks like a problem with JNDI, you have a reference to a JNDI in your project, more than likely your web.xml, this resource is not defined as a service in your Jboss server deploy directory, for instance a jdbc.xml definition you are relying on.