Portlet version problems

12 views
Skip to first unread message

Julien Gribonvald

unread,
Jan 28, 2008, 5:37:02 AM1/28/08
to bookmark...@googlegroups.com
Hi,

So after some test of the bookmarks i have these problems:

- From servlet application :
* I can save bookmarks but can't upload it this return this error :

*type* Rapport d'exception

*message*

*description* _Le serveur a rencontré une erreur interne () qui l'a
empêché de satisfaire la requête._

*exception*

javax.servlet.ServletException: L'exécution de la servlet a lancé une exception
uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:20)

*cause mère*

java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
java.lang.Class.getConstructor0(Class.java:2671)
java.lang.Class.newInstance0(Class.java:321)
java.lang.Class.newInstance(Class.java:303)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:163)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:138)
org.apache.struts.util.RequestUtils.getMultipartHandler(RequestUtils.java:520)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:378)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:794)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191)
org.apache.portals.bridges.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:51)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:20)

- From portlet mode (Using uPortal 2.6.1GA other editions had the same protlets it seems):
* I can only create bookmarks, but can't move it and delete it.
I don't have sub-options shown when i click on the move bouton, and it stay on the overview of bookmarks when i click on delete.
But other options seems to works well expect the import like in servlet mod.

Is there any configuration that i made bad ? I modified nealry nothing ...


After i would like to know if it would be possible to make an admin panel to push bookmarks to specified users.
Also have the possibility of a group management for the same option, group given by a source, like database, LDAP, or why not groups given by the portal.

Is there something planed for a such thing ?

thanks

Julien G.

Mark McLaren

unread,
Jan 28, 2008, 10:10:27 AM1/28/08
to bookmark...@googlegroups.com
Hi Julien,

I'm sorry about this. When I last updated the Jar files it looks like
I did not do a very good job when testing. From your error it looks
like the commons-fileupload jar is missing. Add the following to
pom.xml:

<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2</version>
</dependency>

I haven't tried this in uPortal 2.6.1GA yet - our production portal is
still based on uPortal 2.5.x. I'm not sure what changes have been
made that could impact on this portlet.

I have no immediate plans for an admin panel or groups management but
it should be possible.

At the moment a user sees the default set when they first login but
what they see could easily be determined at runtime. It should be
possible to push a set of mandatory bookmarks.

Regarding groups - I would like to try and keep things simple.

You could use the portal's group management facilities to target
specific bookmarks portlet instances of the portlet at different user
groups.

I'm open to suggestions for the best way to do things.

Mark


--
"Paradoxically, the more time saving abstractions you are using the
more you actually have to know." - Simon Willison

Mark McLaren

unread,
Jan 28, 2008, 10:13:38 AM1/28/08
to bookmark...@googlegroups.com
I will test the portlet in uPortal 2.6.1 and get back to you.

Mark McLaren

unread,
Jan 28, 2008, 10:42:14 AM1/28/08
to bookmark...@googlegroups.com
Hi Julien,

Something must have changed in uPortal 2.6 but I have isolated the problem.

In of the XSL stylesheets (main.xsl and justFolders.xsl) there are
references to:

"spage"

change these to

"spageview"

and everything should work fine. I have also noticed that you don't
need the snapshot version of maven-war-plugin anymore. This
distribution now needs updating!

Thanks for your input,

Mark

Mark McLaren

unread,
Jan 28, 2008, 10:44:58 AM1/28/08
to bookmark...@googlegroups.com
I think it was Struts Bridge code that changed and I hadn't noticed.

On Jan 28, 2008 3:42 PM, Mark McLaren <mark.m...@gmail.com> wrote:

> Something must have changed in uPortal 2.6 but I have isolated the problem.

--

Julien Gribonvald

unread,
Jan 28, 2008, 12:13:09 PM1/28/08
to bookmark...@googlegroups.com
Mark McLaren a écrit :

> I think it was Struts Bridge code that changed and I hadn't noticed.
>
> On Jan 28, 2008 3:42 PM, Mark McLaren <mark.m...@gmail.com> wrote:
>
>
>> Something must have changed in uPortal 2.6 but I have isolated the problem.
>>
>
>
Thanks for all it helped a lot to solve many things, butt there are
still somes problems :

again for the servlet the import doesn't works well, i exported the
bookmark list and tried to import it, but when i tryto import it i have
this error :

*type* Rapport d'exception

*message*

*description* _Le serveur a rencontré une erreur interne () qui l'a
empêché de satisfaire la requête._

*exception*

javax.servlet.ServletException: L'exécution de la servlet a lancé une exception
uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:20)

*cause mère*

java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:103)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:350)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:182)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:389)


org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:794)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191)
org.apache.portals.bridges.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:51)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:20)

