You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by joel badia escolà <ba...@gmail.com> on 2012/09/13 07:42:30 UTC

Fwd: Problems loading external jar in my app !

Hello everyone, i have a problem with my jsp app for adding external
jars. First of all I have tried the same code and app directory
structure in netbeans ide "built-in" tomcat and works fine, but when i
try to serve my app in my tomcat installation (installed using
aptitude) it seems that it's impossible to locate the external jar.

Only with this code:

<%@page import="weka.classifiers.trees.RandomTree" %>

<%
RandomTree t = new RandomTree();
out.println();
out.println("It works");
%>

I get this error message:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 6 in the generated java file
Only a type can be imported. weka.classifiers.trees.RandomTree
resolves to a package

An error occurred at line: 6 in the jsp file:
/DiseaseDiscover/make_diagnosis.jsp
RandomTree cannot be resolved to a type
3: <%@page import="weka.classifiers.trees.RandomTree" %>
4:
5: <%
6: RandomTree t = new RandomTree();
7: out.println();
8: out.println("It works");
9: %>

I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
/var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
/usr/share/tomcat6/lib/

In all directories I get the same error message.

Greetings,

Joel

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


Re: Problems loading external jar in my app !

Posted by Vishwanath Washimkar <vw...@gmail.com>.
remove the DiseaseDiscovery and put it in webapps directory and u should be
good to go. Make it simple

