09-04-2014 12:36 AM
Hello,
We are trying to use the VXML email element on CVP 8.5, Call Studio 8.5.
Here are the steps that are followed in order to configure a JNDI data source
1. mail.jar and activation.jar are copied to Tomcat\common\lib
2. <ResourceLink global="mail/GTVXMLTestMail" name="mail/Session" type="javax.mail.Session"/> added to Tomcat\common\conf\context.xml
3. <Resource auth="Container" name="mail/Session" type="javax.mail.Session" mail.smtp.host="SMTP-IPaddress" /> added in <GlobalNamingResources> tags to omcat\common\conf\server.xml
4. <resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref> added to Tomcat\common\conf\web.xml
We are getting the following error:
The error was: A built-in element encountered an exception of type java.lang.ClassCastException. The root cause was: java.lang.ClassCastException: javax.mail.Session cannot be cast to javax.mail.Session
com.audium.server.AudiumException: A built-in element encountered an exception of type java.lang.ClassCastException.
Does anyone have an idea what the problem might be?
Thanks.
Solved! Go to Solution.
05-06-2016 08:13 AM
Hi There,
If some one happens to come here and looking for email element not working on CVP 10.5 with below error:
The error was: A built-in element encountered an exception of type java.lang.ClassCastException. The root cause was: java.lang.ClassCastException
Please try below workaround:
make sure mail.jar only exist in
C:\Cisco\CVP\VXMLServer\common\lib
and
C:\Cisco\CVP\VXMLServer\Tomcat\lib.
and if you find mail.jar in below, delete it.
C:\Cisco\CVP\VXMLServer\Tomcat\webapps\CVP\WEB-INF\lib
looks to be product defect and not sure why the new installation has mail.jar in webapps folder.
Regards,
Chitntan
09-05-2014 10:38 AM
Check if you are having mail.jar under both Tomcat\lib as well as application lib.
Hemal
09-05-2014 10:40 AM
Tomcat/common/lib
09-05-2014 10:46 AM
Hi Janine,
Sorry there's a mistake in the original post. We added <ResourceLink global="mail/Session" name="mail/Session" type="javax.mail.Session"/> to context.xml so the same name is used for all three xml files. We also used this name for JNDI name. Still it doesn't solve the problem.
09-08-2014 12:38 PM
Is there a reason that you added the ResourceLink tag?
My C:\Cisco\CVP\VXMLServer\Tomcat\conf\context.xml file looks like this, and it works.
Don't forget to stop and start the VXML Server after changing the context.xml file.
<?xml version="1.0"?>
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname=""/>
<Resource type="javax.mail.Session" name="mail/myEmail" mail.smtp.host="TTECVP"/>
</Context>
09-05-2014 10:43 AM
Hi
It's under both folders but we're still getting the error
09-08-2014 06:44 AM
Just leave it in the tomcat one only and then try.
Hemal
09-05-2014 10:39 AM
Email -
1) I usually just configure the context.xml file with the following:
2) And ensure that the mail.jar and activation.jar files are in the
Tomcat/common/lib directory (they were missing in one of the CVP versions!)
3) Restart VXML Server
4) In Studio, I use the jndi name: myEmail
This works fine in class.
09-05-2014 10:46 AM
I meant Tomcat\common\lib and application lib.
Hemal
05-06-2016 08:13 AM
Hi There,
If some one happens to come here and looking for email element not working on CVP 10.5 with below error:
The error was: A built-in element encountered an exception of type java.lang.ClassCastException. The root cause was: java.lang.ClassCastException
Please try below workaround:
make sure mail.jar only exist in
C:\Cisco\CVP\VXMLServer\common\lib
and
C:\Cisco\CVP\VXMLServer\Tomcat\lib.
and if you find mail.jar in below, delete it.
C:\Cisco\CVP\VXMLServer\Tomcat\webapps\CVP\WEB-INF\lib
looks to be product defect and not sure why the new installation has mail.jar in webapps folder.
Regards,
Chitntan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide