> From: [EMAIL PROTECTED]
> Date: Fri, 13 Jul 2007 02:55:03 +0000
>
> I assume you installed the required hibernate jars as well and placed them
> into the lib directory.
Yes.
> I got Roller 3.1 to work however its on Tomcat. I
> had to install Hibernate 3.2 Jar and supporting jars. Be sure to install
> the required database connector libraries inside your Websphere application
> server directory. For example you would need to install a
> mysqlJConnector.jar into your application server's directory if you were
> using Mysql as your database server.
You mean the driver jar, right? I copied the mysql.jar from another database
app (the java-based DB admin tool I used to run in the database setup script),
set up a new JDBC provider for
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDatasource using it, and
configured a data source for the roller database. The roller-custom.properties
contains
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
and I'm pretty sure the database side of things is set up okay, as at one point
while I've been messing with the app settings I saw a banner message giving the
MySQL version etc.
> I cannot help you with websphere,
> however Roller 3.1 uses Hibernate compatable with all application servers.
> We know that its nothing really wrong with the code. You may also try using
> the roller.properties original file as a start instead of overriding this
> file until you get started. Unless you're using a different database
> dialect then you'll have to change it in order for Hibernate to work
> properly. The original should get you started until you get comfortable
> changing these settings. I didn't have to change these properties.
The only properties in my custom file are the database dialect and various
*.dir settings for uploads, search index and planet cache. Also I edited the
log4j.properties to have it write the log file in a different location, as I
didn't think "${catalina.base}/logs/roller.log" would be much use in anything
other than Tomcat ;-)
> Anyway, my 2 cents on it.
>
> Anyway, you'll have to refer to Matt from here on. I only know how to
> install the application. Good luck bud. Roll on...
>
> >From: "Matt Raible"
> >Date: Thu, 12 Jul 2007 14:25:12 -0700
> >
> >Can you please repost as plain/text - this is difficult to read.
Yeah, I know. Sorry about that - it's been that way ever since Hotmail
"upgraded" me to their new interface. I don't like HTML mail either, but I
haven't (yet) found a setting to switch it off :-( Stuart, I see you're also
using hotmail - do you know where the setting is?
Interestingly, on this laptop (which is using an older version of Firefox) it
doesn't display the formatting toolbar, so if I'm lucky that means this message
will be in plain text... Is the text below any more readable, Matt?
> >On 7/12/07, Andrew Stevens wrote:
Can anyone help me get Roller 3.1 running on Websphere 6.0?I downloaded
the binary release zip and the extra required jars from java.net, and
unzipped them. I created the database, ran the script to create the
tables and configured the datasource to be mapped to the jdbc/rollerdb resource
ref. I created an appropriate custom-roller.properties file in
/WEB-INF/classes (specifying log file paths) and re-packaged the web app
as a .war file, which I've deployed into Websphere 6.0. However, when I
start the server/app I get a bunch of exceptions in the log:
[12/07/07 14:52:26:545 BST] 0000000a HibernateRoll E
org.apache.roller.business.hibernate.HibernateRollerImpl Error initializing
Hibernate
java.lang.VerifyError: (class:
org/apache/roller/business/hibernate/HibernatePersistenceStrategy, method:
signature:
(Ljava/lang/String;Ljava/lang/String;)V) Incompatible argument to method
at
org.apache.roller.business.hibernate.HibernateRollerImpl.(HibernateRollerImpl.java:83)
at
org.apache.roller.business.hibernate.HibernateRollerImpl.instantiate(HibernateRollerImpl.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.apache.roller.business.RollerFactory.getRoller(RollerFactory.java:66)
at
org.apache.roller.ui.core.RollerContext.contextInitialized(RollerContext.java:170)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
...
[12/07/07 14:52:26:560 BST] 0000000a RollerFactory E
org.apache.roller.business.RollerFactory getRoller Error instantiating
org.apache.roller.business.hibernate.HibernateRollerImpl
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.apache.roller.business.RollerFactory.getRoller(RollerFactory.java:66)
at
org.apache.roller.ui.core.RollerContext.contextInitialized(RollerContext.java:170)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
...
Caused by: org.apache.roller.RollerException
at
org.apache.roller.business.hibernate.HibernateRollerImpl.(HibernateRollerImpl.java:90)
at
org.apache.roller.business.hibernate.HibernateRollerImpl.instantiate(HibernateRollerImpl.java:101)
... 41 more
[12/07/07 14:52:26:623 BST] 0000000a RollerFactory E
org.apache.roller.business.RollerFactory getRoller
Failed to instantiate fallback roller impl java.lang.Exception: Doh! Couldn't
instantiate a roller class
at org.apache.roller.business.RollerFactory.getRoller(RollerFactory.java:89)
at
org.apache.roller.ui.core.RollerContext.contextInitialized(RollerContext.java:170)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
So I tried stepping through line by line in RAD7's debugger - sure enough, in
the
HibernateRollerImpl constructor it catches the Throwable
java.lang.VerifyError: arguments are not type compatible (class:
org/apache/roller/business/hibernate/HibernatePersistenceStrategy method:
(Ljava/lang/String;Ljava/lang/String;)V) at pc: 223
However, watch expressions for the RollerConfig.getProperty values certainly
look to be
returning strings to me (and at least it confirmed the roller-custom
properties file was being used). So two Strings aren't type compatible
with two Strings... Huh? No wonder the comment in the source says
"// if this happens then we are screwed" :-(
Next I tried changing the classloader
behaviour to "parent last" rather than the default "parent first", in case
it's picking up the wrong version of something from the JRE. But that
just produced a different set of errors:
[11/07/07 19:23:34:448 BST] 000000b9 RollerContext E
org.apache.roller.ui.core.RollerContext contextInitialized
RollerContext initialization failed
java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
at
org.apache.roller.ui.core.RollerContext.upgradeDatabaseIfNeeded(RollerContext.java:374)
at
org.apache.roller.ui.core.RollerContext.contextInitialized(RollerContext.java:168)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:411)
...
[11/07/07 19:23:34:526 BST] 000000b9 ServletWrappe E
SRVE0100E: Did not realize init() exception thrown by servlet action:
java.lang.LinkageError: Class org/xml/sax/SAXParseException violates loader
constraints: definition mismatch between parent and child loaders
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1079)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:324)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:310)
I'm guessing the LinkageError on SAXParseException is due to the
org.xml.sax.*class files being found both in WEB-INF/lib/xmlrpc-1.2-b1.jar
and also in Websphere's $JRE/lib/xml.jar ? Given they're
standard JAXP interfaces and have been included in the JDK since 1.4,
should they really be in the xmlrpc jar anyway? I also noticed the xalan
jar bundled with Roller is version 2.7.0 (according to
org.apache.xalan.Version), while the one included in Websphere's
xml.jar(which I believe is the one it would use for "Parent First"
classloading mode) is "XSLT4J Java 2.6.9". Assuming that's just their own
build of
xalan 2.6.9, is there anything specific to 2.7.0 that Roller requires, or
should it be okay with the earlier version?I had hoped it wouldn't be too
hard to get this working, as they said in Covalent's recent Roller webcast
that "IBM use Roller for their developerWorks blogs, and they run it on
Websphere". However, although the HTTP response headers suggest they're
also using Websphere 6.0 ("Server: IBM_HTTP_Server/6.0.2.13 Apache/2.0.47
(Unix)"), I notice the roller.js script
(http://www-03.ibm.com/developerworks/blogs/theme/scripts/roller.js) doesn't
include the isblank function
near the end; looking through the different tags in Subversion, that
suggests they may only be running Roller 2.0.2 or earlier, as that's the
latest version of that file which didn't contain that function. I'd
prefer to use the current version than one that's nearly a year and a half
old. Does anybody have any suggestions how I can get 3.1 working? Has
anyone successfully got it installed into Websphere 6?
Andrew.
--
http://pseudoq.sourceforge.net/ Open source java Sudoku application
_________________________________________________________________
Feel like a local wherever you go with BackOfMyHand.com
http://www.backofmyhand.com