See my comments inline. please let me know if you still face any problem.

On Feb 16, 2012, at 7:56 AM, William Hayes wrote:

> Thanks Raminderjeet!
> 
> Just checking that the following instructions are correct as long as I
> don't comment out the H2 dependencies and properties?  I wasn't quite sure
You need to comment H2 properties but leave H2 dependencies. 
> about what you said to do for the pom.xml files.  Are these the only
> pom.xml files I should change or should I also change the wookie files?
I did not change any wookie pom to test. I will look into this later if there 
are any properties there.
> 
> 
> Database configuration
> 
> Add mysql-connector-java-5.1.18.jar to same directory as the h2 jar:
> 
> ./rave-portal/target/rave-portal-0.9-incubating-SNAPSHOT/WEB-INF/lib
> ./rave-shindig/target/rave-shindig-0.9-incubating-SNAPSHOT/WEB-INF/lib
If you are changing pom and building you need not to add mysql driver to lib 
folders. That is for distribution. 

> 
> Add following dependency to ./rave-shindig/pom.xml and
> ./rave-portal/pom.xml
> 
> <dependency>
>       <groupId>mysql</groupId>
>       <artifactId>mysql-connector-java</artifactId>
>       <version>5.1.18</version>
> </dependency>
> 
> 
You need to comment H2 properties in 
./rave-portal-resources/src/main/resources/portal.properties and 
/rave-shindig/src/main/resources/rave.shindig.properties and add you mysql. 

> Add mysql properties to
> ./rave-portal-resources/src/main/resources/portal.properties
>       
> portal.dataSource.url=jdbc:mysql://localhost:3306/rave-portal?allowMultiQu
> eries=true
>       portal.dataSource.driver=com.mysql.jdbc.Driver
>       portal.dataSource.username=XXXX
>       portal.dataSource.password=XXXX
> 
> 
>       portal.jpaDialect=org.springframework.orm.jpa.DefaultJpaDialect
>       
> portal.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.MySQL
> Dictionary
>       portal.jpaVendorAdapter.database=MYSQL
> 
> 
> Add mysql properties to
> ./rave-shindig/src/main/resources/rave.shindig.properties
>       
> rave-shindig.dataSource.url=jdbc:mysql://localhost:3306/rave-portal?allowM
> ultiQueries=true
>       rave-shindig.dataSource.driver=com.mysql.jdbc.Driver
>       rave-shindig.dataSource.username=XXXX
>       rave-shindig.dataSource.password=XXXX
> 
> 
>       rave-shindig.jpaDialect=org.springframework.orm.jpa.DefaultJpaDialect
>       
> rave-shindig.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql
> .MySQLDictionary
>       rave-shindig.jpaVendorAdapter.database=MYSQL
> 
> Test via: 'mvn cargo:start -f rave-portal/pom.xml' and then create the
> distribution assuming it passes the test.
Cargo plugin is deploying rave to tomcat using cargo:start command
> 
> 
> 
> 
> 
> 
> On 2/15/12 11:24 PM, "Raminderjeet Singh" <[email protected]> wrote:
> 
>> Hi William,
>> 
>> Yes there are definitely few problems with the instructions. For build to
>> be successful don't remove the h2 driver and add mysql driver in both the
>> pom's.Reason is the Unit tests and H2 console defined in
>> rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml are looking
>> for H2 driver. You can comment H2 console to remove runtime dependency on
>> h2. If you still want to remove h2 you may need to make few for changes
>> to test resources or use  mvn clean install -DskipTests.
>> 
>> Other changes are, we merged  both portal and shindig database to same
>> database in latest releases so point both to same DB.
>> 
>> 
>> portal.dataSource.url=jdbc:mysql://localhost:3306/rave_portal?allowMultiQu
>> eries=true
>> rave-shindig.dataSource.url=jdbc:mysql://localhost:3306/rave_portal?allowM
>> ultiQueries=true
>> 
>> You can test rave by mvn cargo:start -f rave-portal/pom.xml and then
>> create the distribution. I will update the instruction tomorrow.
>> 
>> Thanks
>> Raminder
>> 
>> On Feb 15, 2012, at 8:07 PM, William Hayes wrote:
>> 
>>> After downloading trunk (0.9 Incubating) and making changes (in blue
>>> below), I ran 'mvn ­Pdist' and got the following result
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [INFO] Reactor Summary:
>>> [INFO]
>>> [INFO] Apache Rave :: rave-project ....................... SUCCESS
>>> [6.561s]
>>> [INFO] Apache Rave :: rave-components .................... SUCCESS
>>> [0.171s]
>>> [INFO] Apache Rave :: rave-commons ....................... SUCCESS
>>> [15.642s]
>>> [INFO] Apache Rave :: rave-core .......................... SUCCESS
>>> [46.190s]
>>> [INFO] Apache Rave :: rave-web ........................... SUCCESS
>>> [16.238s]
>>> [INFO] Apache Rave :: rave-providers ..................... SUCCESS
>>> [0.128s]
>>> [INFO] Apache Rave :: rave-opensocial-provider ........... SUCCESS
>>> [9.326s]
>>> [INFO] Apache Rave :: rave-w3c-provider .................. SUCCESS
>>> [8.438s]
>>> [INFO] Apache Rave :: rave-portal-resources .............. SUCCESS
>>> [11.077s]
>>> [INFO] Apache Rave :: rave-portal-dependencies ........... SUCCESS
>>> [4.305s]
>>> [INFO] Apache Rave :: rave-shindig ....................... FAILURE
>>> [30.468s]
>>> [INFO] Apache Rave :: Demo Gadgets ....................... SKIPPED
>>> [INFO] Apache Rave :: rave-portal ........................ SKIPPED
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD FAILURE
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> 
>>> 
>>> Database configuration
>>> 
>>> Add mysql-connector-java-5.1.18.jar to same director as the h2 jar:
>>> 
>>> ./rave-portal/target/rave-portal-0.9-incubating-SNAPSHOT/WEB-INF/lib
>>> ./rave-shindig/target/rave-shindig-0.9-incubating-SNAPSHOT/WEB-INF/lib
>>> 
>>> Add following dependency to ./rave-shindig/pom.xml and
>>> ./rave-portal/pom.xml
>>> 
>>> <dependency>
>>>   <groupId>mysql</groupId>
>>>   <artifactId>mysql-connector-java</artifactId>
>>>   <version>5.1.18</version>
>>> </dependency>
>>> Add mysql properties to
>>> ./rave-portal-resources/src/main/resources/portal.properties
>>> 
>>> portal.dataSource.url=jdbc:mysql://localhost:3306/rave-portal?allowMultiQ
>>> ueries=true
>>> portal.dataSource.driver=com.mysql.jdbc.Driver
>>> portal.dataSource.username=rave
>>> portal.dataSource.password=rave
>>> 
>>> portal.jpaDialect=org.springframework.orm.jpa.DefaultJpaDialect
>>> 
>>> portal.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.MySQ
>>> LDictionary
>>> portal.jpaVendorAdapter.database=MYSQL
>>> Add mysql properties to
>>> ./rave-shindig/src/main/resources/rave.shindig.properties
>>> 
>>> rave-shindig.dataSource.url=jdbc:mysql://localhost:3306/rave-shindig?allo
>>> wMultiQueries=true
>>> rave-shindig.dataSource.driver=com.mysql.jdbc.Driver
>>> rave-shindig.dataSource.username=rave
>>> rave-shindig.dataSource.password=rave
>>> 
>>> rave-shindig.jpaDialect=org.springframework.orm.jpa.DefaultJpaDialect
>>> 
>>> rave-shindig.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sq
>>> l.MySQLDictionary
>>> rave-shindig.jpaVendorAdapter.database=MYSQL
>>> 
>>> 
>>> 
>>> Here are the errors I'm getting:
>>> 
>>> Caused by: org.springframework.beans.factory.BeanCreationException:
>>> Error creating bean with name 'entityManagerFactory' defined in class
>>> path resource [rave-shindig-applicationContext.xml]: Cannot resolve
>>> reference to bean 'dataSource' while setting bean property 'dataSource';
>>> nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean with name 'dataSource' defined in class path resource
>>> [rave-shindig-applicationContext.xml]: Error setting property values;
>>> nested exception is
>>> org.springframework.beans.PropertyBatchUpdateException; nested
>>> PropertyAccessExceptions (1) are:
>>> PropertyAccessException 1:
>>> org.springframework.beans.MethodInvocationException: Property
>>> 'driverClassName' threw exception; nested exception is
>>> java.lang.IllegalStateException: Could not load JDBC driver class
>>> [org.h2.Driver]
>>> 
>>> I can't figure out where it's picking up the H2 database driver.  It
>>> should be using the mysql database driver.
>>> 
>>> Any ideas?  What else can I provide to help figure this out?
>>> 
>>> Thanks,
>>> 
>>> Wm
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

Reply via email to