"The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar." error while WAS 8.5 server startup - eclipse

we are migrating our project from Websphere 6.1 to 8.5 and java from 1.5 to 1.7. While starting the server, we are getting this error. Not sure of the reason, could someone help me. Its been 2 days now :( We are using DB2.
[3/3/16 12:45:26:555 IST] 00000049 SharedEJBRunt I WSVR0057I: EJB jar started: BDSService.jar
[3/3/16 12:45:26:609 IST] 00000049 SharedEJBRunt I WSVR0037I: Starting EJB jar: batchejb.jar
[3/3/16 12:45:26:614 IST] 00000049 WASNameSpaceB I CNTR0167I: The server is binding the com.s1.arch.batch.core.BatchThreadProcessorServiceHome interface of the BatchService enterprise bean in the batchejb.jar module of the epj2ee application. The binding location is: ejb/com/s1/arch/batch/BatchService
[3/3/16 12:45:26:617 IST] 00000049 AbstractEJBRu I CNTR0167I: The server is binding the com.s1.arch.batch.core.BatchThreadProcessorServiceHome interface of the BatchService enterprise bean in the batchejb.jar module of the epj2ee application. The binding location is: java:global/epj2ee/batchejb/BatchService!com.s1.arch.batch.core.BatchThreadProcessorServiceHome
[3/3/16 12:45:26:621 IST] 00000049 SharedEJBRunt I WSVR0057I: EJB jar started: batchejb.jar
[3/3/16 12:45:26:672 IST] 00000049 SharedEJBRunt I WSVR0037I: Starting EJB jar: coreejb.jar
[3/3/16 12:45:26:686 IST] 00000049 PMModuleCooki E PMGR1010E: The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar.
[3/3/16 12:45:26:686 IST] 00000049 PMModuleCooki E PMGR0000E: Call stack:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR1010E: The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar.
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.createPMException(ConcreteBeanClassExtensionImpl.java:340)
at com.ibm.ws.ejbpersistence.beanextensions.PMModuleCookieImpl.getBindingName(PMModuleCookieImpl.java:460)
at com.ibm.ws.ejbpersistence.beanextensions.PMModuleCookieImpl.beanInstall(PMModuleCookieImpl.java:365)
at com.ibm.ws.ejbpersistence.beanextensions.PersistenceManagerImpl.beanInstall(PersistenceManagerImpl.java:66)
at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.addHome(WASEJBRuntimeImpl.java:1686)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:639)
at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule(SharedEJBRuntimeImpl.java:336)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3576)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
[3/3/16 12:45:26:688 IST] 00000049 AbstractEJBRu E CNTR0035E: EJB container caught javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR1010E: The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar.
at com.ibm.ws.ejbpersistence.beanextensions.PMModuleCookieImpl.getBindingName(PMModuleCookieImpl.java:460)
at com.ibm.ws.ejbpersistence.beanextensions.PMModuleCookieImpl.beanInstall(PMModuleCookieImpl.java:365)
at com.ibm.ws.ejbpersistence.beanextensions.PersistenceManagerImpl.beanInstall(PersistenceManagerImpl.java:66)
at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.addHome(WASEJBRuntimeImpl.java:1686)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:639)
at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule(SharedEJBRuntimeImpl.java:336)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3576)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR1010E: The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar.
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.createPMException(ConcreteBeanClassExtensionImpl.java:340)
... 20 more
and is throwing com.ibm.ejs.container.ContainerException: ; nested exception is:
javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR1010E: The current backend id,DB2UDBNT_V91_1, does not have equivalent deployed code in the jar..

Looks like you are using CMP EJB. During deployment you have to select backend_ID for generated EJB code. You are currently selecting DB2UDBNT_V91_1, but looks like you dont have code generated for that.
You either have to select correct backendID, or check Deploy EJB option during installation.
First check if in your EJB module, you have that backendID folder. I don't remember in which exact subfolder it should be, but you should have backends subfolder with generated files (CMPs are dead technology, I didn't use it for some time).
You may have folder with different backend name or no folder. You may need to generate mapping for CMPs and generate code once again, if your database is changing. You should be able to recreate mapping and generate code from Rational Application Developer tool.

Related

jbossfuse: Cannot find the declaration of element 'blueprint'

