Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: White spaces are required between publicId and systemId.

  1. #1

    Default White spaces are required between publicId and systemId.

    Hello,

    I'm developing a Spring (2.5.6) application. When deploying my WAR file to JBoss (5.0.1.GA) I get the error message below. Not sure what I'm doing wrong. The JPetStore sample application deploys fine. My applicationContext.xml is similar to the sample's xml. Am I missing libraries?

    Any help very much appreciated as stuck now!
    Regards,
    Nes

    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to parse schema for nsURI=http://www.springframework.org/schema/tx, baseURI=null, schemaLocation=null
    ...
    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to parse schema for nsURI=http://www.springframework.org/schema/tx, baseURI=null, schemaLocation=null
    ...
    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: -1:-1 1:55 White spaces are required between publicId and systemId.
    ...
    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to parse schema for nsURI=http://www.springframework.org/schema/tx, baseURI=null, schemaLocation=null
    ...
    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to parse schema for nsURI=http://www.springframework.org/schema/tx, baseURI=null, schemaLocation=null

  2. #2

    Default

    Generally, the "White spaces are required between publicId and systemId" is gotten when the xml file in not well formed. You might want to double check the validity of applicationContext.xml, if you are missing some dtds or you might have an invalid element out there in your xml.

    It would helpful if you could post applicationContext.xml and the full stack trace of the exception.

  3. #3

    Default

    There are 2 XML configuration files that use that schema, applicationContext.xml and applicationContext-hibernate.xml. I've attached them both here. Both files validate though (using the Validate function in Eclipse). I've also attached the relevant section from the server.log file.

    Many thanks!
    Nes
    Attached Files Attached Files

  4. #4

    Default

    I've had some tricky issues deploying my Hibernate applications in JBoss 5. In my case, the problems trace back to the Hibernate .jars included as part of the JBoss distribution.

    In most cases, removing all of JBoss's Hibernate .jars and replacing them with my more recent versions fixes the issues.

    I'm not sure if this is causing your apparent XML parsing problems, but it may be worth looking at. Be sure to back up any files you replace in your JBoss distribution.

  5. #5

    Default

    Quote Originally Posted by jamestastic View Post
    I've had some tricky issues deploying my Hibernate applications in JBoss 5. In my case, the problems trace back to the Hibernate .jars included as part of the JBoss distribution.

    In most cases, removing all of JBoss's Hibernate .jars and replacing them with my more recent versions fixes the issues.

    I'm not sure if this is causing your apparent XML parsing problems, but it may be worth looking at. Be sure to back up any files you replace in your JBoss distribution.
    Tried your suggestion, but same error

  6. #6

    Default

    You're right, it definitely looks like an XML parsing problem, which is strange because the XML looks just fine to me.

    According to this this forum, it could be the fault of the Spring dtd, which is odd because it doesn't look like you're referencing it. It seems to spring up with JBoss 5.0.1. Have you tried a different app server, like JBoss 4 or Tomcat?

  7. #7
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    The problem is that JBoss deployer sometimes tries to parse xml files even if it makes no sense at all (why should JBoss ever try to parse Spring contexts?). For example - I noticed that he tries to parse _all_ xml files he finds in ejb modules.

    I guess that your xml files are in some "special" place like WEB-INF and that if you move them somewhere else it should be ok.

  8. #8
    Join Date
    Mar 2009
    Posts
    4

    Default Jboss blames Spring and Spring blames JBOSS

    Jboss blames Spring and Spring blames JBOSS

    see link below.

    http://www.jboss.org/index.html?modu...opic&p=4214388

  9. #9

    Default

    My XML files are in WEB-INF, but isn't this where Spring looks for them? Happy to relocate them, but where to?

    ps: Does seem it is JBoss 5 specific as I have deployed similar webapps to earlier versions of JBoss fine before. Just wanted to bring everything up to latest versions with this new webapp.
    Last edited by nesyarug; Mar 28th, 2009 at 01:43 PM.

  10. #10

    Default

    I thought I'd give it another try on JBoss 5.1.0.GA, but running into the exact same problem. I since moved all my Spring configurations to XML Schema-based configuration. Funny thing is the app runs without any problems on JBoss 4.2.3.GA.

    Same error:

    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to parse schema for nsURI=http://www.springframework.org/schema/context, baseURI=null, schemaLocation=null

    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to parse schema for nsURI=http://www.springframework.org/schema/context, baseURI=null, schemaLocation=null

    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: -1:-1 1:55 White spaces are required between publicId and systemId.

    Anyone ran into same and was able to resolve?
    Last edited by nesyarug; Oct 25th, 2009 at 06:53 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •