I have a grails 3.1.16 application. In that i'm using some plugins of grails 3.1.11. When i'm running my application with grails run-app command its working fine.But when i make the war file and deploy it to tomcat it is picking wrong version of some files.
Initially my app is in grails 3.1.11. But i need some improvements that are done in 3.1.16(BeforeValidateHelper implements serializable). So i have updated the version my grails-app to 3.1.16. .But my plugins are made in 3.1.11 version. When i'm running grails run-app its working fine(BeforeValidateHelper implemented serializable). But when i'm deplying it as war file to tomcat, its showing BeforeValidateHelper is not serializable.
when i open http://localhost:8080 its showing grails 3.1.16 version(which is correct).
But its picking files of grails 3.1.11(BeforeValidateHelper)
Related
I have a Spring Boot project. I created the following two configurations:
Spring Boot Configuration
JAR Application Configuration
Can someone tell me what is the difference? They both run as expected.
Thank you.
Running via Spring Boot configuration will allow hot swapping of the changes during debugging which is very useful during development as you don't have to rebuild all the files and package the jar on every change.
Jar Application is handy when you want to verify that your production jar works as expected.
I am new to grails and I was working on the grails demo app from https://guides.grails.org/creating-your-first-grails-app/guide/index.html . Now this app is using grails version 4.0.1 and I want to use google-analytics plugin https://grails.org/plugin/google-analytics with the app.
The problem is I can't find "grails install-plugin [plugin-name]" also I am not sure if the google-analytics plugin works with grails 4.x. Is there any way I can integrate the google-analytics plugin with my app.
Note: I am using a macbook pro and Intellij IDEA as the ide.
The problem is I can't find "grails install-plugin [plugin-name]" also
I am not sure if the google-analytics plugin works with grails 4.x.
There is no install-plugin command in Grails 4 (or Grails 3). The way to install plugins is to add a dependency on the plugin to build.gradle.
Also, the plugin you linked (https://grails.org/plugin/google-analytics) is not a Grails 4 plugin.
I've deployed liferay 5.2 sp2 on weblogic 10.3 and in deployment part the status of application is Active.
Now when i pass the URL in browser "nakulpatel:7001" it display "500--Internal Server Error".
java.lang.NoClassDefFoundError: com/yahoo/platform/yui/compressor/JavaScriptCompressor
at com.liferay.portal.util.MinifierUtil._minifyJavaScript(MinifierUtil.java:80)
at com.liferay.portal.util.MinifierUtil.minifyJavaScript(MinifierUtil.java:52)
at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:251)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:159)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)...
Please guide me how to fix this problem.
I've not used maven at all.Simply deployed .war file of liferay 5.2 and not able to start portal.
The reason you got it is because Liferay uses YUI compressor to do Javascript/CSS minification. Minification can be done in two ways -- runtime vs build time. It looks like liferay implements the former through servlet filter.
I checked my Liferay 6.0.x installation. There is a liferay-yuicompressor.jar under the \liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\WEB-INF. Lfieray 5.2 should have a similar directory structure. Make sure this jar file is included in your WEB-INF/lib when deploying to WebLogic 10.3
I' starting to use ServiceMix and Camel and I've run through many examples.
It seems that the examples that are OSGi can be deployed in ServiceMix via hot deploy or via console, but I don't know how to deploy a project that is not an OSGI. Can it be done?
For example, I'm looking at the example project from Camel 2.10.0 called camel-example-cxf-proxy. I did some alterations and now I wanted to load it in ServiceMix. If I copy/paste to the deploy directory it is loaded but when I try to run it via osgi:start id it fails.
However if I run it from the IDE as a standalone it runs just fine and I can send and receive requests via SoapUI.
When I'm done with the examples I'll want to create my own project in eclipse and do tests in the IDE and in ServiceMix. I don't really understand the advantage of OSGi yet. SO I'm not too compelled to use OSGi for my project.
My main question is: Can I deploy a non-OSGi non-JBI compliant project in servicemix? Something like the camel-example-cxf-proxy. If yes, how can I do it? If no, how can I OSGi-fy the camel-example-cxf-proxy?
Thank you :)
Apache ServiceMix which uses Apache Karaf as its kernel, support pluggable deployment units. Though OSGi is the main unit.
You can deploy JBI artifacts (eg JBI was used as deployment units for Apache ServiceMix 3.x). So we offer that as a migration path to run JBI in SMX 4.x.
A plain WAR file can be deployed as well. You can for example just drop a .war file in the deploy directory. If you deploy from the shell, you need to prefix the deployer with war so it knows to use the war deployer.
There is some documentation about the various pluggable deployers here
http://fusesource.com/docs/esbent/7.0/esb_deploy_osgi/UrlHandlers.html
For example to install an Apache Wicket WAR example using Maven you can do from the shell:
osgi:install war:mvn:org.apache.wicket/wicket-examples/1.4.7/war?Web-ContextPath=wicket
The Apache documentation about deployer is mainly documented at Apache Karaf
http://karaf.apache.org/manual/2.2.9/users-guide/deployer.html
Now to deploy OSGi applications can be a bit of pain to assemble. And that is why FuseSource created FAB to make it much easier. I blogged about this a bit, which references to videos and more material: http://www.davsclaus.com/2012/08/osgi-deployment-made-easy-with-fab.html
With FAB you can just deploy regular Maven projects out of the box without any OSGi pain.
If your project is a maven project, you can try :
mvn install
Then start your servicemix, and in servicemix command line :
install mvn:groupId/artifactId/version
This will prompt a bundle ID. Then, juste start the bundle :
start <bundle_id>
You can check the state of your bundle with command "list"
The project has to be a bundle to be installed in servicemix / karaf. So the steps to make a camel project work in OSGi are the following.
Use the maven bundle plugin in the pom and configure it to import / export the necessary packages if necessary.
Make sure your camel context is defined in a way that OSGi can start. This is either in the activator of the bundle or in a spring config in the right location or with a blueprint config in the right location.
See two of my karaf tutorials for the details:
CXF: http://www.liquid-reality.de/x/EoBk
Camel: http://www.liquid-reality.de/x/G4Bk
I just downloaded the Glassfish version 3.1.2, this is not yet an official release.
I need this version because my web application is using websockets.
The problem I have now is with the Glassfish plugin for eclipse, he is not recognizing the new Glassfish Version.
With the Glassfish Version 3.1.1 in Eclipse everything works fine.
I am using Oracle Glassfish Server Tools (Eclipse plugin ) version 2.0.0.20111104904 from Oracle(last version I could download).
If I try to add a new Server Runtime Environment in Eclipse for the Glassfish 3.1.2 I get the error:
There is no valid GlassFish installation in the specified directory...
I need everything to be able to debug my web application in Eclipse.
Anyone know what the plugin is checking ?
There is any change to trick the plugin so will run with Glashfish 3.1.2 too ?
Use the plugin from here (for Indigo): http://dlc.sun.com.edgesuite.net/glassfish/eclipse/indigo/
The plugin for Helios does not support 3.1.2.
If you have to live with the bits the are blessed by Oracle or keep using Helios, then you can try the following trick:
create a couple files....
${glassfish.rootdirectory}/modules/jsf-impl.jar and
${glassfish.rootdirectory}/modules/jstl-impl.jar
These files were renamed between 3.1.1 and 3.1.2...
You may be able to get the 3.1.2 to mascarade as 3.1.1 by just
creating empty files with the above names. If that doesn't do it,
make copies of the following files should do it.
The new name for jstl-impl.jar is
gf312/glassfish/modules/javax.servlet.jsp.jstl.jar
The new name for jsf-impl.jar is
gf312/glassfish/modules/javax.faces.jar.
If you are on Helios, you can try the following:
uninstall the Glassfish 3.1.1 plugin (and all associated runtimes and servers).
go to "Install new software" and type in (for the URL): http://download.java.net/glassfish/eclipse/indigo
Though the plugin says indigo, it is also working for me in Helios. And it gives options for both Glassfish 3.1.1 and 3.1.2 servers (pre and post name changes).
Note that it downloads Glassfish itself, and installs an internal server. You can delete that one, and install your own server ("New server...") if you have an existing server you want to work with (as I did).
HTH.