geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Petersson <pe...@pmb.mine.nu>
Subject Re: Running Apache Roller on Geronimo
Date Thu, 15 Mar 2007 18:46:53 GMT
I have now also tested a setup of Apache Roller 3.1 (rc4)  with the 
derby database as backend on a current G1.2 (apache) snapshot.
I get the same error as reported in this thread with the mysql backend 
so David if you (or anyone else for that mater) have some time to take a 
look at this it would be great ;).

Below you will find pointers to the Apache Roller 3.1 bundle and the 
Geronimo and Roller configurations for G and derby setup.

Roller 3.1 Resources
The bundle: http://people.apache.org/~snoopdave/apache-roller-3.1/
Required jars: 
https://roller.dev.java.net/servlets/ProjectDocumentList?expandFolder=6959&folderID=0
Path to the derby rollerdb create script (in the bundle abowe): 
apache-roller-3.1/webapp/roller/WEB-INF/dbscripts/derby/createdb.sql
(I used the G console to import the db stuff)

roller-custom.properties (A good place for this file is in WEB-INF/classes/)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#
#Edit as you like, check the defaults in roller.properties you may not 
need some of this settings.
#
uploads.dir=/var/local/roller/roller_data/uploads
search.index.dir=/var/local/roller/roller_data/search-index

#
# Database configuration settings
# Hibernate dialect: You must override this to use a database other than 
MySQL4
hibernate.dialect=org.hibernate.dialect.DerbyDialect

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

roller-derbydb-plan-g1_2.xml (do not forget to edit db user and password 
settings)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>console.dbpool</dep:groupId>
            <dep:artifactId>DerbyDB_roller</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>org.apache.derby</dep:groupId>
                <dep:artifactId>derby</dep:artifactId>
                <dep:version>10.1.3.1</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>DerbyDB_roller</name>
                    <config-property-setting 
name="Password">thepw</config-property-setting>
                    <config-property-setting 
name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
                    <config-property-setting 
name="UserName">theuser</config-property-setting>
                    <config-property-setting 
name="ConnectionURL">jdbc:derby:roller</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

geronimo-web.xml
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2" 
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" 
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" 
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>roller</sys:groupId>
      <sys:artifactId>roller</sys:artifactId>
      <sys:version>3.1</sys:version>
      <sys:type>war</sys:type>
    </sys:moduleId>
    <sys:dependencies> 
      <sys:dependency>
         <sys:groupId>console.dbpool</sys:groupId>
         <sys:artifactId>DerbyDB_roller</sys:artifactId>
      </sys:dependency>   
    </sys:dependencies>
    <hidden-classes>
        <filter>antlr</filter>
    </hidden-classes>
  </sys:environment>

  <context-root>/roller</context-root>
   
  <sys:resource-ref>
     <sys:ref-name>jdbc/rollerdb</sys:ref-name>
     <sys:resource-link>DerbyDB_roller</sys:resource-link>
  </sys:resource-ref>
 
    <gbean name="DerbyDB_roller" 
class="org.apache.geronimo.security.realm.GenericSecurityRealm" 
xsi:type="dep:gbeanType" 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <attribute name="realmName">DerbyDB_roller</attribute>
        <reference name="ServerInfo">
            <name>ServerInfo</name>
        </reference>
        <reference name="LoginService">
            <name>JaasLoginService</name>
        </reference>
        <xml-reference name="LoginModuleConfiguration">
            <log:login-config 
xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.2">
                <log:login-module control-flag="REQUIRED" 
server-side="true" wrap-principals="false">
                    
<log:login-domain-name>DerbyDB_roller</log:login-domain-name>
                    
<log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
                    <log:option name="userSelect">SELECT username, 
passphrase FROM rolleruser WHERE username=?</log:option>
                    <log:option 
name="dataSourceApplication">null</log:option>
                    <log:option name="groupSelect">SELECT username, 
rolename FROM userrole WHERE username=?</log:option>
                    <log:option 
name="dataSourceName">DerbyDB_roller</log:option>
                </log:login-module>
            </log:login-config>
        </xml-reference>
    </gbean>
 
</web-app>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks
  Peter Petersson

