portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barnhill William" <barnhill_will...@bah.com>
Subject Re: [J2] Cornerstone stack overflow
Date Tue, 02 Dec 2003 17:26:37 GMT
ok, based on some behavior I was seeing in the debugger I think I've 
tracked down the real culprit : PersistenceException.

I can reproduce the bug every time if I reduce the demoPersistence 
program down to just the following:

package org.apache.cornerstone.framework.demo.main;

import java.util.List;

import org.apache.cornerstone.framework.api.factory.CreationException;
import org.apache.cornerstone.framework.api.factory.IFactory;
import 
org.apache.cornerstone.framework.api.implementation.ImplementationException;
import org.apache.cornerstone.framework.bean.visitor.BeanPrinter;
import org.apache.cornerstone.framework.demo.bo.api.IGroup;
import org.apache.cornerstone.framework.demo.bo.api.IUser;
import org.apache.cornerstone.framework.init.Cornerstone;
import org.apache.cornerstone.framework.init.InitException;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;
import 
org.apache.cornerstone.framework.api.persistence.factory.PersistenceException;

public class DemoPersistence {
    public static final String REVISION = "$Revision: 1.6 $";
   
    public static void main(String[] args) throws InitException, 
ImplementationException, CreationException {
        // init log4j
        String log4jConfigFilePath = 
System.getProperty("log4j.configuration", "log4j.properties");
        PropertyConfigurator.configure(log4jConfigFilePath);
        Logger log = Logger.getLogger(DemoPersistence.class);
       
        //try {
           
            Cornerstone.init("../../runtime");
        try {
            try {
                throw new PersistenceException("dummy");
            }
            catch (PersistenceException ex) {
               log.error(ex);
               ex.printStackTrace();
            }           
        }
        catch (Throwable th) {
            java.io.StringWriter sw = new java.io.StringWriter();
            java.io.PrintWriter pw = new java.io.PrintWriter(sw);
            if (th.getCause()  == null) {
                pw.println("Cause is null");
            }
            else {
                th.getCause().printStackTrace(pw);
            }
            th.printStackTrace(pw);
            log.error("Error message is "+th.getMessage());
            log.error("Stack trace from previous error was: 
\n"+sw.getBuffer().toString());           
        }
   }
}

The output I get is :
org.apache.cornerstone.framework.api.persistence.factory.PersistenceException: 
dummy
    at 
org.apache.cornerstone.framework.demo.main.DemoPersistence.main(DemoPersistence.java:31)
Caused by: 
org.apache.cornerstone.framework.api.persistence.factory.PersistenceException: 
dummy
    ... 1 more

with
Caused by: 
org.apache.cornerstone.framework.api.persistence.factory.PersistenceException: 
dummy
    ... 1 more
repeated MANY more times.


Barnhill William wrote:

> The readme file in the cornerstone sample zip says that the 
> StackOverflowError happens sometimes. For me it's happening everytime.
>
> After doing some hunting and fiddling with logging I think I've 
> tracked it down to the following msg/location:
>
> 2003-12-02 12:01:25,702 671  
> [main@(org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectCollectionFactory.createCollection(BasePersistentObjectCollectionFactory.java:325))]

>
> ERROR 
> org.apache.cornerstone.framework.persistence.factory.BasePersistentObjectCollectionFactory
 
> - collection type definition missing; use 
> 'collection.instance.className' or 'collection.factory.className' or 
> 'collection.parent.name'
>
> Has anyone fixed this already?
>
> Does anyone have an idea how to fix this?
>
> Also, will it make a difference right now if I use the version in CVS, 
> or the one in the zip archive?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message