This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Start NetBeans web app in debug mode seems to be starting twice, debug session is lost | ||
---|---|---|---|
Product: | serverplugins | Reporter: | ecerichter |
Component: | Tomcat | Assignee: | Petr Hejl <phejl> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | dkonecny, mentlicher, mmirilovic, pjiricka |
Priority: | P1 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
video of the issue in action! |
Description
ecerichter
2013-02-21 12:43:07 UTC
Created attachment 131669 [details]
IDE log
Created attachment 131672 [details]
video of the issue in action!
Increasing to P1 as per guidelines: http://wiki.netbeans.org/BugPriorityGuidelines Setting version correctly. This seems to be the same problem as issue #226617. *** Bug 226617 has been marked as a duplicate of this bug. *** I cannot reproduce the problem. This is what I tried: * create new Web Application project for Tomcat server (7.0.10) * create a Servlet in the project * run project -> Tomcat server was started * add breakpoint to the servlet and debug project --> server was restarted in debug mode and debugging session was started; opening the servlet URL in the browser hits the breakpoint and debugging works * clean and build project -> project was undeployed first * debug project again -> application was redeployed to server is still running in debug mode and debugging works Could you please try the same and let me know what works for you and what not? Or what should I do differently to reproduce your problem. Thanks. Have you seen the video attached to this ticket? This is repeteable always: whenever I have Tomcat running in Debug mode, then I ask "Project -> Deploy", tomcat is stopped and started again in non debug mode. I just tried your scenario, and is still happening. Notice I've external Tomcat configured with no custom scripts. Port 8080, shutdown port 8005, HTTP Monitor enabled. I did watch the video, but I cannot reproduce the problem locally. Must be some difference between our environments. If you customized your Tomcat instance it could be worth it to try to re-run the testcase I gave on a vanilla Tomcat downloaded from Tomcat website and registered in the IDE without any customizations. I'm not aware of any recent changes in project infrastructure which could be relevant. In issue 226617 ecerichter says this started happening since dev build 201302172300. Passing to Tomcat support in NB. I can confirm that by creating a new empty Java Web project, this issue does not happen. Nevertheless, it is impossible to create new Java Web project and recreate all structures that I have in dozens of web projects. I will need assistance to discover what is going wrong. Which project parameters or dependencies would affect the redeployment? Ok, just after sending the previous message, I made another attempt with one more step in the newly created project: 1) Added PostgreSQL jdbc 4 v1002 driver to the project, and included it in the build of WAR file 2) Created a Resource in context.xml file: <Context antiJARLocking="true" path="/Teste"> <Resource auth="Container" description="MyDatabase" driverClassName="org.postgresql.Driver" logAbandoned="true" maxActive="30" maxIdle="2" maxWait="-1" name="jdbc/studi" password="123456" poolPreparedStatements="true" removeAbandoned="true" removeAbandonedTimeout="600" type="javax.sql.DataSource" url="jdbc:postgresql://127.0.0.1:5432/mydb?charset=UTF-8&loglevel=1" username="dbuser"/> </Context> After that, when redeploy the newly created test web app, I got the restart. Seems that the installation of the JDBC driver is causing the Tomcat restart. Would be possible that I've the exactly same version of JDBC driver in $TOMCAT_HOME/lib Ok, there is a workaround: disable the option "Enable JDBC driver deployment" in Server configuration. Great job ecerichter, thanks for narrowing it down. I did notice that IDE log you appended contains exception which looks relevant: INFO [org.netbeans.modules.tomcat5.TomcatJDBCDriverDeployer] java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:214) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at java.util.jar.JarFile.<init>(JarFile.java:153) at java.util.jar.JarFile.<init>(JarFile.java:117) at org.netbeans.modules.j2ee.common.Util.containsClass(Util.java:551) [catch] at org.netbeans.modules.tomcat5.TomcatJDBCDriverDeployer$DriverDeploymentProgressObject.jdbcDriversToDeploy(TomcatJDBCDriverDeployer.java:168) at org.netbeans.modules.tomcat5.TomcatJDBCDriverDeployer$DriverDeploymentProgressObject.run(TomcatJDBCDriverDeployer.java:126) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044) I will let Petr Hejl to check whether he can reproduce the problem now and fix it in NB Tomcat support. U r welcome. It is my interest to get as much bugs fixed as possible. Having real situations here, I know sometimes it is easier to reproduce the problems. Regarding the PostgreSQL driver, it is standard PostgreSQL driver downloaded from the oficial site: http://jdbc.postgresql.org/download/postgresql-9.2-1002.jdbc4.jar I hope this helps. Regards, Edson I can't reproduce it myself. Looks like either your file is corrupted or there is a problem in JDK compression algorithm. Looks like avoiding of JarFile in our code could help. I tried to fix it blindly at web-main 447c9c94aab5. Could you please retest the issue with IDE build from (upcoming) http://bertram2.netbeans.org:8080/job/web-main/10037/ ? Thanks. Integrated into 'main-golden', will be available in build *201303072300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/447c9c94aab5 User: Petr Hejl <phejl@netbeans.org> Log: #226458 - Start NetBeans web app in debug mode seems to be starting twice, debug session is lost not verified yet, so postponing for NB 7.3.1 (Patch 2) ecerichter any feedback on this? (In reply to comment #19) > ecerichter any feedback on this? I though it was fixed and closed. It works for me in DEV 201303272300. Thanks, Edson Verified by the reporter in trunk. Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/be91360a4968 User: Petr Hejl <phejl@netbeans.org> Log: #226458 - Start NetBeans web app in debug mode seems to be starting twice, debug session is lost |