facebook

Formatting Spring applicationContext causes class not found

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #258428 Reply

    mjonesworld
    Member

    When using Spring and the MyEclipse Spring Config Editor, formatting the document by Ctrl-Shift-F or by a wizard(such as hibernate wizards) editing the file introduces tabs and newlines, causing the class names to be “not found”.

    After the running the hibernate wizards I had this:

    <property name="url">
                <value>
                    jdbc:sqlserver://Turret:1433;databaseName=onyx
                </value>
            </property>

    Which threw this error, and took a lot of fruitless googling for an answer.

    ERROR [main] (JDBCExceptionReporter.java:72) - Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL '
                    jdbc:sqlserver://Turret:1433;databaseName=onyx
    

    I removed the tabs before and the newlines after the class name, thusly:

    <property name="url">
                <value>jdbc:sqlserver://Turret:1433;databaseName=onyx</value>
            </property>

    And the application runs fine.
    Hitting CTRL-SHIFT-F to format the file, adds the tabs, spaces and newlines back in, breaking the application again.
    I experienced this in the spring of 2005, in what ever version was released then, I am now on
    Eclipse
    Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
    Build id: M20060629-1905
    MyEclipse
    Version: 5.0.0
    Build id: 20060805-5.0-GA

    I am surprised to have the same problem, I don’t know if it is Spring, Eclipse or My Eclipse, but it is very frustrating to habitually CTRL-SHIFT-F and break a huge Spring XML file, or run a wizard and break it.

    I hope someone stumbles across this post and save themselves some fruitless googling and gets to do some ogling instead.

    Mark

    #258559 Reply

    Riyad Kalla
    Member

    Mark,
    I will file this bug ASAP, this may be a bad mis-use of the XML formatter not realizing that the whitespace can cause a break in files.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Formatting Spring applicationContext causes class not found

You must be logged in to post in the forum log in