log() instruction leads to build error : cannot find symbol "to()" - apache-camel

When I try to compile this
from(rule.getInput().getUrl()).
log(LoggingLevel.INFO, "New incoming message, rule n°"+getRule().getId()).
routeId(getId()).
filter().method(rule, "verify").
to(outputs);
I have a build error :
MVN : C:\........\DynamicRouteBuilder.java:[38,33] cannot find symbol
MVN : symbol : method to(java.lang.String[])
( to(java.lang.String[]) refers to to(outputs) )
But if I remove the log row :
from(rule.getInput().getUrl()).
//log(LoggingLevel.INFO, "New incoming message, rule n°"+getRule().getId()).
routeId(getId()).
filter().method(rule, "verify").
to(outputs);
It works!
It also works if I move the log row beetween filter() and to().
I can't see why. Any clue?

Related

Not able to fetch the FileSystem from Hitachi_NAS_File_Storage

When I try to execute the below curl command I am getting an issue:
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v7/storage/filesystems
Error:
{
"errorCode" : 1081427,
"errorDetail" : {
"detail" : "[no detail]",
"fault" : "SOAP-ENV:Receiver",
"fileName" : "FileSystemMgmntProvider.cpp",
"function" : "getAllFileSystems",
"lineNumber" : 54,
"message" : "Failed to find a list of file system IDs on the server.",
"reason" : "Failed to find a list of file system IDs on the server.",
"returnedValue" : 2,
"subCode" : 8992
},
"errorMsg" : "An internal HNAS error which usually results from an object not found or an invalid parameter."
}
But I am able to see the FileSystems on that specific server. Am I missing anything.
Please let me know if any permission or any issue with the version.
Reference:
https://knowledge.hitachivantara.com/Documents/Storage/NAS_Platform/13.9/Hitachi_NAS_File_Storage_REST_API_Reference/File_system_resource/02_Get_file_systems

Trying to initialize kadena token on testnet - readrow error Database error

I am receiving this error when trying to initialize a token contract on kadena.
I am using free.mykeyset name in the define and enforce
keysetname in read
Calling transaction , tried using the signer "keysetname" as well as the full non k public address. I am able to deploy but cannot initialize, not sure why it seems to be a database error, nor can I find any info on "pactinternalerror"'s.
Any advice would be appreciated!
Error from (api.testnet.chainweb.com): : Failure: Database exception: {"tag":"PactInternalError","contents":"callDb (doReadRow): user error (Database error: ErrorError)"}
You need add "create-table" function below your module and run it.
Example:
...
my module code
...
(if (read-msg "upgrade")
["upgrade"]
[
(create-table my-table)
]
)

quarkus-cxf native build failes - UnresolvedElementException - Discovered unresolved method during parsing

Good day to all :-)
I am using the quarkus-cxf extension and have now encountered the following problem.
In JVM mode everything works fine. Thank you very much for your library.
But I have errors in native mode. For a tip what I am probably doing wrong, I am very grateful …
Quarkus Version: 1.7.1.Final
quarkus-cxf Version: https://github.com/shumonsharif/quarkus-cxf/blob/master/pom.xml
Error occurs on
mvn clean package -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true -Dquarkus.container-image.registry=nfrt-docker-staging-local.repo.pnet.ch -Dquarkus.container-image.tag=latest -Pnative
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.apache.cxf.staxutils.validation.W3CMultiSchemaFactory.<init>(). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing org.apache.cxf.staxutils.validation.Stax2ValidationUtils.getValidator(Stax2ValidationUtils.java:164)
Call path from entry point to org.apache.cxf.staxutils.validation.Stax2ValidationUtils.getValidator(Endpoint, ServiceInfo):
at org.apache.cxf.staxutils.validation.Stax2ValidationUtils.getValidator(Stax2ValidationUtils.java:136)
at org.apache.cxf.staxutils.validation.Stax2ValidationUtils.setupValidation(Stax2ValidationUtils.java:115)
at org.apache.cxf.staxutils.validation.WoodstoxValidationImpl.setupValidation(WoodstoxValidationImpl.java:66)
at org.apache.cxf.databinding.source.XMLStreamDataReader.validate(XMLStreamDataReader.java:231)
at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:115)
at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:83)
at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:67)
at org.apache.cxf.wsdl.interceptors.BareInInterceptor.handleMessage(BareInInterceptor.java:131)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.MultipleEndpointObserver.onMessage(MultipleEndpointObserver.java:98)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1201)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:750)
... 8 more
Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.apache.cxf.staxutils.validation.W3CMultiSchemaFactory.(). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:259)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedMethod(SharedGraphBuilderPhase.java:249)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedInvoke(SharedGraphBuilderPhase.java:203)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeSpecial(BytecodeParser.java:1811)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeSpecial(BytecodeParser.java:1801)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5339)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3423)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3230)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1088)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:982)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:225)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:352)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:322)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:311)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:112)
at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:373)
at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:530)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
... 5 more
Error: Image build request failed with exit status 1
You can retry with last version on https://github.com/quarkiverse/quarkiverse-cxf

camel-salesforce-maven-plugin - camel-saleforce prefix not found

I am trying to generate saleforce DTO using following command :
mvn camel-salesforce:generate -DcamelSalesforce.clientId=<clientid> -DcamelSalesforce.clientSecret=<clientsecret> -DcamelSalesforce.userName=<username> -DcamelSalesforce.password=<password>
When I run it, I get error
camel-salesforce prefix not found ...
However if I run it like
mvn org.apache.camel.maven:camel-salesforce-maven-plugin:generate ..., it works.
Has anyone else had this issue?

Exception is sometimes being thrown when coppying messages from folder to another using javamail

When trying to copy a list of messages from one folder to another, sometime this exceptions appears.
nested exception is :
com.sun.mail.iap.BadCommandException: A5 BAD COPY failed. Invalid messageset.
at com.sun.mail.imap.IMAPFolder.copyMesages(IMAPFolder.java.1769)
Caused by:
com.sun.mail.iap.BadCommandException: A5 BAD COPY failed. Invalid messageset.
at com.sun.mail.iap.Protocol.handleResult(Protocol.java:353)
at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:373) ...
My Code :
public void moveMessageToTrash(String sourceFolder, String destinationFolder,
MimeMessage mimeMessage) throws MessagingException
{
IMAPFolder source = null;
IMAPFolder destination = null;
if(store.isConnected())
{
source = (IMAPFolder) store.getFolder(sourceFolder);
destin= (IMAPFolder) store.getFolder(destinationFolder);
source.open(Folder.READ_WRITE);
destin.open(Folder.READ_WRITE);
}
Message [] messages = new MimeMessage[1];
messages[0] = mimeMessage;
source.copyMessages(messages,destin);
source.setFlags(messages,new Flags(Flags.Flag.DELETED),true);
source.expunge():
}
EDIT :
Before removing the
source.expunge();
The thrown exception was :
messageRemovedException.
And nothing is being said by the debugger more than what is already said on the initialization of the javamail session :
When the copy fails, nothing is said by the debugger. Everything is shown is only at the initialization of the session :
INFO : DEBUG : JavaMail version 1.5.1
INFO : DEBUG : failed to load any providers, using defaults.
INFO : DEBUG : Tables of loaded providers.
INFO : DEBUG : Providers Listed By Class Name : {com.sun.mail.smtp.SMTPSSLTRANSORT=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTRANSPORT,Oracle,1.5.1]....
INFO : DEBUG : Providers Listed By Protocol :
....
INFO : DEBUG : failed to load address map, using defaults.
what i want to say is that after i removed the source.expunge() from the code, no exception is being thrown anymore, but actually the failure is still exists, some messages are being copied to the target and set deleted in the source, and a litle number of them are copied to the target but set deleted there, not in the source.
Possibly some of the messages you're copying have been deleted and expunged, either by your application or by some other application accessing the same folder? A detailed protocol trace might provide more information.

Resources