I am trying to get an eclipse project to recognize the apache/tomcat(v8.0..) that I have installed, but I am having trouble. The installation is from sudo apt-get install tomcat8, which after a lot of errors I have finally managed to solve. Now I am getting the following after I hook up the tomcat install at /usr/share/tomcat8 to a new project in eclipse.
Description Resource Path Location Type
The container 'Apache Tomcat v8.0 [Apache Tomcat v8.0]' references non existing library '/usr/share/tomcat8/lib/commons-dbcp.jar' helloworld2 Build path Build Path Problem
I'm not sure what the problem could be. There should be no unreferenced libraries as I have installed everything from sudo. I DID have to use this ln -s conf /usr/share/tomcat8/conf to get Eclipse to hook up the library in the first place (as suggested here: Unknown version of Tomcat was specified 8.0.24 / Eclipse 4.4.2 (Luna)). So perhaps that broke it. The road to hello world continues.....
EDIT:
I tried the following:
patientplatypus#next /usr/share/tomcat8/lib $ sudo chmod u+x commons-dbcp.jar
chmod: cannot operate on dangling symlink 'commons-dbcp.jar'
So this appears to be another tomcat8 issue. On installation tomcat8 somehow makes a directory with dangling symlinks to important files. Why it does this or what the fix is, I do not know.
I've not much linux experience, but I use tomcat and eclipse. Eclipse is a mix of java and platform specific binaries, but tomcat is java only (apart from tomcat native which is optional).
If your eclipse supports tomcat8 (I don't remember which version luna supports), you do not need (or even desire) a full server install of tomcat8, you just need to have tomcat package unzipped in any directory you choose, and just point to it.
Which is not the same as installing tomcat8 on your machine and then trying to make it work with eclipse.
My advice is:
Download tomcat8 and unpackage it on a folder.
Create a server runtime with eclipse pointing to that folder.
Develop.
Once you have a war to deploy, you can install tomcat8 on a machine and put your war there and use it.
Related
my centos Server is running the Spring boot application. I am trying to take threaddump of java process. But I cannot find jstack utility on the server. I figured out someone just installed the jre and did not install jdk, that may be the reason why jstack is missing.
Can you please let me know how can I install jstack on this server?
is there any pre-install checks ? or does it involve any downtime ?
You can have several java installations on the same OS by using jdk install from tar file option.
You may manually install jdk to a single parent directory by making use of the .tar.gz jdk installation option.
This option will enable you to download a the .tar.gz file into a new directory, then untar the downloaded file and answer some license agreement.
you will see the you will find jstack in the bin directory in the directory the of the jdk you have just installed. You may need to use the full file path of this jstack file when using.
I have installed Tomcat 9 by using standard way in my Ubuntu 20:
sudo apt install tomcat9 tomcat9-admin
But this installation not defines CATALINA_HOME value.
echo $CATALINA_HOME brings nothing. Why? What is right location for CATALINA_HOME?
Conent of /var/lib/tomcat9 :
conf lib logs policy webapps work
Conent of /etc/tomcat9 :
conf lib logs policy webapps work
My Eclipse JEE Tomcat server runtime environment configuration complains with message
Unknown version of Tomcat was specified.
How to fix that problem?
Don't use an installed copy. The locations of files needed to properly launch Tomcat from Eclipse and actually control the process could have been relocated to who knows where. Download the tar/zip file from tomcat.eclipse.org, and use that instead.
https://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_won.27t_the_New_Server_Runtime_dialog_recognize_my_Linux_installed_version_of_Tomcat.3F
When you install by command
sudo apt install tomcat9 tomcat9-admin
Tomcat become a services inside operating system. Don't use this way in development.
Download Apache Tomcat, unzip, then point to its directory / declare path of Tomcat in Eclipse IDE. Tip: Must check permission some files, allow it read, write inside Tomcat.
Today trying to solve an error on Eclipse startup, I have found a solution that said to reinstall the new version. So I have installed the new version, with which I opened my previous Workspace.
The actual version is: Eclipse IDE for Enterprise Java Developers
Version: 2020-09 (4.17.0)
Build id: 20200910-1200
Now I have a bad situation in the environment in which I work:
Previously I had many Websphere application Servers v8.5.5 already configured through the IBM WebSphere Application Server V8.5x Developer Tools plugin.
The Server runtime I used, was based on Java java_1.7.1_64, that is located in the Websphere AppServer folder.
I reinstalled the plugin to recover its typical functionality, which acts as an interface to the WAS server (start, publish, status) but it seems to be no longer compatible with the current version of Eclipse, so I am no longer able to start the WAS servers from Eclipse.
At the Workbech startup I get the following popup with error:
An attempt was made to Use a Websphere Application Server specific function, which is only supported on JRE 6.0, 7.0, or 8.0
And when I try to interact with the server I receive the folliwing error:
An internal error occurred during: "Starting Server G2".
org/omg/CORBA/UserException
If I double click on the server, to open its configuration page, the IDE opens an empty, grey, page with only the X to close it.
If I try to create a new Server with WAS Runtime, when I click on New > Server, I get this error:
An error has occurred. See error log for more details.
org/omg/CORBA/UserException
The same errors appears if I try to select WebSphere Application Server v8.5 as type of server.
eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
C:\Users\USER\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
C:\Users\USER\.p2\pool\plugins\org.eclipse.epp.package.common_4.17.0.20200910-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:/Users/USER/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
Things I have tried:
Recover the previous eclipse version but I can't, I still have the installation folder, but I probably changed something in the eclipse.ini and if I start it now it always launches me the new updated Eclipse instance, it seems as if it has been added or overwritten something in the .p2 folder due to the installation of the new version that I did.
I tried to install older versions of Eclipse, but the was plugin doesn't seem to work with those either.
I still have all the WAS Profiles configured, Is there an alternative, or a workaround, to continue working on them even without the eclipse plugin? I am quite ignorant on the subject. In the end I just have to start / restart the server, add EARs quickly, do the publish, understand the status of the server; operations for which I have always used the interface.
Thanks in advance to all those who will help me find a solution.
I had the same problem with Eclipse 2020-12 version. The difference is that minimal Java version is now 11 so you cannot use Ibm Java SDK that comes bundled with Websphere to run Eclipse.
Eclipse still throws:
An attempt was made to use a Websphere Application Server specific function, which is only supported on JRE 6.0, 7.0 or 8.0.
but you can ignore it. Installing and debugging applications works.
Here are the steps I made:
download Eclipse JEE 2020-12 zip
extract installation on filesystem
download removed JAXB artfacts and put them in dropins folder
javax.xml
javax.activation
javax.xml.bind
download corba implementation jar, glassfish-corba-orb and also, put in dropins folder
install Websphere Developer Tools for Websphere 8.5 eclipse plugin and point it to local Websphere installation
I have found a workaround in order to continue to work with Eclipse and IBM WebSphere Application Server V8.5x Developer Tools plugin.
I have installed a previous version of Eclipse with an empty workspace
Steps:
Download Eclipse J2ee 2019-09-R as Zip file (Eclipse Photon works too)
Extract in a folder in you file system
edit eclipse.ini file adding -vm C:/Users/USER/IBM/WebSphere/AppServer/java/bin on the first line. (It's Java 1.8 located in WebSphere folder)
Start Eclipse using an empty workspace
Download IBM WebSphere Application Server V8.5x Developer Tools plugin via Help > Install new software. (url: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2020-09_comp/
)
now I'm able to create an use new WAS Servers with my old Profiles without any of the previous error.
I found another way to solve:
In addition to
Download Eclipse as Zip file
Extract in a folder in you file system
edit eclipse.ini file adding -vm Path/IBM/WebSphere/AppServer/java/bin on the first
line. (It's Java 1.8 located in WebSphere folder)
Access the link below and install the compatible version in your eclipse, this link lists several versions:
http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/
Example:
If your version of eclipse is photon get the link below for installation:
http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/photon/
I am trying link TomEE server in eclipse using already existing tomcat server adaptor but I am getting
The Apache Tomcat installation at this directory is version 8.5.3. A Tomcat 7.0 installation is expected.
so any idea how to change the tomee version?
This is due to a bug in Eclipse:https://bugs.eclipse.org/bugs/attachment.cgi?id=262418&action=edit
You can edit a file in a jar on the server to fool the server into thinking it's 8.0.
See the first answer for a workaround: How to use Tomcat 8.5.x and TomEE 7.x with Eclipse?
You have to patch catalina.jar, as this is version number the WTP adapter looks at. It's a quite useless check, and the adapter should allow you to start the server anyway, but nobody has though of that yet.
For years and with every version of Tomcat this is always a problem.
To patch you can do the following:
cd [tomcat or tomee home]/lib
mkdir catalina
cd catalina/
unzip ../catalina.jar
vim org/apache/catalina/util/ServerInfo.properties
Make sure it looks like the following (the version numbers all need to start with 8.0):
server.info=Apache Tomcat/8.0.0
server.number=8.0.0
server.built=May 11 2016 21:49:07 UTC
Then:
jar uf ../catalina.jar org/apache/catalina/util/ServerInfo.properties
cd ..
rm -rf catalina
OS is Linux Ubuntu 16.04 LTS
(The application runs absolutely fine on Windows, I did not have to configure anything after the installation of Matlab Compiler SDK)
I am writing a web application in Java which also calls some functions written in Matlab which requires install Matlab Compiler SDK, after the installation, it told me to append this /usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/sys/os/glnxa64: to the end of the LD_LIBRARY_PATH variable, which I did by
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/sys/os/glnxa64:
But why do I keep getting this error when I try to run the web app in Netbeans?
java.lang.UnsatisfiedLinkError: Failed to find the required library libmwmclmcrrt.so.9.0.1 on java.library.path.
This library is typically installed along with MATLAB or the MCR. Its absence may indicate an issue with that installation or the current path configuration.
libmwmclmcrrt.so.9.0.1 resides inside the /usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64 directory
I also added -Djava.library.path to point to 3 directory entries above to see if it helps, but it does not do anything good at all.
I read several posts on here, but did not seem to solve it.
JNI: Library is Found on Path, but Method is not (java.lang.UnsatisfiedLinkError)
java.lang.UnsatisfiedLinkError even on setting -Djava.library.path
How do I fix this? BTW, this is a web application
[ Tested on Mac OS High Sierra version 10.13.5 (17F77), should be similar for Linux ]
What I did was when I started the application server (In my case Payara). I provided the path to the javabuilder.jar like so
For Payara Full
asadmin deploy --libraries /path/to/javabuilder.jar app.war
For Payara Micro
java -jar payara-micro.jar --deploy app.war --addlibs /path/to/javabuilder.jar
Note:
/path/to/javabuilder.jar is the location of javabuilder.jar within the directory MATLAB_HOME/MATLAB_Runtime/SOME_VERSION/toolbox/javabuilder/jar/javabuilder.jar, Copying this javabuilder.jar file out and reference it will fail with the same error. It must be its original path for it to work. Not sure why