New to this site so bear with me.. I'm developing web project on JVM, generated by Maven and coded in Eclipse I2E. Whenever I want to change server side code (add/delete/modify), I stop the Apache Tomcat server in the Eclipse 'servers' tab, applly changes and then restart the server. This procedure works fine on Windows 10, however, on Ubuntu 20.04 I get : 'Failed to start database [dbname] with classloader..' exception in this line:
this.connection = DriverManager.getConnection(DB.dbURL); //DB.dbURL = jdbc:derby:C:/final_project/ClientsDB;create=true
If I delete the databse and start over, it works fine.
I'm using Eclipse I2E on Ubuntu 20.04, Tomcat 9, Derby 10 and fire up eclispe using sudo -H eclipse
Related
My application is working as expected while I run them manually by using startup.bat file but I am facing JDBC issue while I run the tomcat as a windows service. My tomcat version is 7.0.91 and OS is windows 2016
I've searched a lot on Remote Debugging a REST APIs written in Java using IntelliJ IDEA Community Edition.
My Setup:
Windows 10
Tomcat installed as a windows service
Java 8
Intellij Community IDE
Finally after some googling and sifting through SO, found a solution that works. Posting it below.
Part I. Running Tomcat in Debug Mode
When running Tomcat8 as a service
Open {$TOMCAT_HOME}\bin\Tomcat8w.exe
Under Java > Java Options add the following lines to enable the debug port 8001:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001
Restart the Tomcat Service
Part II. Attaching IntelliJ IDEA Remote Debugger
Create a new Run Configuration using the Remote Template.
Under Configuration > Settings Change the Port to 8001
Run the new config by clicking on the debug icon and IDEA will connect to the debug port of Tomcat
Credits:
How to remotely debug the webapplication running on tomcat service?
Tomcat showing unable to start using eclipse marce or luna but tomcat 7 or 8 running fine under windows 8.1 through cmd by the startup.bat but problem start with when ever try to work with eclipse, I have clear the log and change the directory of tomcat also and change the eclipse workspace but same result.
thanks
I have installed Apache Tomcat 7.0.32 and I am using Eclipse JUNO. But whenever I am using Eclipse I am not getting result from Server rather than I am getting Server can not start within 45sec.
Try changing connection port in server.xml
I'm using:
Spring Tool Suite Version: 3.2.0.RELEASE
Tomcat v7.0.42
When I just run my tomcat server everything is fine but I'm unable to debug it even locally. It produces following error:
Startich Apache Tomcat v7.0.42 at localhost has encoutered a problem.
Server Apache Tomcat v7.0.42 bat localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
I've tried the following:
increase the timeout.
remove all the apps before starting the debugging.
install new instance of tomcat (the only configuration that I've did on fresh install is turning on Use Tomcat installation and Never publish automatically).
But it didn't help, I still can only run the tomcat, without the debug option. Does anyone know how to make this debugging work?
When I've used new, clear workspace for Spring Tool Suite, debugging started to work.
Cheers,