I have a Liferay install on Tomcat. I am testing the option to
install Railo on the same Tomcat install and start using cfm in place
of jsp for managing the portlets output.
Basically the plan is to produce liferay portlets but ..... skip
jsp ......
So I have added a railo folder ( with all railo jar ) to the tomcat
classpath.
Anything loads but I think I have a conflict in an xml parser jar:
Liferay restart and I can see install homepage.
When I try to open railo-context I get this:
javax.servlet.ServletException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration
org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
railo.runtime.config.ConfigWebFactory.loadDocument
(ConfigWebFactory.java:677)
railo.runtime.config.ConfigWebFactory.loadDocument
(ConfigWebFactory.java:662)
railo.runtime.config.ConfigWebFactory.newInstance
(ConfigWebFactory.java:192)
railo.runtime.engine.CFMLEngineImpl.loadJSPFactory
(CFMLEngineImpl.java:153)
railo.runtime.engine.CFMLEngineImpl.addServletConfig
(CFMLEngineImpl.java:122)
railo.loader.engine.CFMLEngineFactory.getInstance
(CFMLEngineFactory.java:119)
railo.loader.servlet.CFMLServlet.init(CFMLServlet.java:26)
org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:433)
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
845)
org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
java.lang.Thread.run(Thread.java:619)
In the logs during installs I find :
Wed Jan 13 16:57:03 GMT 2010-578 Start CFML Controller
===================================================================
SERVER CONTEXT
-------------------------------------------------------------------
- config:/opt/liferay/railo/railo-server/context
===================================================================
Wed Jan 13 16:57:03 GMT 2010-652 write file:/opt/liferay/railo/railo-
server/context/railo-server.xml
java.lang.ClassCastException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at railo.runtime.config.ConfigWebFactory.loadDocument
(ConfigWebFactory.java:677)
at railo.runtime.config.ConfigServerFactory.newInstance
(ConfigServerFactory.java:68)
at railo.runtime.engine.CFMLEngineImpl.getConfigServerImpl
(CFMLEngineImpl.java:134)
at railo.runtime.engine.CFMLEngineImpl.<init>(CFMLEngineImpl.java:86)
at railo.runtime.engine.CFMLEngineImpl.getInstance
(CFMLEngineImpl.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
And:
===================================================================
WEB CONTEXT
-------------------------------------------------------------------
- config:/opt/liferay/railo/web-config/
a7dc2f749325f2363e2fef35033bf503
- webroot:/opt/liferay/tomcat-6.0.18/webapps/ROOT/
===================================================================
Wed Jan 13 16:57:51 GMT 2010-567 config file /opt/liferay/railo/web-
config/a7dc2f749325f2363e2fef35033bf503/railo-web.xml.cfm was not
valid and has been replaced
Wed Jan 13 16:57:51 GMT 2010-568 write file:/opt/liferay/railo/web-
config/a7dc2f749325f2363e2fef35033bf503/railo-web.xml.cfm
java.lang.NullPointerException
at railo.runtime.type.scope.ScopeContext.getClusterScope
(ScopeContext.java:99)
at railo.runtime.engine.Controler.run(Controler.java:81)
at railo.runtime.op.Caster.toPageException(Caster.java:2928)
at railo.runtime.type.scope.ScopeContext.getClusterScope
(ScopeContext.java:119)
at railo.runtime.engine.Controler.run(Controler.java:81)
Any suggestion ??
Thanks
Andrea
Delete these jars from the railo lib folder:
* apache-xml-xerces.jar
* xml-apis.jar
* ss_css2.jar
* tagsoup.jar
* serializer.jar
* w3c-dom.jar
And theoretically you should be good to go. There might be one
other-- I guess I should have left my old "not so 'leet" blog post
un-edited and linked to a new one instead. Eh. You live, you learn.
:)
Force be with you, esse!
:den
--
The path of least resistance and least trouble is a mental rut already
made. It requires troublesome work to undertake the alternation of old
beliefs.
John Dewey
You might want to try this all over again with a new Liferay instance
and place the railo war file in ../liferay_install_dir/deploy/ then
start up liferay. You should be able to go to the Railo admin page
once liferay starts up, however you still need some other extra steps
before you can start writing CF portlets. I haven't had success
creating portlets with Railo using CFML and a free open source code
that Adam wrote to make any CF container utilize a portal engine, I
tried this for Adobe's CF and can build portlets.
Adam,
Thanks for your work on this, I tried using cfportlets version 1 that
you have up on http://wiki.cfinnovate.com/display/cfmlportlets/Home,
Liferay was able to see the portlet I created and loaded it on startup
but keeps coming up blank when I try to place the portlet into a
portal page. Just checked the site and it seems it's down, are you
still working actively on this or has it been abandoned?
On Jan 13, 5:03 pm, Adam Haskell <a.hask...@gmail.com> wrote:
> I can not remember the other places liferay hides Jar's but your best bet is
> to scan the liferay install for all jars and eliminate all duplicates from
> Railo's install.
>
> Adam
>
> On Wed, Jan 13, 2010 at 4:16 PM, Andrea Campolonghi <and...@getrailo.org>wrote:
>
>
>
> > There is no change.
> > The same main error on railo-context loading:
>
> > Wed Jan 13 21:14:41 GMT 2010-718 Start CFML Controller
> > ===================================================================
> > SERVER CONTEXT
> > -------------------------------------------------------------------
> > - config:/opt/liferay/railo/railo-server/context
> > ===================================================================
>
> > java.lang.ClassCastException:
> > org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to
> > org.apache.xerces.xni.parser.XMLParserConfiguration
> > at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
> > at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
> > at
> > railo.runtime.config.ConfigWebFactory.loadDocument(ConfigWebFactory.java:67 7)
> > at
> > railo.runtime.config.ConfigServerFactory.newInstance(ConfigServerFactory.ja va:68)
> > at
> > railo.runtime.engine.CFMLEngineImpl.getConfigServerImpl(CFMLEngineImpl.java :134)
>
> > Micha.
> > If you read this. Any suggestion?
>
> > Thanks
>
> > Andrea
>
> > 2010/1/13 Andrea Campolonghi <and...@getrailo.org>
>
> > Same.
>
> >> I will now try to play a bit with the classpath.
> >> I will try to load before railo and then liferay to see what happen.
>
> >> I will post here the results.
>
> >> Andrea
>
> >> 2010/1/13 Adam Haskell <a.hask...@gmail.com>
>
> >> Funny thing how both of them use Tomcat... Are you getting the same error
> >>> or a new one?
>
> >>> Adam
>
> >>> On Wed, Jan 13, 2010 at 3:09 PM, Andrea Campolonghi <and...@getrailo.org
> >>> > wrote:
>
> >>>> I tried with no success but I guess that was a trick for jBoss
> >>>> incompatibility.
> >>>> My Liferay install run simply on Tomcat with no Jboss involved.
>
> >>>> Must be something else....
>
> >>>> Thanks in any case
>
> >>>> Andrea
>
> >>>> 2010/1/13 denstar <valliants...@gmail.com>
Hi Andrea,
You might want to try this all over again with a new Liferay instance
and place the railo war file in ../liferay_install_dir/deploy/ then
start up liferay. Yo u should be able to go to the Railo admin page
Thanks Adam, would appreciate it. I'm trying Liferay bundled with
Tomcat. Also from what I can tell it seems cfmlportlets would only
work using .cfm files and not cfcs. Would I be right in that
assumption?
On Jan 13, 8:04 pm, Adam Haskell <a.hask...@gmail.com> wrote:
> Oh hey thanks Seyi! I'll look at liferay tonight, it's been a while, I'm
> using it on Websphere and JBoss never used it on Liferay. As for the website
> something sort of auto updated and kinda killed everything :) Trying to
> figure it out tonight.
>
> Adam
>
> On Wed, Jan 13, 2010 at 6:01 PM, seyi <seyilo...@gmail.com> wrote:
> > Hi Andrea,
>
> > You might want to try this all over again with a new Liferay instance
> > and place the railo war file in ../liferay_install_dir/deploy/ then
> > start up liferay. Yo u should be able to go to the Railo admin page
> > once liferay starts up, however you still need some other extra steps
> > before you can start writing CF portlets. I haven't had success
> > creating portlets with Railo using CFML and a free open source code
> > that Adam wrote to make any CF container utilize a portal engine, I
> > tried this for Adobe's CF and can build portlets.
>
> > Adam,
> > Thanks for your work on this, I tried using cfportlets version 1 that
> > you have up onhttp://wiki.cfinnovate.com/display/cfmlportlets/Home,
On Wed, Jan 13, 2010 at 10:05 AM, Andrea Campolonghi wrote:Hi, I have a Liferay install on Tomcat. I am testing the option to install Railo on the same Tomcat install and start using cfm in place of jsp for managing the portlets output. Basically the plan is to produce liferay portlets but ..... skip jsp ......Delete these jars from the railo lib folder: * apache-xml-xerces.jar * xml-apis.jar * ss_css2.jar * tagsoup.jar * serializer.jar * w3c-dom.jar And theoretically you should be good to go. There might be one other-- I guess I should have left my old "not so 'leet" blog post un-edited and linked to a new one instead. Eh. You live, you learn. :) Force be with you, esse! :den
-- Michael Offner-Streit CTO Railo Technologies GmbH michael...@railo.ch www.getrailo.com Mailing List (english): http://groups.yahoo.com/group/railo_talk/ Mailing List (german): http://de.groups.yahoo.com/group/railo/ Linked in: http://www.linkedin.com/e/gis/71368/0CF7D323BBC1 Issue Tracker: http://jira.jboss.org/jira/browse/RAILO Blog: http://www.railo-technologies.com/blog
Some question:1) Implementing a portlet via cfml will I still be able to access to the liferay context ??
2) What are for you the pro and cons of the approaches
3) Do you have a sample of a cfml portlet ?
4) How do you involke Railo if is not globally available ?