Spring Roo
  1. Spring Roo
  2. ROO-900

Can't create working example with Oracle DB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0.2.RELEASE, 1.1.0.M1
    • Fix Version/s: 1.1.0.M2
    • Component/s: PERSISTENCE
    • Labels:
      None
    • Environment:
      Windows Vista SP2, Oracle 10.2

      Description

      I try to create my test application with ROO.
      When I use HYPERSONIC_IN_MEMORY DB - application work right.
      When I use ORACLE DB - application doesn't work at all.
      I can't select and insert rows.
      I use next scripts to create my examples:

      Example HYPERSONIC_IN_MEMORY DB:
      [CODE]
      project --topLevelPackage com.springsource.roo.accHyp
      persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY

      entity --class ~.domain.Account --testAutomatically
      field number --fieldName branchid --notNull --type java.lang.Integer
      field string --fieldName acc --notNull --sizeMin 6

      perform tests
      controller all --package ~.web
      perform eclipse
      exit
      [/CODE]

      Example Oracle DB:
      [CODE]
      project --topLevelPackage com.springsource.roo.accOra
      persistence setup --provider HIBERNATE --database ORACLE --userName scott --password tiger
      database properties set --key database.url --value jdbc:oracle:thin:@beta:1521:zoo
      database properties list

      entity --class ~.domain.Account --testAutomatically
      field number --fieldName branchid --notNull --type java.lang.Integer
      field string --fieldName acc --notNull --sizeMin 6

      perform tests
      controller all --package ~.web
      perform eclipse
      exit
      [/CODE]

      I use
      Spring Roo 1.0.2.RELEASE [rev 638]
      Spring Roo 1.1.0.M1 [rev 3a0b8a3]
      with practilally the same results.

      You can freelly download Oracle XE from here
      http://www.oracle.com/technology/software/products/database/xe/index.html
      and try my script.

      I get errors when I execute "perform tests" command.

      Paul

        Activity

        Hide
        Gene Conroy-Jones added a comment -

        This is very similar to the entry I just made ROO-945. http://jira.springframework.org/browse/ROO-945

        Works fine when selecting HYPERSONIC_IN_MEMORY
        Fails when selecting GOOGLE_APP_ENGINE

        Show
        Gene Conroy-Jones added a comment - This is very similar to the entry I just made ROO-945 . http://jira.springframework.org/browse/ROO-945 Works fine when selecting HYPERSONIC_IN_MEMORY Fails when selecting GOOGLE_APP_ENGINE
        Hide
        Alan Stewart added a comment -

        Gene, I will wait to test your scripts before making a comment on whether this bug is similar to ROO-945.

        Paul, can you please do a git pull on Roo trunk and test again? If it still fails, run the Roo backup command and attach the zip so I can see the generated ITDs

        Show
        Alan Stewart added a comment - Gene, I will wait to test your scripts before making a comment on whether this bug is similar to ROO-945 . Paul, can you please do a git pull on Roo trunk and test again? If it still fails, run the Roo backup command and attach the zip so I can see the generated ITDs
        Hide
        Paul Babachanakh added a comment -

        I got ROO using command:
        git.exe clone git://git.springsource.org/roo/roo.git

        Then I built ROO using command:
        mvn clean install

        And when I started my script I got error
        ____ ____ ____
        / __ \/ __ \/ __ \
        / /_/ / / / / / / /
        / , _/ // / /_/ /
        // ||___/___/ 1.1.0.M2 [rev d126db9]

        Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
        project --topLevelPackage com.springsource.roo.accOra
        Created D:\SRC\Java\spring\accOra\pom.xml
        Created SRC_MAIN_JAVA
        Created SRC_MAIN_RESOURCES
        Created SRC_TEST_JAVA
        Created SRC_TEST_RESOURCES
        Created SRC_MAIN_WEBAPP
        Created SRC_MAIN_RESOURCES\META-INF\spring
        Created SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml
        Created SRC_MAIN_RESOURCES\log4j.properties
        persistence setup --provider HIBERNATE --database ORACLE --userName scott --password tiger
        Managed SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml
        Created SRC_MAIN_RESOURCES\META-INF\persistence.xml
        Please enter your database details in src/main/resources/META-INF/spring/database.properties.
        Created SRC_MAIN_RESOURCES\META-INF\spring\database.properties
        Managed ROOT\pom.xml [Added dependency com.oracle:ojdbc14:10.2.0.2]
        Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-core:3.5.0-Final]
        Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-entitymanager:3.5.0-Final]
        Managed ROOT\pom.xml [Added dependency org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final]
        Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-validator:4.0.2.GA]
        Managed ROOT\pom.xml [Added dependency javax.validation:validation-api:1.0.0.GA]
        Managed ROOT\pom.xml [Added dependency cglib:cglib-nodep:2.2]
        Managed ROOT\pom.xml [Added dependency javax.transaction:jta:1.1]
        Managed ROOT\pom.xml [Added dependency org.springframework:spring-jdbc:$

        {spring.version}]
        Managed ROOT\pom.xml [Added dependency org.springframework:spring-orm:${spring.version}

        ]
        Managed ROOT\pom.xml [Added dependency commons-pool:commons-pool:1.5.4]
        Managed ROOT\pom.xml [Added dependency commons-dbcp:commons-dbcp:1.3]
        The ORACLE JDBC driver is not available in public maven repositories. Please adjust the pom.xml dependency to suit your needs
        Managed ROOT\pom.xml
        Managed SRC_MAIN_RESOURCES\META-INF\spring\database.properties
        database properties set --key database.url --value jdbc:oracle:thin:@beta:1521:zoo
        Managed SRC_MAIN_RESOURCES\META-INF\spring\database.properties
        database properties list
        database.driverClassName = oracle.jdbc.OracleDriver
        database.password = tiger
        database.url = jdbc:oracle:thin:@beta:1521:zoo
        database.username = scott

        entity --class ~.domain.Account --testAutomatically
        Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain
        Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java
        Created SRC_TEST_JAVA\com\springsource\roo\accora\domain
        Created SRC_TEST_JAVA\com\springsource\roo\accora\domain\AccountDataOnDemand.java
        Created SRC_TEST_JAVA\com\springsource\roo\accora\domain\AccountIntegrationTest.java
        Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj
        field number --fieldName branchid --notNull --type java.lang.Integer
        Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java
        Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_JavaBean.aj
        Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj
        field string --fieldName acc --notNull --sizeMin 6
        Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java
        Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_JavaBean.aj
        Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj
        //field string --fieldName acc --notNull

        //logging setup --level DEBUG
        //perform tests

        controller all --package ~.web
        Command 'controller all --package ~.web' not found (for assistance press TAB or type "hint" then hit ENTER)
        Script execution aborted
        java.lang.IllegalStateException: Script execution aborted
        at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:87)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
        at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:34)
        at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169)
        at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:132)
        at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:32)
        at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:158)
        at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:117)
        at java.lang.Thread.run(Unknown Source)
        Roo exited with code 1

        Show
        Paul Babachanakh added a comment - I got ROO using command: git.exe clone git://git.springsource.org/roo/roo.git Then I built ROO using command: mvn clean install And when I started my script I got error ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / , _/ / / / /_/ / / / | |___ /_ __/ 1.1.0.M2 [rev d126db9] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. project --topLevelPackage com.springsource.roo.accOra Created D:\SRC\Java\spring\accOra\pom.xml Created SRC_MAIN_JAVA Created SRC_MAIN_RESOURCES Created SRC_TEST_JAVA Created SRC_TEST_RESOURCES Created SRC_MAIN_WEBAPP Created SRC_MAIN_RESOURCES\META-INF\spring Created SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml Created SRC_MAIN_RESOURCES\log4j.properties persistence setup --provider HIBERNATE --database ORACLE --userName scott --password tiger Managed SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml Created SRC_MAIN_RESOURCES\META-INF\persistence.xml Please enter your database details in src/main/resources/META-INF/spring/database.properties. Created SRC_MAIN_RESOURCES\META-INF\spring\database.properties Managed ROOT\pom.xml [Added dependency com.oracle:ojdbc14:10.2.0.2] Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-core:3.5.0-Final] Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-entitymanager:3.5.0-Final] Managed ROOT\pom.xml [Added dependency org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final] Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-validator:4.0.2.GA] Managed ROOT\pom.xml [Added dependency javax.validation:validation-api:1.0.0.GA] Managed ROOT\pom.xml [Added dependency cglib:cglib-nodep:2.2] Managed ROOT\pom.xml [Added dependency javax.transaction:jta:1.1] Managed ROOT\pom.xml [Added dependency org.springframework:spring-jdbc:$ {spring.version}] Managed ROOT\pom.xml [Added dependency org.springframework:spring-orm:${spring.version} ] Managed ROOT\pom.xml [Added dependency commons-pool:commons-pool:1.5.4] Managed ROOT\pom.xml [Added dependency commons-dbcp:commons-dbcp:1.3] The ORACLE JDBC driver is not available in public maven repositories. Please adjust the pom.xml dependency to suit your needs Managed ROOT\pom.xml Managed SRC_MAIN_RESOURCES\META-INF\spring\database.properties database properties set --key database.url --value jdbc:oracle:thin:@beta:1521:zoo Managed SRC_MAIN_RESOURCES\META-INF\spring\database.properties database properties list database.driverClassName = oracle.jdbc.OracleDriver database.password = tiger database.url = jdbc:oracle:thin:@beta:1521:zoo database.username = scott entity --class ~.domain.Account --testAutomatically Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java Created SRC_TEST_JAVA\com\springsource\roo\accora\domain Created SRC_TEST_JAVA\com\springsource\roo\accora\domain\AccountDataOnDemand.java Created SRC_TEST_JAVA\com\springsource\roo\accora\domain\AccountIntegrationTest.java Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj field number --fieldName branchid --notNull --type java.lang.Integer Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java Created SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_JavaBean.aj Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj field string --fieldName acc --notNull --sizeMin 6 Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account.java Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_JavaBean.aj Managed SRC_MAIN_JAVA\com\springsource\roo\accora\domain\Account_Roo_ToString.aj //field string --fieldName acc --notNull //logging setup --level DEBUG //perform tests controller all --package ~.web Command 'controller all --package ~.web' not found (for assistance press TAB or type "hint" then hit ENTER) Script execution aborted java.lang.IllegalStateException: Script execution aborted at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:34) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:132) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:32) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:158) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:117) at java.lang.Thread.run(Unknown Source) Roo exited with code 1
        Hide
        Paul Babachanakh added a comment -

        I can't find next commands for ROO 1.1.0.M2:

        • logging setup --level DEBUG
        • controller all --package ~.web

        What is the right script for creating simple application for Oracle?

        Show
        Paul Babachanakh added a comment - I can't find next commands for ROO 1.1.0.M2: logging setup --level DEBUG controller all --package ~.web What is the right script for creating simple application for Oracle?
        Hide
        Alan Stewart added a comment -

        I haven't been able to reproduce the issue with Oracle. If you believe there still is a problem, please re-open

        Show
        Alan Stewart added a comment - I haven't been able to reproduce the issue with Oracle. If you believe there still is a problem, please re-open

          People

          • Assignee:
            Alan Stewart
            Reporter:
            Paul Babachanakh
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: