Re: build.xml:2313: Compile failed; see the compiler error output for details

2011-11-14 Thread Anisha Karki
hi,

i think you it would be better to follow this tutorial for the start.
http://anupniroula.blogspot.com/



On Sat, Nov 12, 2011 at 7:08 AM, Cifer  wrote:

> this is the first time i post a question on mail list
> i have googled for my question so much but still get no result
> lastly , i find here and here is my last hope
>
> i am sorry for my poor English if you get into trouble with my question
>
> several days ago I downloaded the apache-tomcat-7.0.22-src.tar.**gz
> then i unpacked it and build the source files followed the BUILDING.txt
> (so i also download the ant,also the lastest version)
>
> i followed the BUILDING.txt
>
> - open the terminal
> - cd /usr/local/tomcat7  ---that is where i unpacked my tar in
> - and run ant
>
> (i am not using a proxy , i am using my huawei 3G device to connect to
> Internet)
>
> as the console scrolled down
> hundred lines of errors rise up
> most of them are something like
> "PoolingDataSource is not abstract and does not override abstract method
> getParentLogger() in CommonDataSource"
>
> and at the last line ,it shows
>
> BUILD FAILED
> /usr/local/tomcat7/build.xml:**2211: The following error occurred while
> excuting the line:
>
> /usr/local/tomcat7/build.xml:**2313: Compile failed; see the compiler
> error output for details.
>
>
> i downloaded the 7.0.22 version of tomcat
> and i am working on Ubuntu 11.10
>
>
> thanks for help 
>
> --
> --**--
> /*send by Cifer*/
>


how to connect Oracle OHS with tomcat

2011-11-14 Thread Azeez Rahman
Hello,

We are trying to 
connect our external facing Oracle Https Server (OHS) with Tomcat, running in 
another internal server. We are having problems to connect OHS and tomcat. We 
have tried to connect Tomcat using mod_proxy, mod_proxy_html & mod_jk. Also 
we don’t have the right module (mod_jk) for Linux EL5 64-bit. Here are the 
server and application details. Please provide a solution for this issue.

 
  
OHS server OS: 
Red Hat Enterprise Linux Server release 5.6 (64-bit)
OHS Version: 
Fusion Middleware 11g (11.1.1.5.0) based on Apache 2.2.15 
(64-bit)
Tomcat Server 
OS:  Windows 2008 Enterprise R2 x64
Tomcat Version: 
6.0.32
External OHS 
URL: https://external-server.com/tm/
Internal Tomcat 
URL: http://internal-server.com:8080/tm/


Thanks,
Azeez

Hosts Created in Tomcat 7 Host-Manager Don't Process JSP

2011-11-14 Thread Jordan Michaels
Running some tests with the Tomcat 7 Host-Manager and it appears as 
though hosts created via the Host Manager don't process JSP.


In my tests, I created a "fred.com" test site with a root directory of 
"/www/fred.com/", and put a simple "hello world" index.jsp file in it. I 
then created the "fred.com" site in the Tomcat 7 Host Manager (7.0.22 - 
downloaded just this morning). The host was created without issue.


I then checked the host with Telnet:

---
jordan@jordan-M61P-S3 /opt/tomcat/conf $ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /index.jsp HTTP/1.1
HOST: fred.com

HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 14 Nov 2011 21:59:45 GMT

Connection closed by foreign host.
jordan@jordan-M61P-S3 /opt/tomcat/conf $
---

Looking at the logs, I found this in the catalina.out file:

---
INFO: Deploying configuration descriptor manager.xml from 
/opt/tomcat/conf/Catalina/fred.com

---

So, I went and looked at the manager.xml file, and this is what it 
contained...


---
 privileged="true" antiResourceLocking="false" 
antiJARLocking="false">


---

Am I missing something? Is there something I should be doing that I'm 
not doing? Can anyone confirm they can run JSP on hosts created in the 
Tomcat 7 Host Manager?


Thanks for any help!

Warm Regards,
Jordan Michaels

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat manager/status question

