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 72763 - Rapid deployment of entitys won't work when paths have spaces
Summary: Rapid deployment of entitys won't work when paths have spaces
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-17 10:02 UTC by stvconsultants
Modified: 2006-06-07 19:39 UTC (History)
0 users

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 stvconsultants 2006-02-17 10:02:35 UTC
NetBeans 5.5 Preview (Build 200602012300)

When deploying a web application via F6 (The run button), if the project is
located on a path containing spaces, the entity manager factory will not be
created correctly due to the spaces present in the path to the
build/web/WEB-INF/classes directory.

When deployed manually as a .war, the problem goes away.

I'm sure people will like to throw this back and forth with the Glassfish
project, however NetBeans is implementing the rapid (re)deployment.
Comment 1 stvconsultants 2006-02-17 10:28:14 UTC
Also, when moving the project to a path without spaces, everything works again
Comment 2 Sherold Dev 2006-02-20 13:39:26 UTC
Could you please send a more detailed description of how to reproduce this issue
and what exactly do you mean by "the entity manager factory will not be
created"?
Comment 3 stvconsultants 2006-02-20 13:50:55 UTC
OK.

This is not the smallest test case.

Start with a clean install of NetBeans 5.5 Preview
1. Register a local glassfish server
2. Create a new EJBable project save it in a directory that has spaces in the
path name (let's use WebApplication and put it in C:\Documents and Settings\test
case\WebApplication1)
3. Add a persistence unit
4. Add a EJB3 entity (Quick way, pick any database table that is there and use
the wizard to create an entity based on the table)

First test point
5. At this point, if you try to deploy using the Run command (assigned to key
F6), you will get a deployment failure.  But take the .war file and deploy it
manually and the web application deploys fine.

6. Add a page that uses the entities (quick way, use the JSF page wizard)
Second test point
7. Again should still have the failure with the Run command (assigned to key F6).

8. Move the project to a location wihout spaces in the path (e.g.
c:\test_case\WebApplication1
9. At this point, you can now deploy using the Run command (assigned to key F6)

Note:
They key binding is irrelevant to the issue.  The issue is irrespective of the
method of invoking the Run command (I'm just using the key binding to clearly
identify the command in question)

Hope this helps
Comment 4 stvconsultants 2006-02-20 13:56:04 UTC
> what exactly do you mean by "the entity manager factory will not be
created"?

If you look in the server log file, you will find that there are problems
creating the entity manager factory due to (i'm guessing) spaces in the
classpath.  The spaces arrise when (i'm guessing again) netbeans modifies the
classpath to include a reference to the project folder where the expanded
classes are ready for deployment.  Because the application server does not use a
copy of the files and instead uses them in situ, the spaces will be necessarily
in the classpath for this app.  The classpath for the app is in an order such
that the classloader can no longer find the entity manager factory and therefore
deployment issues arrise
Comment 5 Sherold Dev 2006-05-25 16:19:11 UTC
moving to sunappserv module for evaluation
Comment 6 _ ludo 2006-06-06 22:57:01 UTC
Vince: try and check with app server backend folks if necessary.
Comment 7 Vince Kraemer 2006-06-07 00:00:47 UTC
this is really something that should be p2, though the fix may have to be in the
GlassFish codebase.
Comment 8 judytang 2006-06-07 01:51:51 UTC
I ran problem when I rapid deployment or redeployment on cmpcustomer (j2ee1.4
cmp sample) in windows XP with a space in the appserver install directory. 
There is one time I saw the following error ADMVAL1052 in server.log, but there
are other times IDE hungs or deployment failed, but I could not recreat this. 
Most time it works fine.  I talked with GlassFish developer and they said the
ADMVAL1052 is caused by window file lock issue, but without be able to recreate
it consistantly, developer said it is very hard to know what is the problem.

The problem I saw may not be the same as this one reported, but the space in the
path is the same environment I use, also it seems at the time when I hit this
problem, I was hitting the deploy function very fast. Just another information
for developer.

----------

There is this error in the server.log when I deploy the cmpcustomer (j2ee1.4 cmp
sample), but after I undeploy the cmp app, then
deploy the app, it worked fine.  It is regarding "Could not rename"

UTIL6046: Attempt to rename D:\AppServer
Install\9sdkplus\domains\domain1\applications\j2ee-apps\cmpcustomer to
D:\AppServer
Install\9sdkplus\domains\domain1\applications\j2ee-apps\cmpcustomer_old failed
after 4 retries
Validation error: [ADMVAL1052: Element  j2ee application 'cmpcustomer' can not
be deleted because it is referenced from server 'server']
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Could not rename
D:\AppServer Install\9sdkplus\domains\domain1\applications\j2ee-apps\cmpcustomer
to D:\AppServer
Install\9sdkplus\domains\domain1\applications\j2ee-apps\cmpcustomer_old
       at
com.sun.enterprise.deployment.backend.AppReDeployer.setAppDirArchive(AppReDeployer.java:333)
       at
com.sun.enterprise.deployment.backend.AppReDeployer.setAppDir(AppReDeployer.java:139)
       at
com.sun.enterprise.deployment.backend.AppDeployerBase.predeploy(AppDeployerBase.java:147)
       at
com.sun.enterprise.deployment.backend.AppDeployer.predeploy(AppDeployer.java:161)
       at
com.sun.enterprise.deployment.backend.AppReDeployer.predeploy(AppReDeployer.java:127)
       at
com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:128)
       at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
       at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
       at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
       at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
       at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
       at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
       at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
|#] 



Comment 9 Vince Kraemer 2006-06-07 19:39:11 UTC
I attempted to reproduce this issue and was not able to (GFv1b48/SJSASPE90 with
NB 5.5 Beta).

I started to dig into the fixed bugs list for GF and came up with these:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=184
https://glassfish.dev.java.net/issues/show_bug.cgi?id=228
https://glassfish.dev.java.net/issues/show_bug.cgi?id=485

closing