Merge branch 'master' into docker5x
diff --git a/README.md b/README.md
index d05d8bc..92fd86f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# turbine-webapp-5.0
+# turbine-webapp-5.x
 
-Maven Archetype to generate a webapp utilizing Turbine 5.0
+Maven Archetype to generate a webapp utilizing Turbine 5.x
 
 ## Getting Started
 
@@ -9,22 +9,29 @@
 ### Prerequisites
 
 * Java 8 JDK or later 
-* [MySQl](https://www.mysql.com/) - Database Server
+* [MySQL](https://www.mysql.com/) - Database Server or [Docker](https://docs.docker.com/get-docker/)
 * [Maven](https://maven.apache.org/) - Dependency Management
 
-You should have Java 8 or later installed.  The archetype sets up a new application using MySQL as the default database store.  However, you can adjust this to use any database supported by Apache Torque 4.0. Therefore, you should be at least have a database instance where you have access rights to create a new database schema and populate it with the tables the application generates.  Finally, this is a maven archetype, so of course you should install a local version of Maven (tested with 3.5.4).
+You should have Java 8 or later installed.  The archetype sets up a new application using MySQL as the default database store.  However, you can adjust this to use any database supported by Apache Torque 5.x. If not using Docker, you should therefore be at least have a database instance where you have access rights to create a new database schema and populate it with the tables the application generates.  Finally, this is a maven archetype, so of course you should install a local version of Maven (tested with 3.5.4 and 3.8.1). 
 
 
 ### Installing
 
 Eclipse integration:
 
-You need to first add the Apache maven archetypes to your IDE so that you can take advantage of using the turbine-webapp-5.0 plugin to generate a new web application.
+You need to first add the Apache maven archetypes to your IDE so that you can take advantage of using the turbine-webapp-5.x plugin to generate a new web application.
 
 The location of the remote catalog file is: http://repo.maven.apache.org/maven2/archetype-catalog.xml 
 
 Step-by-step instructions on how to accomplish this can be found here: https://howtodoinjava.com/eclipse/how-to-import-maven-remote-archetype-catalogs-in-eclipse/
 
+Follow further instructions here: [ARCHETYPE-README](src/main/resources/archetype-resources/docs/README.md) and/or  [ARCHETYPE-DOCKER-README](src/main/resources/archetype-resources/docs/DOCKER-README.md).
+
+
+#### Development
+
+Clone this repository and build it with maven. 
+
 
 ## Built With
 
diff --git a/src/main/resources/archetype-resources/docs/DOCKER-README.md b/src/main/resources/archetype-resources/docs/DOCKER-README.md
index 2c4af11..8c67a37 100644
--- a/src/main/resources/archetype-resources/docs/DOCKER-README.md
+++ b/src/main/resources/archetype-resources/docs/DOCKER-README.md
@@ -22,34 +22,26 @@
 
     mvn install -Pdocker
 
-    
-- Then check in directory  target/docker-resources the file docker-compose.yml e.g. with
-
-    docker compose config
-
-## Optional Integration Test (not tested)
-
-    mvn integration-test 
-
-N.B.: This builds the integrationtest project in target/test-classes/projects/first/project/integrationtest with docker enabled configuration. 
-Running the build inside the container is not required and may be problematic, unless you use only public available dependencies.
-
-
 # Installation (running the app)
-
-- Change into the projects target/docker resource folder
+    
+- Change into directory target/docker-resources andf check the file docker-compose.yml, e.g. with
 
 ```sh
-cd  target/docker-resources
-``` 
-
-## Check Docker Compose file (optional)
-
-- Check services in docker-compose.yml (volumes) 
-``` 
-docker-compose config
+cd <project>/target/docker-resources
+docker compose config
 ```
+    
+- Build and start the services
 
+```sh
+docker compose build --no-cache
+docker compose up
+```
+    
+First time building might take a couple of minutes. 
+
+ - Now you can launch in another termina your new Turbine application by default [http://localhost:8081/app] 
+ 
 N.B. You may use the command *docker compose* or *docker-compose*, but will slightly different results.
 
 
@@ -65,16 +57,13 @@
 The app service uses later a volume, which maps to the local maven repository, which you may need/not need.
 The db service uses mysql-latest (currently 8.x), you may replace it with a fixed release tag.
 
-If previously build, you may want to delete all volumes and containers
+If previously build, you may want to delete all volumes (this will delete all tables in /var/lib/mysql) and containers
 
     docker-compose down -v
 
- - Build it
- 
- 
-```sh
+- Build it
+
     docker-compose build --no-cache
-```
 
  .. optionally build it separately
     docker-compose build --no-cache --build-arg DB_CONTEXT=./docker-resources/db db
@@ -90,14 +79,13 @@
 ### Starting Services
 
 Start both services in one step
-``` 
-docker-compose up
-```    
+
+    docker-compose up
+   
 .. or doing it in background, requires second start command
-``` 
-docker-compose -d up
-docker-compose start
-``` 
+
+    docker-compose -d up
+    docker-compose start
 
 This will start first the db service, then the app service. Jetty is run exposing the webapp to **http://localhost:8081/app**.
 By default remote debugging is activated (port 9000), which could be removed/commented in docker-compose.yml.
@@ -156,13 +144,12 @@
 
 ### Db Service 
 ``` 
-docker-compose run --rm db /bin/sh --build-arg DB_CONTEXT=./docker-resources/db
+docker-compose run --rm db /bin/sh 
 ``` 
 Extract data in db service
 
-```sh
- mysql -u root -h db -P 3306 -p
-```
+    mysql -u root -h db -P 3306 -p
+    
 .. or 
 
     docker-compose exec db mysql -u root --password=... -e "show databases;" --build-arg DB_CONTEXT=./docker-resources/db
@@ -171,13 +158,13 @@
 ### App Service
 
 This will start app and db (as it depends on app):
-```sh
-docker-compose run --rm app /bin/sh 
-``` 
+
+    docker-compose run --rm app /bin/sh 
+
 In the container, check:
-```sh
-ls -la /myapp // should list pom.xml ...
-```
+
+    ls -la /myapp // should list pom.xml ...
+
 
 # System Specific Informations
 
@@ -185,9 +172,7 @@
 
 ### Powershell
 
-- Use Powershell
-
-- Replace in volume mapping for host repo path (maven localRepository) backslashes with slashes "/" in docker-compose.yml.
+- You may have to replace in volume mapping for host repo path (maven localRepository) backslashes with slashes "/" in docker-compose.yml.
 
 - check COMPOSE_CONVERT_WINDOWS_PATHS, https://docs.docker.com/compose/reference/envvars/#compose_convert_windows_paths
 
@@ -209,19 +194,20 @@
 - https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
 
 
-## More Internals, Helpful Docker commands
+### More Internals, Helpful Docker commands
 
-### Resetting / Preparation (optional)
+#### Resetting / Preparation (optional)
 
     docker-compose rm -v
 
-### Delete all images
+#### Delete all images
 
     docker rmi $(docker images -q)
 
 ### Still more docker commands ...
 
-  docker ps  
+```sh
+  docker volume inspect <containerid>  
  
   // delete intermediate images, volumes
   docker rmi $(docker images --filter "dangling=true" -q)
@@ -235,3 +221,8 @@
   
   # stops all running containers  
   docker stop $(docker ps -a -q)
+```
+  
+## License
+
+This project is licensed under the Apache Software License 2.0
diff --git a/src/main/resources/archetype-resources/docs/README.md b/src/main/resources/archetype-resources/docs/README.md
index 01217d3..d215d6e 100644
--- a/src/main/resources/archetype-resources/docs/README.md
+++ b/src/main/resources/archetype-resources/docs/README.md
@@ -1,45 +1,47 @@
-#*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
+# Quick Guide to using the new Turbine 5.x maven archetype for skeleton application generation
 
-http://www.apache.org/licenses/LICENSE-2.0
+Maven Archetype to generate a webapp utilizing Turbine 5.x
 
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-*#
- 
+## Getting Started
 
-# Quick Guide to using the new Turbine 5.1 maven archetype for skeleton application generation
+These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
 
+### Prerequisites
 
+* Java 8 JDK or later 
+* [MySQL](https://www.mysql.com/) - Database Server or [Docker] (https://docs.docker.com/get-docker/)
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+You should have Java 8 or later installed.  The archetype sets up a new application using MySQL as the default database store.  However, you can adjust this to use any database supported by Apache Torque 5.x. If not using Docker, you should therefore be at least have a database instance where you have access rights to create a new database schema and populate it with the tables the application generates.  Finally, this is a maven archetype, so of course you should install a local version of Maven (tested with 3.5.4 and 3.8.1).  
 
 ## About this archetype 
 
-Turbine Version: Turbine 5.1.
+Turbine Version: Turbine 5.1 Turbine-webapp-5.x
+
+### Integration Test (if you checked out this [Archetype Generate Repository](https://github.com/apache/turbine-archetypes.git))
+
+    mvn integration-test 
+
+N.B.: This builds an integrationtest project in target/test-classes/projects/first/project/integrationtest (if you provide -Ddocker=true with docker enabled configuration, otherwise you need a hosted mysql database). You could start testing this archetype here..
+
+- Follow either Local database Setup or Docker Setup
 
 ### Docker Setup
 
-Skip Local Database setup and read later DOCKER-README.md
+- If docker is available you could use the Docker build setup. Follow instructions here: [DOCKER README] (DOCKER-README.md).
 
-### Local database Setup
+### Local Database Setup
 
 First, you should have a local database installed and configured prior to 
 beginning the application setup below.
 
 As we are using MySQL by default you need to create the database in MySQL (server version should be at least 5.5, because of new sql driver), e.g. with
 
+```sh
 mysql -u <user> -p
 mysql> create database helloWorld;
 mysql> \q
+```
 
 or other tools. The database should have been started and the database user granted enough rights.
 
@@ -67,29 +69,15 @@
   -Dgoals=generate-sources,integration-test
 ```
 
-#### Docker integration (short intro)
+#### Docker integration
 
-N.B. Add  
+N.B. Set docker variable to true to enable Docker setup in building the artifact: 
 
-    -Dturbine_database_url=jdbc:mysql://db:3306/ \
     -Ddocker=true
     
 to immediately enable docker setup, when generating the archetype. 
 
 Currently only port 3306 is supported, if you do not want ot change the port seetings for the db container in docker-compose.yml
- 
-You then need not to follow the following chapters, but could immediately go to 
-
-    cd <project>/target/docker-resources
-    
-and then follow the instructions in DOCKER-README.md. In short you may do the following:
- 
-    docker compose configurable
-    docker compose build --no-cache
-    docker compose up
-    
- - Now you can launch your new Turbine application by default [http://localhost:8081/app] 
- 
 
 ### Development
 
@@ -104,34 +92,18 @@
 This requires you provide a local catalog in $HOME\.m2\archetype-catalog.xml. Find further information here: https://maven.apache.org/archetype/archetype-models/archetype-catalog/archetype-catalog.html.
 
 ##### Example
+
+```xml
 <archetype-catalog ...>
  <archetype>
       <groupId>org.apache.turbine</groupId>
       <artifactId>turbine-webapp-5.1</artifactId>
       <version>2.0.0-SNAPSHOT</version>
-      <description>This archetype sets up a web application project based on Apache Turbine 5.0</description>
+      <description>This archetype sets up a web application project based on Apache Turbine 5.x</description>
     </archetype>
   </archetypes>
 </archetype-catalog>
-
-### Notes
-
-When invoking archetype:generate like above, you already have set Turbine goals generate-sources,integration-test 
-and you can then skip them later.
-
-Be aware, when you set both mvn commands goals (which are maven phases actually), i.e  with
-
--Dgoals=generate-sources, integration-test 
-
-you have to create the database (see above) before finishing the (interactive) archetype commands. 
-Otherwise you could catch up doing this later and after that is done calling the phases afterwards as mentioned below.
-
-#### turbine_database_url
-
-Note that the database URL (turbine_database_url) 
-will be appended with your database name
-in the final pom.xml, so you do not need to specify that in 
-the configuration.
+```
 
 ## Project Start and Usage
 
@@ -196,8 +168,7 @@
 - target/test-classes/projects/first/project/integrationtest/src/test/conf/torque/TorqueTest.properties or
   META-INF/maven/archetype-metadata.xml
 
-The security test is by default skipped as it requires a running mysql. It tests many of the Fulcrum Torque Turbine security aspects, 
-activate it by calling
+The security test is by default skipped as it requires a running mysql. It tests many of the Fulcrum Torque Turbine security aspects, you may activate it by calling
 
 ```sh
 mvn test -DskipTests=false
@@ -238,11 +209,15 @@
 
 Be aware of settings and some smaller restrictions, which mostly will be fixed in the upcoming releases.
 
-- Keep groups/roles lower case (which should be fixed in Fulcrum Security 1.1.1/Turbine 4.0)
+- Keep groups/roles lower case (which should be fixed in current Fulcrum Security 2.x/Turbine 5.x)
 - abstract classes and managers are included (because of some minor bugs in Fulcrum Security 1.1.0, same as above)
-- LogoutUser action is included (fix in Turbine 4.0, getUserFromSession)
+- LogoutUser action is included as an custom example 
 - LoginUser action is included (to check for anonymous user, may be fixed in future release)
 - OM (Torque Object Mapper) stub classes are included (until configurable in schema with Torque version 2.1)
-- TurbineConfiguration returns a Commons configuration object, even if field is not assignable (will be fixed in Turbine 4.0, you can then assign e.g. to String instead, cft. SecureScreen)
+- TurbineConfiguration returns a Commons configuration object, even if field is not assignable (fixed in Turbine 5.x, you can then assign e.g. to String instead, cft. SecureScreen)
 - Database connection is done initially by default with JNDI. If you want to change it, check Torque.properties and (1) for Tomcat, META-INF/context.xml or (2) for Jetty, WEB-INF/jetty-env.xml.  
 
+## License
+
+This project is licensed under the Apache Software License 2.0
+
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 03a43d2..5fc4b71 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -495,7 +495,8 @@
                  </plugins>
               </build>
             <properties>
-                <turbine_database_url>${turbine_database_url}</turbine_database_url>
+                <!-- hard code docker compose service id and port by default -->
+                <turbine_database_url>jdbc:mysql://db:3306/</turbine_database_url>
                 <!-- read from #var("settings.localRepository") to provide e.g. local snapshot builds -->
                 <app_volume_local_repo>${settings.localRepository}</app_volume_local_repo>
                 <docker>true</docker>
diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml b/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
index 87fe023..1e1a7d2 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
@@ -9,7 +9,7 @@
  <usePluginRegistry>false</usePluginRegistry>
  <offline>false</offline>
  <pluginGroups>
-    <pluginGroup>org.mortbay.jetty</pluginGroup>
+    <pluginGroup>org.eclipse.jetty</pluginGroup>
  </pluginGroups> 
  <profiles>
 	   <profile>
@@ -19,7 +19,7 @@
       <repositories>
         <repository>
           <id>releases</id>
-          <url>http://central</url>
+          <url>https://central</url>
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>false</enabled></snapshots>
         </repository>
@@ -27,13 +27,13 @@
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
           <id>snapshots</id>
-          <url>http://snapshots</url>
+          <url>https://snapshots</url>
         </repository>
       </repositories>
      <pluginRepositories>
         <pluginRepository>
           <id>releases</id>
-          <url>http://central</url>
+          <url>https://central</url>
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
         </pluginRepository>
@@ -41,7 +41,7 @@
          <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
           <id>snapshots</id>
-          <url>http://snapshots</url>
+          <url>https://snapshots</url>
         </pluginRepository>
       </pluginRepositories>
     </profile>
@@ -54,7 +54,7 @@
         <pluginRepository>
           <id>central</id>
           <name>Maven Plugin Repository</name>
-          <url>http://repo1.maven.org/maven2</url>
+          <url>https://repo1.maven.org/maven2</url>
           <layout>default</layout>
           <snapshots>
             <enabled>false</enabled>
diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile b/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
index 932a800..7ccfc0f 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
@@ -14,10 +14,8 @@
 ARG DB_CONTEXT
 ARG MYSQL_DATABASE
 ARG MYSQL_ROOT_PASSWORD
-ARG MYSQL_RANDOM_ROOT_PASSWORD
 ARG MYSQL_USER
 ARG MYSQL_PASSWORD
-ARG MYSQL_ONETIME_PASSWORD
 
 # mount in docker-compose
 ADD #var("DB_CONTEXT:-.")/mysql/conf/my.cnf /etc/
@@ -47,8 +45,6 @@
 ENV MYSQL_USER=${MYSQL_USER}
 ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
 ENV MYSQL_HOST=
-ENV MYSQL_RANDOM_ROOT_PASSWORD ${MYSQL_RANDOM_ROOT_PASSWORD}
-ENV MYSQL_ONETIME_PASSWORD=${MYSQL_ONETIME_PASSWORD}
 
 # Need to change the datadir to something else that /var/lib/mysql because the parent docker file defines it as a volume.
 # https://docs.docker.com/engine/reference/builder/#volume :
diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf b/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf
index 940f84b..6eca3ac 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf
@@ -6,17 +6,14 @@
 #
 # * Basic Settings
 #
-#user            = mysql
-#pid-file        = /var/run/mysqld/mysqld.pid
-#socket          = /var/run/mysqld/mysqld.sock
 
 character-set-server=utf8
 
 # in mysql image VOLUME /var/lib/mysql and any changes to this directory 
 # during build process might got lost after the build step is done 
 # match db_data in docker-compose
-
-datadir     = /initialized-db
+# therefore we us a copy in Dockerfile, no uncomment needed
+# datadir     = /initialized-db
 
 #tmpdir          = /tmp
 
@@ -29,6 +26,6 @@
 tee=/mysql/log/log.out
 
 [mysqld_safe]
-#socket          = /var/run/mysqld/mysqld.sock
+
 nice            = 0
 
diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml b/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml
index 13180c9..868ad52 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml
@@ -1,5 +1,5 @@
 # service configuration for our dockerized Java app
-version: '3'
+version: '3.7'
 
 services:
   app:
@@ -37,29 +37,25 @@
       context: ../
       dockerfile: ./docker-resources/db/Dockerfile
       args:
-        - DB_CONTEXT=./docker-resources/db
-        - MYSQL_DATABASE=${turbine_database_name}
-        - MYSQL_ROOT_PASSWORD=changeit
-        - MYSQL_RANDOM_ROOT_PASSWORD=
-        - MYSQL_USER=${turbine_database_user}
-        - MYSQL_PASSWORD=${turbine_database_password}
+        DB_CONTEXT: ./docker-resources/db
+        MYSQL_DATABASE: ${turbine_database_name}
+        MYSQL_ROOT_PASSWORD: changeit
+        MYSQL_USER: ${turbine_database_user}
+        MYSQL_PASSWORD: ${turbine_database_password}
     
     environment:
-      - MYSQL_DATABASE=${turbine_database_name}
-      - MYSQL_HOST= 
-      - MYSQL_ROOT_PASSWORD=changeit
-      - MYSQL_RANDOM_ROOT_PASSWORD=
-      - MYSQL_USER=${turbine_database_user}
-      - MYSQL_PASSWORD=${turbine_database_password}
-      - DB_CONTEXT=./docker-resources/db
-      #- MYSQL_ALLOW_EMPTY_PASSWORD=yes
+      MYSQL_DATABASE: ${turbine_database_name}
+      MYSQL_ROOT_PASSWORD: changeit
+      MYSQL_USER: ${turbine_database_user}
+      MYSQL_PASSWORD: ${turbine_database_password}
+      DB_CONTEXT: ./docker-resources/db
       
     volumes:
       - "./db/mysql/init:/docker-entrypoint-initdb.d"   
-      - "/db/mysql/conf:/etc/mysql/conf.d"
+      - "./db/mysql/conf:/etc/mysql/conf.d"
       - "./db/mysql/data:/data" 
+      - "./db/mysql/log:/mysql/log"
       # default mysql persistent data
-      - mysql_log_${turbine_database_name}:/mysql/log:rw 
       - db_data_${turbine_database_name}:/var/lib/mysql:rw  
     restart: always     
     ports:
@@ -71,9 +67,9 @@
     #command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
     command: --default-authentication-plugin=mysql_native_password
 
+ # this might work only for *nix, check with docker image inspect db
 volumes:
   db_data_${turbine_database_name}:
-  mysql_log_${turbine_database_name}:
   
 #networks:
 #  db:
diff --git a/src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml b/src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml
index 41d6802..2b26cb2 100644
--- a/src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml
+++ b/src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml
@@ -80,8 +80,8 @@
 
   <table name="TURBINE_ROLE_PERMISSION" 
    interface="org.apache.fulcrum.security.torque.peer.TurbineRolePermissionPeerMapper">
-    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="primitive"/>
+    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="primitive"/>
 
     <!-- Turbine service revokeAll(role) manages removal, but you might want to handle it just with onDelete="cascade" -->
     <foreign-key foreignTable="TURBINE_ROLE">
@@ -119,9 +119,9 @@
   <table name="TURBINE_USER_GROUP_ROLE" 
   interface="org.apache.fulcrum.security.torque.peer.TurbineUserGroupRoleModelPeerMapper"
   peerInterface="org.apache.fulcrum.security.torque.peer.TorqueTurbineUserGroupRolePeer">
-    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="primitive"/>
+    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="primitive"/>
+    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="primitive"/>
     <!-- Turbine service revokeAll(user) manages removal, but you might want to handle it just with onDelete="cascade" -->
     <foreign-key foreignTable="TURBINE_USER">
       <reference local="USER_ID" foreign="USER_ID"/>