Finally working after disabling openjpa.QueryCompilationCache and
applying patch to xwork-2.0.4.jar.
Patch is required to prevent "Could not initialize class
com.opensymphony.xwork2.validator.ValidatorFactory" while trying to
create new user.
to apply patch download sources from
http://www.opensymphony.com/xwork/download.action
and patch from
http://jira.opensymphony.com/browse/XW-649
problem described
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=141959&postdays=0&postorder=asc&start=0
my configuration ...
roller-custom.properties:
installation.type=manual
database.configurationType=jdbc
database.jdbc.driverClass=com.mysql.jdbc.Driver
database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollerdb
database.jdbc.username=roller
database.jdbc.password=*****
#dibable cache to prevent
#<0.9.7-incubating nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: There were errors
initializing your configuration:
org.apache.openjpa.lib.util.ParseException: Instantiation of plugin
"QueryCompilationCache" with value "true" caused an error
"java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
org.apache.openjpa.util.CacheMap". The alias or class name may have been
misspelled (as it closely matches the valid plugin alias "true"), or the
class may not be available in the class path. Valid aliases for this
plugin are: [all, false, true]
#...
#Caused by: java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap
openjpa.QueryCompilationCache=false
web.xml comment out resource-ref:
<!-- jndi resources -->
<!--
<resource-ref>
<res-ref-name>jdbc/rollerdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
Thanks for help,
Matej.
Werner Gaulke wrote:
Exception looks like a datasource configuration problem to me. Try defining
a no-tx-datasource. Have a look in the jboss server documentation.
Unfortunately no success :(
roller.log empty, jboss console/log (see attachment)
I think I'm closer with jdbc configuration than jndi.
--
matej
Werner Gaulke wrote:
No problem:
Jboss-web.xml:
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
<jboss-web>
<security-domain>java:/jaas/roller-policy</security-domain>
<context-root>roller</context-root>
<resource-ref>
<res-ref-name>jdbc/rollerdb</res-ref-name>
<jndi-name>java:/jdbc/RollerDB</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<jndi-name>java:/mail/RollerMail</jndi-name>
</resource-ref>
</jboss-web>
Roller-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE datasources
PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
"http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/RollerDB</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/roller</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>roller</user-name>
<password>mysecretpass</password>
</local-tx-datasource>
</datasources>
Roller-custom.properties
weblog.absoluteurl.mysite=http://www.mysite.de
web.xml -> didn't change anything.
I do not know how far these settings apply to jboss 5.1
Werner
I was also trying to manage with resource ref and ds, but with no
success, can you please post me content of your files.
roller-ds.xml
jboss-web.xml
web.xml
roller-custom.properties
--
matej
Werner Gaulke wrote:
Hello,
I have configured Roller with JBoss 4.2.3. Here are the steps I've done:
- define roller-ds.xml with database configuration
- define jboss-web.xml in roller.war/web-inf with resource ref pointer
for
roller-ds
- add roller-custom.properties in roller/web-inf/classes
- put hibernate-entitymanager.jar in roller/web-inf/lib
Create roller tables manually
Startup jboss - everything working fine (I left out email config)
Maybe it helps for jboss 5.1 - if you get it working please drop a note
here. I plan to migrate to jboss 5.1 later this year
Regards
werner