While Deploying a War application into fuse container, Im getting the Exception: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'
My blueprint schema is:
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
Exception detail:
org.ops4j.pax.web.pax-web-extender-war - 4.3.0 | Error deploying web application
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ServletContext resource [/WEB-INF/camel-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:397)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:542)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$3.call(HttpServiceContext.java:354)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$3.call(HttpServiceContext.java:350)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.callContextInitialized(HttpServiceContext.java:349)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)[93:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)[94:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:601)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)[93:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:260)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)[96:org.eclipse.jetty.util:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:279)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:1096)[116:org.ops4j.pax.web.pax-web-runtime:4.3.0]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:417)[116:org.ops4j.pax.web.pax-web-runtime:4.3.0]
at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:380)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:692)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:237)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:182)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:135)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[karaf.jar:2.4.0.redhat-630187]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:101)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:219)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:179)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:59)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:281)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2143)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:788)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)[:2.11.0.SP4-redhat-1]
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
... 49 more
Can anyone give a clue in this scenario?
In JBoss FUSE the war isn't a preferred way, you should use bundle instead, and use blueprint to configure the route. Please take a look at the camel quickstarts in JBoss FUSE kit.

Exposing SOAP service using apache Camel and WSDL

I have a WSDL file located under src\main\resources\wsdl\ folder and it is having multiple operations defined within it. My application is running on Weblogic 12C server. I'm trying to expose the SOAP web-service using Apache Cammel (version: 2.18.3) with Java DSL -
I have written below code under configuration method of my RouteBuilder class -
CxfComponent cxfComponent = new CxfComponent(getContext());
CxfEndpoint serviceEndpoint = new CxfEndpoint("/soap/Manage_Order", cxfComponent);
serviceEndpoint.setAddress("http://<IP>:<PORT>/myproject/soap/ManageOrder_Details");
serviceEndpoint.setServiceClass(
"Fully qualified service interface name generated from WSDL file using maven with #WebService annotation");
serviceEndpoint.setEndpointName(<end point name defined in the service class with #WebEndpoint annotation>);
serviceEndpoint.setDataFormat(DataFormat.MESSAGE);
serviceEndpoint.setDefaultOperationName("manageOrder");
getContext().addEndpoint("myServiceEndPoint1", serviceEndpoint);
from("cxf:myServiceEndPoint1").log("Hi, I am here").end();
While I'm deploying the application, it is throwing below exception -
weblogic.application.ModuleException: java.lang.IllegalArgumentException: serviceClass must be specified
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: serviceClass must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:311)
at org.apache.camel.component.cxf.CxfEndpoint.createServerFactoryBean(CxfEndpoint.java:663)
at org.apache.camel.component.cxf.CxfConsumer.createServer(CxfConsumer.java:70)
at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:66)
at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:252)
Truncated. see log file for complete stacktrace
pom.xml
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-soap</artifactId>
<version>2.18.3</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.18.3</version>
<!-- use the same version as your Camel core version -->
</dependency>
As the error says, you have not mentioned the service class and endpoint names.serviceEndpoint.setServiceClass("Fully qualified service interface name generated from WSDL file using maven with #WebService annotation");
serviceEndpoint.setEndpointName(<end point name defined in the service class with #WebEndpoint annotation>);
Step 1: Generate the service from your wsdl using wsdl2java command or your choice of IDE.
Step 2: Have that in your code classpath
Step 3: Mention the class name and endpoint names in the above piece of code

Error invoking a remote EJB method from a JSF managed bean in a portlet

I am trying to deploy a JSF portlet into a Liferay portal 6.2 running on top of a JBoss EAP 6.4, with OpenJDK 8. The portlet is deployed as a WAR file, but invokes some methods of an EJB through a remote interface. The EJB is deployed as an EAR file directly on JBoss.
On my developing machine it is working fine. But in a test machine it is not. There are exactly the same WAR and EAR files, the standalone.xml setup is almost the same for both machines, and also the JBoss modules are the same.
The stacktrace printed in the log is the following:
JBWEB000236: Servlet.service() for servlet Adminis Servlet threw exception: javax.portlet.faces.BridgeException: javax.faces.FacesException
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:91) [liferay-faces-bridge-impl-3.2.4-ga5.jar:3.2.4-ga5 (Ephesus / Feb 15, 2014 AD)]
at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112) [liferay-faces-bridge-impl-3.2.4-ga5.jar:3.2.4-ga5 (Ephesus / Feb 15, 2014 AD)]
...
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
Caused by: javax.faces.FacesException
at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:139) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:113) [icefaces-3.3.0.jar:]
... 194 more
Caused by: java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1439) [rt.jar:1.8.0_121]
at java.util.HashMap$KeyIterator.next(HashMap.java:1461) [rt.jar:1.8.0_121]
at org.jboss.ejb.client.EJBClientContext.getEJBReceiver(EJBClientContext.java:725) [jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146) [jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]
...
at com.sun.proxy.$Proxy459.obtenerUsuarioPorCodigo(Unknown Source)
at com.sofis.adminis.delegates.PermisosDelegate.obtenerUsuarioPorCodigo(PermisosDelegate.java:450) [adminis-delegate-1.0.jar:]
at com.sofis.security.web.UsuariosSessionBeanWeb.autenticar(UsuariosSessionBeanWeb.java:1927) [classes:]
at com.sofis.security.web.listeners.SofisAutologinLiferayPhaseListener.afterPhase(SofisAutologinLiferayPhaseListener.java:54) [classes:]
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
... 198 more
I rised the log level to "org.jboss.ejb.client" and now I see two interesting messages just before the stactrace:
22:13:16,684 DEBUG [org.jboss.ejb.client.EJBClientContext] (ajp-/0.0.0.0:8009-5) org.jboss.as.ejb3.remote.LocalEJBReceiverPreferringDeploymentNodeSelector#4bc9113e deployment node selector selected node for appname=SS-ADMINIS-ear-1.0,modulename=SS-ADMINIS-MAVEN-EJB-1.0,distinctname=
22:13:16,687 DEBUG [org.jboss.ejb.client.EJBClientContext] (ajp-/0.0.0.0:8009-5) Selected node doesn't belong to eligible receivers. Continuing with a random eligible receiver
Note that there is no node name in both messages (two blanks before "node").
In my developing machine, where it works, the first message does include a node name, and the second message does not appear:
18:56:37,902 DEBUG [org.jboss.ejb.client.EJBClientContext] (http-/0.0.0.0:8080-2) org.jboss.as.ejb3.remote.LocalEJBReceiverPreferringDeploymentNodeSelector#6db73304 deployment node selector selected spio node for appname=SS-ADMINIS-ear-1.0,modulename=SS-ADMINIS-MAVEN-EJB-1.0,distinctname=
The only diference is that in my machine I am going directly with the browser to the server ([Browser] -- HTTP --> [JBoss]) while in the testing machine I go through a load balancer ([Browser] -- HTTP --> [Apache] -- AJP --> [JBoss]). That is reflected in the messages (ajp-/0.0.0.0 vs http-/0.0.0.0).
The exception is thrown when I try to invoke a method from the EJB through the remote interface. The reference to the local stub is gotten by means of a lookup, and the result is not null. There are no errors at deploy and the lookup does not throw an error neither.
What can be happening or what am I missing?
A friend of mine found the solution.
Something a did't say is that the testing machine was in fact a docker container. And it seems that there is a bug in JBoss with docker making the former to not read the hostname to pick a node name, so de node name when it starts is empty. So the message above a empty name node being selected is shown, and then the error.
The workaround is to specify a node name with the -Djboss.node.name parameter to JBoss. I put that setting in the standalone.conf, restarted the JBoss and it worked fine. Now, the first message shows the name I specified, and the second message does not appear, nor the exception.

