Lassen Sie mich vorweg sagen, dass ich kein Java-Entwickler bin, sondern eher ein Python-Entwickler, der einen kleinen Teil des Java-Codes für ein Projekt nutzen muss. :-)Java-Fehler: java.lang.ClassNotFoundException:
aber sagen, dass ich folgende Fehlermeldung ich empfangen:
Caused by: java.lang.ClassNotFoundException: CustomSecurePropertyPlaceholderModule
mit dem folgenden Code:
<?xml version="1.0" encoding="UTF-8"?>
<domain:mule-domain xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:domain="http://www.mulesoft.org/schema/mule/ee/domain"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tls="http://www.mulesoft.org/schema/mule/tls"
xmlns:ss="http://www.springframework.org/schema/security"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:secure-property-placeholder="http://www.mulesoft.org/schema/mule/secure-property-placeholder"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/ee/domain http://www.mulesoft.org/schema/mule/ee/domain/current/mule-domain-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/current/mule-tls.xsd
http://www.mulesoft.org/schema/mule/secure-property-placeholder http://www.mulesoft.org/schema/mule/secure-property-placeholder/current/mule-secure-property-placeholder.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<spring:beans>
<spring:bean id="secure-property-placeholder" class="CustomSecurePropertyPlaceholderModule">
<spring:property name="encryptionAlgorithm" value="AES" />
<spring:property name="encryptionMode" value="CBC" />
<spring:property name="keyFilePath" value="keyfile.properties" />
<spring:property name="locations" value="secure.properties"/>
<spring:property name="ignoreResourceNotFound" value="true" />
<spring:property name="ignoreUnresolvablePlaceholders" value="true" />
</spring:bean>
</spring:beans>
</domain:mule-domain>
I src/main/java
sichergestellt haben, ist auf dem Build-Pfad innerhalb der run config (die Datei CustomSecurePropertyPlaceholderModule
befindet sich dort). Ich sehe auch, dass shared_resources/target/classes
als der Ausgabeordner in der Run-Konfiguration als auch festgelegt ist. Irgendwelche Ideen, warum ich diesen Fehler immer noch erhalte?
Dank @alamar für die Unterstützung! Ich habe gerade das neue Paket erstellt, die Klasse in das Paket verschoben, den Verweis innerhalb der Klasse aktualisiert, sowie die Spring Bean. Immer noch den gleichen Fehler erhalten. Irgendwelche anderen Ideen? –
@PaulCalabro können Sie bitte die gesamte Stack-Trace (mehr, desto besser) liefern? Dort könnte es nicht-triviale Informationen geben. – alamar
Sicher Sache! Hier ist ein Kern, der die Informationen enthält: https://gist.github.com/paulcalabro/b8c6a46041b8b555879f52d1583daf58 (es war zu lange zum Posten) –