I have seen this topic before but it is always in reference to a web application.
I have created an EJB Session bean to wrap the AWS Messaging API. Specifically the snsClient.publish() call. I deploy the bean successfully but when i run the client I get the following error.
javax.ejb.EJBException: EJB Exception: ;
nested exception is: java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;;
nested exception is: java.rmi.RemoteException: EJB Exception: ;
nested exception is: java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at webblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at gov.dot.fmcsa.fens.messaging.MessagingSessionEJB_8dyj1s_MessagingSessionEJBImpl_1035_WLStub.SendSMS(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
This is due to an older version of the library being deployed with Weblogic. I know I need to specify the included class.
I have tried to add preferred packages to the weblogic_application.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.1/weblogic-application.xsd"
xmlns="http://xmlns.oracle.com/weblogic/weblogic-application">
<prefer-application-packages>
<package-name>org.joda.time.*</package-name>
</prefer-application-packages>
</weblogic-application>
I also tried adding the class to the Shared Library References.