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 74087

Summary: Spaces in paths are not escaped
Product: serverplugins Reporter: Lukas Jungmann <jungi>
Component: Sun Appserver 8Assignee: _ ludo <ludo>
Status: VERIFIED FIXED    
Severity: blocker CC: mkrauskopf
Priority: P3 Keywords: SIMPLEFIX
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Lukas Jungmann 2006-03-28 13:07:57 UTC
-have server installed in path with space
-create appclient project
-open project/private props

=>spaces in paths are not escaped as you can see there
Comment 1 Martin Krauskopf 2006-06-14 09:08:51 UTC
Also on Linux. However not easily reproducible due to glassfish issue:

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=603

Simple workaround for installing glassfish(b48) is to fix the setup.xml with
e.g. changing lines 38[2-4]:

  <arg line='"${install.home}/imq/bin"'/>
  <arg line='"${install.home}/bin"'/>
  <arg line='"${install.home}/lib"'/>
Comment 2 Martin Krauskopf 2006-06-14 12:28:02 UTC
This is problem of all project types (ear, war, car, ejb). -> code. I'll handle
it on all places.
Comment 3 Martin Krauskopf 2006-06-14 12:44:38 UTC
We should probably use quotes for arguments as needed (e.g. in
j2ee.appclient.jvmoptions). But anyway if you install the glassfish with the
workaround mentioned in the previous comment the installation is still unusable
with or without NetBeans. So probably you wil not get any further on Linux and
similar.
Comment 4 Martin Krauskopf 2006-06-14 13:08:01 UTC
Those property are generated by the J2eePlatform implemenation. Specifically in
the Sun AS case the method
org.netbeans.modules.j2ee.sun.ide.j2ee.PlatformImpl.getToolProperty() generates
those properties. Presumably simplefix. Just use quotation marks for values
which uses filepaths.
Comment 5 _ ludo 2006-08-23 19:32:52 UTC
Just to make sure and I do not break someething else,

in private.properties, what do you want instead of  (My app server does not have
space in the install, but I just need you to tell me where the quote should go)
:

j2ee.appclient.tool.args=-configxml
C:\\Sun\\AppServer955beta2\\domains\\domain1\\config\\sun-acc.xml
j2ee.appclient.tool.jvmoptions=-Dcom.sun.aas.configRoot=C:\\Sun\\AppServer955beta2\\config
-Dcom.sun.aas.installRoot=C:\\Sun\\AppServer955beta2
-Dcom.sun.aas.imqLib=C:\\Sun\\AppServer955beta2\\imq\\lib
-Djava.security.policy=C:\\Sun\\AppServer955beta2\\lib\\appclient\\client.policy
-Djava.security.auth.login.config=C:\\Sun\\AppServer955beta2\\lib\\appclient\\appclientlogin.conf
-Djava.endorsed.dirs=C:\\Sun\\AppServer955beta2\\lib\\endorsed
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ACCLogManager
j2ee.appclient.tool.mainclass=com.sun.enterprise.appclient.Main
j2ee.appclient.tool.runtime=C:\\Sun\\AppServer955beta2\\lib\\appserv-admin.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-cmp.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-ext.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-rt.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-ws.jar:C:\\Sun\\AppServer955beta2\\lib\\dbschema.jar:C:\\Sun\\AppServer955beta2\\lib\\fscontext.jar:C:\\Sun\\AppServer955beta2\\lib\\j2ee.jar:C:\\Sun\\AppServer955beta2\\lib\\xalan.jar:C:\\Sun\\AppServer955beta2\\lib\\xercesImpl.jar:C:\\Sun\\AppServer955beta2\\lib\\install\\applications\\jmsra\\imqjmsra.jar:C:\\Sun\\AppServer955beta2\\lib\\dtds:C:\\Sun\\AppServer955beta2\\lib\\schemas
j2ee.platform.classpath=C:\\Sun\\AppServer955beta2\\lib\\javaee.jar:C:\\Sun\\AppServer955beta2\\lib\\jsf-impl.jar:C:\\Sun\\AppServer955beta2\\lib\\activation.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-tags.jar:C:\\Sun\\AppServer955beta2\\lib\\mail.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-jstl.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-ws.jar
j2ee.platform.wscompile.classpath=C:\\Sun\\AppServer955beta2\\lib\\j2ee.jar:C:\\Sun\\AppServer955beta2\\lib\\saaj-api.jar:C:\\Sun\\AppServer955beta2\\lib\\saaj-impl.jar:C:\\Sun\\AppServer955beta2\\lib\\jaxrpc-api.jar:C:\\Sun\\AppServer955beta2\\lib\\jaxrpc-impl.jar:C:\\Sun\\AppServer955beta2\\lib\\endorsed\\jaxp-api.jar:C:\\Sun\\AppServer955beta2\\lib\\appserv-ws.jar


Comment 6 Lukas Jungmann 2006-08-30 16:34:06 UTC
simply said all full paths in "j2ee.appclient.tool.args" and
"j2ee.appclient.tool.jvmoptions" options has to be escaped, so I want:

j2ee.appclient.tool.args=-configxml
"C:\\Sun\\AppServer955beta2\\domains\\domain1\\config\\sun-acc.xml"

j2ee.appclient.tool.jvmoptions=-Dcom.sun.aas.configRoot="C:\\Sun\\AppServer955beta2\\config"
-Dcom.sun.aas.installRoot="C:\\Sun\\AppServer955beta2"
-Dcom.sun.aas.imqLib="C:\\Sun\\AppServer955beta2\\imq\\lib"
-Djava.security.policy="C:\\Sun\\AppServer955beta2\\lib\\appclient\\client.policy"
-Djava.security.auth.login.config="C:\\Sun\\AppServer955beta2\\lib\\appclient\\appclientlogin.conf"
-Djava.endorsed.dirs="C:\\Sun\\AppServer955beta2\\lib\\endorsed"
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ACCLogManager


Other options seems to work correctly (just tested ;) )

Thanks.
Comment 7 _ ludo 2006-09-01 19:06:27 UTC
Fixed
Checking in PlatformImpl.java;
/cvs/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/PlatformImpl.java,v
 <--  PlatformImpl.java
new revision: 1.3.8.7.2.21; previous revision: 1.3.8.7.2.20
Comment 8 Lukas Jungmann 2006-10-05 21:32:34 UTC
v.