2011-11-14 Thread Daniel Mikusa
Justin,

Your "conf/tomcat-users.xml" looks fine to me.  I copied and pasted it
into a stock Tocmat 6.0.33 server on my machine and it worked fine.

At this point, you might want to also post your "conf/server.xml" file.

Dan



On Mon, 2011-11-14 at 13:00 -0800, Justin Larose wrote:
> Yes I have restarted tomcat after editing this file:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Thanks,
> Justin LaRose
> Database & Web Services Administrator
> NEXCOM
> (757) 631-3443
> justin.lar...@nexweb.org
> 
> 
> 
> From:   Daniel Mikusa 
> To: Tomcat Users List 
> Date:   11/14/2011 02:32 PM
> Subject:Re: tomcat manager/status question
> 
> 
> Justin,
> 
> What exactly do you have in your "conf/tomcat-users.xml" file?  If you
> could include the contents of the file inline here, that would be
> helpful.
> 
> Don't forget to redact passwords and other sensitive info.
> 
> Dan
> 
> 
> On Mon, 2011-11-14 at 11:18 -0800, Justin Larose wrote:
> > Question:  I upgraded my Tomcat version to 6.0 using the
> > apache-tomcat-6.0.33.exe file and I am trying to access the manager
> > and the status pages here:  localhost:port\index.jsp
> > I get to the default Tomcat page and select "status" and I get a login
> > prompt. After entering the username and password that I have
> > configured in the \conf\tomcat-users.xml
> > file it just asks for the password again and again. After the 3rd
> > attempt it will default to the 401 page that talks about configuring
> > the tomcat-users.xml file. I also get the same error after selecting
> > the "manager" link as well.
> >
> > Do I need to install another portion of Tomcat to get this feature to
> > work?
> >
> >
> >
> > Thanks,
> > Justin LaRose
> > Database & Web Services Administrator
> > NEXCOM
> > (757) 631-3443
> > justin.lar...@nexweb.org
> >
> > 
> **
> > This email and any files transmitted with it are intended solely for
> > the use of the individual or agency to whom they are addressed.
> > If you have received this email in error please notify the Navy
> > Exchange Service Command e-mail administrator. This footnote
> > also confirms that this email message has been scanned for the
> > presence of computer viruses.
> >
> > Thank You!
> > 
> **
> >
> 


RE: Grabbing the user's info

2011-11-14 Thread Villalobos, Ricardo
> -Original Message-
> From: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com]
> Sent: Monday, November 14, 2011 1:27 PM
> To: 'Tomcat Users List'
> Subject: RE: Grabbing the user's info
> 
> Hello,
> 
> What do you call "network authentication" ?
> 
> If you speak about windows domain (active directory) authentication you
> can use JNDIRealm
> (http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm)
> because AD has LDAP interface.
> Here are some examples:
> http://www.jspwiki.org/wiki/ActiveDirectoryIntegration
> 
> 
> Ilya Kazakevich,
> Developer
> JetBrains Inc
> http://www.jetbrains.com
> "Develop with pleasure!"
> 
> -Original Message-
> From: Josh Gooding [mailto:josh.good...@gmail.com]
> Sent: Monday, November 14, 2011 10:19 PM
> To: Tomcat Users List
> Subject: Grabbing the user's info
> 
> Hey guys,
> 
> Question.  I'm developing an application that resides on a network.  I
> wondered if (and how) there was a way to use the users network
> authentication as a valid authentication into this application?
> 
> - Josh
> 

To add to Ilya's reply:

If you are using Active Directory in your network to provide authentication and 
authorization then you can also use Kerberos which allows Single Sign-On to 
properly authorized users and applications (i.e., user only needs to log in 
once to a workstation to access network services including applications running 
in Web servers such as Tomcat; not to be confused with Tomcat's Single Sign-On 
feature that which I believe allows single authentication between different Web 
applications running on the same instance).