Wildfly 10 Not using database but getting a jpa error

I recently installed Wildfly-10.0.0.Final. To get my feet wet, I created an elementary EJB that does not require a database connection. For some reason when I try to deploy the EJB, I get the following error:
Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.
\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"JavaEE_Wildfly1.jar\"
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'org.eclipse.persistence.jpa.PersistenceProvider' not found"}}
Since I am not using a database, do I still have to specify a Persistence provider? I do not have a persistence.xml because I did not think I needed one.
I don't think you need a persistence.xml. Check out this EJB-In-A-War wildfly quickstart for an example of a #Stateless EJB deployed without a persistence.xml.

JBoss 7.1: java.lang.IllegalStateException: No 'jboss' MBeanServer found

My application is deployed on JBoss 7.1 (standalone).
I am getting an exception on the following line:
MBeanServerConnection server = MBeanServerLocator.locateJBoss();
The exception is:
JBoss: java.lang.IllegalStateException: No 'jboss' MBeanServer found!
That code above worked fine when the app was deployed on JBoss 5.
From what I was reading online, the code is supposed to work only when it's called from the same JVM in which the MBeanServer was created. Otherwise it's a remote call and I have to use JNDI. But is it not a local call (same JVM - i.e. the JBoss JVM)? How did it work on JBoss 5 then?
How do I make it work on JBoss 7.1 standalone, without changing this specific code?
Here is the solution:
https://community.jboss.org/thread/221708
Quote:
Above problem is dueto locateJboss implementation that is compatible with older version of Jboss. The MBeanServer used by JBoss 7 (by default) is the platform MBeanServer. The class name iscom.sun.jmx.mbeanserver.JmxMBeanServer and the default domain is DefaultDomain. Accordingly, you can simply use:
java.lang.management.ManagementFactory.getPlatformMBeanServer()
Alternatively:
for(MBeanServer server: javax.management.MBeanServerFactory.findMBeanServer(null)) {
if("DefaultDomain".equals(server.getDefaultDomain())) return server;
}
throw new Exception("Failed to locate MBeanServer");
On another note, jboss.system:type=ServerInfo object name doesn't work in AS 7.1 I had to use JVM specific parameters to nail down to MBean attributes. 'java.lang:type=Memory' and attribute as 'HeapMemoryUsage'.