0
讓我通過說我不是Java開發人員,而是一個需要爲項目利用一小部分Java代碼的Python開發人員。使用下面的代碼Java錯誤:java.lang.ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: CustomSecurePropertyPlaceholderModule
::-)
話雖這麼說,我收到以下錯誤
<?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>
我保證src/main/java
距離的構建路徑運行配置文件(文件CustomSecurePropertyPlaceholderModule
駐留在那裏)。我也看到shared_resources/target/classes
也被設置爲運行配置中的輸出文件夾。任何想法,爲什麼我仍然收到這個錯誤?
感謝@alamar的幫助!我只是創建了新的包,將類移到了包中,更新了類中的引用以及spring bean。仍然收到相同的錯誤。任何其他想法? –
@PaulCalabro你能否提供整個堆棧跟蹤(越多越好)?那裏可能有不平凡的信息。 – alamar
當然可以!這裏有一個包含以下信息的要點:https://gist.github.com/paulcalabro/b8c6a46041b8b555879f52d1583daf58 (發佈時間太長) –