cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2826
Views
5
Helpful
9
Replies

Email element in CVP 8.5

isilo0001
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

Chintan Gajjar
Level 8
Level 8

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

View solution in original post

9 Replies 9

hemal.mehta
Level 5
Level 5

Check if you are having mail.jar under both Tomcat\lib as well as application lib.

Hemal

Tomcat/common/lib

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.

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>

Hi

It's under both folders but we're still getting the error

Just leave it in the tomcat one only and then try.

Hemal

janinegraves
Spotlight
Spotlight

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.

hemal.mehta
Level 5
Level 5

I meant Tomcat\common\lib and application lib.

Hemal

Chintan Gajjar
Level 8
Level 8

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