I have a very specific problem deploying a webapp on a Windows installation of Tomcat 8.5 ( version 8.5.29 ) that I have been pulling my hair out for the last few days with no success. My web application generates a PDF using JasperReports and within this PDF is a barcode ( which uses Barbecue 1.5-beta ). Running this report on my local install of Tomcat works great, but when I deployed it to the server it did not produce the barcode. I did not see any errors either
Barcode just has placeholder
I downloaded the 8.5 distro without all the Windows specific installers and files, fired up tomcat (startup.bat) and ran the report again. This time it worked. The barcode rendered and everything. Same exact web app directory and config files.
I copied every file from the generic distro to the windows Tomcat install directory and ran again. Same problem. I went into the Tomcat Config dialog, changed the start up mode from jvm to java, but no luck.
The java virtual machine setting is:
C:\Program Files\Java\jre1.8.0_161\bin\server\jvm.dll
I changed it to use default and still the same problem. The java options are out of the box settings ( same when I ran the startup.bat ).
My only guess is the tomcat.exe that is being run is doing something different, but I cannot even begin to figure out what the difference is. I removed the tomcat native dll (tcnative-1.dll 1.2.16 ), but again no luck.
I feel like I need to just run the generic Tomcat 8.5, but this needs to be running all the time and run as a service.
I can't believe one stupid barcode is causing me so much pain. Its for a warehouse packslip so it is required. At this point I am willing to drive to the warehouse and just manually draw the barcodes myself!
Perhaps someone out in the internet has experienced this and has an idea before I just end my career and become a juggler.
Related
I have downloaded the Sci2 application (an Eclipse based tool for bibliometrics) and installed it on two Windows 10 systems. On one system (the desktop) it starts up and runs without a problem. On the other (a new laptop) it fails to start with the following error in the log file:
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started
The commonly suggested solution to include "org.eclipse.core.runtime#start" in the config.ini file does, not surprisingly, not work as the first (identical) installation on the desktop computer runs as expected, and thus the config.ini file is correct.
It obviously must have something to do with differences in what else is installed on the two systems and how the systems are configured, but I cannot figure out for the life of me where even to look for the source of the problem. The Windows versions on the two systems are identical, as are the Java versions installed.
Also noticed that on the working desktop system, the application creates additional directories (after startup, not during installation) in the configuration folder:
org.eclipse.core.runtime
org.eclipse.equinox.app
.settings
These folders are not not being created on the other system (the laptop). Just copying these folders over unfortunately does not resolve the issue either.
Any help or suggestions would be highly appreciated.
After playing around with 32-bit / 64-bit version of Sci2 and Java, and reinstalling the 64-bit JRE, the application starts up again as expected.
Still don't know the specific issues that caused the problem, but at least it works now. Must say the error message in the log file is very confusing.
I have got a new version of a Java Swing Application (DMG file) that I want to test, but it keeps opening the Old version of the application, even though I have deleted the old application. It's like it's opening a cached version.
This is how I install the application:
Open DMG file.
Drag file to Application folder.
I only see this issue on OS X. On Windows it works fine.
I even tried running the jar file directly, and I see the same behaviour; it works on Windows but on Mac it shows the old version.
I tried the following but I saw the same behaviour:
Restarting the computer
Clearing/Deleting the Java cache (from
System Preference>Java>General>Temporary Internet Files>Settings>Delete Files...)
Logging as the Guest user on my mac.
Lastly, I have tried this on a different Mac and I do NOT see the issue. It seems like there is something specifically wrong with my OS X.
There was a copy of the old version in /Users/*/Library/Java/Extensions which was required by the Robot test automation framework.
Deleting it solved the issue.
I know that this question has already been asked a couple of time but any answers helped me to fixed my own problem. Like I said I am working on OSX Mavericks and I would like to use tomcat with Eclipse JEE. Here is exactly what I did :
- I downloaded Eclipse JEE for mac.
- I downloaded Apache 7.0.47 on http://tomcat.apache.org/download-70.cgi
- I put my folder in /Library/apache-tomcat-7.0.47 and I created a symbolic link in this same folder that I named tomcat
- I tryied to configure it with Eclipse but when I start the server an error message occur :
"Port 8080 required by Tomcat v7.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)."
Do you know which process is using the port 8080 on mac OS and how to kill it ?
I tried to start the server on another port by changing it in eclipse in port 8081. But still nothing appear on localhost:8081.
I tried to launch appache with the terminal by typing : "/Library/Tomcat/bin/startup.sh" and still nothing happened, my web browser just tell me : "no data received".
I hope I have been understable and hope somebody could give me an issue.
I've not tried this on Mavericks, but I have used Tomcat 7 with the previous two versions of Eclipse on Lion and Mountain Lion.
• Be sure you are using the correct edition, Eclipse IDE for Java EE Developers Eclipse IDE for Java EE Developers not "Eclipse Standard 4.3.1" or "Eclipse IDE for Java Developers" nor any others. In theory you should be able to add plugins in order to get the equivalent, but that has never worked for me nor for many other folks.
• After downloading Tomcat, run it through the BatChmod app, turning on the checkboxes to clear the filesystem meta-data. By default, file permissions will block Tomcat from running on a Mac (in my experience at least).
• Test Tomcat by itself. Drag the "startup.sh" into a Terminal window and press Return to launch. Later drag the "shutdown.sh" into the same window to stop. Point a web browser to this address to see Tomcat's welcome:http://localhost:8080/ (Tip: You can trash all the .bat files when running on a Mac.)
• No need for symlinks. You should not have to do anything to at all to Tomcat, except the BatChmod. The trick is to configure a new server within Eclipse. The goal is to make Eclipse aware of your Tomcat folder. I'm sorry I cannot remember exact steps at the moment. Doing the configuration is not as easy as it should be – nothing in Eclipse is as easy as it should be.
• You may need to start from scratch. Trash Eclipse and all of its config files, settings files, etc., both visible and invisible. Do some googling to discover their locations.
• Beware that you should not share the "workspace" folder between versions of Eclipse. Others have advised that major (annual) versions of Eclipse are not completely compatible with their settings, prefs, and such.
• There may be some issues with Java 7 on Mavericks -- you may want to check the Apple Java Developer mailing list.
If you have a choice, considering using other tools instead of Eclipse. Eclipse is arcane and fragile. My first choice would be IntelliJ, though you'll need the commercial (not free of cost) version to do web server work. I only used Eclipse because of its plugin for Vaadin. Another choice is NetBeans which is easier to setup with Tomcat than Eclipse (and now has a good plugin for Vaadin btw).
Tip: I put Tomcat at the root level of my current user's home folder, just to keep things simple.
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.
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.