You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Liu <sc...@tapestry.net> on 2000/11/30 20:57:01 UTC

build failed on tomcat

Hi All,

I have installed j2sdk1_3_0 binary version on solaris 2.6
and had jakarta-ant built. When I tried to build the tomcat
it failed since there was no class of SAXParserFactory.
I could not find anything in the j2sdk1_3_0 directories.
Do I need to install other class libraries to make it work?

Thanks

Scott

# ./build.sh
Searching for build.xml ...
Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml

BUILD FAILED

No JAXP compliant XML parser found. See http://java.sun.com/xml for the
reference implementation.
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)

        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at org.apache.tools.ant.Main.runBuild(Main.java:401)
        at org.apache.tools.ant.Main.main(Main.java:149)




RE: formbased security

Posted by John de la Garza <jd...@designinsites.com>.
Thanks!

You've been super helpful, just wanted to let you know I really appreciate
it and have got alot out of your quick responses!  I normally don't get
support this good, even we it is billed at $100 a question.

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Monday, December 04, 2000 11:04 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: formbased security


John de la Garza wrote:

> What I meant was how can I never have them see the tomcat login...I want
to
> validate the manually from my own code?
>
> I have a web based app that the user must log into...I want log the user
in
> to tomcat once they are logged into to application.
>
> What I meant about being asked twice was that they would be asked to login
> to my app...then asked once to log into tomcat's thing..
>

If you want the user to experience a single login, you need to choose one
approach or the other -- either have your application do it all, or have
Tomcat
do it all.

In the former case, your application would need to do it's own checking (on
every request) that the user is still logged in, and redirect them to the
login
page if needed.  You would not have an <security-constraint> or
<login-config>
entries in your web.xml file.

For Tomcat-managed security, you would install such directives, and set up
your
users and roles appropriately (by default in the "conf/tomcat-users.xml"
file).
You can customize the look and feel of the login page if you choose
form-based
authentication.  See the servlet specification
<http://java.sun.com/products/servlet/download.html> for more information on
this.

Craig McClanahan




Re: formbased security

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
John de la Garza wrote:

> What I meant was how can I never have them see the tomcat login...I want to
> validate the manually from my own code?
>
> I have a web based app that the user must log into...I want log the user in
> to tomcat once they are logged into to application.
>
> What I meant about being asked twice was that they would be asked to login
> to my app...then asked once to log into tomcat's thing..
>

If you want the user to experience a single login, you need to choose one
approach or the other -- either have your application do it all, or have Tomcat
do it all.

In the former case, your application would need to do it's own checking (on
every request) that the user is still logged in, and redirect them to the login
page if needed.  You would not have an <security-constraint> or <login-config>
entries in your web.xml file.

For Tomcat-managed security, you would install such directives, and set up your
users and roles appropriately (by default in the "conf/tomcat-users.xml" file).
You can customize the look and feel of the login page if you choose form-based
authentication.  See the servlet specification
<http://java.sun.com/products/servlet/download.html> for more information on
this.

Craig McClanahan



RE: formbased security

Posted by John de la Garza <jd...@designinsites.com>.
What I meant was how can I never have them see the tomcat login...I want to
validate the manually from my own code?

I have a web based app that the user must log into...I want log the user in
to tomcat once they are logged into to application.

What I meant about being asked twice was that they would be asked to login
to my app...then asked once to log into tomcat's thing..



-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Monday, December 04, 2000 10:27 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: formbased security


John de la Garza wrote:

> Can I manually stick the username/passwd into the server container? So the
> user is not asked?  for example they log into my app...then they can
browser
> around with out being asked to 'login' again...
>

Well, that is what actually happens.  Once you log on, your identity is
recognized until you exit your browser (or the server is restarted).

>
> Also can I keep the user/passwd list in a database instead of the
> tomcatusers.xml file?
>

There are comments in the "conf/server.xml" file illustrating how you can
replace the SimpleRealm interceptor (that processes "conf/tomcat-users.xml")
with one that uses JDBC to access a database.  Examples of configuration for
several different databases are included.

Craig McClanahan




Re: formbased security

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
John de la Garza wrote:

> Can I manually stick the username/passwd into the server container? So the
> user is not asked?  for example they log into my app...then they can browser
> around with out being asked to 'login' again...
>

Well, that is what actually happens.  Once you log on, your identity is
recognized until you exit your browser (or the server is restarted).

>
> Also can I keep the user/passwd list in a database instead of the
> tomcatusers.xml file?
>

There are comments in the "conf/server.xml" file illustrating how you can
replace the SimpleRealm interceptor (that processes "conf/tomcat-users.xml")
with one that uses JDBC to access a database.  Examples of configuration for
several different databases are included.

Craig McClanahan



RE: formbased security

Posted by John de la Garza <jd...@designinsites.com>.
Can I manually stick the username/passwd into the server container? So the
user is not asked?  for example they log into my app...then they can browser
around with out being asked to 'login' again...

Also can I keep the user/passwd list in a database instead of the
tomcatusers.xml file?

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Thursday, November 30, 2000 4:43 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: formbased security


John de la Garza wrote:

> arg!
>
> I meant insufficient...sorry
>

I wondered if that's what you really meant :-)

>
> Is there more than the servlet 2.2 spec?
>

You might look into some of the new books and articles coming out that talk
about servlet 2.2.  Or, you could ask specific questions on issues that are
not
clear.

Form based login started making sense for me after I understood the basic
philosophy.  Have you ever accessed a web site that uses BASIC security to
pop
up a username/password dialog box?  And then, after you were successfully
authenticated, the server gave you the requested page?

Form based login should feel very much like that from the user's
perspective.
The first time he or she tries to access a protected page, the login page
will
be shown first -- once they log on successfully, the originally requested
page
will be shown.