On Tue, Sep 18, 2012 at 6:11 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2012/9/18 joel badia escolà <ba...@gmail.com>:
> > The placement it's correct i'm using Debian and my app it's deployed
> > in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where
> > $CATALINA_BASE=/var/lib/tomcat6).
> >
> > This is the full tree of my webapp:
> >
> > .
> > |-- disease_discover.jsp
> > |-- disease_discover.jsp~
> > |-- disease_simpts.jsp
> > |-- disease_simpts.jsp~
> > |-- get_diseases.jsp
> > |-- get_diseases.jsp~
> > |-- get_simpts.jsp
> > |-- get_simpts.jsp~
> > |-- images
> > |   |-- icona.png
> > |   |-- icona.xcf
> > |   |-- menu_background.png
> > |   `-- menu_background.xcf
> > |-- index.html
> > |-- index.html~
> > |-- make_completions.jsp
> > |-- make_completions.jsp~
> > |-- make_diagnosis.jsp
> > |-- make_diagnosis.jsp~
> > |-- make_disease_completions.jsp
> > |-- make_disease_completions.jsp~
> > |-- prediction_data
> > |   |-- rt-test-nonoise-20.model
> > |   `-- tmp_test.arff
> > |-- scripts
> > |   |-- diseasediscover.js
> > |   |-- diseasediscover.js~
> > |   |-- disease_simpts.js
> > |   |-- disease_simpts.js~
> > |   |-- jquery.js
> > |   |-- main.js
> > |   |-- main.js~
> > |   |-- simpt_diseases.js
> > |   `-- simpt_diseases.js~
> > |-- simpt_diseases.jsp
> > |-- simpt_diseases.jsp~
> > |-- styles
> > |   |-- basic_style.css
> > |   `-- basic_style.css~
> > `-- WEB-INF
> >     |-- classes
> >     `-- lib
> >         `-- weka.jar
> >
> >> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase
> [...]
> >
> > I think that it's correct. As you can see i respect the lower and upper
> cases !
> >
>
> 1. The ROOT web application is the wrong place for your files.  All
> web applications are independent. The ROOT application is just one of
> them.
>
> 2. You have not read the wikipedia article
>
>
> > Thank's and best regards,
> >
> > Joel Badia Escolà
> >
> > 2012/9/18, Konstantin Kolinko <kn...@gmail.com>:
> >> 2012/9/18 joel badia escolà <ba...@gmail.com>:
> >>> I tried all the things that you expose, but without results :(
> >>>
> >>> Is it possible that the Debian installation disable tomcat auto
> >>> WEB-INF checking? If it's possible, can you tell me where I can find
> >>> this "magic" configuration file?
> >>
> >> 1. It is not possible to disable loading libraries from WEB-INF/lib
> >> and classes from WEB-INF/classes, as that is required by the Servlet
> >> specification.
> >>
> >> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase,
> >> and the full path is
> >>
> >> ${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib
> >>
> >> The mapping between web application names and their URLs is explained
> >> in the "Context" chapter of the Configuration Reference.
> >>
> >>
> >> 2. How do you deploy your application into Tomcat?
> >>
> >> 3. Note that the examples application that is included with the
> >> official Apache Tomcat distributive has several libraries in it:
> >> jstl.jar, standard.jar.
> >>
> >> 4.
> >>
> http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Problems loading external jar in my app !

Posted by André Warnier <aw...@ice-sa.com>.
Konstantin Kolinko wrote:
> 2012/9/18 joel badia escolà <ba...@gmail.com>:
...

> 
> 2. You have not read the wikipedia article
> 
> 
I think that we should implement a filter on the list, which automatically throws away any 
top-posted message. ;-)

http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style


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


Re: Problems loading external jar in my app !

Posted by André Warnier <aw...@ice-sa.com>.
joel badia escolà wrote:
>> 1. The ROOT web application is the wrong place for your files.  All
>> web applications are independent. The ROOT application is just one of
>> them.
> 
> Perfect with this i solve the problem ;)
> 
>> 2. You have not read the wikipedia article
> 
> I'm not sure if I understand completely the full article, because as
> you notice my english skills are some limited (sorry i'm working too
> for fix it :P). But I think that one response like that, if I
> understood, it's correct?
> 
Yes, perfect.  It makes clear what you are responding to, it is easy to read in sequence, 
like a normal conversation, etc.

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


Re: Problems loading external jar in my app !

Posted by joel badia escolà <ba...@gmail.com>.
> 1. The ROOT web application is the wrong place for your files.  All
> web applications are independent. The ROOT application is just one of
> them.

Perfect with this i solve the problem ;)

> 2. You have not read the wikipedia article

I'm not sure if I understand completely the full article, because as
you notice my english skills are some limited (sorry i'm working too
for fix it :P). But I think that one response like that, if I
understood, it's correct?

Best Regards and thanks everyone that helps me,

Joel Badia Escolà

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


Re: Problems loading external jar in my app !

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/9/18 joel badia escolà <ba...@gmail.com>:
> The placement it's correct i'm using Debian and my app it's deployed
> in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where
> $CATALINA_BASE=/var/lib/tomcat6).
>
> This is the full tree of my webapp:
>
> .
> |-- disease_discover.jsp
> |-- disease_discover.jsp~
> |-- disease_simpts.jsp
> |-- disease_simpts.jsp~
> |-- get_diseases.jsp
> |-- get_diseases.jsp~
> |-- get_simpts.jsp
> |-- get_simpts.jsp~
> |-- images
> |   |-- icona.png
> |   |-- icona.xcf
> |   |-- menu_background.png
> |   `-- menu_background.xcf
> |-- index.html
> |-- index.html~
> |-- make_completions.jsp
> |-- make_completions.jsp~
> |-- make_diagnosis.jsp
> |-- make_diagnosis.jsp~
> |-- make_disease_completions.jsp
> |-- make_disease_completions.jsp~
> |-- prediction_data
> |   |-- rt-test-nonoise-20.model
> |   `-- tmp_test.arff
> |-- scripts
> |   |-- diseasediscover.js
> |   |-- diseasediscover.js~
> |   |-- disease_simpts.js
> |   |-- disease_simpts.js~
> |   |-- jquery.js
> |   |-- main.js
> |   |-- main.js~
> |   |-- simpt_diseases.js
> |   `-- simpt_diseases.js~
> |-- simpt_diseases.jsp
> |-- simpt_diseases.jsp~
> |-- styles
> |   |-- basic_style.css
> |   `-- basic_style.css~
> `-- WEB-INF
>     |-- classes
>     `-- lib
>         `-- weka.jar
>
>> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase [...]
>
> I think that it's correct. As you can see i respect the lower and upper cases !
>

