That works. Thanks Scott. Now DemoPersistence also works (after adding another step in the default goal to run it). We will add its commentary to the Jetspeed Cornerstone Sample Code document soon.

Jun

Weaver, Scott wrote:

I will go ahead and move them

*================================* | Scott T Weaver |
| <[EMAIL PROTECTED]> | | Apache Jetspeed Portal Project |
| Apache Pluto Portlet Container |
*================================*




-----Original Message-----
From: Jun Yang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 5:31 PM
To: Jetspeed Developers List
Subject: Re: [J2] Cornerstone Framework Update.

Thanks, Bill.  Now I see the problem: the properties files currently
residing under src/java belong to src/resources.

Jun

Barnhill William wrote:



My mistake, correct snippet should be:
   <resource>
       <directory>${basedir}/src/java</directory>
       <includes name="**/*.properties" />
   </resource>

I have tested this with a clean build and it works.

Barnhill William wrote:



Adding the following snippet in the resources element of the
cornerstone project.xml includes the property files. I left the other
resource element in for completeness.

    <resource>
        <directory>${basedir}/src</directory>
        <includes name="**/*.properties" />
    </resource>

Bill


Jun Yang wrote:




I digged around a little and found these properties files missing
from jetspeed-cornerstone-1.0.jar.

Scott, would you please take at the maven build to see why e.g.
BasePersistentObjectListFactory.properties is missing from
jetspeed-cornerstone-1.0.jar?  Thanks!

Jun

Barnhill William wrote:



Jun,

Thanks, that got me past that problem, but now I'm getting a
similar exception as before.  Remember that PersistencException
being thrown was triggering the getCause() call that caused the
stack overflow? Well the reason for the PersistenceException is the
stack trace at the bottom of this message.

The message is
  collection type definition missing; use
'collection.instance.className' or 'collection.factory.className'
or 'collection.parent.name'


I'm guessing this would be set in one of : BasePersistentObjectListFactory.properties, BasePersistentObjectMapFactory.properties, BasePersistentObjectSetFactory.properties, or hsqldb-standalone.reg.properties

Question is which one, and what should it be set to?

[java] 2003-12-02 15:56:00,441 1723 [main] ERROR



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory


- persistenceException; rootCause:
  [java]
org.apache.cornerstone.framework.api.factory.CreationException:
org.apache.cornerstone.framework.api.factory.CreationException:
org.apache.cornerstone.framework.api.factory.CreationException:
collection type definition missing; use 'collec
tion.instance.className' or 'collection.factory.className' or
'collection.parent.name'
  [java]
org.apache.cornerstone.framework.api.factory.CreationException:
org.apache.cornerstone.framework.api.factory.CreationException:
collection type definition missing; use
'collection.instance.className' or 'collection.factory.className'
or 'c
ollection.parent.name'
  [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createCollection(BasePersistentObjectCollectionFactory.ja
va:307)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createInstance(BasePersistentObjectCollectionFactory.java
:123)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.retrieveAndPopulate(BasePersistentObjectCollectionFactory
.java:220)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createInstance(BasePersistentObjectCollectionFactory.java
:107)


[java] at



org.apache.cornerstone.framework.demo.main.DemoPersistence.main(DemoPersis
tence.java:45)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createInstance(BasePersistentObjectCollectionFactory.java
:118)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createInstance(BasePersistentObjectCollectionFactory.java
:107)


  [java] Caused by:
org.apache.cornerstone.framework.api.factory.CreationException:
org.apache.cornerstone.framework.api.factory.CreationException:
collection type definition missing; use
'collection.instance.className' or 'collection.factory.class
Name' or 'collection.parent.name'
  [java]      at



org.apache.cornerstone.framework.demo.main.DemoPersistence.main(DemoPersis
tence.java:45)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createCollection(BasePersistentObjectCollectionFactory.ja
va:307)


  [java] Caused by:
org.apache.cornerstone.framework.api.factory.CreationException:
collection type definition missing; use
'collection.instance.className' or 'collection.factory.className'
or 'collection.parent.name'
  [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.retrieveAndPopulate(BasePersistentObjectCollectionFactory
.java:220)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createCollection(BasePersistentObjectCollectionFactory.ja
va:300)


  [java]      ... 4 more
  [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createInstance(BasePersistentObjectCollectionFactory.java
:118)


  [java]      ... 2 more
  [java] Caused by:
org.apache.cornerstone.framework.api.factory.CreationException:
collection type definition missing; use
'collection.instance.className' or 'collection.factory.className'
or 'collection.parent.name'
  [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectC
ollectionFactory.createCollection(BasePersistentObjectCollectionFactory.ja
va:300)


  [java]      ... 4 more
  [java] Exception in thread "main"
  [java] [ERROR] Java Result: 1
BUILD SUCCESSFUL
Total time: 8 seconds
Finished at: Tue Dec 02 15:56:01 EST 2003

Jun Yang wrote:



Bill,

Change
cornerstone-


demo/registry/implementation/cornerstone.dataSource/hsqldb-
standalone.reg.properties.


Change the line "connection.url=..." to
"connection.url=jdbc:hsqldb:./hsqldb/data/test" and
DemoPersistence should run.

Jun

Barnhill William wrote:



Scott,

I also have created a modified maven.xml, which is attached.
It has the benefit of the following goal tree using prereqs
attributes
demo
  demo:main
         demo:prep
  demo:persistence
         demo:prep

I've also added the hsql jar as a pathelement for the persistence
demo, but this should prob be a maven dependency.

I'm now getting the following error (probly SHQL config problem):
 [java]
org.apache.cornerstone.framework.api.factory.CreationException:
java.sql.SQLException: Table not found: TEST_GROUP in statement
[select * from test_group where id = 100]
 [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectF
actory.createInstance(BasePersistentObjectFactory.java:146)


[java] at



org.apache.cornerstone.framework.demo.main.DemoPersistence.main(DemoPersis
tence.java:31)


 [java] Caused by: java.sql.SQLException: Table not found:
TEST_GROUP in statement [select * from test_group where id = 100]
 [java]      at org.hsqldb.Trace.getError(Unknown Source)
 [java]      at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
 [java]      at
org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
 [java]      at org.hsqldb.jdbcConnection.execute(Unknown Source)
 [java]      at org.hsqldb.jdbcStatement.fetchResult(Unknown
Source)
 [java]      at org.hsqldb.jdbcStatement.executeQuery(Unknown
Source)
 [java]      at
org.hsqldb.jdbcPreparedStatement.executeQuery(Unknown Source)
 [java]      at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectF
actory.retrieveAndPopulate(BasePersistentObjectFactory.java:234)


[java] at



org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectF
actory.createInstance(BasePersistentObjectFactory.java:141)


 [java]      ... 1 more
 [java] Exception in thread "main"
 [java] [ERROR] Java Result: 1

Bill

Barnhill William wrote:



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to