I'm trying to add the SAP connector to Java Web Application and I'm using Eclipse and Maven to build the project.
I added sapjco3.dll at C:/Windows/System32 on my local machine and libsapjco3.so at /usr/lib64/ on AWS server (Amazon Linux 2) respectively. Then I added the sapjco3.jar file on pom.xml file like below to add the plugin and I have no problem building & running the app on my local machine and AWS server.
pom.xml
Problem happens when I replace the WAR file on AWS server and below message pops up:
tomcat log
It works fine if I reboot the tomcat server but I want to update the WAR file without reboot.
Based on the error message, I see that Tomcat server is trying to load libsapjco3.so again and causing the problem, which I don't know why java can't handle this. I guess either I need to add some logic somewhere to prevent loading libsapjco3.so twice or I just had set this up wrong and there is a proper way of doing this.
How can I fix this?
Amazon Linux 2
Tomcat 8.5.73
OpenJDK Runtime Environment (build 1.8.0_312-b07)
Related
Actually I have to run my java war file having service which i want to access .normally in pc we run eclipse and use tomcat to do so. But in server if I have space then how to run my war file over there.
Basically you just install tomcat on your server and deploy the war file to it. There is lots of documentation on how to do this.
I would turn to the tomcat documentation on how to get started:
https://tomcat.apache.org/tomcat-8.0-doc/introduction.html
I have a Java 1.6.0 web application that I am developing using a Kepler Version 2 Eclipse development environment. I am using an Oracle Weblogic Server Administration Console 12c.
I'm running the app locally - and trying to debug it. Instead of stopping at any of the breakpoints I've set - I get the following error:
When I installed the application to Weblogic, I ran the Weblogic console and then installed the application by adding the ear file.
I thought I did everything exactly the same as previous web applications I've done this way - but I was always able to debug those applications.
Also - one other thing that is different. When make any changes and re-build the ear file - I actually have to delete and reinstall from the Weblogic console for the changes to take place. I'm thinking this might be related.
Any suggestions?
Thanks!
Have a jar file added to a build path in any of the projects that
include the classes in your project
I have developed a java webservice application that I have been running on my dev-computer and in the meanwhile been setting up a dedicated ubuntu based linux server.
I have installed oracle-jre, mysql and apache tomcat 7 on this linux server and
after reading documentation I understand that I can either copy the deployed project archive (.WAR) or I can simply copy the project folder, into the servers /webapps/ folder from my development computer. Then restart tomcat7 and it should automatically run the webapp.
On my dev-computer with Eclipse IDE the webservice works properly as expected, but I cannot access the POST URL methods at all on the server
e.g. localhost:8080/Webservice/rest/account/login
(The installation on the server seems to be O.K as the Apache examples all work properly.)
I cannot see any logs in the /logs/ directory, in fact the folder is completely empty, so I cannot debug whats actually happening. Why aren't logs writing to the Catalina.out file?
Am I deploying this correctly as explained above?
Do I need to configure Eclipse or any project settings to reflect the change from the eclipse IDE / dev-computer to the server? E.g Is there any real difference?
A lot of questions there, but I wanted to clarify as much as possible,
Cheers,
Oliver
I fixed this issue by reinstalling tomcat.
When starting JBoss from the servers view inside Eclipse Indigo SR2 with JBoss Tools 2.3.0 on my machine, everything runs fine.
I have copied all contents of my work folder containing Eclipse and JBoss-7.1.1.Final to a different machine.
Now, when I try to start the server, it fails with this message:
Starting JBoss 7.1.1 Runtime encountered an error. The archive: /jboss/jboss-modules.jar which is referenced by the classpath, does not exist.
I don't see anything referencing the jar in the runtime or server or project configurations. And the jboss-modules.jar is inside the root folder of the JBoss server, as expected. There are no deployments in the standalone.xml.
Both machines are running SuSe 12. .bashrc and .profile are empty.
The server starts fine from command line.
I have created a new runtime and a server using this runtime from scratch in Eclipse, but get the same error.
Any ideas are appreciated.
modules.jar is required to run JBOSS 7.1 Runtime, which is missing.
Go to Window > Preferences > Server > Runtime Environment > Default Classpath.
If you don't see any classpath in the right side menu,you can tweek the classpath setting by-
Change server to JBOSS 7.0 Runtime.
Again Change server to JBOSS 7.1 Runtime.
Delete and Add Server Again,
while Add new server,
Please Check the 2nd and 3rd checkboxes
-"Listen on all Interfaces to allow remote web connections"
-"Expose your management port as server's hostname"
now everything will run fine.
I have found the solution just now:
I have found the reference to the jboss-modules.jar in the launch configuration of the server under User Libraries. All attempts to delete it failed. After removing or resetting to defaults and applying, I started the server, received the same error and the .jar was in the launch cofig classpath again.
I actually had a project named jboss without any facets, just to have the JBoss files visible from the eclipse project browser. This project was closed.
After I opened it, the server started fine again.
I am still clueless about how the reference to the jboss-modules.jar from a project got into the launch config classpath and why it resisted removing attempts.
I know this is a late response but in case anyone needs a solution to this issue.
If you go to Window > Preferences > Servers > Runtime Environments > Default Classpath
You will see that the 'JBoss 7.0 Runtime' does not have 'modules../-[*/.jar]' dependency, which is where the jboss-modules.jar lives. After selecting the 'JBoss 7.0 Runtime' rather than the JBoss 7.1 Runtime, the error relating to the jboss-modules.jar went away, and the server starts without error.
My application also started without error. I am using JBoss 7.1.1.
I downloaded alfresco CMS for java and i installed it but the tomcat installed by alfresco is not getting started. and thats why i cant use alfresco.
in event viewer log it says "The alfrescoTomcat service terminated with service-specific error 0 (0x0).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."
anyone has solution for this ????
It seems that unfit memory settings on the Windows Service can cause the issue you describe. To configure it, open the configuration window for the Alfresco service using (adjust the path accordingly):
C:\Alfresco\tomcat\bin\timcat6w //ES//AlfrescoTomcat
then on the Java tab try to adjust the values to fit your machine (e.g. you should not give the process more memory than the available physical RAM)
Sometimes it best to break out tomcat from Alfresco and to install Tomcat separately with version that installs Tomcat as a service. There are .exe installers for this.
Apache Tomcat can be found
https://tomcat.apache.org/download-80.cgi
After Tomcat is installed start it up in Services.msc, then validate if the Tomcat console comes up. http://localhost:8080, then deploy your alfresco war file.
I like this approach better since I can verify tomcat before I deploy Alfresco.