You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Varsha NRao (HCL Financial Services)" <Va...@hcl.in> on 2009/09/14 11:49:31 UTC
Jetspeed 2 and Tomcat-6.0.20 Login Problem
Hello ,
I have deployed Jetspeed 2 Tomcat-6.0.20 using the following maven commands
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed-2 -DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.0 -DartifactId=jetexpress -Dpackage=org.apache.portals.tutorials -DgroupId=org.apache.portals.tutorials -Dversion=1.0-SNAPSHOT
I changed the jetspeed-mvn-settings.xml file as per the instructions in the tutorials and I ran the following command to build and deploy in tomcat
mvn jetspeed:mvn -Dtarget=all
I am able to launch the jetexpress portal from tomcat.
I moved the jars required for login into the lib folder . And I add the JAAS realm in sever.xml as follows :
<Realm className="org.apache.catalina.realm.JAASRealm"
appName="Jetspeed"
userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl"
roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl"
useContextClassLoader="true"
debug="5"/>
My jetspeed.xml located under conf\Catalina\localhost is as follows:
<Context crossContext="true">
<Realm className="org.apache.catalina.realm.JAASRealm"
appName="Jetspeed"
userClassNames="org.apache.jetspeed.security.impl.UserImpl,org.apache.jetspeed.security.impl.TransientUser,org.apache.jetspeed.security.UserSubjectPrincipalImpl"
roleClassNames="org.apache.jetspeed.security.impl.RoleImpl,org.apache.jetspeed.security.impl.TransientRole"
useContextClassLoader="true"
debug="0"/>
<Resource name="jdbc/jetspeed" auth="Container"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
type="javax.sql.DataSource" username="" password=""
driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:D:\Program Files\Apache Software Foundation\Tomcat 6.0\database\derby\productiondb;create=true"
maxActive="100" maxIdle="30" maxWait="10000"/>
<Valve className="org.apache.catalina.authenticator.FormAuthenticator" characterEncoding="UTF-8"/>
</Context>
But I am facing a problem while login . I get the following exception
Sep 14, 2009 11:29:59 AM org.apache.catalina.realm.JAASRealm authenticate
WARNING: Login exception authenticating username "admin"
javax.security.auth.login.LoginException
at org.apache.jetspeed.security.impl.DefaultLoginModule.login(DefaultLoginModule.java:258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:362)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
I went though some similar posts but I am unable to find a solution for this.
I have used Maven 2.0.9 and tomcat 6.0.20.
Any help on this is appreciated.
Thanks
Cheers :)
Varsha
"No one can go back and make a brand new start.
Anyone can start from now and make a brand new ending..."
P Please do not print this email unless it is absolutely necessary. Spread environmental awareness
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
RE: Jetspeed 2 and Tomcat-6.0.20 Login Problem
Posted by "Varsha NRao (HCL Financial Services)" <Va...@hcl.in>.
Hi David,
Thanks a lot for the help , I changed the path for the database in the jetspeed.xml , I removed all the '\'es and replaced them with '/'es , and it worked correctly.
Thanks again. :)
Cheers :)
Varsha
"No one can go back and make a brand new start.
Anyone can start from now and make a brand new ending..."
Please do not print this email unless it is absolutely necessary. Spread environmental awareness
-----Original Message-----
From: David Sean Taylor [mailto:d.taylor@onehippo.com]
Sent: Tuesday, September 15, 2009 4:54 AM
To: Jetspeed Users List
Subject: Re: Jetspeed 2 and Tomcat-6.0.20 Login Problem
We got this running on Windows here out of the Program Files
directory, both putting the source code and tomcat installation under /
Program Files/jetexpress/jetexpress and /Program Files/jetexpress/
tomcat6 respectively. So I want to make it clear: IT IS POSSIBLE TO
BUILD AND RUN JETSPEED ON WINDOWS UNDER PROGRAM FILES. That said, I
don't recommend it, as I know there are some old issues associated
with doing this, not to mention the frequent emails to this list from
newbies trying to install it there and not being familiar with Java
development.
Lets re-review your email and see if I can identify the issues....
On Sep 14, 2009, at 2:49 AM, Varsha NRao (HCL Financial Services) wrote:
>
> Hello ,
>
> I have deployed Jetspeed 2 Tomcat-6.0.20 using the following maven
> commands
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-
> alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed-2 -
> DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.0 -
> DartifactId=jetexpress -Dpackage=org.apache.portals.tutorials -
> DgroupId=org.apache.portals.tutorials -Dversion=1.0-SNAPSHOT
>
> I changed the jetspeed-mvn-settings.xml file as per the instructions
> in the tutorials and I ran the following command to build and deploy
> in tomcat
>
The jetspeed-mvn-settings.xml instructs you to put your database in /
tmp, however according to your jetexpress.xml below, you put it under
D:\Program Files\Apache Software Foundation\Tomcat 6.0\database\derby
\productiondb, so something doesn't add up
> mvn jetspeed:mvn -Dtarget=all
>
>
> I am able to launch the jetexpress portal from tomcat.
>
>
> I moved the jars required for login into the lib folder . And I add
> the JAAS realm in sever.xml as follows :
>
Not necessary. The build moves all the jars around for you. Recommend
starting with a clean Tomcat as it sounds like some jar is now in the
wrong place
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl"
>
> roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl"
> useContextClassLoader="true"
> debug="5"/>
>
Again, not necessary to do. Don't edit the server.xml. The build will
create a custom server xml file for the jetexpress webapp.
>
> My jetspeed.xml located under conf\Catalina\localhost is as follows:
>
> <Context crossContext="true">
>
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl
> .UserImpl
> ,org
> .apache
> .jetspeed
> .security
> .impl
> .TransientUser,org.apache.jetspeed.security.UserSubjectPrincipalImpl"
>
> roleClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl.RoleImpl,org.apache.jetspeed.security.impl.TransientRole"
> useContextClassLoader="true"
> debug="0"/>
>
>
> <Resource name="jdbc/jetspeed" auth="Container"
> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> type="javax.sql.DataSource" username="" password=""
>
> driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
> url="jdbc:derby:D:\Program Files\Apache Software Foundation\Tomcat
> 6.0\database\derby\productiondb;create=true"
> maxActive="100" maxIdle="30" maxWait="10000"/>
>
There is the problem -- I missed it the first time.
You cannot have single back slashes in Java -- This is probably one
of the oldest problems for Java newbies on Windows when running the
Jetspeed build.
Key:
This is a forward slash: /
This is a back slash: \
Try
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:/Program Files/Apache Software Foundation/Tomcat 6.0/
database/derby/productiondb;create=true"
or
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:D:/Program Files/Apache Software Foundation/Tomcat 6.0/
database/derby/productiondb;create=true"
or
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:D:\\Program Files\\Apache Software Foundation\\Tomcat
6.0\\database\\derby\\productiondb;create=true"
Make sure to set ALL your jetspeed-mvn-settings.xml without the single
backslashes including the <org.apache.jetspeed.server.home> setting
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
Re: Jetspeed 2 and Tomcat-6.0.20 Login Problem
Posted by David Sean Taylor <d....@onehippo.com>.
We got this running on Windows here out of the Program Files
directory, both putting the source code and tomcat installation under /
Program Files/jetexpress/jetexpress and /Program Files/jetexpress/
tomcat6 respectively. So I want to make it clear: IT IS POSSIBLE TO
BUILD AND RUN JETSPEED ON WINDOWS UNDER PROGRAM FILES. That said, I
don't recommend it, as I know there are some old issues associated
with doing this, not to mention the frequent emails to this list from
newbies trying to install it there and not being familiar with Java
development.
Lets re-review your email and see if I can identify the issues....
On Sep 14, 2009, at 2:49 AM, Varsha NRao (HCL Financial Services) wrote:
>
> Hello ,
>
> I have deployed Jetspeed 2 Tomcat-6.0.20 using the following maven
> commands
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-
> alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed-2 -
> DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.0 -
> DartifactId=jetexpress -Dpackage=org.apache.portals.tutorials -
> DgroupId=org.apache.portals.tutorials -Dversion=1.0-SNAPSHOT
>
> I changed the jetspeed-mvn-settings.xml file as per the instructions
> in the tutorials and I ran the following command to build and deploy
> in tomcat
>
The jetspeed-mvn-settings.xml instructs you to put your database in /
tmp, however according to your jetexpress.xml below, you put it under
D:\Program Files\Apache Software Foundation\Tomcat 6.0\database\derby
\productiondb, so something doesn't add up
> mvn jetspeed:mvn -Dtarget=all
>
>
> I am able to launch the jetexpress portal from tomcat.
>
>
> I moved the jars required for login into the lib folder . And I add
> the JAAS realm in sever.xml as follows :
>
Not necessary. The build moves all the jars around for you. Recommend
starting with a clean Tomcat as it sounds like some jar is now in the
wrong place
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl"
>
> roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl"
> useContextClassLoader="true"
> debug="5"/>
>
Again, not necessary to do. Don't edit the server.xml. The build will
create a custom server xml file for the jetexpress webapp.
>
> My jetspeed.xml located under conf\Catalina\localhost is as follows:
>
> <Context crossContext="true">
>
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl
> .UserImpl
> ,org
> .apache
> .jetspeed
> .security
> .impl
> .TransientUser,org.apache.jetspeed.security.UserSubjectPrincipalImpl"
>
> roleClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl.RoleImpl,org.apache.jetspeed.security.impl.TransientRole"
> useContextClassLoader="true"
> debug="0"/>
>
>
> <Resource name="jdbc/jetspeed" auth="Container"
> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> type="javax.sql.DataSource" username="" password=""
>
> driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
> url="jdbc:derby:D:\Program Files\Apache Software Foundation\Tomcat
> 6.0\database\derby\productiondb;create=true"
> maxActive="100" maxIdle="30" maxWait="10000"/>
>
There is the problem -- I missed it the first time.
You cannot have single back slashes in Java -- This is probably one
of the oldest problems for Java newbies on Windows when running the
Jetspeed build.
Key:
This is a forward slash: /
This is a back slash: \
Try
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:/Program Files/Apache Software Foundation/Tomcat 6.0/
database/derby/productiondb;create=true"
or
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:D:/Program Files/Apache Software Foundation/Tomcat 6.0/
database/derby/productiondb;create=true"
or
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:D:\\Program Files\\Apache Software Foundation\\Tomcat
6.0\\database\\derby\\productiondb;create=true"
Make sure to set ALL your jetspeed-mvn-settings.xml without the single
backslashes including the <org.apache.jetspeed.server.home> setting
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Jetspeed 2 and Tomcat-6.0.20 Login Problem
Posted by David Sean Taylor <d....@onehippo.com>.
On Sep 14, 2009, at 2:49 AM, Varsha NRao (HCL Financial Services) wrote:
>
> Hello ,
>
> I have deployed Jetspeed 2 Tomcat-6.0.20 using the following maven
> commands
>
>
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-
> alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed-2 -
> DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.0 -
> DartifactId=jetexpress -Dpackage=org.apache.portals.tutorials -
> DgroupId=org.apache.portals.tutorials -Dversion=1.0-SNAPSHOT
>
> I changed the jetspeed-mvn-settings.xml file as per the instructions
> in the tutorials and I ran the following command to build and deploy
> in tomcat
>
> mvn jetspeed:mvn -Dtarget=all
>
>
> I am able to launch the jetexpress portal from tomcat.
>
>
> I moved the jars required for login into the lib folder . And I add
> the JAAS realm in sever.xml as follows :
That should not be necessary
>
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl"
>
> roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl"
> useContextClassLoader="true"
> debug="5"/>
>
>
> My jetspeed.xml located under conf\Catalina\localhost is as follows:
>
> <Context crossContext="true">
>
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Jetspeed"
>
> userClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl
> .UserImpl
> ,org
> .apache
> .jetspeed
> .security
> .impl
> .TransientUser,org.apache.jetspeed.security.UserSubjectPrincipalImpl"
>
> roleClassNames
> =
> "org
> .apache
> .jetspeed
> .security
> .impl.RoleImpl,org.apache.jetspeed.security.impl.TransientRole"
> useContextClassLoader="true"
> debug="0"/>
>
>
> <Resource name="jdbc/jetspeed" auth="Container"
> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> type="javax.sql.DataSource" username="" password=""
>
> driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
> url="jdbc:derby:D:\Program Files\Apache Software Foundation\Tomcat
> 6.0\database\derby\productiondb;create=true"
> maxActive="100" maxIdle="30" maxWait="10000"/>
>
> <Valve
> className="org.apache.catalina.authenticator.FormAuthenticator"
> characterEncoding="UTF-8"/>
>
> </Context>
>
> But I am facing a problem while login . I get the following exception
>
> Sep 14, 2009 11:29:59 AM org.apache.catalina.realm.JAASRealm
> authenticate
> WARNING: Login exception authenticating username "admin"
> javax.security.auth.login.LoginException
> at
> org
> .apache
> .jetspeed
> .security.impl.DefaultLoginModule.login(DefaultLoginModule.java:258)
If I enter an invalid password, I usually get something like:
WARNING: Login exception authenticating username "admin"
javax.security.auth.login.LoginException: Invalid password.
at
org
.apache
.jetspeed
.security.impl.DefaultLoginModule.login(DefaultLoginModule.java:258)
I just tested locally and it works for me on 6.0.20. Going to have a
newbie programmer test jetexpress (on Windows, installed in Program
File) and see if how that goes, should have results soon...
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org