2014-06-12 25 views
1

我有骡子流量,尝试部署它,它说:“对于配置应用程序未找到”骡配置的应用程序没有找到

我已经在src /主/应用程序创建一个虚拟的骡子-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 [[email protected] 
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 [[email protected]] 
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

这是什么'namehistory.xml'文件,使部署失败? –

+0

它在应用程序中有另一个xml文件。 – bekur

回答

0

我的流程名称与项目名称不同。即项目名称是webservices,但流名称是rest-webservices.xml。在mule-deploy.properties中,我被称为webservices.xml。我将其更改为config.resources = rest-webservices.xml。

还有一点我观察到,如果你有很多xml文件,在mule-deploy.properties中排序也很重要。即config.resources = test1.xml,test2.xml,test3.xml,它不应该像test2.xml,test3.xml,test1.xml

将mule-config.xml文件保存在app目录中。

+0

你确定吗?我没有看到你从你发布的代码中的任何地方调用config.resources。另外,你如何加载属性文件?您应该使用上下文:属性占位符标记ID顺序使这些属性可供应用程序使用。 –

2

我有同样的问题。 当你建立你的拉链,你应该压缩文件,而不是一个目录... 丹

+4

欢迎来到SO。你是否与OP有同样的问题?你可以详细说明如何压缩一个目录会导致同样的问题(相同的错误)吗? –

+0

我们如何在部署后制作自动.zip文件。 –

+2

这个答案根本没有帮助,它必须被删除,因为它没有告诉任何关于如何解决问题的方法,它被谷歌引用作为第一个答案,但不应该在这里明确表决。 – HDJEMAI

0

在你的Mule配置文件中(src /主/应用程序/应用程序,配置-file.xml),您可以指定属性你想加载的文件。

<context:property-placeholder location="${environment.name}.properties" /> 

这是属性位置的描述:

属性:位置

属性文件的位置,以解决对, 占位符作为一个Spring资源位置:一URL,“classpath:”伪URL或 相对文件路径。可以指定多个位置,用逗号分隔 。如果既没有指定位置,也没有指定属性-ref,则会针对系统属性解析占位符 。

$ {environment.name}必须是系统环境变量。您需要确保您部署应用程序的系统包含该变量。我想你也可以在Maven构建中指定它,如果你使用的是Maven(clean install -Denvironment.name = test)。你可以试试。

要在本地进行测试,请右键单击您的项目,选择运行方式,选择运行配置,单击环境选项卡,添加变量“environment.name”和值“local”(不带引号),并确保您的local.properties文件存在于添加到构建路径的位置。例如,它可以是src/main/app或资源文件夹。

0

我也有同样的问题。 我相信,我的解决方案更简单。 不是以某种方式导出项目,然后尝试通过浏览器上传压缩文件来部署它,我通过Anypoint工作室本身部署了它。

  1. 右键单击该项目
  2. Anypoint平台
  3. 部署到使用您的凭据云
  4. 登录(如果已经没有签署)
  5. 选择适当的应用程序和运行时环境,然后打部署。
相关问题