I am no expert in this subject, but I have tested Waffle[1] which provides a 
simple interface to the Kerberos protocol and it seems quite powerful. I have 
used Waffle with Tomcat as instructed in the tutorials and it worked as 
explained. Keep in mind that Waffle JARs need to reside in Tomcat's lib and not 
in your app's lib. As for Kerberos, you may want to check [2] which is a good 
reference in my opinion.

Note that I am not able to judge the quality of Waffle or the applicability of 
Kerberos to your project, I just thought that it may be of some interest.

/ricardo

[1] Windows Authentication Functional Framework:  http://waffle.codeplex.com/
[2] Garman, Jason. Kerberos: The Definitive Guide. O'Reilly Media. August 26, 
2003. ISBN: 978-0-596-00403-3

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat manager/status question

2011-11-14 Thread Justin Larose
Yes I have restarted tomcat after editing this file:









Thanks,
Justin LaRose
Database & Web Services Administrator
NEXCOM
(757) 631-3443
justin.lar...@nexweb.org



From:   Daniel Mikusa 
To: Tomcat Users List 
Date:   11/14/2011 02:32 PM
Subject:Re: tomcat manager/status question


Justin,

What exactly do you have in your "conf/tomcat-users.xml" file?  If you
could include the contents of the file inline here, that would be
helpful.

Don't forget to redact passwords and other sensitive info.

Dan


On Mon, 2011-11-14 at 11:18 -0800, Justin Larose wrote:
> Question:  I upgraded my Tomcat version to 6.0 using the
> apache-tomcat-6.0.33.exe file and I am trying to access the manager
> and the status pages here:  localhost:port\index.jsp
> I get to the default Tomcat page and select "status" and I get a login
> prompt. After entering the username and password that I have
> configured in the \conf\tomcat-users.xml
> file it just asks for the password again and again. After the 3rd
> attempt it will default to the 401 page that talks about configuring
> the tomcat-users.xml file. I also get the same error after selecting
> the "manager" link as well.
>
> Do I need to install another portion of Tomcat to get this feature to
> work?
>
>
>
> Thanks,
> Justin LaRose
> Database & Web Services Administrator
> NEXCOM
> (757) 631-3443
> justin.lar...@nexweb.org
>
> 
**
> This email and any files transmitted with it are intended solely for
> the use of the individual or agency to whom they are addressed.
> If you have received this email in error please notify the Navy
> Exchange Service Command e-mail administrator. This footnote
> also confirms that this email message has been scanned for the
> presence of computer viruses.
>
> Thank You!
> 
**
>



RE: Cannot create JDBC driver tomcat-6.0.26

2011-11-14 Thread Propes, Barry L


And maybe use a different driver? Or ensure you have the correct one?

Okay, I'm going to ignore your first report, then, since this one seems more 
plausible.

> Caused by: java.lang.NullPointerException at
> sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
> at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
> at
> sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) at
> java.sql.DriverManager.getDriver(DriverManager.java:253) at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicData
> Source.java:1143)

...
>
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat manager/status question

2011-11-14 Thread Daniel Mikusa
Justin,

What exactly do you have in your "conf/tomcat-users.xml" file?  If you
could include the contents of the file inline here, that would be
helpful.  

Don't forget to redact passwords and other sensitive info.

Dan


On Mon, 2011-11-14 at 11:18 -0800, Justin Larose wrote:
> Question:  I upgraded my Tomcat version to 6.0 using the
> apache-tomcat-6.0.33.exe file and I am trying to access the manager
> and the status pages here:  localhost:port\index.jsp 
> I get to the default Tomcat page and select "status" and I get a login
> prompt. After entering the username and password that I have
> configured in the \conf\tomcat-users.xml 
> file it just asks for the password again and again. After the 3rd
> attempt it will default to the 401 page that talks about configuring
> the tomcat-users.xml file. I also get the same error after selecting
> the "manager" link as well. 
> 
> Do I need to install another portion of Tomcat to get this feature to
> work? 
> 
> 
> 
> Thanks, 
> Justin LaRose
> Database & Web Services Administrator 
> NEXCOM
> (757) 631-3443
> justin.lar...@nexweb.org
> 
> **
> This email and any files transmitted with it are intended solely for 
> the use of the individual or agency to whom they are addressed. 
> If you have received this email in error please notify the Navy 
> Exchange Service Command e-mail administrator. This footnote 
> also confirms that this email message has been scanned for the
> presence of computer viruses.
> 
> Thank You!
> **
> 


