Re: migration from tomcat 7.0 to 8.5

2019-02-11 Thread Mark Thomas
On 04/10/2017 15:53, Aquatic Safaris Diver wrote:
> 
> I've read the migration manuals and have tried to make the changes to
> my configuration to work correctly in tomcat v8.5, but it's not.  I'm
> not an experton XML files and JDK so please help me.   I'm sure this is crazy 
> simple
> for you experts.

Why make life difficult for yourself? Just package those libraries in
your web application's WEB-INF/lib directory.

Mark

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



migration from tomcat 7.0 to 8.5

2019-02-08 Thread Aquatic Safaris Diver


I've read the migration manuals and have tried to make the changes to
my configuration files to work correctly in tomcat v8.5, but it's not.  I'm
not an expert on XML files and JDK so please help me.   I'm sure this is
crazy simple
for you experts.

The server.xml conf file is OK between the two versions.   But my
application's deployment is having problems.

In my tomcat v7 conf/Catalina/localhost directory, I have ed.xml file
for my application containing:








So the question is what to do with Loader section.  
After spending about 6 hours and reading tons of other web posts from
others trying to do the same thing,
I finally have something working, kinda.  My web application at least
deploys when tomcat starts.
The Loader part in the .xml was replaced with:


    
    
    
    
    
    



I think I'm up to 12 hours messing with this and reading everything I
can get my hands on.
I still don't have a good understanding of what webAppMount is or what I
should set it to, and,
for that matter, internalPath.  I changed PostResources to JarResources
and nothing changed.  
The jar files are not getting found or the classes in the jar files are
not getting found.  
When I access the JSP page that need to resolve classes in these .jar's,
I get

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

An error occurred at line: [20] in the generated java file: 
[/work/Catalina/localhost/ed/org/apache/jsp/charters_jsp.java]
Only a type can be imported. com.google.api.client.json.JsonFactory resolves to 
a package

Line 20 is:
import com.google.api.client.json.JsonFactory;


I'd really like to get off Tomcat 7 before it's EOL.

Please help with what I need to do to make my app work in Tomcat 8.5.X

Thanks,
Paul






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



Re: migration from tomcat 7.0 to 8.5

2017-10-04 Thread Konstantin Kolinko
2017-10-04 17:53 GMT+03:00 Aquatic Safaris Diver :
>
> I've read the migration manuals and have tried to make the changes to
> my configuration to work correctly in tomcat v8.5, but it's not.  I'm
> not an experton XML files and JDK so please help me.   I'm sure this is crazy 
> simple
> for you experts.
>
> The server.xml conf file is OK between the two versions.   But my
> application's deployment is having problems.
>
> In my tomcat v7 conf/Catalina/localhost directory, I have ed.xml file
> for my application containing:
>
> 
> 

"path" cannot be used here, ignored

docBase is rare to be seen here, but OK (it is outside of webapps)

> 
> 
> 
> virtualClasspath="/usr/local/calendar/libs/google-api-client-1.22.0.jar;/usr/local/calendar/google-api-services-calendar-v3-rev230-1.22.0.jar;/usr/local/calendar/libs/google-http-client-1.22.0.jar;/usr/local/calendar/libs/google-http-client-jackson2-1.22.0.jar;/usr/local/calendar/libs/google-oauth-client-1.22.0.jar;/usr/local/calendar/libs/jackson-core-2.1.3.jar"/>
> 
>
> After spending about 6 hours and reading tons of other web posts from
> others trying to do the same thing, I finally have
> something working, kinda.  My web application at least deploys when
> tomcat starts.  The Loader part in the .xml was replaced with:
> 
>  className="org.apache.catalina.webresources.JarResourceSet"
>base="/usr/local/calendar/libs/google-api-client-1.22.0.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
>  className="org.apache.catalina.webresources.JarResourceSet"
>
> base="/usr/local/calendar/google-api-services-calendar-v3-rev230-1.22.0.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
>  className="org.apache.catalina.webresources.JarResourceSet"
>base="/usr/local/calendar/libs/google-http-client-1.22.0.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
>  className="org.apache.catalina.webresources.JarResourceSet"
>
> base="/usr/local/calendar/libs/google-http-client-jackson2-1.22.0.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
>  className="org.apache.catalina.webresources.JarResourceSet"
>base="/usr/local/calendar/libs/google-oauth-client-1.22.0.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
>  className="org.apache.catalina.webresources.JarResourceSet"
>base="/usr/local/calendar/libs/jackson-core-2.1.3.jar" 
> webAppMount="/WEB-INF/lib" internalPath="/."/>
> 

I'd use org.apache.catalina.webresources.FileResourceSet.  There is an
example in "Ordering" section here:
http://tomcat.apache.org/tomcat-8.5-doc/config/resources.html#Nested_Components

The docs could be better.

> However, when I access the JSP page that need to resolve classes in these 
> .jar's, I get
> org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> An error occurred at line: [20] in the generated java file: 
> [/work/Catalina/localhost/ed/org/apache/jsp/charters_jsp.java]
> Only a type can be imported. com.google.api.client.json.JsonFactory resolves 
> to a package
>
> Line 20 is:
> import com.google.api.client.json.JsonFactory;

It is odd.
Stacktrace?

In my experience I faced
https://bz.apache.org/bugzilla/show_bug.cgi?id=47323
but it is quite different from your case.

isPackage(className) check mentioned there tries to load (className +
".class") as a resource and reports "true, it is a package" if the
class resource is not found.

> I think I'm up to 12 hours messing with this and reading everything I can get 
> my hands on.
> Something that was so simple in tomcat 7 has turned out to be a nightmare in 
> tomcat 8.
> I still don't have a good understanding of what webAppMount is or what I 
> should set it to.
> I changed PostResources to JarResources and nothing changed.   The jar files 
> are not getting found
> or the classes in the jar files are not getting found.
>
> There is no way this can be this hard and complicated in tomcat 8.
>
> Please help.

Best regards,
Konstantin Kolinko

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



migration from tomcat 7.0 to 8.5

2017-10-04 Thread Aquatic Safaris Diver

I've read the migration manuals and have tried to make the changes to
my configuration to work correctly in tomcat v8.5, but it's not.  I'm
not an experton XML files and JDK so please help me.   I'm sure this is crazy 
simple
for you experts.

The server.xml conf file is OK between the two versions.   But my
application's deployment is having problems.

In my tomcat v7 conf/Catalina/localhost directory, I have ed.xml file
for my application containing:








After spending about 6 hours and reading tons of other web posts from
others trying to do the same thing, I finally have
something working, kinda.  My web application at least deploys when
tomcat starts.  The Loader part in the .xml was replaced with:

    
    
    
    
    
    


However, when I access the JSP page that need to resolve classes in these 
.jar's, I get
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [20] in the generated java file: 
[/work/Catalina/localhost/ed/org/apache/jsp/charters_jsp.java]
Only a type can be imported. com.google.api.client.json.JsonFactory resolves to 
a package

Line 20 is:
import com.google.api.client.json.JsonFactory;

I think I'm up to 12 hours messing with this and reading everything I can get 
my hands on.
Something that was so simple in tomcat 7 has turned out to be a nightmare in 
tomcat 8.
I still don't have a good understanding of what webAppMount is or what I should 
set it to.
I changed PostResources to JarResources and nothing changed.   The jar files 
are not getting found
or the classes in the jar files are not getting found. 

There is no way this can be this hard and complicated in tomcat 8.

Please help.




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