Announcement Announcement Module
Collapse
No announcement yet.
install jpa -database MSSQL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • install jpa -database MSSQL

    Hi all,

    When executing command install jpa -database MSSQL ...
    In database.properties file it creates:

    Code:
    database.driverClassName=com.microsoft.jdbc.sqlserver.SQLServerDriver
    and with that entry i get following exception:

    Code:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.microsoft.jdbc.sqlserver.SQLServerDriver]
    but examination of Microsoft SQL Server JDBC Driver 2.0 March 2009

    it seems theat right entry shoud be:

    Code:
    database.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
    I tested this and it worked for me so if there is anyone else who has similar problem hope it helps

  • #2
    Hi,

    Thanks for making us aware of this. I think it would be best if you could open a Jira ticket for this. Please include the exact versions of the driver and the database you are using.

    We are also considering to use the jTDS driver as an alternative http://jtds.sourceforge.net/ as this is available through public Maven repositories and would remove the 'manual' installation step for the developer.

    Regards,
    Stefan

    Comment


    • #3
      Hello Stefan,

      please do not use JTDS driver for MS SQL since it's out of date. Last version was released in 2007. Microsoft SQL Server JDBC driver 2.0 is stable and supports all the necessary functions. At least to my experience.

      Kind regards,
      Fritz

      Comment


      • #4
        @zcracker & @fritzfs,

        Thanks for your feedback on this. I have changed the driver name in the Roo sources. Progress was documented here: http://jira.springframework.org/browse/ROO-134

        This change should be available in the next release.

        Regards,
        Stefan

        Comment


        • #5
          Btw, Stefan, it would be cool if there would be a command in ROO which would handle JDBC dependencies and set a database parameters without JPA

          Perhaps something like:
          install -database jdbc

          Do you think something like this can be arranged? If that's not possible, I'll have to set up jdbc manual

          Kind regards,
          fritzfs

          Comment


          • #6
            @fritzfs,

            That sounds like a new feature

            Maybe we can also pre-configure JdbcTemplate in the application context for you and then have it inserted with the 'add field' command into a Java type.

            What do you think?

            If you'd like you can open a Jira ticket as a new feature request.

            Regards,
            Stefan

            Comment


            • #7
              Yes, that sounds great! It would be perfect if I could have templates for JDBC operations like operations with stored procedures.

              If ROO could generate something like this, it would be great:
              http://pastebin.com/m125dc3f8

              Of course, perhaps some code cannot be generated. Maybe just method name without the body?

              new jdbc_template -action CRUD -domain User

              ?

              Comment


              • #8
                Originally posted by Stefan Schmidt View Post
                Hi,

                We are also considering to use the jTDS driver as an alternative http://jtds.sourceforge.net/ as this is available through public Maven repositories and would remove the 'manual' installation step for the developer.

                Regards,
                Stefan
                Just having a first look at roo and was wondering what the best way is to add non maven available jars such as the ms jdbc driver jar. ie: what is the suggested 'manual' step?

                Comment


                • #9
                  crobster,

                  The manual step he is referring to is manually installing not-publicly-available libraries into a developer's local repository. This is primarily used for Java libraries and other projects that were not built with maven or do not have maven support at the project level. Usually, in these situations, the developer downloads the library (artifact) and then installs it into their local maven repository. Typically, this is performed at the command-line with a command similar to:

                  Code:
                  mvn install:install-file -Dfile=your-artifact-1.0.jar \
                                           -DgroupId=org.some.group \
                                           -DartifactId=your-artifact \
                                           -Dversion=1.0 \
                                           -Dpackaging=jar
                  For more information, you can check out http://maven.apache.org/plugins/mave...gin/usage.html.

                  Alot of modern maven enabled/supported IDEs (such as NetBeans and Eclipse) support manual installation via a right-click on the missing dependency and choosing something like "manually install ..."

                  Alternatively, and my preferred method for when many developers need to be supported is to have a domain/network central maven repository where such artifacts can be installed and shared among all developers using either repository settings in the pom.xml, in the maven system settings.xml or in the user's settings.xml

                  Hope that helps,

                  Comment

                  Working...
                  X