ich versuche mich gerade an dem ENS von Amazon. Allerdings kann ich das Sample nicht ausführen, da mir Eclipse immer eine Fehlermeldung ausgibt.
Java:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ws/security/components/crypto/Crypto
at com.amazon.notifications.test.NotificationServiceClientTest.main(NotificationServiceClientTest.java:30)Caused by: java.lang.ClassNotFoundException: org.apache.ws.security.components.crypto.Crypto
at java.net.URLClassLoader$1.run(UnknownSource)
at java.security.AccessController.doPrivileged(NativeMethod)
at java.net.URLClassLoader.findClass(UnknownSource)
at java.lang.ClassLoader.loadClass(UnknownSource)
at sun.misc.Launcher$AppClassLoader.loadClass(UnknownSource)
at java.lang.ClassLoader.loadClass(UnknownSource)...1 more
Hat evtl. bereits einer damit gearbeitet und kann mir helfen? Ich hoffe ich poste es im richtigen Forum, da ich wirklich Anfänger bin.
;-) ohne QuellCode können wir deine Fehler nur erraten (benzin ist leer, geh tanken). Könnte sein dass du die notwendigen Pakete nicht hast. In Netbeans bin ich heute zufällig auf eine (standartmäßige) vorhandene Amazon-Api unter "Services->Web Services" gestoßen (der Reiter befindet sich 2 positionen weiter rechts vom Reiter "Projects" wo logischerweise: die projekte aufgelistet werden (müsste bei mir standartansicht sein also kann man sich daran orientieren)
Also vllt mal mit Netbeans testen oder die Amazon api richtig runterladen + in das Projekt einbinden
Dieses habe ich schlicht bei Eclipse importiert und das wars. Somit bekomme ich die besagte Fehlermeldung, wenn ich das Sample ausführen möchte. Habt Ihr/Du nen Tipp wie ich das genau einbinde?
BTW, nutze von der Uni eher den JDeveloper, als Eclipse. Hier habe ich gar keine Ahnung wie ich das Zip-File einbinden kann. Habt Ihr da nen Tipp?
So, das mit der obigen Fehlermeldung habe ich nun hinbekommen. Habe die gesamten besagten jar's per Google rausgesucht und importiert. Anschließend habe ich wie in der Readme beschrieben einen Keystore erstellt. Wenn ich das Sample aber nun starten will bekomme ich folgende Fehlermeldungen:
Java:
An error has occurred while trying to use the NotificationService client
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:46 counts of IllegalAnnotationExceptionsThere are two properties named "eventType"this problem is related to the following location:
at public java.lang.String com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported.getEventType()
at com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported
at public com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported com.amazon.notifications.doc._2007_01_16.ObjectFactory.createIsEventTypeSupported()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.String com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported.eventType
at com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported
at public com.amazon.notifications.doc._2007_01_16.IsEventTypeSupported com.amazon.notifications.doc._2007_01_16.ObjectFactory.createIsEventTypeSupported()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "matchString"this problem is related to the following location:
at public java.lang.String com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes.getMatchString()
at com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes
at public com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetSupportedEventTypes()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.String com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes.matchString
at com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes
at public com.amazon.notifications.doc._2007_01_16.GetSupportedEventTypes com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetSupportedEventTypes()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "eventType"this problem is related to the following location:
at public java.lang.String com.amazon.notifications.doc._2007_01_16.GetEvents.getEventType()
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.String com.amazon.notifications.doc._2007_01_16.GetEvents.eventType
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "eventsPerPage"this problem is related to the following location:
at public java.lang.Long com.amazon.notifications.doc._2007_01_16.GetEvents.getEventsPerPage()
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.Long com.amazon.notifications.doc._2007_01_16.GetEvents.eventsPerPage
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "limit"this problem is related to the following location:
at public java.lang.Long com.amazon.notifications.doc._2007_01_16.GetEvents.getLimit()
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.Long com.amazon.notifications.doc._2007_01_16.GetEvents.limit
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "startDate"this problem is related to the following location:
at public javax.xml.datatype.XMLGregorianCalendar com.amazon.notifications.doc._2007_01_16.GetEvents.getStartDate()
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected javax.xml.datatype.XMLGregorianCalendar com.amazon.notifications.doc._2007_01_16.GetEvents.startDate
at com.amazon.notifications.doc._2007_01_16.GetEvents
at public com.amazon.notifications.doc._2007_01_16.GetEvents com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetEvents()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "eventsPerPage"this problem is related to the following location:
at public java.lang.Long com.amazon.notifications.doc._2007_01_16.GetMore.getEventsPerPage()
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.Long com.amazon.notifications.doc._2007_01_16.GetMore.eventsPerPage
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "pagingCookie"this problem is related to the following location:
at public com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.getPagingCookie()
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "backOffTime"this problem is related to the following location:
at public javax.xml.datatype.Duration com.amazon.notifications.doc._2007_01_16.PagingCookie.getBackOffTime()
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected javax.xml.datatype.Duration com.amazon.notifications.doc._2007_01_16.PagingCookie.backOffTime
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "cookie"this problem is related to the following location:
at public java.lang.String com.amazon.notifications.doc._2007_01_16.PagingCookie.getCookie()
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected java.lang.String com.amazon.notifications.doc._2007_01_16.PagingCookie.cookie
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactoryThere are two properties named "timeToLive"this problem is related to the following location:
at public javax.xml.datatype.Duration com.amazon.notifications.doc._2007_01_16.PagingCookie.getTimeToLive()
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactorythis problem is related to the following location:
at protected javax.xml.datatype.Duration com.amazon.notifications.doc._2007_01_16.PagingCookie.timeToLive
at com.amazon.notifications.doc._2007_01_16.PagingCookie
at protected com.amazon.notifications.doc._2007_01_16.PagingCookie com.amazon.notifications.doc._2007_01_16.GetMore.pagingCookie
at com.amazon.notifications.doc._2007_01_16.GetMore
at public com.amazon.notifications.doc._2007_01_16.GetMore com.amazon.notifications.doc._2007_01_16.ObjectFactory.createGetMore()
at com.amazon.notifications.doc._2007_01_16.ObjectFactory......
Allerdings habe ich ja diesen Code überhaupt nicht selbst geschrieben, sondern der sollte doch so funktionieren(da Sample zum ausprobieren). Wie gehe ich denn nun mit damit um?
PS.: Habe das oben verlinkte SDK-Zip in Eclipse importiert.
Ich habe mir mal zum testen das ganze auch runtergeladen, Projekt importiert und das gleiche Problem gehabt wie du zum Anfang. Bin in dem Falle auch echt enttäuscht von Amazon, dass die hier eine unvollständige API zum download anbieten. Auch habe ich nirgends einen wirklichen link zu den benötigten libs gefunden und als ich in der ReadMe noch etwas von keystore gelesen hatte, habe ich iwe keine Lust mehr auf das ganze gehabt :-/. Kundenfreundlich ist definietiv anderster
Nun ja, der compile mault rum, das Einträge doppelt vorhanden sind. Vllt eine Datei doppelt eingebunden oder so?:rtfm: Oder Programmierfehler in den Samples ???:L
Ich sehe gerade, das auch anscheinend iwelche Cookies evtl. doppelt gesetzt wurden :-/. Naja, das ganze wirkt auf mich, wie eine riesig große Baustelle. Spätestens ab diesem Punkt würde sich mir die Frage stellen:
Brauche ich das unbedingt? Gehts nicht anderster oder kann ich das nicht weglassen?!
vielen vielen Dank, dass Du das mal ebenfalls probiert hast!!!! Ich habe ja schon sowas von an mir gezweifelt.
Ob ich das brauche? Naja, ist meine erste Aufgabe in meinem Nebenjob vom Studium. Allerdings verstehe ich mittlerweile warum mir diese Aufgabe mit einem fetten Grinsen übertragen wurde. Von daher probiere ich mal weiter.
Habs mir jetzt nicht durchgelesen (Zeitgründe und so) aber scheint u.U. das zu sein was du gebrauchen kannst, hoffe stehen genug infos drin, die du verwerten kannst.