I am using FIS2.0 and find the following unsupported comments:
https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.3/html-single/fuse_integration_services_2.0_for_openshift/#get-started-s2i-binary
Unsupported Starter Modules
The following components do not have a starter because of compatibility issues:
...
camel-spark-rest
...
While I am using spark-rest component in fuse rest DSL on EAP, now I need to migrate it to OCP, I tested the spark-rest with rest DSL on FIS running with spring boot, found no error, does it mean I can use camel-spark-rest on FIS? what the risk could be.
My sample camel-context.xml in FIS is:
<restConfiguration component="spark-rest" port="9091"/>
<rest id="_rest_prj1" path="/prj1">
<post consumes="text/xml" id="_rest_prj1_svc1"
produces="text/xml" uri="/svc1/a1">
<to uri="seda:preprocessor"/>
</post>
</rest>
Best regards
Lan
You can use Spark-rest but you won't have RH support in case of anything happening with that component.
Related
I use camel version 2.12.3
I would like to get yesterday date for file name.
Founded documentation from https://camel.apache.org/components/latest/languages/simple-language.html
So i coded like below :
<setProperty propertyName="exportFileName">
<camel:simple>${date:now-24h:yyyyMMdd}</camel:simple>
</setProperty>
I had this error "java.lang.IllegalArgumentException: Command not supported for dateExpression: now-24h"
Am i missing something here ?
Thanks
Your version is simply too old. This works in current versions of Camel 2.x but not in 2.12.x
By the way: Notice the version switcher in the Camel component docs in the upper right. You have to switch from latest to 2.x to see the correct docs. However, even the 2.x docs describe the current versions of 2.x and so you would have the same problem in this case :-)
We are migrating from EAP 6 to EAP 7 one project that uses Apache Camel. In this project, we are using dependency injection using the CDI 2.0 specification provided by EAP 7. We are migrating from EAP 6.4 which is using CDI 1.X specification. The Apache Camel version that we are using is 2.17.6
We have updated our project with the appropiate changes in the code, but in the moment of deploying the application in the server, we are getting this error, coming from the Camel dependency:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type CdiCamelExtension with qualifiers #Default
at injection point [BackedAnnotatedParameter] Parameter 3 of [BackedAnnotatedMethod] #Produces private static org.apache.camel.cdi.CdiCamelFactory.typeConverter(InjectionPoint, #Any Instance<CamelContext>, CdiCamelExtension)
at org.apache.camel.cdi.CdiCamelFactory.typeConverter(CdiCamelFactory.java:0)
It seems that it is a problem related with Apache Camel, with the 3rd parameter of the signature, that cannot find the way to obtain an object to inject it here.
The camel library camel-cdi-2.17.6jar file that contains the class org.apache.camel.cdi.CdiCamelExtension, and the service configuration in this jar is indicating to use this CdiCamelExtension.
We can see also that within this library the beans.xml file contains:
<beans version="1.0" bean-discovery-mode="all">
<scan>
<exclude name="org.apache.camel.cdi.Main"/>
</scan>
</beans>
With all this, we cannot see why CdiCamelContext cannot be obtained.
Could this be because EAP 7 is using CDI 2.0, and Camel 2.17.6 could not be compatible with this specification? We don't have much experience with Camel, so we are not sure if we could be missing something with it.
Thanks for your help
adding <module name="org.apache.camel" annotations="true" meta-inf="true"/> to global-modules of standalone.xml worked for me.
First, Im using IntelliJ (v2017.2.3), it's a Maven project with the webApp archetype and im using Spring.
I want to create a EmbeddedDatabase using HSQL, I think i setup everything properly but when i launch my app, nothing append (no errors).
This is what i have (image link):
Here is my applicationContext.xml :
<jdbc:embedded-database id="Users" type="HSQL">
<jdbc:script location="classpath:db/sql/create_db.sql" />
</jdbc:embedded-database>
My goal is to execute the create_db.sql script when I start the app, the configuration seems to be good, what am I missing ?
Thank you very much
It seems that the latest sdk com.google.firebase:firebase-server-sdk:3.0.0 relies on creating threads for most calls, e.g., com.google.firebase.database.FirebaseDatabase.getReference
This is a problem when using GAE since it promptly throws an Exception:
servlet java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
Are we suppoed to just use the JVM sdk (com.firebase:firebase-client-jvm) instead?
The instructions aren't so clear and it seems like the legacy website is the only one where we can get the secret. The new website gives us the .json file.
Has anyone had any success with using the new v3 version with GAE?
Yes. Just tested.
As with the 2.x SDKs, you can work around the threading limitation by using manual scaling.
While the Cloud guide on using Firebase with GAE is a bit outdated, the section on manual scaling should still be useful to help you through this.
More on ThreadManager here.
I was experiencing the same problem and discovered the cause in this blog thread.
When adding dependences, I had included appengine-java-sdk but overlooked appengine-api-1.0-sdk. Adding it eliminated the exception. The full dependencies block is:
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.48'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.google.firebase:firebase-server-sdk:3.0.3'
compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.48'
}
Include the JSON file in the "Resource Files" of appengine-web.xml.
Example:
<resource-files>
<include path="/**.xml" />
<exclude path="/feeds/**.xml" />
</resource-files>
See the link https://cloud.google.com/appengine/docs/java/config/appref#resource_files .
"The files that listed in the element are accessible by the application code using the filesystem. These files are stored on the application servers with the app as opposed to how static files are stored and served.".
I get the following error when trying to use the Camel XSLT component:
java.lang.NoSuchMethodException: net.sf.saxon.jaxp.TransformerImpl.setMessageEmitter(net.sf.saxon.event.Receiver)
How can I fix this?
The solution was to include Saxon-HE 9.4 (http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE/9.4.0.7). Versions above this don't appear to have the methods that Camel 2.14.1 needs.