jbossfuse: Cannot find the declaration of element 'blueprint' - jbossfuse

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.

Related

Missing SOAP-ENV webservice response header in JBOSS EAP 7.4.3 after migration from 6.4

0
I am trying to migrate my application server (JBOSS EAP) from 6.4 to 7.4.3. But, after migration I am getting the below error while hitting my webservices.
Unwinding now: org.apache.cxf.interceptor.Fault: Unmarshalling error: unexpected element (uri: ....) Caused by : com.sun.istack.SAXParseException2; line number: 0; columnNumber: 0; unexpected element (uri:....)
Thus, I have added -Dcom.sun.xml.bind.backupWithParentNamespace=true system property in my JBOSS server VM argument to resolve above issue. Now, I am getting good responses but the below two lines are missing in my new JBOSS(JBOSS EAP 7.4.3) webservice response.
First Line - <xml version="1.0" encoding="UTF8"?> and
Second Line - <SOAP-ENV:Header xmlns:SOAP-ENV=...>
But this two lines were present in older JBOSS EAP 6.4 response. Should I need to add any other system property for this. Please help me on this.
Reagrds, Ritesh

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

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.

Issue JNDI resource initialization - DB connection #"DB2 on Cloud - BLUEMIX

We are unable to make DB2 database connection from Java application deployed on "Liberty on Java" using JNDI resource at Bluemix.
It is not able to initialize the resource.
My server.xml file is
"<dataSource id="eVotingDataSource" jdbcDriverRef="db2-driver" jndiName="jdbc/DatabaseName" type="javax.sql.DataSource">
<properties.db2.jcc id="eVotingDataSource-props" databaseName="*******" user="db2inst1" password="******" portNumber="50001" serverName="********" sslConnection="true"/>
</dataSource>
<jdbcDriver id="db2-driver" libraryRef="db2-library"/>
<library id="db2-library">
<fileset id="db2-fileset" dir="${server.config.dir}/lib" includes="db2jcc4.jar db2jcc_license_cu.jar"/>
</library>
Web.xml file
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/DatabaseName</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
applicationContext.xml file
<jee:jndi-lookup id="eVotingDataSource"
jndi-name="jdbc/DatabaseName"
expected-type="javax.sql.DataSource" />
Below is output of messages.log
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.nl.abnamro.evoting.dao.IssuerDAOImpl.eVotingSessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eVotingSessionFactory' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'eVotingDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eVotingDataSource': Invocation of init method failed; nested exception is javax.naming.NamingException: CWWKN0008E: An object could not be obtained for name jdbc/DatabaseName.
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eVotingDataSource': Invocation of init method failed; nested exception is javax.naming.NamingException: CWWKN0008E: An object could not be obtained for name jdbc/DatabaseName.
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eVotingMailSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Intermediate context does not exist: mail/Session
When we load the application we receive the following error:
Error 500: javax.servlet.ServletException: Filter [springSecurityFilterChain]: could not be initialized
Could you please assist?
The error you are receiving is related with this configuration from your server.xml
jndiName="**jdbc/DatabaseName**"
CWWKN0008E: An object could not be obtained for name **jdbc/DatabaseName**.
If you are using a DB service bound using Bluemix, the runtime is automatically configured when your application is staging, so you usually don't need to provide your own configuration in your server.xml overwriting the Bluemix configuration.
Instead, if you need to overwrite the server.xml for your own configurations, you could access the DB service references on your Bluemix page, on the Bluemix console under the 'Environment Variables' section
You could retrieve the DBService name to use inside your server.xml as JNDI/[DBNAME]
You could also retrieve the right Datasource to use simply deploying your app on Bluemix without overwriting the server.xml and check on the Bluemix UI (under Files section) the value of the Datasource on the produced server.xml
Just a little question: Could you confirm that you are pushing your application along with your server.xml, within a packaged version of your liberty run-time ?

Trying to configure an active MQ broker with a plugin in Java, where should <bean class="..."> attribute be pointing to?

