You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ignacio Ocampo <na...@gmail.com> on 2014/11/17 06:59:12 UTC

jespa (jcifs) does not works in Tomcat but works in single app

Hi all,

I've a simple *app (A)* that uses *JESPA* (and *JCIFS*), it works perfectly
when I run this isolated. This app, has a *functionA* that call a URL with
NTLM authentication and I use JESPA to authenticate.

I have another *app (B)* that uses *app (A)* as library with *TOMCAT*, but,
when I call the *functionA* it doesn't work.

In both cases, I'm sure of:

   1. I register java protocol handler with:
*System.setProperty("java.protocol.handler.pkgs",
   "jespa")* at the start of the program (I tried with *JAVA_OPTS* too).
   2. I've *jespa-1.1.20.jar* and *jcifs-1.3.18.jar* in /opt/tomcat/lib/
   and /opt/tomcat/webapps/ROOT/WEB-INF/lib

Using CLASSPATH:
/root/apache-tomcat-7.0.57/bin/bootstrap.jar:/root/apache-tomcat-7.0.57/bin/tomcat-juli.jar:/root/apache-tomcat-7.0.57/lib/
*jespa.jar*:/root/apache-tomcat-7.0.57/lib/*jcifs.jar*


-- 
Ignacio Ocampo Millán

Re: jespa (jcifs) does not works in Tomcat but works in single app

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Ignacio,

On 11/17/14 11:36 AM, Ignacio Ocampo wrote:
> Hi Andre,
> 
> I did all steps described in documentation for set "jespa" in 
> java.protocol.handler.pkgs
> 
> It works perfectly in a single app but it does not work in Tomcat.
> 
> The authentication process isn't the problem, the problem is that 
> Tomcat does not detect the Jespa wrapper to handle http url 
> connections.

If you have to set up a new protocol handler, how are you doing that
when running within Tomcat?

- -chris

> On Mon, Nov 17, 2014 at 10:33 AM, André Warnier <aw...@ice-sa.com> 
> wrote:
> 
>> Ignacio Ocampo wrote:
>> 
>>> Hi all,
>>> 
>>> I've a simple *app (A)* that uses *JESPA* (and *JCIFS*), it 
>>> works perfectly when I run this isolated. This app, has a 
>>> *functionA* that call a URL with NTLM authentication and I use 
>>> JESPA to authenticate.
>>> 
>>> I have another *app (B)* that uses *app (A)* as library with 
>>> *TOMCAT*, but, when I call the *functionA* it doesn't work.
>>> 
>> 
>> That is not very helpful as a problem description.  What does
>> not work ? How do you know that it does not work ? What appears
>> in the logfiles ? What does your webapp try to do with Jespa ?
>> 
>> 
>>> In both cases, I'm sure of:
>>> 
>>> 1. I register java protocol handler with: 
>>> *System.setProperty("java.protocol.handler.pkgs", "jespa")* at 
>>> the start of the program (I tried with *JAVA_OPTS* too). 2. 
>>> I've *jespa-1.1.20.jar* and *jcifs-1.3.18.jar* in 
>>> /opt/tomcat/lib/ and /opt/tomcat/webapps/ROOT/WEB-INF/lib
>>> 
>> 
>> If your purpose is only to authenticate the user of your webapp, 
>> you do not need a copy in /opt/tomcat/lib/. That is probably a 
>> bad idea anyway.
>> 
>> Did you follow the steps in the Jespa manual, page 9, "Step 2: 
>> Test the Computer account with the Example Webapp" ?
>> 
>> 
>>> Using CLASSPATH: 
>>> /root/apache-tomcat-7.0.57/bin/bootstrap.jar:/root/ 
>>> apache-tomcat-7.0.57/bin/tomcat-juli.jar:/root/apache-tomcat-7.0.57/lib/
>>>
>>>
*jespa.jar*:/root/apache-tomcat-7.0.57/lib/*jcifs.jar*
>>>
>>>
>>>
>>
>>> 
Jespa is a commercial product, not a part of Tomcat (*). Should
>> you not be contacting the support at www.ioplex.com / 
>> support@ioplex.com for this ?
>> 
>> (*) This being said, it works fine with Tomcat for me, at 
>> multiple sites and since years.
>> 
>> ---------------------------------------------------------------------
>>
>>
To
>> 
unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUa59yAAoJEBzwKT+lPKRYsxYQAJs5xEINRIUI02UQtrmD6Vvj
vGAe3i1W75wsThtnoAgVafUVAwBAewJDLkCfJKBU0YmxTAMNlUPgaDr0c7ZchNBN
7Iw17xgRDF4Yu6zFt6oDTxnVp8sBqnnCfjtJXNXKpHDct3rwPmAxIDs5fm1p/3f3
AjLcXD/rfeKIggIb7ahYFNGLlGjbZymRPpYWgasPq6PiU7CyP5cLgJ8+zHWa3OqQ
6SxIiuBFmwWUjo+H4yD8HY08sRJ2unAXAI+AB8Whk3g4nuHCnvSdmn9TodfabHpI
4CMDA+7k4l5M4cQPnI1njlIuMEHDjOuAxY9W3HENWrfS5d7g8BiZR5SjryvdY4b+
7CTpZXFEaXEF49owzbfFBsqpwi/Xukt3dfUFYKss+7kmEKvm3LViCA/e/AOgE4B9
99H/1K1o3waBCjUbzrbNxIxm60B7ENExlw3hxTlnhMjTgUCfwLLrD7mXSy966YYP
Gj93M6eG75P+DKasTA5yqwm8RvHIbTmor1eN9jPa2KVnfJby9pAIq9YbbgAj5q8H
6oWdYnM24XUIiqA8ehbE4eyknxC0CwczVpNKMKSs7IC08/ZnIsqD7TVGGEQS52D9
83/IQkYCuWYTlxyK7WGEdOJqllr367/mXnkzaqKo87HkDk0CUeOsMvtRe29x8bkq
Hr/s19/qTzCoC3dSddcR
=K57I
-----END PGP SIGNATURE-----

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


Re: jespa (jcifs) does not works in Tomcat but works in single app

Posted by Ignacio Ocampo <na...@gmail.com>.
Hi Andre,

I did all steps described in documentation for set "jespa" in
java.protocol.handler.pkgs

It works perfectly in a single app but it does not work in Tomcat.

The authentication process isn't the problem, the problem is that Tomcat
does not detect the Jespa wrapper to handle http url connections.

Regards.

On Mon, Nov 17, 2014 at 10:33 AM, André Warnier <aw...@ice-sa.com> wrote:

> Ignacio Ocampo wrote:
>
>> Hi all,
>>
>> I've a simple *app (A)* that uses *JESPA* (and *JCIFS*), it works
>> perfectly
>> when I run this isolated. This app, has a *functionA* that call a URL with
>> NTLM authentication and I use JESPA to authenticate.
>>
>> I have another *app (B)* that uses *app (A)* as library with *TOMCAT*,
>> but,
>> when I call the *functionA* it doesn't work.
>>
>
> That is not very helpful as a problem description.  What does not work ?
> How do you know that it does not work ? What appears in the logfiles ?
> What does your webapp try to do with Jespa ?
>
>
>> In both cases, I'm sure of:
>>
>>    1. I register java protocol handler with:
>> *System.setProperty("java.protocol.handler.pkgs",
>>    "jespa")* at the start of the program (I tried with *JAVA_OPTS* too).
>>    2. I've *jespa-1.1.20.jar* and *jcifs-1.3.18.jar* in /opt/tomcat/lib/
>>    and /opt/tomcat/webapps/ROOT/WEB-INF/lib
>>
>
> If your purpose is only to authenticate the user of your webapp, you do
> not need a copy in
> /opt/tomcat/lib/. That is probably a bad idea anyway.
>
> Did you follow the steps in the Jespa manual, page 9, "Step 2: Test the
> Computer account with the Example Webapp" ?
>
>
>> Using CLASSPATH:
>> /root/apache-tomcat-7.0.57/bin/bootstrap.jar:/root/
>> apache-tomcat-7.0.57/bin/tomcat-juli.jar:/root/apache-tomcat-7.0.57/lib/
>> *jespa.jar*:/root/apache-tomcat-7.0.57/lib/*jcifs.jar*
>>
>>
>>
> Jespa is a commercial product, not a part of Tomcat (*).
> Should you not be contacting the support at www.ioplex.com /
> support@ioplex.com for this ?
>
> (*) This being said, it works fine with Tomcat for me, at multiple sites
> and since years.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Ignacio Ocampo Millán

Re: jespa (jcifs) does not works in Tomcat but works in single app

Posted by André Warnier <aw...@ice-sa.com>.
Ignacio Ocampo wrote:
> Hi all,
> 
> I've a simple *app (A)* that uses *JESPA* (and *JCIFS*), it works perfectly
> when I run this isolated. This app, has a *functionA* that call a URL with
> NTLM authentication and I use JESPA to authenticate.
> 
> I have another *app (B)* that uses *app (A)* as library with *TOMCAT*, but,
> when I call the *functionA* it doesn't work.

That is not very helpful as a problem description.  What does not work ? How do you know 
that it does not work ? What appears in the logfiles ?
What does your webapp try to do with Jespa ?

> 
> In both cases, I'm sure of:
> 
>    1. I register java protocol handler with:
> *System.setProperty("java.protocol.handler.pkgs",
>    "jespa")* at the start of the program (I tried with *JAVA_OPTS* too).
>    2. I've *jespa-1.1.20.jar* and *jcifs-1.3.18.jar* in /opt/tomcat/lib/
>    and /opt/tomcat/webapps/ROOT/WEB-INF/lib

If your purpose is only to authenticate the user of your webapp, you do not need a copy in
/opt/tomcat/lib/. That is probably a bad idea anyway.

Did you follow the steps in the Jespa manual, page 9, "Step 2: Test the Computer account 
with the Example Webapp" ?

> 
> Using CLASSPATH:
> /root/apache-tomcat-7.0.57/bin/bootstrap.jar:/root/apache-tomcat-7.0.57/bin/tomcat-juli.jar:/root/apache-tomcat-7.0.57/lib/
> *jespa.jar*:/root/apache-tomcat-7.0.57/lib/*jcifs.jar*
> 
> 

Jespa is a commercial product, not a part of Tomcat (*).
Should you not be contacting the support at www.ioplex.com / support@ioplex.com for this ?

(*) This being said, it works fine with Tomcat for me, at multiple sites and since years.

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