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

Thread: Beandoc crashing (on its samples!)

  1. #1

    Default Beandoc crashing (on its samples!)

    Hi,
    I'm trying to run Beandoc on the samples included in the 0.6.2 distribution and I'm getting the following error:

    Code:
    C:\temp\spring-beandoc-0.6.2\samples>runbeandoc-cli.bat beandoc.properties
    Sottodirectory o file ..\target\beandoc giĆ* esistente.
    4-ott-2005 17.46.33 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [org/springframework/beandoc/client/beandoc.xml]
    4-ott-2005 17.46.33 org.springframework.core.CollectionFactory <clinit>
    INFO&#58; JDK 1.4+ collections available
    4-ott-2005 17.46.33 org.springframework.beandoc.util.PatternMatcher convertStringsToPatterns
    AVVERTENZA&#58; Ignoring invalid RegEx pattern in String &#91;*.MessageSource&#93;; problem description &#91;Dangling meta character '*'
     near index 0
    *.MessageSource
    ^&#93;
    4-ott-2005 17.46.34 org.springframework.beandoc.DefaultContextProcessor process
    INFO&#58; Processing input files..
    Unable to run beandoc tool; Unexpected internal error near index 1
    \
     ^
    I'm using jdk 1.5.0_05. Anybody has ideas?

  2. #2
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    I'll take a look at it for you. The RegEx is invalid, as noted in the output you posted. Try changing it beandoc.properties for now and see what happens.
    Darren Davison.
    Public Key: 0xE855B3EA

  3. #3
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    hmm. It works for me even with the typo in the RegEx (using runbeandoc-cli.sh on Linux though).

    Can you enable debug logging and post the output?

    I've fixed and committed the RegEx typo, although that's not the issue you're seeing.

    Regards,
    Darren Davison.
    Public Key: 0xE855B3EA

  4. #4

    Default

    I've tried (set DEBUG level on both root logger and beandoc logger in the log4j.properties file) but the output does not changes... it seems no log statements besides the last INFO are executed...

  5. #5
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    you don't have an earlier version of beandoc installed anywhere do you?
    Darren Davison.
    Public Key: 0xE855B3EA

  6. #6

    Default

    Nope, and I don't see where I can download one (http://opensource2.atlassian.com/con...play/BDOC/Home only links 0.6.2)

  7. #7
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    that's ok. Earlier versions had similar error messages that should have been fixed.

    What happens if you run the runbeandoc-ant.bat program?

    Also, try editing beandoc.properties and changing the input.files entry to use the petclinic files rather than petstore.

    Afraid I don't have any windows machines to test this on at present - I'll see if I can get a colleague to try it this afternoon though..

    Regards,
    Darren Davison.
    Public Key: 0xE855B3EA

  8. #8

    Default

    runbeandoc-ant.bat

    Code:
    Buildfile&#58; build.xml
    
    init&#58;
    
    beandoc&#58;
      &#91;beandoc&#93; 5-ott-2005 14.58.03 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
      &#91;beandoc&#93; INFO&#58; Loading XML bean definitions from class path resource &#91;org/springframework/beandoc/client/beandoc.xml&#93;
    
      &#91;beandoc&#93; 5-ott-2005 14.58.03 org.springframework.core.CollectionFactory <clinit>
      &#91;beandoc&#93; INFO&#58; JDK 1.4+ collections available
      &#91;beandoc&#93; 5-ott-2005 14.58.04 org.springframework.beandoc.util.PatternMatcher convertStringsToPatterns
      &#91;beandoc&#93; AVVERTENZA&#58; Ignoring invalid RegEx pattern in String &#91;*.MessageSource&#93;; problem description &#91;Dangling meta c
    haracter '*' near index 0
      &#91;beandoc&#93; *.MessageSource
      &#91;beandoc&#93; ^&#93;
      &#91;beandoc&#93; 5-ott-2005 14.58.04 org.springframework.beandoc.DefaultContextProcessor process
      &#91;beandoc&#93; INFO&#58; Processing input files..
    
    BUILD FAILED
    C&#58;\temp\spring-beandoc-0.6.2\samples\build.xml&#58;35&#58; java.util.regex.PatternSyntaxException&#58; Unexpected internal error nea
    r index 1
    \
    I've tried also with petclinic and with my own mapping files, the error is still (exactly) the same...
    I'm re-downloading everything again, let's see if the problem is a file curruption.

  9. #9

    Default

    I've loaded the sources into Eclipse and running the DefaultContextProcessorText I get exactly the same error as above.

    I've also tried to run it on jdk 1.5.0_03 but got the same error.
    Running on jdk 1.4 does not work, since apparently spring has been compiled with 1.5 without preserving the compatibility with 1.4

    I'm investigating.

  10. #10

    Default

    Ok, found the problem. At line 174 of BeanDocUtils you do a Split using the file separator, that happens to be "\\" under Windows (that's why it works on Linux).

    Replacing split(File.separator) with split(File.separator.replace("\\", "\\\\"))
    does the trick.

    It seems that beandoc users and Windows users have been two separate sets so far ;-)

Similar Threads

  1. BeanDoc and Spring attributes
    By ben_sion in forum Container
    Replies: 3
    Last Post: Oct 10th, 2005, 03:44 AM
  2. BeanDoc 0.6 available.
    By davison in forum Announcements
    Replies: 7
    Last Post: Oct 8th, 2005, 07:48 AM
  3. Beandoc and Spring 1.2
    By trondgzi in forum Container
    Replies: 2
    Last Post: Jun 14th, 2005, 07:54 AM
  4. BeanDoc without the filesystem
    By kodos in forum Container
    Replies: 1
    Last Post: Jun 6th, 2005, 06:31 PM
  5. beandoc: 2 problems/ideas
    By simcha in forum Container
    Replies: 3
    Last Post: Apr 28th, 2005, 04:36 AM

Posting Permissions

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