David Jencks wrote:
>
> On Mar 13, 2007, at 5:37 PM, Peter Petersson wrote:
>
>> Okey I built a snapshot of the Geronimo 1.2 branch from svn and did 
>> some minimal changes to the geronimo-web.xml file before testing 
>> roller 3.1 rc4 out on this new build and I am sorry to say that I get 
>> exactly the same error as I got with the December release of Geronomo 
>> 1.2 beta. As I reported in the "Runing  Apache Roller 3.0 on Geronimo 
>> 1.1.1" thread Roller actually executed a bit future in G 1.1.1 than 
>> in 1.2.
>>
>> David : I did not quite understand what you meant by "calling the 
>> database jdbc/rollerdb in the database plan" (to be able to skip the 
>> mapping) where would I put It in the <name> tag ?
>
>
> I think you could have 2 plans like this:
> (I eliminated the resource-ref element by changing the name of the db 
> pool, and moved the realm gbean into the web app plan)
>
> geronimo-web.xml
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2" 
> <http://geronimo.apache.org/xml/ns/j2ee/web-1.2> 
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" 
> <http://geronimo.apache.org/xml/ns/naming-1.1> 
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" 
> <http://geronimo.apache.org/xml/ns/security-1.1> 
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" 
> <http://geronimo.apache.org/xml/ns/deployment-1.1>>
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>roller</sys:groupId>
>       <sys:artifactId>roller</sys:artifactId>
>       <sys:version>3.1</sys:version>
>       <sys:type>war</sys:type>
>     </sys:moduleId>
>     <sys:dependencies>  
>       <sys:dependency>
>          <sys:groupId>console.dbpool</sys:groupId>
>          <sys:artifactId>MySqlDB_roller</sys:artifactId>
>       </sys:dependency>    
>     </sys:dependencies>
>     <hidden-classes>
>         <filter>antlr</filter>
>     </hidden-classes>
>   </sys:environment>
>
>   <context-root>/roller</context-root>
>
>     <gbean name="MySqlDB_roller" 
> class="org.apache.geronimo.security.realm.GenericSecurityRealm" 
> xsi:type="dep:gbeanType" 
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
> <http://geronimo.apache.org/xml/ns/deployment-1.2> 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> <http://www.w3.org/2001/XMLSchema-instance>>
>         <attribute name="realmName">MySqlDB_roller</attribute>
>         <reference name="ServerInfo">
>             <name>ServerInfo</name>
>         </reference>
>         <reference name="LoginService">
>             <name>JaasLoginService</name>
>         </reference>
>         <xml-reference name="LoginModuleConfiguration">
>             <log:login-config 
> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.2" 
> <http://geronimo.apache.org/xml/ns/loginconfig-1.2>>
>                 <log:login-module control-flag="REQUIRED" 
> server-side="true" wrap-principals="false">
>                     
> <log:login-domain-name>MySqlDB_roller</log:login-domain-name>
>                     
> <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
>                     <log:option name="userSelect">SELECT username, 
> passphrase FROM rolleruser WHERE username=?</log:option>
>                     <log:option 
> name="dataSourceApplication">null</log:option>
>                     <log:option name="groupSelect">SELECT username, 
> rolename FROM userrole WHERE username=?</log:option>
>                     <log:option 
> name="dataSourceName">MySqlDB_roller</log:option>
>                 </log:login-module>
>             </log:login-config>
>         </xml-reference>
>     </gbean>
>   
> </web-app>
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> roller_mysql_db_plan.xml
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <connector 
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" 
> <http://geronimo.apache.org/xml/ns/j2ee/connector-1.2>>
>     <dep:environment 
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
> <http://geronimo.apache.org/xml/ns/deployment-1.2>>
>         <dep:moduleId>
>             <dep:groupId>console.dbpool</dep:groupId>
>             <dep:artifactId>MySqlDB_roller</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>rar</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>mysql</dep:groupId>
>                 <dep:artifactId>mysql-connector-java</dep:artifactId>
>                 <dep:version>3.1.12</dep:version>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>     </dep:environment>
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                 
> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
>                 <connectiondefinition-instance>
>                     <name>jdbc/rollerdb</name>
>                     <config-property-setting 
> name="Password">thepw</config-property-setting>
>                     <config-property-setting 
> name="Driver">com.mysql.jdbc.Driver</config-property-setting>
>                     <config-property-setting 
> name="UserName">theuser</config-property-setting>
>                     <config-property-setting 
> name="ConnectionURL">jdbc:mysql://localhost:3306/roller</config-property-setting>
>                     <connectionmanager>
>                         <local-transaction/>
>                         <single-pool>
>                             <max-size>10</max-size>
>                             <min-size>0</min-size>
>                             <match-one/>
>                         </single-pool>
>                     </connectionmanager>
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> </connector>
>
>
>>
>> Below is the configuration and the stack trace.
>> If anyone has any suggestions or notice anything I may have missed 
>> plz let me (us) know It really would be great to have this app 
>> running on G.
>
> If you have any ideas on how to run roller on derby and get it to a 
> point where geronimo is complaining I'll try to find some time to take 
> a look
>
> thanks
> david jencks
>
>
>>
>> Thanks
>>    Peter
>>


Mime
View raw message