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.

Bug 198022 - Unable to load resource [com.mysql.jdbc.EscapeProcessor]
Summary: Unable to load resource [com.mysql.jdbc.EscapeProcessor]
Status: RESOLVED INCOMPLETE
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-22 20:19 UTC by xirias
Modified: 2012-11-20 14:56 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xirias 2011-04-22 20:19:46 UTC
Debug version of my java web app fails in version 7 when I try to debug.  Netbeans reports successful deployment, but then I get this error when executing a JPA query against MySQL:

java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [com.mysql.jdbc.EscapeProcessor], because it has not yet been started, or was already stopped

This error occurs at the first query against the database.  The entire application works fine with Netbeans version 6.9.1.  

One potential clue is that I had to manually add the MySQL driver to the project in version 7, while with prior versions of Netbeans I've never had to explicitly do so.
Comment 1 Sergey Petrov 2011-04-22 20:31:00 UTC
if it's runtime output of web application I'm not sure what's the issue with persistence support.
do you mean 6.9.1 add mysql driver for you and 7.0 not?
do you use the same server in both cases?
can you provide sample project or complete steps? are project different working project in 6.9.1 and not working in 7.0?
also if there is an issue it may be an issue with web app support, as there is something with "WebappClassLoader".
Comment 2 xirias 2011-04-22 22:18:04 UTC
You may be right that it's not necessarily "persistence support", but the error seems to be arising somehow from the database code.

Yes, I did not need to add MySQL to 6.9 and earlier.

My current project has too many dependencies to easily provide to you, 140 datatables, etc.  I will see if I can come up with a minimum working case.  However you may see a rash of identical errors from other users and that alone could help you narrow the cause, e.g. if it's always MysQL/Hibernate/JPA as in my case, then that would point to the cause.
Comment 3 xirias 2011-07-13 18:36:43 UTC
Just tested again with nightly build 201107110600, same exact result.  Also tried explicitly listing the MySQL JDBC connector, same result.  

App runs fine without debugger.  Fails when I debug.  Unfortunate, I am stuck using a combination of 6.8 and 6.9.1 still, since 6.9.1 has tragic bugs that make it useless for entity class gen.  So I am curious whether this will ever be fixed, or should we be migrating away from netbeans with persistence?
Comment 4 Sergey Petrov 2011-07-13 21:11:16 UTC
do you mean there are more issues?
regarding driver addition by ide, there was no such funtionality in 6.9 and no changes in 7.0, some information seems to be missed. may be something with hiberate support if it's jpa-hibernate application.
Comment 5 Sergey Petrov 2011-07-13 21:15:23 UTC
also there is nothing similar to SomeNameClassLoader generated by jpa support, is it some classs from your application? can you provide more complete logs?
Comment 6 xirias 2011-07-13 22:52:42 UTC
1. Specifying the jdbc driver within the IDE was not something I wanted to do, I thought it was your idea, and in any case it didn't change the error.

2. WebAppClassLoader is a class within Glassfish. If I google it along with glassfish 3.1, I see my error is pretty common but no easy fix posted.  So it may be a problem particular to glassfish 3.1.  It is reported by users of Open JPA as well as Hibernate.

The reason I report it as a Netbeans error is that it happens only when I am trying to debug within Netbeans.  I also get a popup messagebox during that process about how I should attach to the debugger with a certain port.

The only new info I saw looking at all the messages during Glassfish startup is a warning DPL8027: Ignore WEB-INF/sun-web.xml in archive .., as GlassFish counterpart runtime xml WEB-INF/glassfish-web.xml is present in the same archive.  These two xml files both appear to allow configuring the ClassLoader but no clues as to how, and whether this warning is relevant.
Comment 7 Sergey Petrov 2011-07-14 08:50:51 UTC
ok, if it's gf3.1 issue (may be) it looks like you are using older gf with 6.9.
also as it's provider independent from your investigation and there was no changes in jdbc drivers handling as I know, it's hard to do sommething on nb side. Also there is no information regarding what cause you opinion it';s jpa related it least jpa nb generated code related, may be more logs may help or complete stack trace. Also I have no proof but it may mean also in debug mode from any ide you may get this issue. Still may have sense to review on serverplugin or webproject support side if it may be valid here or if there are more ideas.

Vince, do you have nay ideas on the issue? I'm reassigning it, feel free to push back or fwd to webproject or close if feel it's not nb issue.
Comment 8 Vince Kraemer 2011-11-09 00:27:05 UTC
The driver should not be in the project... it should be in <DOMAIN>/lib/ext...

If the jdbc driver is in both places that may contribute to this issue.
Comment 9 Vince Kraemer 2011-11-09 00:28:13 UTC
Can you provide step-by-step instructions that would help us reproduce this issue?
Comment 10 xirias 2011-11-09 01:45:36 UTC
As far as I can determine the problem happens with Glassfish 3.1, not "3.x".  When I roll back to Glassfish 3.x, the problem has not occurred.  I get other problems with this, but the particular bug I reported vanishes if I use the older Glassfish.  The one bundled with Netbeans 7 is the one with the problem.
Comment 11 Vince Kraemer 2011-11-16 00:29:50 UTC
still waiting for detailed instructions on how to reproduce the issue.  I do not need to see the project.  I do need to know things like:

1. is the project already deployed when you start to debug the project?
2. do you make changes to the project code while you are doing your debugging?
3. what are the menus/items that you are using (the more precisely you can describe your actions the better)

Before yo do that though... please try the following...

start your gf server in 'normal mode'
open the Servers property dialog (Tools->Servers)
untick the 'Preserve Sessions Across Redeployment' on the Common tab
undeploy your project by finding it in the Services window and using the Undeploy item from its right click menu.
stop the server
use the project's right click menu and use the Debug item.

See if the issue can be reproduced after the sequence of events.
Comment 12 TomasKraus 2012-11-20 14:56:03 UTC
Please can you check if this issue still exists in last 7.3 builds? I did some changes in WEB-INF/sun-web.xml vs. WEB-INF/glassfish-web.xml code to fix some bugs.
Also I fixed some issue with mysql driver deployment in 7.2 or 7.3 in the past.

I'm closing this bug now because we got no response from you since Vince asked for detailed reproduction scenario.

Feel free to reopen it if you see this issue in 7.3 builds and you'll provide reproduction scenario.