*note* _La trace complète de la cause mère de cette erreur est
disponible dans les fichiers journaux de Apache Tomcat/5.5.25._

After in portlet mod, it's a bit better, but one thing is remaining i
can't move links to folders, i mean when i click on move it shows now
where i want to move it, but when i click on the folder i'm redirected
on the overview of the folder contents...


And thanks for your response about improvment that i suggested ;)

I have many otherthings to watch before, but maybe we could do something
to help you in these improvments. Also for groups i understand what you
mean, you prefer for the moment to keep the publication of many
instance, ok it's a solution... Else i would like to know if you tested
your applications in servlet mod with CAS authentication and not a
default user ? If yes i think there is only one change to do to access
by a login for user and to add CAS parameters in the servlet context.

thanks

Julien.

Mark McLaren

unread,
Jan 28, 2008, 3:10:02 PM1/28/08
to bookmark...@googlegroups.com
Thank you for your patience Julien.

commons-io is also missing and needs to be added to the pom.xml

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>

In justFolders.xsl the spageview that we just changed should actually
be spage - as it was originally.
(main.xsl should have spageview).

Yes, I use this with CAS filter. You can use any mechanism that sets
getRemoteUser to a username.

It would be really good to collaborate on this at some point. Thank
you for spotting the bugs, I hope you find this application useful.

Best wishes,

Mark

On Jan 28, 2008 5:13 PM, Julien Gribonvald <julien.g...@recia.fr> wrote:
>
> Mark McLaren a écrit :
> > I think it was Struts Bridge code that changed and I hadn't noticed.
> >
> > On Jan 28, 2008 3:42 PM, Mark McLaren <mark.m...@gmail.com> wrote:
> >
> >
> >> Something must have changed in uPortal 2.6 but I have isolated the problem.
> >>
> >
> >
> Thanks for all it helped a lot to solve many things, butt there are
> still somes problems :
>
> again for the servlet the import doesn't works well, i exported the
> bookmark list and tried to import it, but when i tryto import it i have
> this error :
>
> *type* Rapport d'exception
>
> *message*
>
> *description* _Le serveur a rencontré une erreur interne () qui l'a
> empêché de satisfaire la requête._
>
> *exception*
>
> javax.servlet.ServletException: L'exécution de la servlet a lancé une exception
> uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:20)
>
> *cause mère*
>
> java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
> org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:103)
> >

> After in portlet mod, it's a bit better, but one thing is remaining i
> can't move links to folders, i mean when i click on move it shows now
> where i want to move it, but when i click on the folder i'm redirected
> on the overview of the folder contents...
>
> And thanks for your response about improvment that i suggested ;)
>
> I have many otherthings to watch before, but maybe we could do something
> to help you in these improvments. Also for groups i understand what you
> mean, you prefer for the moment to keep the publication of many
> instance, ok it's a solution... Else i would like to know if you tested
> your applications in servlet mod with CAS authentication and not a
> default user ? If yes i think there is only one change to do to access
> by a login for user and to add CAS parameters in the servlet context.
>
> thanks
>
> Julien.

Julien Gribonvald

unread,
Jan 29, 2008, 5:13:20 AM1/29/08
to bookmark...@googlegroups.com
Hi Mark,

Thanks for all, now it's working totally. Actually I'm testing many
applications to provide a good Portal for in future French schools and
administration. It's only a testing portal, but we are studying all
possibilities and so we will put different applications to different
users for tests to make a final choice ;)

But your applications seems very good even if there are many other
solutions...

After for the CAS connection, how are you going it ? Normally you add
the CAS filters and mapping in the web.xml file, but after how are you
going ? I'm not totally familiar with your application so i don't know
how you get user name from CAS authentication and how you make
modifications.
Thanks in advance if you can give me a quick summary on modifications to
do, and sorry to take some of your time.

Best regards,

Julien G.


Mark McLaren a écrit :

Mark McLaren

unread,
Jan 29, 2008, 5:34:23 AM1/29/08
to bookmark...@googlegroups.com
We currently still use the CAS 2 client servlet filter in production
(although the CAS 3 client should work just as well - it is just
configured differently). The important thing is that the userid needs
to get into the request - so that getRemoteUser works. The
portlet/application makes use of the getRemoteUser method on the
request to acquire the userid. If you are using CAS you should remove
the SimpleFIlter from web.xml (that is purely included for a quick
start).

For CAS client 2 filter configuration:

<http://www.ja-sig.org/wiki/display/CASC/Using+CASFilter>

With CAS client 2 filter this is achieved by setting the following on
the CAS filter in the web.xml:

<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>
<param-value>true</param-value>
</init-param>

For CAS client 3 filter configuration:

