We have in use an old application running on Spring 2.5 and Jboss 4.2.3 which hasn't been modified for years. It will be replaced with a new application, developed in our current stack, in a foreseable future. Until then, we need to provide very basic maintenance and updates.
I have succeded to setup a working development environment with newer JRE and MySQL versions. Now I need to test that we are able to modify the original source and recompile it the WAR package for deployment.
I would appreciate information on the following topics:
Which JDK version should I use? Can I use Java 7 or do I need a 1.6 version?
Where can I find build scripts or samples? (there's nothing such as build.xml in the project).
Any other tip that would be helpful.
Thanks in advance.
Related
I am working on an old jsp project. I have to modify it so that I can use it to meet my needs. I was facing issue while using any newer version of tomcat or java sdk. Therefore, I am using Tomcat 5.5.7 and java SDK 1.5. I have updated java class files of this project using eclipse helios (2012). But the implementation don't show up in my project. Like when I change the database name and run the project it still wants to use the old database name. I have tried to upgrade the whole project to a new version of tomcat and java sdk but it doesn't work. Can anyone help me with this?
Steps you need to take -
Import the project into eclipse - Create a new project, import using existing source files.
You need to setup the Java Facet of "Dynamic Web Application" along with some other Facets to make this application run successfully on the tomcat container inside of eclipse.
You need to install the server tools in eclipse. Using the Java EE perspective is very helpful.
When making changes to the JDK or the server runtime, as you mentioned, you will need to update the projects build path. Right click on the root of your project and go to the build path. Change the SDK version, change the runtime version of tomcat that is included with it. You will need to create a new Java Server runtime for any other versions of Tomcat you want to add to the project.
This is a complicated issue, and there is no specific answer, as your question is very broad. I would recommend watching some tutorials on "How to setup Web application projects in Eclipse." Maybe add Java 5 or 6 to the search to get older results.
I am setting a project for Spring MVC but it seems to hold some issue.
while configuring I am Tomcat-7 and JRE 1.8 but due to this project is not setting up.
Earlier when I was learning Spring Core JRE 1.8 was not an issue it was automatically getting configured. But now while building MVC project it is generating below problem, it say's
"Faceted Project problem(Java Version Mismatch)"
and is this happening when i am not using this Apache Tomcatv7 is being loaded along with JRE1.7
[1: this image I have manually changed the JRE1.8]
https://drive.google.com/open?id=1JNEoP8_Yb79-2dGGFm3EaZKI5uHjj5RB
[2: But still on selecting Apache Tomcat JRE1.7 is being loaded]
https://drive.google.com/open?id=1SVlL1h7rF9kspYNnUe70O5Y3NYalBtQ2
I therefore want to use JRE1.8 for configuring the project, but it seems Apache Tomcat version is Generating problem.
So do I need to upgrade the version of Tomcat??
For your first statement :
In offcial page of Tomcat it says that Tomcat 7.x is compatible
with JDK-6 and higher version of JDK. So JDK 8 should not give an
issue with it.
I think the main reason could be, different versions of Java in compiler and in project facets. The Java facet version needs to always match the java compiler compliance level.
If you want to use Java compiler level as 1.8, then you should upgrade tomcat runtime envionment to java 8 and also change the project facets to 1.8.
Java 7 at the runtime and java 8 at compile time, this combination will not work. this would be worked for vice versa.
You can change Java runtime as follows :
1. select Apache> Tomcat 7 Server
2. Configure Runtime Environments
3. On this screen there is a pulldown labeled JREs.
4. You should find your JRE listed. If not use the Installed JRE button.
5. Select the desired JRE. Click the FINISH button.
Hope this solves your problem. Do upvote if this has helped a tiny bit :)
I am migrating an application that used Jetty 7.4.5.v20110725 to Jetty 9.3.0.M2, using Maven. I already had upgraded the javax.servlet-api to 3.1.0.
But I am using the FakeHttpServer version 0.3.0 for tests, and at this time there is no newer version. It uses the org.eclipse.jetty.server.nio.SelectChannelConnector class that used to exist up to Jetty 8.x, but does not exists anymore in Jetty 9.
Currently my projects breaks at runtime with a NoClassDefFoundError due to the removed class in Jetty that FakeHttpServer tries to use, holding me back from upgrading Jetty. What can I do to fix that?
Note, this was also cross-posted in the Portuguese StackOverflow version: https://pt.stackoverflow.com/q/64548/132
Upgrade the code that uses Jetty on FakeHttpServer for Jetty 9.
That is your only choice if you want to use Jetty 9 with FakeHttpServer.
Looking at the project page for FakeHttpServer, it seems that there have been no updates (commits) to the project tree since Dec 2012.
You'll either have to convince the project leads to update it, or do it yourself.
Note that Jetty contains several ways of testing webapps. Look at the unit tests in the jetty source code and I'm sure you will find the equivalent of FakeHttpServer.
ServletTester comes to mind as one example. Or just create a Server using the LocalConnector is another way.
I'm attempting to generate a JAX-WS server top down (from a WSDL) for the IBM WebSphere v7 runtime using Eclipse Kepler. The problem I'm running into is that I simply cannot select the web service runtime to be IBM WebSphere JAX-WS, there is no option for it. I've installed the WebSphere Application Server Developer Tools plugin for Kepler and configured the runtime in Eclipse to be the runtime installed on my system. I can also compile applications against the WAS 7 runtimes and deploy them to a WAS 7 server, so it would appear the runtimes are available.
The biggest thing that's frustrating me is that the option is available in Eclipse Indigo (3.x). To make sure there wasn't something awry with my work space or install in any way, I downloaded fresh copies of both versions of Eclipse, started with fresh work spaces, and installed the WAS 7 plugin on both versions from the marketplace. Eclipse 3.x gives me the option, but 4.x does not.
Now, I know these plugins are different versions. The version provided by the marketplace for Eclipse 4.x is 8.5.5011.v20131031_0202 while the version for 3.x is 8.5.1002.v20130402_2058, which based on the version number appears to be about 7 months older. This leads me to my question, is it possible to use the IBM WebSphere JAX-WS runtime to generate web services in Eclipse 4.x anymore? I've tried searching the web all I can but have found no mention of this ability being removed from the plugin. I've even found other SO posts that make it seem like this once was available for Eclipse 4.x, but maybe no longer is with the latest version of the plugin (this linked question is over a year old). Does anyone know the answer to this. Is it no longer possible to do this, or is it actually possible by some other means that that you could share please?
Apparently this is fixed now (see https://www.ibm.com/developerworks/community/forums/html/topic?id=29712397-fdfd-41be-8668-ada56447711a). The version of the plugin didn't change, but it sounds like there was an update to the plugin that fixed a bug.
am developing a simple web app using jsps and servlets for tomcat 5.5.
Currently using the Eclipse Helios and Dynamic Web Application Project.
For some reason it is a nightmare. We spent 4 hours today trying to deploy a servlet to tomcat. We kept getting errors like
"java.lang.UnsupportedClassVersionError: Bad version number in .class file"
we played around with everything trying to set the build compatibility to what tomcat had but couldn't make the stupid thing work. (Yes it is possible we're incompetent. any suggestions on what we can try looking at are apprecieated)
My friend recalls from long time ago that he used this plugin
eclipsetotale_tomcatPlugin
in order to create a "tomcat project". My question is, does sysdeo tomcat plugin add any features that aren't already available in helios?
thanks
Not sure about sysdeo, but your error seems similar to bug 116713:
If your default JRE is set to 1.4.2 and you have a Web project targetting
Tomcat 5.5 (dynamic Web module version 2.4 and Java 5.0), when you tried to run
a main program, you'll get the error (you mention).
What is your default JRE set for your project?
This scenario happens when the JVM running the code is older than the one the compiler generated code for.
Have you considered simply running Tomcat under Java 6? If that is not an option, please edit your question to include this and any other restrictions on this project.
We used to get that error often when we had Java version issues. Eclipse environment and Windows environment (java_home and path variables typically) are easy to overlook.
Also, you can use javap -v Foo in same directory as Foo.class to find out its version.
Just use the Eclipse IDE for Java EE Developers, 206 MB edition of Eclipse. It has Tomcat and other webserver support built-in by default. Works like a charm!
Sysdeo is an old, as far as I know obsolete, plugin.