excalibur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordon Saardchit <jsaardc...@go2.com>
Subject NullPointerException With Connection Pools
Date Sat, 12 Feb 2005 00:06:55 GMT
I hope i'm on the right list for this, but I'm attempting to use
avalon/excalibur for its jdbc connection pooling, which I've used before
plenty of times with the old version of avalon and jdk1.3.x.  However, when
attempting to use it now (jdk 1.4.x) I get the following exception when
attempting to initialize my component manager:

java.lang.NullPointerException at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:266)

The exception is being thrown from the initialize() method of my component
manager.  When looking at the source for this class it appears to be an
issue with the logger manager, however, from my source below I set all the
appropirate loggers pior to initialization of the of ComponentManager.  I
can also supply my role and component config descriptors if it will help,
but they are virtually identical to the tutorial.  Thanks in advance for any
help.  Much appreciated:

Source:

try
        {
            mgr = new ExcaliburComponentManager();

            DefaultConfigurationBuilder builder = 
                new DefaultConfigurationBuilder();

            log.debug( "Building Configuration" );

            Configuration conf = builder.build(
                getClass().getClassLoader().getResourceAsStream(
                    "config/ali-config.xml"
                )
            );

            java.io.InputStream is =
getClass().getClassLoader().getResourceAsStream(
                    "config/ali-roles.xml"
                );

            log.debug( "Building role config" );
            Configuration roleConfig = builder.build( is );

            // setup the components using role manager
            DefaultRoleManager roleMgr = new DefaultRoleManager();

            log.debug( "Setting role manager logger" );
            roleMgr.setLogger(
                Hierarchy.getDefaultHierarchy().getLoggerFor(
                    "ali.roles"
                )
            );

            roleMgr.configure(roleConfig);

            log.debug( "Setting logger for component manager" );
            mgr.setLogger(
                Hierarchy.getDefaultHierarchy().getLoggerFor(
                    "ali.roles"
                )
            );

            mgr.setRoleManager(roleMgr);
            mgr.contextualize( new DefaultContext() );
            mgr.configure(conf);

            log.debug( "initializing component manager" );
            mgr.initialize();
        }
        catch(Exception e)
        {
            log.error( e.getMessage(), e );
            throw new ServletException(e.getMessage());
        }

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@excalibur.apache.org
For additional commands, e-mail: user-help@excalibur.apache.org


Mime
View raw message