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:
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/home/httpd/ed" path="/ed">
<Parameter name="login" value="xxxxxxx/xxxxxxx"/>
<Parameter name="key_string" value="XxxxxxxxxxxXxxxxxxxx"/>
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
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"/>
</Context>
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:
<Resources className="org.apache.catalina.webresources.StandardRoot">
<PostResources
className="org.apache.catalina.webresources.JarResourceSet"
base="/usr/local/calendar/libs/google-api-client-1.22.0.jar"
webAppMount="/WEB-INF/lib" internalPath="/."/>
<PostResources
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="/."/>
<PostResources
className="org.apache.catalina.webresources.JarResourceSet"
base="/usr/local/calendar/libs/google-http-client-1.22.0.jar"
webAppMount="/WEB-INF/lib" internalPath="/."/>
<PostResources
className="org.apache.catalina.webresources.JarResourceSet"
base="/usr/local/calendar/libs/google-http-client-jackson2-1.22.0.jar"
webAppMount="/WEB-INF/lib" internalPath="/."/>
<PostResources
className="org.apache.catalina.webresources.JarResourceSet"
base="/usr/local/calendar/libs/google-oauth-client-1.22.0.jar"
webAppMount="/WEB-INF/lib" internalPath="/."/>
<PostResources
className="org.apache.catalina.webresources.JarResourceSet"
base="/usr/local/calendar/libs/jackson-core-2.1.3.jar"
webAppMount="/WEB-INF/lib" internalPath="/."/>
</Resources>
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: [email protected]
For additional commands, e-mail: [email protected]