It's not any more or less secure than BASIC authentication -- but form based
login lets you customize the look and feel of the login page, where BASIC
authentication does not.

Craig McClanahan




Re: formbased security

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
John de la Garza wrote:

> arg!
>
> I meant insufficient...sorry
>

I wondered if that's what you really meant :-)

>
> Is there more than the servlet 2.2 spec?
>

You might look into some of the new books and articles coming out that talk
about servlet 2.2.  Or, you could ask specific questions on issues that are not
clear.

Form based login started making sense for me after I understood the basic
philosophy.  Have you ever accessed a web site that uses BASIC security to pop
up a username/password dialog box?  And then, after you were successfully
authenticated, the server gave you the requested page?

Form based login should feel very much like that from the user's perspective.
The first time he or she tries to access a protected page, the login page will
be shown first -- once they log on successfully, the originally requested page
will be shown.

It's not any more or less secure than BASIC authentication -- but form based
login lets you customize the look and feel of the login page, where BASIC
authentication does not.

Craig McClanahan



RE: formbased security

Posted by John de la Garza <jd...@designinsites.com>.
arg!

I meant insufficient...sorry

Is there more than the servlet 2.2 spec?

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Thursday, November 30, 2000 4:22 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: formbased security


John de la Garza wrote:

> where can I get complete documentation on formbased security?  The servlet
> 2.2 spec is sufficient.

http://java.sun.com/products/servlet/download.html

Craig


Re: formbased security

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
John de la Garza wrote:

> where can I get complete documentation on formbased security?  The servlet
> 2.2 spec is sufficient.

http://java.sun.com/products/servlet/download.html

Craig

formbased security

Posted by John de la Garza <jd...@designinsites.com>.
where can I get complete documentation on formbased security?  The servlet
2.2 spec is sufficient.


Re: build failed on tomcat

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Scott Liu wrote:

> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>

There are several prerequisites for building Tomcat from sources -- they are
documented (for Tomcat 4.0 at least) in the "README.txt" file in the top level
directory of the source distribution (CVS repository "jakarta-tomcat-4.0").

In particular, the error you got below is because you need to download and
install the Java API for XML Parsing (JAXP) release.  See the readme file for
more details.

>
> Thanks
>
> Scott
>

Craig McClanahan

PS:  All of these steps are required only if you want to build Tomcat from
source.  If you just want to run it, download the binary distribution instead --
everything you need (except for a JDK, and the JSSE classes for SSL) is
included.

Re: build failed on tomcat

Posted by Scott Liu <sc...@tapestry.net>.
Now it is being built after I modified the "build.sh" and
"build.xml" to reflect the change of "xml.jar" in
jakarta-ant.

Thanks,

Scott

Robert B. Easter wrote:

> On Thursday 30 November 2000 14:57, Scott Liu wrote:
> > Hi All,
> >
> > I have installed j2sdk1_3_0 binary version on solaris 2.6
> > and had jakarta-ant built. When I tried to build the tomcat
> > it failed since there was no class of SAXParserFactory.
> > I could not find anything in the j2sdk1_3_0 directories.
> > Do I need to install other class libraries to make it work?
> >
> > Thanks
> >
>
> You are missing the Java API for XML Parsing.  When you unzipped the
> jakarta-tomcat, you should find a README file.  You'll have to read it's
> installation steps one by one.  It explains what else you have to install and
> how to setup all of the environment variables etc to make things work
> smoothly.  I'm a novice at Java stuff, but followed the README and it is
> working.  Now I just have to read LOTS more documentation to learn how to
> start making my own stuff.  I come from php/apache and postgresql, so this is
> much different!
>
> > Scott
> >
> > # ./build.sh
> > Searching for build.xml ...
> > Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
> >
> > BUILD FAILED
> >
> > No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> > reference implementation.
> > java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> >
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> >         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> >
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:120)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:401)
> >         at org.apache.tools.ant.Main.main(Main.java:149)
>
> --
> -------- Robert B. Easter  reaster@comptechnews.com ---------
> - CompTechNews Message Board   http://www.comptechnews.com/ -
> - CompTechServ Tech Services   http://www.comptechserv.com/ -
> ---------- http://www.comptechnews.com/~reaster/ ------------


Re: build failed on tomcat

Posted by "Robert B. Easter" <re...@comptechnews.com>.
On Thursday 30 November 2000 14:57, Scott Liu wrote:
> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>
> Thanks
>

You are missing the Java API for XML Parsing.  When you unzipped the 
jakarta-tomcat, you should find a README file.  You'll have to read it's 
installation steps one by one.  It explains what else you have to install and 
how to setup all of the environment variables etc to make things work 
smoothly.  I'm a novice at Java stuff, but followed the README and it is 
working.  Now I just have to read LOTS more documentation to learn how to 
start making my own stuff.  I come from php/apache and postgresql, so this is 
much different!


> Scott
>
> # ./build.sh
> Searching for build.xml ...
> Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:120)
>         at org.apache.tools.ant.Main.runBuild(Main.java:401)
>         at org.apache.tools.ant.Main.main(Main.java:149)

-- 
-------- Robert B. Easter  reaster@comptechnews.com ---------
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------

Re: build failed on tomcat

Posted by "Robert B. Easter" <re...@comptechnews.com>.
btw, I'm using JDK 1.2.2 but I don't think it matters

On Thursday 30 November 2000 14:57, you wrote:
> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>
> Thanks
>
> Scott
>
> # ./build.sh
> Searching for build.xml ...
> Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:120)
>         at org.apache.tools.ant.Main.runBuild(Main.java:401)
>         at org.apache.tools.ant.Main.main(Main.java:149)

-- 
-------- Robert B. Easter  reaster@comptechnews.com ---------
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------