Re: tomcat manager/status question

2011-11-14 Thread Thad Humphries
Did you restart Tomcat after changing/adding the tomcat-users.xml file?

On Mon, Nov 14, 2011 at 2:18 PM, Justin Larose wrote:

> Question:  I upgraded my Tomcat version to 6.0 using the
> apache-tomcat-6.0.33.exe file and I am trying to access the manager and the
> status pages here:  localhost:port\index.jsp
> I get to the default Tomcat page and select "status" and I get a login
> prompt. After entering the username and password that I have configured in
> the \conf\tomcat-users.xml
> file it just asks for the password again and again. After the 3rd attempt
> it will default to the 401 page that talks about configuring the
> tomcat-users.xml file. I also get the same error after selecting the
> "manager" link as well.
>
> Do I need to install another portion of Tomcat to get this feature to work?
>
>
>
> Thanks,
> Justin LaRose
> Database & Web Services Administrator
> NEXCOM
> (757) 631-3443
> justin.lar...@nexweb.org
>
>
> **
> This email and any files transmitted with it are intended solely for
> the use of the individual or agency to whom they are addressed.
> If you have received this email in error please notify the Navy
> Exchange Service Command e-mail administrator. This footnote
> also confirms that this email message has been scanned for the
> presence of computer viruses.
>
> Thank You!
> *
> **
> *
>



-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


tomcat manager/status question

2011-11-14 Thread Justin Larose
Question:  I upgraded my Tomcat version to 6.0 using the 
apache-tomcat-6.0.33.exe file and I am trying to access the manager and 
the status pages here:  localhost:port\index.jsp
I get to the default Tomcat page and select "status" and I get a login 
prompt. After entering the username and password that I have configured in 
the \conf\tomcat-users.xml
file it just asks for the password again and again. After the 3rd attempt 
it will default to the 401 page that talks about configuring the 
tomcat-users.xml file. I also get the same error after selecting the 
"manager" link as well.

Do I need to install another portion of Tomcat to get this feature to 
work?



Thanks,
Justin LaRose
Database & Web Services Administrator
NEXCOM
(757) 631-3443
justin.lar...@nexweb.org
**
This email and any files transmitted with it are intended solely for 
the use of the individual or agency to whom they are addressed. 
If you have received this email in error please notify the Navy 
Exchange Service Command e-mail administrator. This footnote 
also confirms that this email message has been scanned for the
presence of computer viruses.

Thank You!
**



RE: Grabbing the user's info

2011-11-14 Thread Ilya Kazakevich
Hello,

What do you call "network authentication" ? 

If you speak about windows domain (active directory) authentication you can
use JNDIRealm
(http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm) because
AD has LDAP interface.
Here are some examples:
http://www.jspwiki.org/wiki/ActiveDirectoryIntegration


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

-Original Message-
From: Josh Gooding [mailto:josh.good...@gmail.com] 
Sent: Monday, November 14, 2011 10:19 PM
To: Tomcat Users List
Subject: Grabbing the user's info

Hey guys,

Question.  I'm developing an application that resides on a network.  I
wondered if (and how) there was a way to use the users network
authentication as a valid authentication into this application?

- Josh


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Grabbing the user's info

2011-11-14 Thread Josh Gooding
Hey guys,

Question.  I'm developing an application that resides on a network.  I
wondered if (and how) there was a way to use the users network
authentication as a valid authentication into this application?

- Josh


Re: Session time out never takes place with ajax

2011-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sharon,

On 11/10/11 3:11 AM, Sharon Prober (sprober) wrote:
> I understand it is invoked before the filters, but after
> completion it would arrive to the filter/servlet container anyway.
> So what your saying is that if I build a valve and read information
> from IO file or/db or any other cached data which doesn’t trigger
> a request.getSession That will work?

