Pass mule message into a java component in Mule 4.3 CE - components

Is there a way to pass mule message/ event context into a java class in Mule 4.3 CE, as using Callable interface in Mule 3.8?

No, and it would be a bad practice to try to do it in Mule 4 to do something like that. See https://docs.mulesoft.com/mule-sdk/1.1/general-coding-rules#never-access-flow-variables for more details.

Related

Transform a xml into java object using mule 4.3 kernal (CE)

We can transform a xml payload into java object by mapping elements using Transform Message component in Mule 4.3 EE.
Can we transform a xml into java object using mule 4.3 kernal (CE) instead of using EE ?
The actual XML element in the flow for Transform Message is <ee:transform>. The ee namespace indicates it is an Enterprise Edition (EE) feature. So the answer would be that you can not use Transform Message in Mule Kernel, also known as Mule Community Edition (CE).

use couchbase-lite 2.5 with javafx application

I developed my javafx application using couchbase-lite 1.3 and it works as expected.
But now, i want to use the N1QL query to retrieve the data from this database.
This is not possible with 1.3 version.
on https://docs.couchbase.com/couchbase-lite/2.0/index.html i can see that it possible with version 2.5 but i do not see the binaries jar for javafx.
Do someone knows how to add 2.5 binaries to the javafx project?
thanks
Couchbase-lite 2.x supports the Java language only on Android. We are considering pure Java support for a future release.

cxf, jaxb on AIX/IBM Java - CollisionCheckStack issue

I had the following issue recently in my code. The environment is:
Java(TM) SE Runtime Environment (build pap6470sr1-20120330_01(SR1))
IBM J9 VM (build 2.6, JRE 1.7.0 AIX ppc64-64 20120322_106209 (JIT enabled, AOT enabled))
J9VM - R26_Java726_SR1_20120322_1720_B106209
Throwable occurred: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -14
at com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate(CollisionCheckStack.java:133)
at com.sun.xml.bind.v2.util.CollisionCheckStack.push(CollisionCheckStack.java:71)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTypeRef(XmlSchemaGenerator.java:705)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.access$1900(XmlSchemaGenerator.java:429)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace$ElementWithType.writeTo(XmlSchemaGenerator.java:1273)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTo(XmlSchemaGenerator.java:583)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.access$600(XmlSchemaGenerator.java:429)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator.write(XmlSchemaGenerator.java:411)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.generateSchema(JAXBContextImpl.java:755)
at org.apache.cxf.jaxb.JAXBUtils.generateJaxbSchemas(JAXBUtils.java:760)
at org.apache.cxf.jaxb.JAXBDataBinding.generateJaxbSchemas(JAXBDataBinding.java:447)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:374)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:429)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:637)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:492)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:240)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:180)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:121)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:458)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
at javax.xml.ws.Service.getPort(Service.java:130)
This code worked fine on Linux server with Oracle Java 1.7. It also worked on AIX with IBM Java 1.6. But it throws these exceptions when using IBM Java 1.7.
I did a research of com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate(CollisionCheckStack.java:133)
And found some looking similar issues/answers, such as:
http://mydevtoolbox.blogspot.com/2013/07/jaxb-marshaller-no-threadsafe-error.html, which recommends “Create a Marshaller and Unmarshaller per request”
I don’t explicitly use Marshaller/Unmarshaller – it looks like CXF/JAXB issue on Java 1.7.
Any thoughts, insights, opinions are greatly appreciated.
Can you try using JAXB 2.2.4 based jars for IBM Java 1.7 and see if that solves the issue?
We had this issue after upgrading JAVA version from 1.6 to 1.8, to fix
you need to upgrade JAXB version from 1.x to 2.x.
Just had this problem
I was using Openj9 JDK and switched over to HotSpot. I used the IntelliJ JDK manager to download the JDK from OpenJDK and made my environmental variables point to the downloaded file structure (JAVA_HOME variable).
It solved the problem
This is not "real" answer, just a workaround suggestion.
The stack trace indicates you have a problem with schema generation. Maybe you could overcome this by providing an XML Schema explicitly using #XmlSchema.location. You'd have to generate and make this schema available manually. Not so cool, but if everything else fails...

Oracle ADF Faces application on Websphere 7.0

Can someone please help me out with the Oracle ADF faces application which I'm trying to deploy on Websphere 7.0? Do I need to apply any fixpacks on WAS? I'm trying to migrate this project from Websphere 6.1 to Websphere 7.0.
In Websphere 6.1, after removing jsf implementation jar files and providing them as part of WEB-INF\lib and changing the classloader to PARENT_LAST, the application was working fine.
For websphere 7.0, I can't seem to get the application working. It always picks up the Sun's JSF implementation. I've also tried the shared library concept but to no success.
Regards,
Zahir
The Oracle documentation lists a certification for WAS 7.0.0.13 ND. So you need FixPack 13 or later.
As the WebSphere Application Server 7 is a full blown JEE5 server it requires/has JSF 1.2 support. You can switch between the built in Sun and MyFaces implementation if required.
You should probably make sure that the ADF version you are using is certified for WAS 7. The ADF release notes tell that ADF supports JSF 2.0. The WAS 7 only comes with JSF 1.2. Exchanging the JSF version with placing the JSF 2 libs into WEB-INF/lib works well for our projects in conjunction with the 'PARENT_LAST' classloading policy. Make sure that you set the policy either for the whole application or for both the application and the web module.
ADF Faces is a Java based framework and it will run on WebSphere but, you have to add the required libraries first. The easiest way to prepare WebSphere to run ADF Faces application is through JDeveloper. Alternatively, you can google Oracle JRF (Java Runtime Framework) and install that on your WebSphere, before running the ADF Faces application.

Executor and Future class equivalents for JDK 1.4 to achieve execution timeouts

Is there a framework that is compatible with JDK 1.4 that can simulate the same execution timeout functionality via thread management as in Executor and Future found in JDK 5?
There is a back port of the JDK 5.0 library which use the same classes names etc. http://backport-jsr166.sourceforge.net/ It supports Java 1.2, 1.3, 1.4, 5.0 and 6. There was no Java 4.
Check out the pre-Java5 util.concurrent package. It's what the new concurrency classes were based on.

Resources