<http://www.ja-sig.org/products/cas/client/client-java/index.html>

With CAS client 3 filter this is achieved by adding a new filter in
the web.xml and a corresponding Spring bean:

<filter>
<filter-name>CAS HttpServletRequestWrapperFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casHttpServletRequestWrapperFilter</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>CAS HttpServletRequestWrapperFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

With the following in securityConfiguration.xml:

<bean id="casHttpServletRequestWrapperFilter"
class="org.jasig.cas.client.web.filter.HttpServletRequestWrapperFilter"/>


On Jan 29, 2008 10:13 AM, Julien Gribonvald <julien.g...@recia.fr> wrote:
>
> After for the CAS connection, how are you going it ? Normally you add
> the CAS filters and mapping in the web.xml file, but after how are you
> going ? I'm not totally familiar with your application so i don't know
> how you get user name from CAS authentication and how you make
> modifications.

--

Julien Gribonvald

unread,
Jan 29, 2008, 6:29:11 AM1/29/08
to bookmark...@googlegroups.com
Thanks for all now this is working with CAS V2 without problems, i have
to test it in few weeks with CAS v3 ;)

I will let you know for feedbacks ;)

Best wishes,

Julien G.

Mark McLaren a écrit :

Julien Gribonvald

unread,
Jan 29, 2008, 9:45:49 AM1/29/08
to bookmark...@googlegroups.com
Again me :p

But just to ask if it's normal that there isn't possibility to import
news feeds, we can export but there isn't button for the import ? I ask
in case that i can't seen it ...
Because i thought about the possibility to make a different database for
the 2 applications and to make an admin which will be able to put on the
application of his choice different links and to different groups, This
could be a 3rd application using uPortal services to find groups or
users (also using LDAP) and which would publish links in all user
accounts of his choice.

In an other hand some precisions for those who will read these lines in
case :

The configuration work well for CAS V2 but you have to had a dependency
specially for the cas-client jar v2.1.1, for that add in the pom.xml :

<dependency>
<type>jar</type>
<groupId>cas</groupId>
<artifactId>casclient</artifactId>
<version>2.1.1</version>
</dependency>

and on the web.xml of bmarks and nfeeds add :

<filter>
<filter-name>CAS Filter</filter-name>
<filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
<param-value>https://domain_name_of_your_server/cas/login</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
<param-value>https://domain_name_of_your_server/cas/serviceValidate</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
<param-value>domain_name_of_your_server</param-value>
</init-param>


<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>
<param-value>true</param-value>
</init-param>

</filter>

<filter-mapping>
<filter-name>CAS Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

and comment these lines :

<filter>
<filter-name>Simple Auth Filter</filter-name>
<filter-class>uk.ac.bris.portlet.bookmarks.web.SimpleAuthFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>Simple Auth Filter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>Simple Auth Filter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>

After if you are using tomcat you can add these lines in plugins in the
pom.xml for an automatic deployment :

<plugin>
<groupId>org.codehous.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://localhost:8080/manager</url>
<server>tomcat-manager</server>
</configuration>
</plugin>

you can modify localhost by the domain name where your tomcat is
running, like that you can deploy on an other computer...

But don't forget to configure your maven file
MAVEN_PATH/conf/setting.xml in adding a server (between servers tag)

<server>
<id>tomcat-manager</id>
<username>admin</username>
<password>XXXXX</password>
</server>

for example, but also this username must be configured as a username and
role in tomcat config (TOMCAT_PATH/conf/tomcat-users.xml)

<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="XXXXX" roles="admin,manager"/>

where the user must have at least the manager role.

With that you need only to do a :
mvn tomcat:deploy to deploy
and
mvn tomcat:undeploy to undeploy the application.

If this can help ...

Best regards

Julien.

Mark McLaren a écrit :

Mark McLaren

unread,
Jan 29, 2008, 10:16:45 AM1/29/08
to bookmark...@googlegroups.com
OPML is the de-facto standard for newsfeed collections. When I wrote
the newsfeed application I found that OPML to be too flexible a
format. Different newsfeed readers use slightly different OPML
formats and not all newsfeed readers support folders (and those that
support folders the implementation varies greatly).

You could always use XBEL!

In production, to get around the import problem for
bookmarks/newsfeeds I wrote a Firefox toolbar that imports URL and
feeds into the bookmarks and newsfeed applications.

<https://www.bris.ac.uk/portal/help/content/toolbar-help.html>

Obviously the above Firefox toolbar is Bristol specific - but it could
be adapted for your institution.

I thought you had some really good ideas about extending the Maven
installation - but I do want to keep the core installation generic so
that it can be used by people who do not use Tomcat or CAS (although
we use both of those!).

Mark

Reply all
Reply to author
Forward
0 new messages