I think it would help if you explained what your "ping" needs to do.
Basically, if you need session data to do it, you are out of luck. If
you don't need session data, why are you pinging?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7BPvIACgkQ9CaO5/Lv0PD6rQCglhRD4lA4qMaqkybwBXvjeqc1
+LIAn3ARzOKhsdzPqBJ9xkkLYAeIWiXf
=kM6R
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot create JDBC driver tomcat-6.0.26

2011-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Micheal,

On 11/14/11 9:17 AM, Michael Strupp wrote:
> I'm using Tomcat 6.0.26 on Windows 7 and want to establish
> database access with jdbc to a mysql-DB. There is another servlet
> project running in the same tomcat using the same DB Connection and
> the access for this project runs fine. So I thought that it's good
> to access the db like in the working servlet project step by step,
> but when doing this I get:
> 
> org.apache.tomcat.dbcp.dbcp.SQLNestedException:Hello

Hmm.

> I'm using Tomcat 6.0.26 on Windows 7 and want to establish
> database access with jdbc to a mysql-DB. There is another servlet
> project running on tomcat using the same DB Connection and the
> access for this project runs fine. So I thought that it's good to
> access the db like in the working servlet project step by step, but
> when doing this I get:
> 
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
> driver of class '' for connect URL 'null'

Okay, I'm going to ignore your first report, then, since this one
seems more plausible.

> Caused by: java.lang.NullPointerException at
> sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507) 
> at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476) 
> at
> sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) at
> java.sql.DriverManager.getDriver(DriverManager.java:253) at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)

...
> 
strange that you're getting this error in JdbcOdbcDriver, which
you aren't trying to use. Maybe it's a catch-all or something. At any
rate, this really doesn't have anything to do with JDBC-ODBC bridge:
it's a broken configuration.

> This is a part of the $TOMCAT_HOME/conf/server.xml
> 
> 
> 
>  path="/IZServlets" reloadable="true" 
> source="org.eclipse.jst.jee.server:IZServlets">

You really shouldn't put a  into your server.xml. Instead,
use a META-INF/context.xml file in your webapp's WAR (or deployment
directory if you aren't using a WAR).

>  maxActive="30" maxIdle="2" maxWait="120" name="jdbc/mysqlDB" 
> password="XXX" type="javax.sql.DataSource" 
> url="jdbc:mysql://localhost:3306/inzserdb_01" username="root"/>

That looks okay to me, except that you are missing
type="javax.sql.DataSource". You probably don't need it, though, since
it's obviously trying to create a DataSource already.

> The Context in the comment ist the context that is used by the
> working servlet project.

Fine, but it doesn't include any  element, so it's not
terribly useful.

> This is the
> $TOMCAT_HOME/wtpwebapps/IZServlets/META-INF/context.xml
> 
>name="jdbc/mysqlDB" auth="Container" type="javax.sql.DataSource" 
> driverClassName="com.mysql.jdbc.Driver" 
> url="jdbc:mysql://localhost:3306/inzserdb_01" username="root"
> password="XXX" maxActive="30" maxIdle="2" maxWait="120" /> 
> 

So you are using both META-INF/context.xml *and* server.xml? Don't do
that. Pick one (and make it the former).

> The file mysql-connector-java-5.1.13-bin.jar is in the folder 
> $TOMCAT_HOME/wtpwebapps/IZServlets/WEB-INF/lib/ and also in the
> folder $TOMCAT_HOME/lib/

You need to remove it from your webapp's folder or things aren't going
to work.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7BPlgACgkQ9CaO5/Lv0PC59wCfT8PJjtUggWn2MRdBWUohDHmd
xiIAn07sDEI31ZQGtCYmGziGLvrFBsBa
=sxhB
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: build.xml:2313: Compile failed; see the compiler error output for details

