我有骡子流,试图部署它,它说"未找到应用程序的配置"
我在src / main / app下创建了一个虚拟mule-config.xml,如下所示。我的流程是:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" version="EE-3.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="webservicesFlow1" doc:name="webservicesFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="slmule2.corp.local" port="8088" path="rest" doc:name="HTTP"/>
<jersey:resources doc:name="REST">
<component class="com.rest.sample.RestComponent"/>
</jersey:resources>
</flow>
</mule>
mule-deploy.properties
redeployment.enabled=true
encoding=UTF-8
domain=default
config.resources=webservices.xml
骡-config.xml中
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd">
<!-- empty config to avoid the hot deployment classloader choking on a missing config file -->
</mule>
ERROR 2014-06-12 12:58:06,575 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.MuleDeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Failed to deploy app + +
'webservices-1.0.0-SNAPSHOT-v20140612-12+57', + + see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.InstallException: Config for app 'historydata-1.0.0-SNAPSHOT-
v20140612-12+57' not found: /apps/mulesoft/mule-enterprise-standalone-3.4.2/apps
/webservices-1.0.0-SNAPSHOT-v20140612-12+57/webservices.xml at
org.mule.module.launcher.application.DefaultMuleApplication.install(DefaultMuleApplication.j
ava:107) at
org.mule.module.launcher.application.ApplicationWrapper.install(ApplicationWrapper.java:79)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:42) at
org.mule.module.launcher.MuleDeploymentService.guardedDeploy(MuleDeploymentService.java:454)
at
org.mule.module.launcher.MuleDeploymentService.deployApplication(MuleDeploymentService.java:
191) at
org.mule.module.launcher.MuleDeploymentService.deployExplodedApp(MuleDeploymentService.java:
708) at
org.mule.module.launcher.MuleDeploymentService.deployExplodedApps(MuleDeploymentService.java
:661) at
org.mule.module.launcher.MuleDeploymentService.access$400(MuleDeploymentService.java:57) at
org.mule.module.launcher.MuleDeploymentService$AppDirWatcher.run(MuleDeploymentService.java:
808) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThr
eadPoolExecutor.java:178) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPool
Executor.java:293) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at
java.lang.Thread.run(Thread.java:744) INFO 2014-06-12 12:58:07,859 [2132436410@qtp-
1158879031-6] org.mule.module.launcher.MuleDeploymentService: ================== Request to
Undeploy Application: ambrosehistorydata-1.0.0-SNAPSHOT-v20140612-12+57 INFO 2014-06-12
12:58:07,860 [2132436410@qtp-1158879031-6]
org.mule.module.launcher.application.DefaultMuleApplication: App 'webservices-1.0.0-
SNAPSHOT-v20140612-12+57' never started, nothing to dispose of INFO 2014-0
我正在使用mule studio 3.5.0和mule-ee 3.4。
答案 0 :(得分:3)
我遇到了同样的问题。 当你构建你的zip时,你应该压缩文件,而不是目录...... 丹
答案 1 :(得分:0)
在您的Mule配置文件(src / main / app / app-config-file.xml)中,您可以指定要加载的属性文件。
<context:property-placeholder location="${environment.name}.properties" />
这是属性位置的描述:
属性:位置
用于解析占位符的属性文件的位置, 作为Spring资源位置:一个URL,一个&#34;类路径:&#34;伪URL,或 相对文件路径。可以指定多个位置,分开 用逗号。如果既未指定location也未指定properties-ref, 占位符将根据系统属性进行解析。
$ {environment.name}必须是系统环境变量。您需要确保部署应用程序的系统包含该变量。我认为你也可以在Maven构建中指定它,如果你使用的是Maven(clean install -Denvironment.name = test)。你可以试试。
要在本地测试,请右键单击您的项目,选择run as,选择运行配置,单击Environment选项卡,添加您的变量&#34; environment.name&#34;和价值&#34;本地&#34; (不带引号)并确保local.properties文件存在于添加到构建路径的位置。例如,它可以是src / main / app,也可以是资源文件夹。
答案 2 :(得分:0)
我也有同样的问题。 我相信,我的解决方案更简单。 我不是以某种方式导出项目,而是尝试通过浏览器上传压缩文件来部署它,而是通过Anypoint studio本身部署它。
答案 3 :(得分:0)
有时javaw.exe似乎没有放弃一个正在运行的项目,并且似乎锁定了对配置文件的访问。杀死javaw.exe并重新运行该项目,即可对其进行修复。