I'm trying to configure an activemq broker with a plugin installed, but can't seem to get the qualified name of the plugin class right in the broker configuration file.
I have pasted the error message followed by the broker config below. Basicallly in the element I'm specifying
class="file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin"
which is absolute path to the XmlValidationPlugin.class file(have tried appending .class to path above but I get the same error).
Initially I assumed that the class attribute should be pointing to the .class file but have tried pointing it to .java and still doesn't work.
I have read the active MQ faq on developing plugins, FAQs, spring documentation etc.
My class path is
.;JAVA_HOME\lib;C:\Marcus\JavaProjects\Project;C:\Marcus\JavaProjects\Project\build\prod\classes
and JAVA_HOME is:
C:\Program Files\Java\jdk1.7.0_03
all the java source resides in
C:\Marcus\JavaProjects\Project\src
and the .class files are in
C:\Marcus\JavaProjects\Project\build\prod\classes
( file structure in classes mirrors that in src,so for example
com.foo.jms.amqplugin.XmlValidationPlugin
will have its .class file in
classes/com/foo/jms/amqplugin )
the plugin in question is XmlValidationPlugin.java, and is in folder src in package:
com.foo.jms.amqplugin
I have tried putting XmlValidationPlugin.class in a JAR and putting the JAR in activemqinstalldir/lib,( as was recommended to other people who had a similar problem) but this has not helped.
I have spent a day and a half on this already, and would really appreciate if anyone has any idea what the value of the plugins class attribute should be, as I have tried everything... Thanks in advance!
TOP OF ERROR OUTPUT:
C:\Program Files\apache-activemq-5.5.1>bin\activemq xbean:file:C:/Marcus/JavaProjects/Project/config/custom-broker.xml
Java Runtime: Oracle Corporation 1.7.0_03 C:\Program Files\Java\jdk1.7.0_03\jre
Heap sizes: current=15872k free=14246k max=506816k
JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\Program Files\apache-
activemq-5.5.1\bin\../conf;C:\Program Files\apache-activemq-5.5.1\bin\../conf; -Dactivemq.home=C:\Program Files\apache-activemq-5.5.1\bin\.. -Dactivemq.base=C:\Program Files\apache-activemq-5.5.1\bin\
..
ACTIVEMQ_HOME: C:\Program Files\apache-activemq-5.5.1\bin\..
ACTIVEMQ_BASE: C:\Program Files\apache-activemq-5.5.1\bin\..
Loading message broker from: xbean:file:C:/Marcus/JavaProjects/Project/config/custom-broker.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1#7a8ba4: startup date [Thu Apr 12 10:38:26 CEST 2012]; root of context hierarchy
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin. Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin.
Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
...
BROKER CONFIG FILE:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core"
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-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<!--The <broker> element is used to configure the ActiveMQ broker. -->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
dataDirectory="${activemq.base}/data">
...
<!--plugin-->
<plugins>
<bean xmlns="http://www.springframework.org/schema/beans"
id="xmlValidationPlugin"
class="com.foo.jms.amqplugin.XmlValidationPlugin"/>
</plugins>
</broker>
</beans>
Basicallly in the element I'm specifying class="file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin" which is absolute path to the XmlValidationPlugin.class file(have tried appending .class to path above but I get the same error). Initially I assumed that the class attribute should be pointing to the .class file but have tried pointing it to .java and still doesn't work.
It seems that the error you are getting is from the classloader.
Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
Classloader expects a fully qualified class-name instead of a path to the class file. Try to specify the fully qualified class name instead of the path to the class file .
Instead of:
file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
Use:
com.foo.jms.amqplugin.XmlValidationPlugin
and do make sure that CLASSPATH environment variable will contain: C:/Marcus/JavaProjects/Project/build/prod/classes
If ActiveMQ uses some custom classloader for loading plug-ins (I do not know the details), you might need to specify the classpath in some ActivemMQ-specific way.

Wildcard bean loading in JBoss 5.1.0.GA

We have this in config.xml, which loads OK in JBoss 4.2.2.GA
<import resource="classpath*:/META-INF/apollo/babel-*-beans.xml"/>
However in JBoss 5.1.0.GA, it does not load (as I am aware things are stricter)
Offending resource: ServletContext resource [/WEB-INF/config/catalog-config.xml];
nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Could not resolve bean definition resource pattern [classpath*:/META-INF/apollo/babel-*-beans.xml];
nested exception is java.io.FileNotFoundException:
I followed the advice here http://community.jboss.org/message/6502 to disable validation,
%JBOSS_HOME%/server/< serverName>/deployers/ear-deployer-jboss-beans.xml, uncommentthe commented out lines:
<property name="useValidation">false</property>
but the error stays.
So how do I make JBoss 5.1.0.GA less strict and able to load using wildcard?