• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Running 1.5 from CVS?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I am attempting to do some single sign-on integration for the forum and the rest of my site, and rather than hack up the code I figure it will be much more maintainable to implement the SSO support as described on the site (http://www.jforum.net/confluence/display/sso/SSO).

I am unable to run the HEAD tree successfully, though, which I need for this SSO support. I modified the build script to point to my tomcat but other than that (and a change or two in the properties file), all is unchanged.

The error I get is some template thing, and I don't quite know how all the template stuff works. Exception below. Am I missing anything, like some simple configuration step? Is it enough to update the properties file with my appropriate settings and then just deploy the WAR, or is there an install sequence I need to go through? My DB is a 2.1.4 schema DB.

Also, I am curious whether folks that work on the tree using Eclipse have a debugging setup at all? I usually use MyEclipse for web dev, but am not sure what plain old Eclipse has int eh way of remote debugging support -- is there a doc at all that describes how to debug with the JForum default Eclipse project?

Thanks!

Expression templateName is undefined on line 5, column 14 in exception.html. The problematic instruction: ---------- ==> ${templateName} [on line 5, column 12 in exception.html] in include "${templateName}/message.htm" [on line 5, column 1 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.renderElementToString(Environment.java:1461) at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at freemarker.core.Include.accept(Include.java:110) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:231) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:106) at net.jforum.JForum.service(JForum.java:228) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source)
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This stack trace does not have the real error. However, as you said you're running the schema frm 2.1.4, the error much problem lies there.

You should use the 2.1.5 schema. (a diff from 2.1.4 will be available soon in the cvs)

Also, for debugging in Eclipse, take a look at this:

http://www.guj.com.br/content/articles/eclipse/EclipseTomcatServletDebugging.htm

It is in portuguese, because I made it for a Brazilian website - but you will understand only looking for the picuteres ;)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks much. So on the schema, what is the easiest way for me to deploy the new one? I don't see the /install stuff like I have in 2.1.4, or any sql scripts anywhere. Am I overlooking them or are they not in CVS right now?

Thanks...
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They are under WEB-INF/config/database

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there!

I'm getting the exact same error, but different DB schemes shouldn't be the problem here. I use the current CVS version of JForum, and after some struggling (hsqldb.properties seems to be missing in CVS) I got it working.
But as soon as I set the following properties to use the default SSO cookie method, I get that "Expression templateName is undefined" error instead of the forum start page.

authentication.type=sso
sso.implementation=net.jforum.sso.CookieUserSSO

The JforumSSO cookie containing the username is set for site localhost, but with a different path (localhost:8080/xyzWeb instead of localhost:8080/xyzForum). May that be the problem? If yes, how can I make the cookie accessible for the forum?

Thanks!
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Expression templateName is undefined" happens because some another error. You should look at your container logs - I mean, templateName is undefined is just a consequence, not the cause.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rafael!

Thank you for your quick reply.
*lol* I found the error. I'm simply missing the classes net.jforum.sso.CookieUserSSO and SSOCookie...
When I read the chapter "Using the default SSO cookie", I thought that those classes are already existing, but I couldn't find them in my CVS directory. Did I make anything wrong while checking out from CVS (I haven't used CVS before), or are the classes accidentally missing, or do I have to write them on my own?
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ehm... sorry, forget about SSOCookie! That's a variable name, not a class name........ ops:

Still missing CookieUserSSO though.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
same problem here.
net.jforum.sso.CookieUserSSO
does not exist. I'm runnning HEAD from CVS. Either the docs are misleading (assuming we have to create our own CookieUserSSO), or the class is just missing

my trace
java.lang.ClassNotFoundException: net.jforum.sso.CookieUserSSO
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at net.jforum.ControllerUtils.checkSSO(ControllerUtils.java:209)
at net.jforum.ControllerUtils.refreshSession(ControllerUtils.java:271)
at net.jforum.JForum.service(JForum.java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought I'd better register, before this thread gets too confusing. ;)
I am (was) the second "anonymous" here.

I wrote my own (very basic) CookieUserSSO.java to try to get my cookies and/or session attributes. Now I can choose between two possibilities:

1. Run my WebApp and the Forum under different contexts (/xxxWeb and /xxxForum):
Forum works, but I can't access the cookie or the session attributes my WebApp has set.

2. Run the forum as a sub-context of my WebApp (/xxxWeb/xxxForum):
I can now access the cookie (still no session attribute, though the session has the same ID as in my WebApp), but something else goes terribly wrong. In JForum.service(...), the calls to request.getModule() and request.getAction() return null.

Does anyone have a solution for this?
I use JBoss 4.0.2, and I'm not quite an expert for web development (obviously)...
How can I setup JBoss and my apps in a way that I can access cookies from different contexts? Any help appreciated!

Thanks,
DC
[originally posted on jforum.net by DemonCleaner]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a quick additional note:
It works when I run the WebApp at / and the forum at /xxxforum (which is not quite what I want, but at least it works).

So is there a known general problem with JForum running as a "subcontext" (/abc/def)? Or is any special configuration needed for that?

DC

Oh, and one more thing: I've seen "JForum.getRequest()" in various code pieces (for example by Mark "Anonymous" in the "Using JForum SSO..." thread just a couple of days ago). There's no such method in my CVS code?! Has that been removed? Is "JForumExecutionContext.getRequest()" the correct replacement?

Sorry for all those questions....
[originally posted on jforum.net by DemonCleaner]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These are sample classes, that does not belong to the core JForum.
Please take a look here:

http://www.jforum.net/confluence/display/integration/SSO

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I followed the instructions , set all waht is needed

sso.implementation = net.jforum.sso.CookieUserSSO
..........


and got the following error:
Expression templateName is undefined on line 5, column 14 in exception.html. The problematic instruction: ---------- ==> ${templateName} [on line 5, column 12 in exception.html] in include "${templateName}/message.htm" [on line 5, column 1 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.renderElementToString(Environment.java:1461) at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at freemarker.core.Include.accept(Include.java:110) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:231) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:108) at net.jforum.JForum.service(JForum.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)



When i chacked on tomcat errors, it says that the class net.jforum.sso.CookieUserSSO is missing...

I double checked on the distribution jforum2.1.6 and the class is really missing !!!

Could u please tell me where can i find that class ( i also downloaded the version 2.1.5 and it is the same probleme)

Sincerly Yours
Mehdi
[originally posted on jforum.net by bouayame]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to create it. CookieUserSSO is just an example in the documentation

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is this new class CookieUserSSO supposed to do?

Example link http://www.jforum.net/confluence/display/integration/SSO is not working. Any other examples ?

Any help ?
[originally posted on jforum.net by sf_techie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To clarify further, I am using cookie with username as mentioned in following case of documentation:

"Use the method when you already have a login cookie with the value set to the username."


Please help.
[originally posted on jforum.net by sf_techie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume that despite the subject of "Running 1.5 in CVS" you mean you want a working example for the current code.... If so, here's one:

https://coderanch.com/t/577202 #15411


[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for unintentionally posting under wrong topic.

Code snippet you provided helped a lot.

Thanks a lot Monroe.

MJ


[originally posted on jforum.net by sf_techie]
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic