0

I started working with Spring Tool Suite 6.0 M1, Spring Roo 1.2.5, JDK 8.0, Windows 7 Home; I created a Spring Roo project but I'm having troubles to complete the project configuration.

Here the steps:

  1. The Roo project is created: File > New > Other > Spring > Spring Roo Project
  2. jpa setup is completed
  3. JTDS is being used by default as follow..

    database.driverClassName=net.sourceforge.jtds.jdbc.Driver
    database.url=jdbc\:jtds\:sqlserver\://localhost\:1433/mydb

  4. osgi start --url file:///D:/RooThings/jtds-1.2.4.jar (it worked fine)
  5. database reverse engineering complete with success.
  6. There are warnings for a couple of classes within the project:

    @RooJpaEntity(identifierType = SeriePK.class, versionField = "", table = "Serie", schema = "dbo")
    public class Serie {}

** SeriePK.class : Type mismatch: cannot convert from Class<'SeriePK> to Class<'? extends Serializable>

At SeriePK.class:
@RooIdentifier(dbManaged = true)
public final class SeriePK {}

I extended it with Seriealizable, but the warning is still there. I tried to fix this changing the SQLServer driver as follow:

  1. I followed this support: Setup SqlServer Driver in Roo project
  2. database.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver database.url=jdbc\:sqlserver\://localhost\:1433;database=mydb
  3. osgi start --url file:///D:/RooThings/sqljdbc4-4.0.jar (it worked fine)

roo> database introspect --schema dbo
javax.net.ssl.SSLSocket not found by [84]

so, I can't to continue working with Roo anymore..

Any help I'd really appreciate.

Jrr
  • 167
  • 1
  • 4
  • 14
  • The error message is as clear as possible. A class which implements `Serializable` is expected for `@RooJpaEntity.identifierType()` but your class `SeriePK` does not implement `Serializable`. – Holger Jun 11 '14 at 17:18
  • Thanks Holger, as I mentioned above I did it without sucess, however here some results after some bug-fixing: Spring Roo 1.2.5 is causing that trouble with Database reverse process. I had to make a downgrade to Roo 1.2.4, and it's working fine now. – Jrr Jun 12 '14 at 00:24
  • About to change JTDS to SQLServer driver I'm still getting: **roo> database introspect --schema dbo \n javax.net.ssl.SSLSocket not found by [83]** – Jrr Jun 12 '14 at 00:26
  • My last version tool are: Windows 7, JDK 7, STS 3.5.1 Roo 1.2.5 .. I'm using JTDS instead of SQLServer driver (sqljdbc4-4.0.jar).. as you can see I did a donwgrade of my development tools.. Any help I'd really appreciate. – Jrr Jun 12 '14 at 00:28

2 Answers2

1

I had same problem. After add "osgi start --url file:c:/sqljdbc4-4.0.jar" and before running "database introspect --schema dbo", you should write:

jpa setup --database MSSQL --provider HIBERNATE --hostName LOCALHOST --userName USERDB --password PSSWDB --databaseName DB

0

I have the same problem after updating my sts.

I think that implements Serializable in the .aj file is not detected.

So you have to rewrite implements Serializable in your .java file.

Roo will delete automatically the concerning .aj file.

Try to implement Serializable in SeriePK.java

naddame
  • 129
  • 2
  • 10