After successfully deploying Roller 1.2 on JBoss 4.0.3 I decided it was
time to upgrade my Roller version so I fetched the latest source from
SVN and built it. I updated my database launched JBoss with my upgraded
Roller (2.1 the database says).
The first time I started JBoss with the new Roller I got an exception
reporting that it was unable to map the rollerdb datasource.
jdbc/rollerdb was defined in my jboss-web.xml but no longer defined in
web.xml. Why was this removed from web.xml. When I added this back to
web.xml like it was before the server started up properly except for one
stack trace on INFO level.
00:21:31,143 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
log4j:ERROR Could not create level [TRACE]. Reported error follows.
00:21:31,143 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
java.lang.ClassCastException
00:21:31,143 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.parseLevel(DOMConfigurator.java:521)
00:21:31,143 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:437)
00:21:31,153 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:344)
00:21:31,153 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:790)
00:21:31,153 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:675)
00:21:31,163 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:625)
00:21:31,163 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:611)
00:21:31,173 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
00:21:31,173 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
00:21:31,183 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at org.apache.log4j.Category.getInstance(Category.java:519)
00:21:31,183 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)
00:21:31,193 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:127)
00:21:31,193 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance.java:553)
00:21:31,203 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:226)
00:21:31,203 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:461)
00:21:31,203 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:208)
00:21:31,213 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at org.apache.velocity.app.Velocity.init(Velocity.java:106)
00:21:31,243 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.servlet.VelocityServlet.initVelocity(VelocityServlet.java:193)
00:21:31,243 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:162)
00:21:31,243 INFO
[org.apache.velocity.runtime.log.SimpleLog4JLogSystem.init(SimpleLog4JLogSystem.java:63)]
at
org.roller.presentation.velocity.BasePageServlet.init(BasePageServlet.java:49)
Roller however seems to run without a hitch despite of this.
And oh man Roller 2 is cool :)
Best Regards,
Bjorn Ingimundarson
Anil Gangolli wrote:
Thanks. I'll add a note to the wiki.
Björn Ingimundarson wrote:
Seems like this was all just a JBoss issue.
I spotted this issue when searching for a fix on Google
http://jira.atlassian.com/browse/JRA-8279
I upgraded to the latest version of JBoss and now everything works
like a charm :)
This seems to also have fixed my user role problem. So it looks like
the userrole went down the drain when RollerMenuModel failed (due to
the class loader problem).
Best regards,
Bjorn Ingimundarson
Anil Gangolli wrote:
Bjorn:
This looks roughly like you are getting an implementation of the
Digester that is from a classloader outside the webapp (possibly in
some common, or system level) and it can't find the class within the
webapp (which is there in rollerweb.jar within the WEB-INF/lib.)
You might be able to work around this with various classloader
semantic tweaks for the web app, but I am not sure. If you're
working from sources, you might try the suggestion below.
roller-dev:
I think we can be more resilient to this by supplying the actual
Class class object rather than the String class name when setting up
addCreateObject() in the Digester. This means loading them
ourselves. Anyone see issues with this?
--a.
Anil Gangolli wrote:
Can you also tell us what version of Roller you are using? and
whether you built from sources or used the distribution?
--a.
Björn Ingimundarson wrote:
Hello,
I am currently setting up Roller Weblogger on JBoss 4.0 and have
followed the instructions found at
http://rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuideJBoss4.
The installation went ok and I can see my blog and post comments
and all that good stuff.
There are however 2 issues that are bothering me when trying to
log-in and post/modify entries.
1. I can not see the Menu on the main page due to the following
exception:
13:26:19,800 ERROR
[org.roller.presentation.tags.menu.RollerMenuModel.<init>(RollerMenuModel.java:106)]
Unexpected exception
java.lang.ClassNotFoundException: No ClassLoaders found for:
org.roller.presentation.tags.menu.MenuImpl
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.roller.presentation.tags.menu.RollerMenuModel.<init>(RollerMenuModel.java:72)
at
org.roller.presentation.tags.menu.MenuTag.prepareContext(MenuTag.java:63)
at
org.roller.presentation.tags.VelocityTag.doEndTag(VelocityTag.java:84)
at
org.roller.presentation.tags.HybridTag.doEndTag(HybridTag.java:64)
2. I can not access anything after I'm logged in
I get an error message after I am logged in: You are not
authorized to access that resource.
However I seem to be logged in. From my jboss.security.log I see
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
DatabaseServerLoginModule, dsJndiName=java:/jdbc/RollerDB
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
principalsQuery=SELECT passphrase FROM rolleruser WHERE username=?
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
rolesQuery=SELECT rolename, 'Roles' FROM userrole WHERE username=?
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] login
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] User
'bjossi' authenticated, loginOk=true
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] commit,
loginOk=true
13:57:27,870 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] Assign
user to role editor
13:57:27,870 TRACE
[org.jboss.security.plugins.JaasSecurityManager.roller-policy]
updateCache, subject=Subject:
Principal: bjossi
Principal: Roles(members:editor)
So I am a logged in user in role 'editor'.
Anyone out there with a successful JBoss Roller Weblogger Setup.
Anyone,, anyone.. :)
Best Regards,
Bjorn Ingimundarson
--
Bjorn Ingimundarson
Senior Developer
Hex Software
Tel/Mobile: +354 824 4680
E-mail: [EMAIL PROTECTED]
Web page: http://www.hexia.net