Maycon Oliveira [
https://community.jboss.org/people/FuinhaAzul] created the discussion
"Re: AS7 7.1.1.Final: java.lang.ClassCastException:
org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory cannot be cast to
javax.xml.crypto.dsig.XMLSignatureFactory"
To view the discussion, visit:
https://community.jboss.org/message/724797#724797
--------------------------------------------------------------
Sure,
My structure is:
An EJB TimerService that will sign a XML with a digital certificate. All by
"scratch". There is no deployment descritors.
The app:
myapp.ear
lib
myutilclasses.jar
myapp.war (some rest services)
lib
primefaces.jar
myapp.jar (Some TimerServices, some Assynchronous EJB invocation and stored procedures
calls)
EAR MANIFEST (the others are empty)
Dependencies: org.apache.log4j export,com.nl.ed export,oracle.jdbc
export,org.jboss.ironjacamar.jdbcadapters export,javax.mail.api export
On jboss modules (I created my own module) i have some extra libraries:
ojdbc6.jar, barbecue.jar, commons-digester.jar, itext.jar, jasperreports.jar, jasypt.jar,
pdfrenderer.jar
*But:*
Try to deploy an single EJB module on jboss as7 with this class, and the problem will
happen:
package TesteTimer;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.ScheduleExpression;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.Timeout;
import javax.ejb.TimerService;
import javax.xml.crypto.dsig.XMLSignatureFactory;
@Singleton
@Startup
public class TimerClass {
@Resource
TimerService timerService;
@PostConstruct
public void initialize() {
ScheduleExpression expression = new ScheduleExpression();
expression.second("*/1").minute("*").hour("*");
timerService.createCalendarTimer(expression);
}
@Timeout
public void execute() {
System.out.println("BEFORE EXCEPTION");
XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
System.out.println("AFTER EXCEPTION");
}
}
Thansk for your help!
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/724797#724797]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]