2011-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 11/13/11 1:13 AM, Caldarale, Charles R wrote:
>> From: Cifer [mailto:mantia...@gmail.com] Subject: Re:
>> build.xml:2313: Compile failed; see the compiler error output for
>> details
> 
>> why must i use java6 to compile tomcat7
> 
> Because Sun (not Oracle) added methods to an interface class in JDK
> 7 that Tomcat does not implement, resulting in errors during 
> compilation.  Tomcat cannot add the methods in question since
> doing so would make it impossible to run Tomcat on JDK 6.  Sun did
> not think that one through.

Can you give me a reference for that? I'd like to read about it.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7BOk8ACgkQ9CaO5/Lv0PCgnwCcDXRdhYdvMaTkQk6/VDR0rcfL
cK4AoJ2mv/BaIDLQFNf48K3u91M/FCLe
=1jE2
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: 403 error starting tomcat 7.0.22 application on windows 7

2011-11-14 Thread Tim Watts
On Mon, 2011-11-14 at 09:56 +0400, bas...@obninsk.com wrote:
> 
> -Исходное сообщение- 
> From: Tim Watts
> Sent: Monday, November 14, 2011 9:09 AM
> To: Tomcat Users List
> Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7
> 
> On Mon, 2011-11-14 at 08:17 +0400, bas...@obninsk.com wrote:
> > > Can you paste the application web.xml file (inline) into your reply?
> > >
> > > 
> > > http://www.w3.org/2001/XMLSchema-instance";
> > > xmlns="http://java.sun.com/xml/ns/javaee";
> > > xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
> > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
> > > version="2.5">
> > >  WEB query
> > >  
> > >  
> > >404
> > >/includes/error404.jsp
> > >  
> > >  
> > >500
> > >/includes/error500.jsp
> > >  
> > >  
> > >
> > >reportcmnt
> > >reportcmnt
> > >/jsp/reportcmnt.jsp
> > >  
> > >  
> > >reportcmnt
> > >/reportcmnt
> > >  
> > > 
> > >
> 
> > Do you have an access log configured, if so, what does it show?
> >
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query HTTP/1.1" 302
> > 125 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, 
> > like
> > Gecko) Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query/ HTTP/1.1" 
> > 403
> > 964 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, 
> > like
> > Gecko) Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query HTTP/1.1" 302
> > 125
> > "http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97";
> > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko)
> > Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query/ HTTP/1.1" 
> > 403
> > 964
> > "http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97";
> > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko)
> > Chrome/15.0.874.120 Safari/535.2"
> > What user account is Tomcat running under?
> 
> A: local system account. It has full access to the application's folders and 
> files.
> >
> >
> 
> OK, you're getting a 403 on http://localhost:8082/query/ but your
> web.xml only shows a mapping for /reportcmnt and no welcome file
> declarations.  What happens if you use /query/reportcmnt instead?
> 
> A: 403 error again.
> 
> Is there perhaps an index.html that would have redirected
> to /query/reportcmnt?
> 
> A: My index.html contains
> 
> 
>   
>   
> WEB query
>   
>   
> location="jsp/app.jsp"
>   
> 
> 
> Q: What version of Tomcat were you using prior to the win7 migration?
> 
> A: Tomcat 7.0.22.
> I've just installed Tomcat 7.0.22 on WinXP,
> then copied my app from Win7 to the WinXp webapps folder and run my app.
> It works fine.
> 
So (xp,tc7)=OK but (win7,tc7)=403 for 'query' but not 'manager'.
Presumably on XP you're also running Tomcat as a service under the local
system account?  Just for grins, have you tried stopping the service
then running Tomcat from a command shell (e.g. {tc-home}\bin
\startup.bat) on win7 under your user account and see if you still get
the 403?

Just guessing here but is it possible your web app files have security
constraints attached to them that aren't being resolved on win7 but are
on xp?

Are there any conditions in your app logic that would return a 403?
Perhaps it can't access a service from win7 but can from xp? Licensing?

Also, looks like you've done some tweaking on server.xml (e.g. different
server port).  Can you paste in this file as well?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: mod_jk Avoid loadbalancing

