I am publishing Web Services using Mule. Everything works fine but I do not understand why my mule configuration file is not valid in Eclipse.
This is the error message displayed by Eclipse:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'cxf:simple-service'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":abstract-transformer, "http://www.mulesoft.org/schema/mule/core":abstract-filter, "http://www.mulesoft.org/schema/mule/core":abstract-security-filter, "http://www.mulesoft.org/schema/mule/core":abstract-intercepting-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-observer-message-processor, "http://www.mulesoft.org/schema/mule/core":processor, "http://www.mulesoft.org/schema/mule/core":custom-processor, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-redelivery-policy, "http://www.mulesoft.org/schema/mule/core":abstract-transaction, "http://www.mulesoft.org/schema/mule/core":abstract-reconnection-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-multi-transaction, "http://www.mulesoft.org/schema/mule/core":property, "http://www.mulesoft.org/schema/mule/core":properties}' is expected. mule-components.xml /my-project/src/main/resources line 35 XML Problem
This is the portion of my configuration file at line 35:
<flow name="MonFlow">
<inbound-endpoint address="servlet://monService">
<cxf:simple-service
serviceClass="mon.package.MonClassService" />
</inbound-endpoint>
<component>
<spring-object bean="myApp.monClassService" />
</component>
</flow>
Here are the schemas used in the file:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:https="http://www.mulesoft.org/schema/mule/https"
xmlns:jetty="http://www.mulesoft.org/schema/mule/jetty"
xmlns:jetty-ssl="http://www.mulesoft.org/schema/mule/jetty-ssl"
xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet"
xmlns:spring="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/file
http://www.mulesoft.org/schema/mule/file/3.2/mule-file.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
http://www.mulesoft.org/schema/mule/https
http://www.mulesoft.org/schema/mule/https/3.2/mule-https.xsd
http://www.mulesoft.org/schema/mule/jetty
http://www.mulesoft.org/schema/mule/jetty/3.2/mule-jetty.xsd
http://www.mulesoft.org/schema/mule/jetty-ssl
http://www.mulesoft.org/schema/mule/jetty-ssl/3.2/mule-jetty-ssl.xsd
http://www.mulesoft.org/schema/mule/stdio
http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd
http://www.mulesoft.org/schema/mule/vm
http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
http://www.mulesoft.org/schema/mule/xml
http://www.mulesoft.org/schema/mule/xml/3.2/mule-xml.xsd
http://www.mulesoft.org/schema/mule/cxf
http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/servlet
http://www.mulesoft.org/schema/mule/servlet/3.2/mule-servlet.xsd
">
Any ideas?
Thank you!
Tu dis "dans Eclipse", donc j'assume que tu n'es pas dans "Mule Studio".
Il te faut ajouter les schemas qui se trouvent dans chaque JAR de Mule dans le dictionnaire XML d'Eclipse: http://genschawtech.blogspot.ca/2008/09/eclipse-xml-catalog-entry-for-dtd-or.html
Tu as peut-être aussi ce probleme: http://blogs.mulesoft.org/overcoming-xml-validation-errors-in-eclipse-35/
Related
I followed the samples at OrientDBs manual to extract data from a xml collection (2nd sample) and load it into a OrientDB graph database: it worked.
But now i stuck and don't know, how to describe the oetl-configuration (json-File), if I change the samples source data that it looks like (and meets my requirements) - nest a <ADD>-Section:
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<ADD>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</ADD>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<ADD>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</ADD>
</CD>
</CATALOG>
Does anybody know, how to write the configuration. The following doesn't work, and the ADD field in my graph database is an empty string:
...
"extractor" :
{ "xml":
{
"rootNode": "CATALOG.CD",
"tagsAsAttribute": ["CATALOG.CD"]
}
},
...
Thanks for your help!
Best
I'm using Magento2,when i login on my website i got this message.
There has been an error processing your request Specified invalid
parent id (Magento_Backend::mgs) Error log record number:
1307308720759
This website was working fine but last day i run a query and recompile and then this issue start coming up....
Below Error Log Detail
{"0":"Specified invalid parent id (Magento_Backend::mgs)","1":"#0
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(58):
Magento\Backend\Model\Menu\Builder->getResult(Object(Magento\Backend\Model\Menu))\n#1
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Backend\Model\Menu\Builder\Interceptor->___callParent('getResult',
Array)\n#2
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Model\Menu\Builder\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Backend\Model\Menu))\n#3
/home/gervetus/public_html/generated/code/Magento/Backend/Model/Menu/Builder/Interceptor.php(26):
Magento\Backend\Model\Menu\Builder\Interceptor->___callPlugins('getResult',
Array, Array)\n#4
/home/gervetus/public_html/vendor/magento/module-backend/Model/Menu/Config.php(148):
Magento\Backend\Model\Menu\Builder\Interceptor->getResult(Object(Magento\Backend\Model\Menu))\n#5
/home/gervetus/public_html/vendor/magento/module-backend/Model/Menu/Config.php(111):
Magento\Backend\Model\Menu\Config->_initMenu()\n#6
/home/gervetus/public_html/vendor/magento/module-backend/Model/Url.php(361):
Magento\Backend\Model\Menu\Config->getMenu()\n#7
/home/gervetus/public_html/vendor/magento/module-backend/Model/Url.php(321):
Magento\Backend\Model\Url->_getMenu()\n#8
/home/gervetus/public_html/generated/code/Magento/Backend/Model/Url/Interceptor.php(102):
Magento\Backend\Model\Url->getStartupPageUrl()\n#9
/home/gervetus/public_html/vendor/magento/module-backend/App/AbstractAction.php(276):
Magento\Backend\Model\Url\Interceptor->getStartupPageUrl()\n#10
/home/gervetus/public_html/vendor/magento/module-backend/App/AbstractAction.php(208):
Magento\Backend\App\AbstractAction->_processUrlKeys()\n#11
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(58):
Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))\n#12
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callParent('dispatch',
Array)\n#13
/home/gervetus/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143):
Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#14
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor),
Object(Closure), Object(Magento\Framework\App\Request\Http))\n#15
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#16
/home/gervetus/public_html/generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php(26):
Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch',
Array, NULL)\n#17
/home/gervetus/public_html/vendor/magento/framework/App/FrontController.php(55):
Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#18
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(58):
Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))\n#19
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch',
Array)\n#20
/home/gervetus/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#21
/home/gervetus/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26):
Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch',
Array, Array)\n#22
/home/gervetus/public_html/vendor/magento/framework/App/Http.php(135):
Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#23
/home/gervetus/public_html/vendor/magento/framework/App/Bootstrap.php(256):
Magento\Framework\App\Http->launch()\n#24
/home/gervetus/public_html/index.php(40):
Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))\n#25
{main}","url":"/admin/admin/index/index/key/6570ae1e6f609b1c1c0433e9e2307b5d7250e1e160091871b57a4326817cae2e/","script_name":"/index.php"}
Just modify the menu file located under /vendor/magento/module-cms/etc/adminthml/menu.xml
<add id="Magento_Backend::mgs" title="Blocks" translate="title" module="Magento_Cms" sortOrder="30" parent="Magento_Backend::mgs" action="cms/block" resource="Magento_Cms::block"/>
Here's how it'll look
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
<add id="Magento_Cms::cms_page" title="Pages" translate="title" module="Magento_Cms" sortOrder="0" parent="Magento_Backend::content_elements" action="cms/page" resource="Magento_Cms::page"/>
<add id="Magento_Cms::cms_block" title="Blocks" translate="title" module="Magento_Cms" sortOrder="30" parent="Magento_Backend::content_elements" action="cms/block" resource="Magento_Cms::block"/>
<add id="Magento_Backend::mgs" title="Blocks" translate="title" module="Magento_Cms" sortOrder="30" parent="Magento_Backend::mgs" action="cms/block" resource="Magento_Cms::block"/>
</menu>
</config>
As per error there is no any parent id name with mgs so it will throw error.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
<add id="Magento_Cms::cms_page" title="Pages" module="Magento_Cms" sortOrder="0" parent="Magento_Backend::content_elements" action="cms/page" resource="Magento_Cms::page"/>
<add id="Magento_Cms::cms_block" title="Blocks" module="Magento_Cms" sortOrder="30" parent="Magento_Backend::content_elements" action="cms/block" resource="Magento_Cms::block"/>
</menu>
In the code above parent="Magento_Backend::content_elements" will display in content menu so give valid id to your menu then it will work.
For reference see this link
I am using a Mongo DB connector to insert data into Mongo Instance located in mLab.
I am sure I am using the correct credentials since these credentials are working when I am using them through a Java code.
But here using the Mongo DB connector constantly throws me an error as can be seen below.
org.mule.api.ConnectionException: Couldn't connect with the given
credentials org.mule.api.ConnectionException: Couldn't connect with
the given credentials at
org.mule.module.mongo.MongoCloudConnector.getDatabase(MongoCloudConnector.java:1304)
at
org.mule.module.mongo.MongoCloudConnector.connect(MongoCloudConnector.java:1173)
at
org.mule.module.mongo.connectivity.MongoCloudConnectorConnectionFactory.makeObject(MongoCloudConnectorConnectionFactory.java:56)
at
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at
org.mule.module.mongo.connectivity.MongoCloudConnectorConnectionManager.acquireConnection(MongoCloudConnectorConnectionManager.java:361)
at
org.mule.module.mongo.connectivity.MongoCloudConnectorConnectionManager.test(MongoCloudConnectorConnectionManager.java:444)
at
org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:88)
at
org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:113)
at
Is there something that I am missing here?
Below is the XML :
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="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
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" host="developers.zomato.com" port="80" doc:name="HTTP Request Configuration"/>
<http:request-config name="HTTP_Request_Configuration1" host="api.mlab.com" port="80" doc:name="HTTP Request Configuration"/>
<mongo:config name="Mongo_DB" password="XXXXX" database="restaurant_data" host="ds241039.mlab.com" port="41039" doc:name="Mongo DB" username="XxXx"/>
<flow name="rest-webservice-applicationFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/rest" allowedMethods="GET" doc:name="HTTP"/>
<http:request config-ref="HTTP_Request_Configuration" path="api/v2.1/search" method="GET" doc:name="HTTP">
<http:request-builder>
<http:query-param paramName="entity_id" value="1"/>
<http:query-param paramName="entity_type" value="city"/>
<http:header headerName="user-key" value="XXXXXXXXX"/>
</http:request-builder>
</http:request>
<dw:transform-message doc:name="Transform Message" metadata:id="13f7b603-ac1e-45b4-9950-32c39a20ee36">
<dw:input-payload mimeType="application/json"/>
<dw:set-payload><![CDATA[%dw 1.0
%output application/json
---
{
results_found: payload.results_found,
results_start: payload.results_start,
results_shown: payload.results_shown,
restaurants: payload.restaurants map ((restaurant , indexOfRestaurant) -> {
restaurant: {
R: restaurant.restaurant.R,
id: restaurant.restaurant.id,
name: restaurant.restaurant.name,
url: restaurant.restaurant.url,
location: restaurant.restaurant.location,
switch_to_order_menu: restaurant.restaurant.switch_to_order_menu,
cuisines: restaurant.restaurant.cuisines,
average_cost_for_two: restaurant.restaurant.average_cost_for_two,
price_range: restaurant.restaurant.price_range,
currency: restaurant.restaurant.currency,
offers: restaurant.restaurant.offers map ((offer , indexOfOffer) -> offer),
thumb: restaurant.restaurant.thumb,
user_rating: restaurant.restaurant.user_rating,
photos_url: restaurant.restaurant.photos_url,
menu_url: restaurant.restaurant.menu_url,
featured_image: restaurant.restaurant.featured_image,
has_online_delivery: restaurant.restaurant.has_online_delivery,
is_delivering_now: restaurant.restaurant.is_delivering_now,
deeplink: restaurant.restaurant.deeplink,
has_table_booking: restaurant.restaurant.has_table_booking,
events_url: restaurant.restaurant.events_url
}
})
}]]></dw:set-payload>
</dw:transform-message>
<mongo:json-to-dbobject doc:name="Mongo DB"/>
<mongo:insert-object config-ref="Mongo_DB" doc:name="Mongo DB" collection="restaurant"/>
</flow>
</mule>
The MongoDB connector uses the deprecated MONGODB-CR authentication mechanism, MLab is expecting the SCRAM-SHA-1 mechanism.
The SCRAM-SHA-1 mechanism is available in the enterprise version of Mulesoft ESB.
The connection URI configuration is available on version 4.2.0 and above. This is how you configure it:
Add the connector to pom.xml:
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-mongo-connector</artifactId>
<version>4.2.0</version>
</dependency>
Configure a connection in your flow:
<mongo:config-connection-string name="MongoDB_Config"
connectionString="mongodb://jdoe:myPass#localhost:27017?authMechanism=SCRAM-SHA-1"/>
I'm using Websphere, JSF 1.2, JPA (Eclipselink)
On my project I have the following structure:
-APHP0000_EJB
.APHP0000FacadeEJB.java
.Controllers (Managers)
.persistence.xml
-APHP0000_EJBClient
.APHP0000FacadeEJBLocal.java
.APHP0000FacadeEJBRemote.java
.Entyties
.TO
-APHP0000_EJBEAR
-APHP0000_Web (depends on APHP0000_EJBClient )
.jsp
.ManageBeans
-APHP0000_WebEAR
-->persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="APHP0000_EJB" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:comp/env/ds_aphp_web</jta-data-source>
<jar-file>APHP0000_EJBClient.jar</jar-file>
<class>su.aphpweb.jpa.entities.UnidadeProdutiva</class>
<class>su.aphpweb.jpa.entities.TipoParadaN4</class>
...
<class>su.aphpweb.jpa.entities.MaquinaProdutiva</class>
<properties>
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.target-server" value="org.eclipse.persistence.platform.server.was.WebSphere_7_Platform" />
<property name="javax.persistence.jtaDataSource" value="jdbc/ds_aphp_web" />
<property name="eclipselink.cache.shared.default" value="false" />
<property name="eclipselink.logging.parameters" value="true" />
</properties>
</persistence-unit>
</persistence>
When I Start my container, my APHP0000_EJBEAR is deployed, but my APHP0000_WebEAR is not. and get the following exception. Please, I'm stuck on this thing since last week.
[19/12/12 13:33:49:898 BRST] 00000006 JPAPUnitInfo E CWWJP0015E: Ocorreu um erro no provedor de persistência org.eclipse.persistence.jpa.PersistenceProvider quando ele tentou criar factory de gerenciador de entidade do contêiner para a unidade de persistência APHP0000_EJB. Ocorreu o seguinte erro: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [APHP0000_EJB] failed.
Internal Exception: java.lang.RuntimeException: java.io.FileNotFoundException: D:\Equipe\APHP\APHP0000_EJB\ejbModule\APHP0000_EJBClient.jar (O sistema não pode encontrar o arquivo especificado.)
[19/12/12 13:33:49:898 BRST] 00000006 JPAPUnitInfo E CWWJP0009E: O servidor não pode criar um depósito de informações EntityManagerFactory para a unidade persistente APHP0000_EJB do provedor org.eclipse.persistence.jpa.PersistenceProvider no módulo file:/D:/Equipe/APHP/APHP0000_EJB/ejbModule/.
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I WSVR0037I: Iniciando o jar do EJB: APHP0000_EJB.jar
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I CNTR0167I: O servidor está ligando a interface su.aphpweb.jpa.entities.controller.ResponsParadaUnidManagerRemote do enterprise bean ResponsParadaUnidManager no módulo APHP0000_EJB.jar do aplicativo APHP0000_WebEAR. O local de ligação é: ejb/APHP0000_WebEAR/APHP0000_EJB.jar/ResponsParadaUnidManager#su.aphpweb.jpa.entities.controller.ResponsParadaUnidManagerRemote
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I CNTR0167I: O servidor está ligando a interface su.aphpweb.jpa.entities.controller.UnidadeMotivoTipoManagerRemote do enterprise bean UnidadeMotivoTipoManager no módulo APHP0000_EJB.jar do aplicativo APHP0000_WebEAR. O local de ligação é: ejb/APHP0000_WebEAR/APHP0000_EJB.jar/UnidadeMotivoTipoManager#su.aphpweb.jpa.entities.controller.UnidadeMotivoTipoManagerRemote
[19/12/12 13:33:49:914 BRST] 00000006 ComponentData E CWMDF0015E: O carregador de classes não pode carregar a interface su.aphpweb.negocio.ejb.APHP0000FacadeEJBRemote no arquivo su.aphpweb.negocio.ejb.APHP0000FacadeEJB Enterprise JavaBeans (EJB).
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI E WSVR0040E: Falha no addEjbModule para APHP0000_EJB.jar [class com.ibm.ws.runtime.component.DeployedEJBModuleImpl]
com.ibm.ejs.container.EJBConfigurationException: CWMDF0015E: O carregador de classes não pode carregar a interface su.aphpweb.negocio.ejb.APHP0000FacadeEJBRemote no arquivo su.aphpweb.negocio.ejb.APHP0000FacadeEJB Enterprise JavaBeans (EJB).
at com.ibm.ws.metadata.ComponentDataObject.setInterfacesFromImplements(ComponentDataObject.java:783)
at com.ibm.ws.metadata.ComponentDataObject.finishCDO(ComponentDataObject.java:424)
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2609)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3827)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1120)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:619)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:723)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1264)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4476)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4654)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1269)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2041)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:651)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:613)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1086)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:967)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1284)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1180)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1086)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:967)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:282)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
at com.ibm.rmi.iiop.ORB.process(ORB.java:513)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1574)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2841)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2714)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
The error seems to indicate that it can't find the jar file, APHP0000_EJBClient.jar. Is the jar in the ear? It needs to be.
You could try removing the tag, and just list the entity classes (as long as there are on the classpath they will be found).
For EJB Exception :CWMDF0015E
It is necessary to click in the paramètrage of publication for WebSphere Application Server of Eclipse IDE "to execute the server and the resources on the server"
and run a server
I have an EAR application which contains an MDB and a WAR.
In this EAR application I would send a message into an another Queue from other EAR application. Say jms/anotherQueue
If the message sending happens in web context, it works.
I have such setup in web.xml
<message-destination-ref>
<message-destination-ref-name>jms/anotherQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>jms/anotherQueue</message-destination-link>
</message-destination-ref>
But if the message sending occurs in EJB (MDB here) context, I will get a JNDI name lookup failure.
javax.naming.NameNotFoundException: anotherQueue
my ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
<message-driven>
<ejb-name>jms/myMDB</ejb-name>
<ejb-class>com.my.MDBImplement</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>jms/myQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-ref>
<res-ref-name>jms/myCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>jms/myMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
the openejb.jar is
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ejb:openejb-jar
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<dep:environment>
<dep:moduleId>
<dep:groupId>myGroup</dep:groupId>
<dep:artifactId>imyMDB</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>ejb</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>org.apache.geronimo.configs</dep:groupId>
<dep:artifactId>activemq-broker</dep:artifactId>
<dep:type>car</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<ejb:enterprise-beans>
<ejb:message-driven>
<ejb:ejb-name>jms/myMDB</ejb:ejb-name>
<ejb:resource-adapter>
<ejb:resource-link>myJmsResource</ejb:resource-link>
</ejb:resource-adapter>
</ejb:message-driven>
</ejb:enterprise-beans>
</ejb:openejb-jar>
I define myJmsResource in geronimo-application.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<app:application
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<dep:environment>
<dep:moduleId>
<dep:groupId>myGroup</dep:groupId>
<dep:artifactId>myEAR</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>ear</dep:type>
</dep:moduleId>
</dep:environment>
<app:module>
<app:connector>geronimo-activemq-ra-2.1.4.rar</app:connector>
<conn:connector>
<dep:environment>
<dep:moduleId>
<dep:groupId>myGroup</dep:groupId>
<dep:artifactId>myJmsResource</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>rar</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>org.apache.geronimo.configs</dep:groupId>
<dep:artifactId>activemq-broker</dep:artifactId>
<dep:type>car</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<conn:resourceadapter>
<conn:resourceadapter-instance>
<conn:resourceadapter-name>myJmsResource</conn:resourceadapter-name>
<nam:workmanager>
<nam:gbean-link>DefaultWorkManager</nam:gbean-link>
</nam:workmanager>
</conn:resourceadapter-instance>
<conn:outbound-resourceadapter>
<conn:connection-definition>
<conn:connectionfactory-interface>javax.jms.ConnectionFactory</conn:connectionfactory-interface>
<conn:connectiondefinition-instance>
<conn:name>jms/myCF</conn:name>
<conn:implemented-interface>javax.jms.QueueConnectionFactory</conn:implemented-interface>
<conn:implemented-interface>javax.jms.TopicConnectionFactory</conn:implemented-interface>
<conn:connectionmanager>
<conn:xa-transaction>
<conn:transaction-caching />
</conn:xa-transaction>
<conn:single-pool>
<conn:match-all />
</conn:single-pool>
</conn:connectionmanager>
</conn:connectiondefinition-instance>
</conn:connection-definition>
</conn:outbound-resourceadapter>
</conn:resourceadapter>
<conn:adminobject>
<conn:adminobject-interface>javax.jms.Queue</conn:adminobject-interface>
<conn:adminobject-class>org.apache.activemq.command.ActiveMQQueue</conn:adminobject-class>
<conn:adminobject-instance>
<conn:message-destination-name>jms/myQueue</conn:message-destination-name>
<conn:config-property-setting name="PhysicalName">jms/myQueue</conn:config-property-setting>
</conn:adminobject-instance>
<!-- ******************************************************************** -->
<!-- define referred message destination ??? -->
<conn:adminobject-instance>
<conn:message-destination-name>jms/anotherQueue</conn:message-destination-name>
<conn:config-property-setting name="PhysicalName">jms/anotherQueue</conn:config-property-setting>
</conn:adminobject-instance>
</conn:adminobject>
<conn:adminobject>
<conn:adminobject-interface>javax.jms.Topic</conn:adminobject-interface>
<conn:adminobject-class>org.apache.activemq.command.ActiveMQTopic</conn:adminobject-class>
</conn:adminobject>
</conn:connector>
</app:module>
</app:application>
It seems that myMDB cannot understand what jms/anotherQueue is!!!
How can I fix it?
OK, I found a quick fix....
in ejb-jar.xml
<enterprise-beans>
<message-driven>
<ejb-name>jms/myMDB</ejb-name>
.....
<!-- referred queue -->
<resource-env-ref>
<resource-env-ref-name>jms/anotherQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
I must admit, I still don't understand how to write a correct deployment plan.
I just goggle, copy, paste.....and mix up those deployment plans.