The title says it all. I am trying to install Roller 3 on Mac OS X (Intel) 10.4.8 on top of Jetty 6 and using PostgreSQL 8.1.3. I'm using Java 1.5. I've tried to set up things in accordance with the Installation Guide (http://people.apache.org/~snoopdave/roller30- install-guide.pdf), but that is based on Tomcat and MySQL, so I've had to experiment. Not surprisingly, it's not working, and I'd be grateful if someone could help me.

The Jetty instructions on the Wiki (http://rollerweblogger.org/wiki/ Wiki.jsp?page=InstallationGuideJetty) apply to version 4.2.14 and Jetty seems to have changed somewhat since then. After googling around, I put together the files {jetty.home}/contexts/roller.xml and {jetty.home}/etc/jetty-roller.xml (see below) and started jetty thus from {jetty.home}:

        java -jar start.jar etc/jetty.xml etc/jetty-roller.xml

I then get an error in the log file (see below) which seems to indicate that something is wrong with the DataSource jdbc/rollerdb. When I examined what is returned, the StandardXSDataSource object had nulls in url, user and password and not the values I assigned.

I've left {jetty.home}/etc/jetty.xml as it was when installed and based {jetty.home}/etc/jetty-roller.xml on jetty-plus.xml.

Any hints or pointers please?

Steve

------------------------------------------------------------------------ -----------------
contexts/roller.xml
=============
<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure// EN" "http://jetty.mortbay.org/configure.dtd";>

<Configure class="org.mortbay.jetty.webapp.WebAppContext">

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Required minimal context configuration : --> <!-- + contextPath --> <!-- + war OR resourceBase --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <Set name="contextPath">/roller</Set>
<Set name="resourceBase"><SystemProperty name="roller.webapp" default="webapps/roller"/></Set>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Optional context configuration --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <Set name="extractWAR">false</Set>
    <!--Set name="copyWebDir">false</Set-->
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Use configuration classes defined in etc/jetty- roller.xml -->

<!-- Sequence of configurations to be applied to a webapp. --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <Array id="plusConfig" type="java.lang.String">
        <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
        <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
        <Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
        <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
        <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
    </Array>

    <Set name="ConfigurationClasses"><Ref id="plusConfig" /></Set>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Set up JDBC user realm --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <Get name="securityHandler">
        <Set name="userRealm">
            <New class="org.mortbay.jetty.security.JDBCUserRealm">
                <Arg>Roller Realm</Arg>
<Arg><SystemProperty name="jetty.home" default="."/>/ etc/jdbcRealm.properties</Arg>
            </New>
        </Set>
    </Get>

</Configure>

------------------------------------------------------------------------ -----------------
etc/jetty-roller.xml
==============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure// EN" "http://jetty.mortbay.org/configure.dtd";>

<Configure id="Server" class="org.mortbay.jetty.Server">

<!-- ======================================================================== =========== --> <!-- Configure a Jotm instance which provides a javax.transaction.TransactionManager --> <!-- and a javax.transaction.UserTransaction implementation. --> <!-- ======================================================================== =========== -->
    <New id="jotm" class="org.objectweb.jotm.Jotm">
        <Arg type="boolean">True</Arg>
        <Arg type="boolean">False</Arg>
        <Call id="tm" name="getTransactionManager"/>
        <Call id="ut" name="getUserTransaction"/>
    </New>

<!-- ======================================================================== =========== --> <!-- Set up the UserTransaction impl from JOTM as the transaction manager for jetty6 --> <!-- ======================================================================== =========== -->
    <New id="tx" class="org.mortbay.jetty.plus.naming.Transaction">
        <Arg>
            <Ref id="ut"/>
        </Arg>
    </New>

<!-- ======================================================================== =========== --> <!-- Set up a DataSource that is XA aware. JOTM uses XAPool for this. --> <!-- ======================================================================== =========== -->
    <New id="rollerds" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/rollerdb</Arg>
        <Arg>
<New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                <Arg>
<New class="org.enhydra.jdbc.standard.StandardXADataSource"> <Set name="driverName">org.postgresql.Driver</Set> <Set name="url">jdbc:postgresql://localhost: 5432/roller</Set>
                        <Set name="user">roller</Set>
                        <Set name="password">roller</Set>
<Set name="transactionManager"><Ref id="tm"/ ></Set>
                    </New>
                </Arg>
            </New>
        </Arg>
    </New>
</Configure>

------------------------------------------------------------------------ -----------------
LOG FILE
=======
2007-01-08 22:27:03.436::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 0 [main] INFO org.objectweb.jotm - JOTM started with a local transaction factory which is not bound.
1    [main] INFO  org.objectweb.jotm  - CAROL initialization
153  [main] INFO  org.objectweb.jotm.jta  - JOTM 2.0.10
2007-01-08 22:27:04.109::INFO:  jetty-6.1.0
2007-01-08 22:27:04.283::INFO: Deploy /Users/steve/Documents/ NetBeans/jetty-6.1.0/contexts/roller.xml -> [EMAIL PROTECTED]/roller,file:/Local/ OpenSource/Roller/webapp/roller/} 2007-01-08 22:27:04.396::INFO: Class annotation processing is not currently implemented 2007-01-08 22:27:04.403::INFO: Binding java:comp/env/jdbc/rollerdb to jdbc/rollerdb 2007-01-08 22:27:04.454::INFO: Class annotation processing is not currently implemented 1025 [main] INFO org.apache.roller.config.RollerConfig - successfully loaded default properties. 1026 [main] INFO org.apache.roller.config.RollerConfig - no custom properties file found in classpath 1026 [main] INFO org.apache.roller.config.RollerConfig - no custom properties file specified via jvm option 1027 [main] INFO org.apache.roller.config.RollerConfig - Expanded value of uploads.dir from '${user.home}/roller_data/uploads' to '/ Users/steve/roller_data/uploads' 1027 [main] INFO org.apache.roller.config.RollerConfig - Expanded value of search.index.dir from '${user.home}/roller_data/search- index' to '/Users/steve/roller_data/search-index' 1034 [main] DEBUG org.enhydra.jdbc.xapool - CoreDataSource:getObjectInstance instance created 1034 [main] DEBUG org.enhydra.jdbc.xapool - StandardPoolDataSource:setDataSourceName
2007-01-08 22:27:04.928::WARN:
java.lang.NullPointerException
at javax.naming.InitialContext.getURLScheme (InitialContext.java:228) at javax.naming.InitialContext.getURLOrDefaultInitCtx (InitialContext.java:277)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.enhydra.jdbc.pool.StandardPoolDataSource.getObjectInstance (StandardPoolDataSource.java:589) at org.enhydra.jdbc.pool.StandardXAPoolDataSource.getObjectInstance (StandardXAPoolDataSource.java:193) at javax.naming.spi.NamingManager.getObjectInstance (NamingManager.java:304) at org.mortbay.naming.NamingContext.lookup (NamingContext.java:605) at org.mortbay.naming.NamingContext.lookup (NamingContext.java:665) at org.mortbay.naming.NamingContext.lookup (NamingContext.java:680) at org.mortbay.naming.local.localContextRoot.lookup (localContextRoot.java:164)
        ....


---
Vimia GmbH
PO Box 163
CH-8143 Stallikon
+41 44 777 9782



Reply via email to