2011-11-14 Thread Jeffrey Janner
Alexander -
Can you give us a better idea of how you are deploying everthing?
Perhaps a simple ASCII map showing how the systems are related?
Jeff

From: Alexander Diedler [mailto:adied...@tecracer.de]
Sent: Monday, November 14, 2011 4:42 AM
To: users@tomcat.apache.org
Subject: mod_jk Avoid loadbalancing

Hello

It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the 
loadbalancing between these three nodes? We only need the session replication. 
The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a 
"double" balanced request, first time by the HW-balancer and second time by the 
Apache mod_jk himself.

Best regards
Alexander

__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


Cannot create JDBC driver tomcat-6.0.26

2011-11-14 Thread Michael Strupp

Hello

I'm using Tomcat 6.0.26 on Windows 7 and want to establish database 
access with jdbc to a mysql-DB. There is another servlet project running 
in the same tomcat using the same
DB Connection and the access for this project runs fine. So I thought 
that it's good to access the db like in the working servlet project step 
by step, but when doing this

I get:

org.apache.tomcat.dbcp.dbcp.SQLNestedException:Hello

I'm using Tomcat 6.0.26 on Windows 7 and want to establish database 
access with jdbc to a mysql-DB. There is another servlet project running 
on tomcat using the same
DB Connection and the access for this project runs fine. So I thought 
that it's good to access the db like in the working servlet project step 
by step, but when doing this

I get:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at 
com.inzeit.servlet.LoginServlet2.checkCredentials(LoginServlet2.java:45)

at com.inzeit.servlet.LoginServlet2.doGet(LoginServlet2.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
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:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
at java.sql.DriverManager.getDriver(DriverManager.java:253)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)

... 17 more

This is a part of the $TOMCAT_HOME/conf/server.xml


path="/IZServlets" reloadable="true" 
source="org.eclipse.jst.jee.server:IZServlets">
maxActive="30" maxIdle="2" maxWait="120" name="jdbc/mysqlDB" 
password="XXX" type="javax.sql.DataSource" 
url="jdbc:mysql://localhost:3306/inzserdb_01" username="root"/>



The Context in the comment ist the context that is used by the working 
servlet project.


This is the $TOMCAT_HOME/wtpwebapps/IZServlets/META-INF/context.xml






The password is in both files correctly set.
And this is $TOMCAT_HOME/wtpwebapps/IZServlets/WEB-INF/web.xml


http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" 
version="2.5">

IZServlets

index.html
index.htm
index.jsp
default.html
default.htm
default.jsp


jdbc/mysqlDB
javax.sql.DataSource
Container



EmployeeServlet
EmployeeServlet
com.inzeit.servlet.EmployeeServlet


EmployeeServlet
/EmployeeServlet



LoginServlet2
LoginServlet2
com.inzeit.servlet.LoginServlet2


LoginServlet2
/LoginServlet2



Finally this is the part of the servlet throwing the exception.

private void checkCredentials(HttpServletRequest request, 
HttpServletResponse response)

