Bugs item #971010, was opened at 2004-06-11 02:51
Message generated for change (Comment added) made by starksm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=971010&group_id=22866

Category: JBossServer
Group: v3.2
Status: Open
Resolution: Works For Me
Priority: 5
Submitted By: ulf gohde (gohde)
Assigned to: Scott M Stark (starksm)
Summary: 3.2.4 and 4DR4 can not handle spaces in dir names

Initial Comment:
An MBean loads a configuration file from the jboss start 
directory. In our case this directory contains spaces 
whicj is not a problem in JBoss 3.2.2. However, 3.2.4 
and 4DR4 seem to have problems with spaces in 
directory names.

see attached log

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2004-12-29 12:52

Message:
Logged In: YES 
user_id=175228

All issues have been moved to http://jira.jboss.com. Existing
issues have been moved. New issues will be closed with this
canned reponse.

----------------------------------------------------------------------

Comment By: ulf gohde (gohde)
Date: 2004-08-25 10:12

Message:
Logged In: YES 
user_id=1022717

hehe, as i already stated in my comment from 2004-06-23

----------------------------------------------------------------------

Comment By: DoctorPizza (doctorpizza)
Date: 2004-08-25 09:49

Message:
Logged In: YES 
user_id=1034988

I concur, it looks like the new XML libraries are causing issues.

----------------------------------------------------------------------

Comment By: ulf gohde (gohde)
Date: 2004-08-25 09:46

Message:
Logged In: YES 
user_id=1022717

My point exactly. after replacing the xercesimpl.jar and xml-
apis.jar with the versions used in JBoss 3.2.2 it works fine.

----------------------------------------------------------------------

Comment By: DoctorPizza (doctorpizza)
Date: 2004-08-25 08:25

Message:
Logged In: YES 
user_id=1034988

It may or may not be related, but moving from 3.2.3 to 3.2.5 
broke some XML handling for us, due to space-in-filename-
related issues.

The code was this:
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
saxParser.parse(myFile, this); // 'this' extends DefaultHandler
where myFile referred to an file with a space in its path.



----------------------------------------------------------------------

Comment By: ulf gohde (gohde)
Date: 2004-08-03 07:38

Message:
Logged In: YES 
user_id=1022717

Your example does not reflect the described problem at all. As 
i stated in my example the filename does NOT contain path 
information, which means the working directory is autmatically 
used and if that contains spaces you get the error. If you 
pass the whole path it works fine, which means the logic that 
is adding the working directory to the path is buggy.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2004-08-01 07:19

Message:
Logged In: YES 
user_id=175228

This little program does not show a problem using the 3.2.5
parsers.

package xml;

import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;

public class TestFilenameSpaces
{
   public static void main(String[] args) throws Exception
   {
      String filename = "/tmp/java/xml/Space Here/ejb-jar.xml";
      DOMParser parser = new DOMParser();
      parser.parse(filename);
      Document doc = parser.getDocument();
      NodeList sessions = doc.getElementsByTagName("session");
      for(int n = 0; n < sessions.getLength(); n ++)
      {
         Element ejb = (Element) sessions.item(n);
         Node name =
ejb.getElementsByTagName("ejb-name").item(0);
        
System.out.println(name.getFirstChild().getNodeValue());
      }
   }
}


----------------------------------------------------------------------

Comment By: ulf gohde (gohde)
Date: 2004-06-23 01:11

Message:
Logged In: YES 
user_id=1022717

The code is actually quite simple. The passed filename is just 
the filename w/o any path information. After looking at the 
code it was clear that JBoss is not the problem. I replaced 
the xercesimpl.jar and xml-apis.jar with the versions used in 
JBoss 3.2.2 and after that it is working fine.



public Configuration(String strFilename) throws 
CaseWareException
    {
        m_strFilename = strFilename;

        try
        {
            DOMParser parser = new DOMParser();

            parser.parse(m_strFilename);

            m_document = parser.getDocument();

            // build hashtable with section name as key and 
corresponding handler name
            extractSections();

            // build hashtable with section name as key and 
corresponding handler instance
            extractNameValuePairs();
        }
        catch(Exception e)
        {
                        if( Debug.isOnFor(FULL_CLASS))
                                Debug.debug
(FULL_CLASS, "Configuration", Debug.INFO, e.getMessage());
            //Debug.showError(e);
                        throw new CaseWareException
(CLASS, "Configuration", 
EFWResourceBundle.ERR_APP_SERVER, SeverityType.FATAL, 
ErrorType.FLOWARE, null, e);
            //throw new FlowareException(e);
        }
    } // Configuration


----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2004-06-19 21:31

Message:
Logged In: YES 
user_id=175228

Show the code from:
com.plx.framework.config.Configuration.<init>(Configuration.java:139)

along with how the file URL is being obtained.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=971010&group_id=22866


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to