Results 1 to 9 of 9

Thread: install jpa -database MSSQL

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    8

    Default 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. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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

  3. #3

    Default

    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

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    @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

  5. #5

    Default

    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

  6. #6
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    @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

  7. #7
    Join Date
    Aug 2009
    Posts
    3

    Default

    Quote 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?

  8. #8
    Join Date
    Nov 2006
    Location
    Columbus, OH
    Posts
    143

    Default

    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,
    Regards,

    Joshua Preston

    --

    "The Guide says that there is an art to flying," said Ford, "or rather a knack. The knack lies in learning how to throw yourself at the ground and miss."

Posting Permissions

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