I am new to Spring and Maven and I am having trouble working the Roo tutorial with Glassfish and Oracle. I have seen some of the instructions for working with Oracle but what I tried below did not work. I am hoping to get some help with the jdbc driver and possibly the GlassFish deployment.
I started with a clean Windows 7 64bit machine and did 32 bit installs of JDK 6u31, Glassfish 3.1.2, and STS 2.9.1.RELEASE-e3.7.2. I have Oracle running on another machine and I downloaded ojdbc6.jar for version 11.2.0.3.
I was able to start Glassfish from STS after downloading the server adapter.
Trying to do the ten-minutes Roo example from chapter 1 I got the following log file (this version has dummy values substituted on the jpa setup command).
After I did the initial project command I noticed that the roo shell output did not match what was listed in Chapter 1 but there were no errors. I assumed this was just a case of documentation from a previous version of Roo. After the the initial project command completed I placed the odbc6.jar file in the tenmin directory and executed the following maven command to use the Oralce jar.Code:// Spring Roo 1.2.1.RELEASE [rev 6eae723] log opened at 2012-04-09 16:51:59 exit // Spring Roo 1.2.1.RELEASE [rev 6eae723] log closed at 2012-04-09 16:52:37 // Spring Roo 1.2.1.RELEASE [rev 6eae723] log opened at 2012-04-09 16:55:37 project --topLevelPackage com.tenmin jpa setup --provider HIBERNATE --database ORACLE --databaseName mydbname --hostName v1425.mydomain.net --userName sproo --password mypassword entity jpa --class ~.Timer --testAutomatically field string --fieldName message --notNull web mvc setup web mvc all --package ~.web selenium test --controller ~.web.TimerController perform tests perform package quit // Spring Roo 1.2.1.RELEASE [rev 6eae723] log closed at 2012-04-09 17:03:55 // Spring Roo 1.2.1.RELEASE [rev 6eae723] log opened at 2012-04-09 17:05:38
Then I modified pom.xml changingCode:mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=C:\Users\win7ult\tenmin\ojdbc6.jar
ToCode:<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.2</version> </dependency>
Then I resumed my roo session at the entity jpa command.Code:<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.3</version> </dependency>
The selenium and perform commands did not complete successfully and neither did the mvn tomcat:run command (Does the STS install include Tomcat? The tutorial does not have very much instruction on what needs to be setup prior to starting it). It appears that I did not install the jdbc dependency correctly.
In STS the pom.xml overview displays the message "Missing artifact com.oracle:ojdbc6.jar:11.2.0.3"
Also if I try to publish my tenmin project to GlassFish from STS I get a message that says: 'Publishing to GlassFish 3.1.2 at localhost...' has encountered a problem. cannot Deploy tenmin with the following detail:
Code:cannot Deploy tenmin Deployment Error for module: tenmin: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.ClassNotFoundException: com.tenmin.web.ApplicationConversionServiceFactoryBean. Please see server.log for more details.


Reply With Quote