1. The ROOT web application is the wrong place for your files.  All
web applications are independent. The ROOT application is just one of
them.

2. You have not read the wikipedia article


> Thank's and best regards,
>
> Joel Badia Escolà
>
> 2012/9/18, Konstantin Kolinko <kn...@gmail.com>:
>> 2012/9/18 joel badia escolà <ba...@gmail.com>:
>>> I tried all the things that you expose, but without results :(
>>>
>>> Is it possible that the Debian installation disable tomcat auto
>>> WEB-INF checking? If it's possible, can you tell me where I can find
>>> this "magic" configuration file?
>>
>> 1. It is not possible to disable loading libraries from WEB-INF/lib
>> and classes from WEB-INF/classes, as that is required by the Servlet
>> specification.
>>
>> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase,
>> and the full path is
>>
>> ${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib
>>
>> The mapping between web application names and their URLs is explained
>> in the "Context" chapter of the Configuration Reference.
>>
>>
>> 2. How do you deploy your application into Tomcat?
>>
>> 3. Note that the examples application that is included with the
>> official Apache Tomcat distributive has several libraries in it:
>> jstl.jar, standard.jar.
>>
>> 4.
>> http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style
>>

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


Re: Problems loading external jar in my app !

Posted by joel badia escolà <ba...@gmail.com>.
The placement it's correct i'm using Debian and my app it's deployed
in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where
$CATALINA_BASE=/var/lib/tomcat6).

This is the full tree of my webapp:

.
|-- disease_discover.jsp
|-- disease_discover.jsp~
|-- disease_simpts.jsp
|-- disease_simpts.jsp~
|-- get_diseases.jsp
|-- get_diseases.jsp~
|-- get_simpts.jsp
|-- get_simpts.jsp~
|-- images
|   |-- icona.png
|   |-- icona.xcf
|   |-- menu_background.png
|   `-- menu_background.xcf
|-- index.html
|-- index.html~
|-- make_completions.jsp
|-- make_completions.jsp~
|-- make_diagnosis.jsp
|-- make_diagnosis.jsp~
|-- make_disease_completions.jsp
|-- make_disease_completions.jsp~
|-- prediction_data
|   |-- rt-test-nonoise-20.model
|   `-- tmp_test.arff
|-- scripts
|   |-- diseasediscover.js
|   |-- diseasediscover.js~
|   |-- disease_simpts.js
|   |-- disease_simpts.js~
|   |-- jquery.js
|   |-- main.js
|   |-- main.js~
|   |-- simpt_diseases.js
|   `-- simpt_diseases.js~
|-- simpt_diseases.jsp
|-- simpt_diseases.jsp~
|-- styles
|   |-- basic_style.css
|   `-- basic_style.css~
`-- WEB-INF
    |-- classes
    `-- lib
        `-- weka.jar

> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase [...]

I think that it's correct. As you can see i respect the lower and upper cases !

Thank's and best regards,

Joel Badia Escolà

2012/9/18, Konstantin Kolinko <kn...@gmail.com>:
> 2012/9/18 joel badia escolà <ba...@gmail.com>:
>> I tried all the things that you expose, but without results :(
>>
>> Is it possible that the Debian installation disable tomcat auto
>> WEB-INF checking? If it's possible, can you tell me where I can find
>> this "magic" configuration file?
>
> 1. It is not possible to disable loading libraries from WEB-INF/lib
> and classes from WEB-INF/classes, as that is required by the Servlet
> specification.
>
> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase,
> and the full path is
>
> ${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib
>
> The mapping between web application names and their URLs is explained
> in the "Context" chapter of the Configuration Reference.
>
>
> 2. How do you deploy your application into Tomcat?
>
> 3. Note that the examples application that is included with the
> official Apache Tomcat distributive has several libraries in it:
> jstl.jar, standard.jar.
>
> 4.
> http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Problems loading external jar in my app !

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/9/18 joel badia escolà <ba...@gmail.com>:
> I tried all the things that you expose, but without results :(
>
> Is it possible that the Debian installation disable tomcat auto
> WEB-INF checking? If it's possible, can you tell me where I can find
> this "magic" configuration file?

1. It is not possible to disable loading libraries from WEB-INF/lib
and classes from WEB-INF/classes, as that is required by the Servlet
specification.

Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase,
and the full path is

${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib

The mapping between web application names and their URLs is explained
in the "Context" chapter of the Configuration Reference.


2. How do you deploy your application into Tomcat?

3. Note that the examples application that is included with the
official Apache Tomcat distributive has several libraries in it:
jstl.jar, standard.jar.

4.
http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style

Best regards,
Konstantin Kolinko

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


Re: Problems loading external jar in my app !

Posted by Vishwanath Washimkar <vw...@gmail.com>.
Hi ,

why are you putting your webapplication under
/var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery .
This make DiseaseDirecovery a part of the root web appliction.

Put the webapplication in under the webapps directory :
/var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery

I think u jars are not deploying as u r putting the webpplication directory
under ROOT webapplication.

I don't think debian OS will change anything how tomcat deploys web app.
The deployment is minimum as specified in J2EE specs

try this
Vish

On Tue, Sep 18, 2012 at 2:44 PM, joel badia escolà <ba...@gmail.com>wrote:

> I tried all the things that you expose, but without results :(
>
> Is it possible that the Debian installation disable tomcat auto
> WEB-INF checking? If it's possible, can you tell me where I can find
> this "magic" configuration file?
>
> I have another theory, Is it possible that the jar i'm using needs
> some extra configuration for tomcat recognition? I'm working with weka
> if this can help you !
>
> Greetings,
>
> Joel
>
> 2012/9/13, Christopher Schultz <ch...@christopherschultz.net>:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Vishwanath,
> >
> > On 9/13/12 10:04 AM, Vishwanath Washimkar wrote:
> >> Joel,
> >>
> >> At first look it seemed to me odd, but I google search I got this
> >> link. It seems that you have not provided ' ; ' at the end of  your
> >> import.
> >
> > That's not how it is supposed to work. Either there is a bug in Tomcat
> > or there is something else wrong. I would be very surprised if adding
> > a ";" after the last "import" fixed this problem.
> >
> >> Also test it out putting the jar in the webapps/lib or
> >> <tomcat-root>/lib.
> >
> > That first one is the right solution.
> >
> >> I need to research on aptitude installation though.
> >
> > Aptitude is a package manager for Debian-based OSs.
> >
> >> The following link might help.
> >>
> >>
> http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package
> >
> > I
> >>
> > think the ";" is a red herring.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> > Comment: GPGTools - http://gpgtools.org
> > Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
> >
> > iEYEARECAAYFAlBSUCUACgkQ9CaO5/Lv0PAoygCfckVCwmJvMuhSEpgPWqOdQggP
> > 20MAn0LeFCrswdcu6vI0zXzA8VbbHYZE
> > =s0oX
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Problems loading external jar in my app !

Posted by joel badia escolà <ba...@gmail.com>.
I tried all the things that you expose, but without results :(

Is it possible that the Debian installation disable tomcat auto
WEB-INF checking? If it's possible, can you tell me where I can find
this "magic" configuration file?

I have another theory, Is it possible that the jar i'm using needs
some extra configuration for tomcat recognition? I'm working with weka
if this can help you !

Greetings,

Joel

2012/9/13, Christopher Schultz <ch...@christopherschultz.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Vishwanath,
>
> On 9/13/12 10:04 AM, Vishwanath Washimkar wrote:
>> Joel,
>>
>> At first look it seemed to me odd, but I google search I got this
>> link. It seems that you have not provided ' ; ' at the end of  your
>> import.
>
> That's not how it is supposed to work. Either there is a bug in Tomcat
> or there is something else wrong. I would be very surprised if adding
> a ";" after the last "import" fixed this problem.
>
>> Also test it out putting the jar in the webapps/lib or
>> <tomcat-root>/lib.
>
> That first one is the right solution.
>
>> I need to research on aptitude installation though.
>
> Aptitude is a package manager for Debian-based OSs.
>
>> The following link might help.
>>
>> http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package
>
> I
>>
> think the ";" is a red herring.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBSUCUACgkQ9CaO5/Lv0PAoygCfckVCwmJvMuhSEpgPWqOdQggP
> 20MAn0LeFCrswdcu6vI0zXzA8VbbHYZE
> =s0oX
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Problems loading external jar in my app !

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

Vishwanath,

On 9/13/12 10:04 AM, Vishwanath Washimkar wrote:
> Joel,
> 
> At first look it seemed to me odd, but I google search I got this
> link. It seems that you have not provided ' ; ' at the end of  your
> import.

That's not how it is supposed to work. Either there is a bug in Tomcat
or there is something else wrong. I would be very surprised if adding
a ";" after the last "import" fixed this problem.

> Also test it out putting the jar in the webapps/lib or
> <tomcat-root>/lib.

That first one is the right solution.

> I need to research on aptitude installation though.

Aptitude is a package manager for Debian-based OSs.

> The following link might help.
> 
> http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package

I
> 
think the ";" is a red herring.

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

iEYEARECAAYFAlBSUCUACgkQ9CaO5/Lv0PAoygCfckVCwmJvMuhSEpgPWqOdQggP
20MAn0LeFCrswdcu6vI0zXzA8VbbHYZE
=s0oX
-----END PGP SIGNATURE-----

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


Re: Problems loading external jar in my app !

Posted by Vishwanath Washimkar <vw...@gmail.com>.
Joel,

At first look it seemed to me odd, but I google search I got this link. It
seems that you have not provided ' ; ' at the end of  your import. Also
test it out putting the jar in the webapps/lib or <tomcat-root>/lib.

I need to research on aptitude installation though. The following link
might help.

http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package

best of luck
Vishwanath

On Thu, Sep 13, 2012 at 11:12 AM, joel badia escolà <ba...@gmail.com>wrote:

> Hello everyone, i have a problem with my jsp app for adding external
> jars. First of all I have tried the same code and app directory
> structure in netbeans ide "built-in" tomcat and works fine, but when i
> try to serve my app in my tomcat installation (installed using
> aptitude) it seems that it's impossible to locate the external jar.
>
> Only with this code:
>
> <%@page import="weka.classifiers.trees.RandomTree" %>
>
> <%
> RandomTree t = new RandomTree();
> out.println();
> out.println("It works");
> %>
>
> I get this error message:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> An error occurred at line: 6 in the generated java file
> Only a type can be imported. weka.classifiers.trees.RandomTree
> resolves to a package
>
> An error occurred at line: 6 in the jsp file:
> /DiseaseDiscover/make_diagnosis.jsp
> RandomTree cannot be resolved to a type
> 3: <%@page import="weka.classifiers.trees.RandomTree" %>
> 4:
> 5: <%
> 6: RandomTree t = new RandomTree();
> 7: out.println();
> 8: out.println("It works");
> 9: %>
>
> I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
> /var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
> /usr/share/tomcat6/lib/
>
> In all directories I get the same error message.
>
> Greetings,
>
> Joel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Fwd: Problems loading external jar in my app !

Posted by Ralph Plawetzki <ra...@purejava.org>.
Am 13.09.2012 07:42, schrieb joel badia escolà:
> Hello everyone, i have a problem with my jsp app for adding external
> jars. First of all I have tried the same code and app directory
> structure in netbeans ide "built-in" tomcat and works fine, but when i
> try to serve my app in my tomcat installation (installed using
> aptitude) it seems that it's impossible to locate the external jar.
> 
On which OS did you install tomcat6?

> I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
> /var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
> /usr/share/tomcat6/lib/
> 
If your OS would be Debian or Ubuntu, /usr/share/tomcat6/lib/ is the
place to make weka.jar available for all webapps on tomcat. After
dropping it in there, did you restart tomcat?

Have you checked the file permissions of weka.jar? It has to be readable
for the user tomcat6 is running with.

Regards,
Ralph

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