{
String query = "SELECT role, user.id, name, firstName, email 
FROM user, employees, addresses WHERE userName = ? " +
"AND employees.id = user.employeeID AND employees.addressID = 
addresses.ID";


String loginName = request.getHeader("userName");
String pw = request.getHeader("passWord");
try {
Context context = new InitialContext();
DataSource dataSource = (DataSource) 
context.lookup("java:comp/env/jdbc/mysqlDB");

Connection connection = dataSource.getConnection();
connection.setAutoCommit(false);
...
}
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {

Tomcat 7, JAX-WS 2.2.5

2011-11-14 Thread Ivan
Dear All,

We are running JAX-WS web-services using JAX-WS RI under tomcat. First we
upgraded from Tomcat 5.5 to Tomcat 7 and everything was fine. Eventually, we
decided to upgrade to the latest JAX-WS RI and went for 2.2.5 version. 

We faced a problem. Upon requests we started seeing exceptions from JAX-WS
indicating that the body of the request was broken. From the point of view of
TCPMON everything was fine. We enabled request tracing and saw that the JAX-WS
RI was gettting empty requests' input streams which were causing mentioned
exceptions (org.jvnet.mimepull.MIMEParsingException: Missing start boundary;
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog). 

Also, we tried tomcat 5.5 and JAX-WS RI 2.2.5 and they worked together fine.

After investigation we found out that all versions of JAX-WS RI since 2.2.2 were
causing the same problem. Presumably, the cause of the issue is servlet 3.0
async request processing which has been added in JAX-WS RI 2.2.2. Partly, it
explains why tomcat 5.5 works fine with JAX-WS RI 2.2.5 as the RI falls back to
non-async request processing.

We changed connector's protocol to 'org.apache.coyote.http11.Http11NioProtocol'
and everything started working.

As I understand, both BIO and NIO connectors should be working well with servet
3.0 async. Could you comment on this?

I am really looking forward to your reply.

Best regards,
Ivan


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



mod_jk Avoid loadbalancing

2011-11-14 Thread Alexander Diedler
Hello

 

It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the
loadbalancing between these three nodes? We only need the session
replication. The Loadbalancing with failover will be done by a Big-IP F5, so
we don´t need a “double” balanced request, first time by the HW-balancer and
second time by the Apache mod_jk himself.

 

Best regards

Alexander

 



smime.p7s
Description: S/MIME cryptographic signature


Re: Adding SSL information into access log

2011-11-14 Thread Tapio Niemi

Hi!

I already tried: pattern="%{SSL_CLIENT_M_SERIAL}r %h %l %u %t
"%r" %s %b" on access log valce configuration, which
caused server not to start
That shouldn't have happened: Tomcat should start with the above log
pattern.
And it does; was some kind of temporary glitch which you get when you do 
stop-start-configure-use browser-stop-start in a rapid sequence.

, and pattern="%{CLIENT_AUTH}r %h %l %u %t"%r" %s %b",
which just causes "-" to appear on the log.

That's because "CLIENT_AUTH" doesn't appear to be a request attribute.
Yep, it's a field in a some class I can't anymore remember which I used 
to make a guess.

Also tried %{SSL_CLIENT_M_SERIAL}x and s with varying results.

Why did you try that? Just guessing?

Yes, just guessing.


If you can't find a standard request attribute that meets your needs,
you could always write a Filter (or Valve, if it's necessary to run
before the AccessLogValve) that puts anything you want into the
request for logging purposes.
Now this is great advice. That is exactly what I ended up doing. I wrote 
a filter that sets a custom request attribute with all the needed data 
and then use that in AccessLogValve configuration. Works great, and 
doesn't require that much knowledge of Tomcat internals that i thought 
it might. Can recommend this solution to anyone with similar needs. Not 
contributing my filter publicly however, since the code is not very 
generic; it gives internal server error on non-SSL request (quite easy 
to fix if required) plus some minor concerns.


-Tapio Niemi

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Problem in Load Balancing (AJP)

2011-11-14 Thread ali jan
Dear all

we have deployed our university application in a cluster(did load balancing
using AJP) using tomcat application servers and apache access sever.


*Following is our apache httpd.conf configuration*

ProxyPass / balancer://myCluster/ stickysession=JSESSIONID|jsessionid
nofailover=On timeout=60

BalancerMember ajp://192.168.1.2:8009 route=sys02
BalancerMember ajp://192.168.1.3:8009 route=sys03



In *apache access server error log* we are getting following errors, and
these errors *started today*, before today our system was running smoothly,
*periodically user getting error "service temporally unavailable"*
when users reporting this issue then we are resolving it by restarting
apache access server.
However our tomcat instances are running fine.

[Thu May 12 18:13:32 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:32 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:32 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)
[Thu May 12 18:13:33 2011] [error] proxy: BALANCER: (balancer://myCluster).
All workers are in error state for route (sys03)


On *sys03 *tomcat 1500 users sessions are created, while on sys02 tomcat
only 100 sessions are created


Any help will be appreciated

Thanks