We are migrating our project from the Sun App server to Glassfish. For compilation we need the classpath to be set to the servlet-api.jar which is found in the servlet container. Where in the Glassfish installation can I find these jars?
Thanks.
I guess you want to use Glassfish 3 or higher.
You can find the servlet-api in
$GLASSFISH_HOME\glassfish\modules\javax.servlet-api.jar
in Glassfish 3 and 4.
Related
I have Grails web project developed in 2.5.1 version. It works fine in Tomcat 7.0.63. When I deploy same running WAR file in Tomcat 8.0.33, it gives ehcache error:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.cache.ehcache.EhCacheFactoryBean.setMaxEntriesLocalHeap(J)V
I know it's due to ehcache old version, but the same war was working fine in Tomcat 7, so, what's wrong in Tomcat 8 ?
Any help would be great.
Thanks.
Update: If I replace all jar files of Tomcat 8 by Tomcat 7, then it works. But it seems like stupid thing to do this.
There was multiple ehcache jar files in project. Hibernate cache and spring cache, seems like spring cache was pointing to old jar in Tomcat8. We forced excluding ehcache-core and it worked.
For more info: Exclude plugin
I am installing Glassfish 3 on eclipse kepler. But, I am getting the following problem
Why I am getting this problem?.
How can I overcome this error to install glassfish server.
Please help me.
Thanks in Advance
As you can see on your screenshot the error message says that Glassfish needs a full Java JDK and not a JRE, like you selected.
If you have already installed a JDK choose that instead of "Default JRE".
If you didn't already install a JDK, do that and register it in your Eclipse (Settings -> Java -> Installed JREs).
When I had tried deploying Guvnor onto Glassfish, I hit the same problem as here.
If anyone has performed a successful deployment, what are the steps to deploy a recent version of Guvnor (e.g. 5.4) to a recent version of Glassfish (e.g. 3.1)?
The steps for deploying Guvnor 5.4 are:
Take the guvnor-5.4.0.Final-jboss-as-7.0.war binary war file
Remove WEB-INF/lib/javassist-3.14.0-GA.jar from the binary war file
Add the a glassfish-web.xml file to WEB-INF see here
Replace WEB-INF/web.xml with this
Repackage the binary war file and deploy to glassfish
I have a project on git hub that automates creating a glassfish specific version of guvnor. See here for more information: link
How can I set my java jar application to use jre 6 instead of jre 7?
I'm doing this because there are some compatibility issue with the libraries I'm using if the application use jre 7.
Edit:
The application will come with its own installers (using advanced installer) that have a jre6 installer. But I don't know how to trace the installation folder of the jre6.
How can I trace it and make the jar file use the jre6?
You can do this from Advanced Installer much simpler. You have two options:
Force the package to use the JRE 1.6 found on the machine by going to "Virtual Machine" tab from Java Products page and setting the minimum and maximum JRE versions to 1.6
Add as bundle in the project from the same page the JRE for version 1.6. This means that Advanced Installer will automatically import in your package the JRE resources required for your application, thus increases the package size, and will install them in the application's install folder. This JRE bundle will be used only by your application and removed along with it.
When running your application using java.exe, you could provide the absolute path to a Java 1.6 installation. Something like:
absolute_path_to_java6_dir/bin/java -jar yourRunnableJar.jar
or
absolute_path_to_java6_dir/bin/java -cp .;yourJar.jar;otherJarFiles className
You could check the running JVM version when starting your application.
System.getProperty("java.version");
This way you could provide a meaningful explanation to end-user.
I've just discovered that all the install guides for railo+resin assume you're installing the obsolete 3.1.2 bundle (railo-3.1.0.012-resin-3.1.2-without-jre.zip). I have Resin 4 installed now, what is the process for deploying the Railo WAR / JAR's (under linux)?
Should be nearly identical to setting up Railo on Resin 3.1. Have you tried it?
http://www.getrailo.org/index.cfm/documentation/installation/railo-resin-apache/