Hi I am using maven I am trying to generate excel then send it as attachment to email in netbeans I am not gettig any error however in my tomcat I am getting error below I will really appreciate any hel or advice thank you
my pom
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.jexcelapi/jxl -->
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<!-- End change plugin specific dependencies here -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15</version>
<type>jar</type>
</dependency>
</dependencies>
Error
SEVERE [http-nio-443-exec-10] org.oo.project1.try1.execute null
java.lang.ClassCastException: javax.mail.util.ByteArrayDataSource cannot be cast to javax.sql.DataSource
at org.oo.project1.try1.sendMail(carexcel.java:282)
at org.oo.project1.try1.tryy(carexcel.java:240)
at org.oo.project1.try1.execute(carexcel.java:116)