Jboss throw ClassNotFoundException: XMLGregorianCalendarImpl
ngthphat Aug 10, 2012 11:58 AMHi all,
I developed a ear file with some webService inside.
This is a part of my DTO:
public XMLGregorianCalendar getStartDate() { if(startDate != null){ startDate.setTimezone(DatatypeConstants.FIELD_UNDEFINED); } return startDate; } /** * @param startDate the startDate to set */ @XmlSchemaType(name = "date") public void setStartDate(XMLGregorianCalendar startDate) { this.startDate = startDate; }
I use maven to build my ear file:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>${jdkVersion}</source> <target>${jdkVersion}</target> </configuration> </plugin> <plugin> <artifactId>maven-ejb-plugin</artifactId> <version>2.3</version> <configuration> <ejbVersion>3.1</ejbVersion> </configuration> </plugin>
Then, I deploy ear file to Jboss 7.1.1 and try to invoke to web service. However, jboss alway throw a exception, this is a part of log:
Caused by: java.lang.RuntimeException: ClassNotFoundException marshaling EJB parameters at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:229) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] ....... Caused by: java.lang.ClassNotFoundException: org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl from [Module "my.ear.file.xxx" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
Does someone know why jboss throw that exception? And how to fix it?
I deployed to Glassfish 3.1 and my web service work correctly.