Cannot compile Spring Boot to native image with Python language support - spring-boot

I'm trying to build a native image (GraalVM 22.3) from a Spring Boot 3 RC1 application with Python language support on Apple M1. I can build the native image without Python language support. But when adding
<buildArgs combine.children="append">
<buildArg>--verbose</buildArg>
<buildArg>--language:python</buildArg>
<buildArg>-Dorg.graalvm.launcher.relative.python.home=${env.JAVA_HOME}/languages/python</buildArg>
<buildArg>-Dorg.graalvm.launcher.relative.llvm.home=${env.JAVA_HOME}/languages/llvm</buildArg>
</buildArgs>
without any polyglot code in the application, the build throws errors during the "Parsing methods" step. The error message is not always the same. It differs randomly (from my point of view):
[4/7] Parsing methods... [****] (17.8s # 4.40GB)
Fatal error: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.svm.core.util.VMError$HostedError: Discovered an unresolved callee while parsing org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:128).
at parsing org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:128)
at method: RequestAttributes org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes()
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2518)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3393)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.iterateBytecodesForBlock(HostedGraphBuilderPhase.java:201)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3345)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3190)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.build(HostedGraphBuilderPhase.java:144)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:97)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.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:446)
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.svm.hosted.code.CompileQueue.defaultParseFunction(CompileQueue.java:1145)
at com.oracle.svm.hosted.code.CompileQueue.doParse(CompileQueue.java:857)
at com.oracle.svm.hosted.code.CompileQueue$ParseTask.run(CompileQueue.java:386)
at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool.externalHelpQuiescePool(ForkJoinPool.java:2104)
at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:3321)
at com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:243)
at com.oracle.svm.hosted.code.CompileQueue.parseAll(CompileQueue.java:594)
at com.oracle.svm.hosted.code.CompileQueue.finish(CompileQueue.java:424)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:651)
at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:610)
Caused by: com.oracle.svm.core.util.VMError$HostedError: Discovered an unresolved callee while parsing org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:128).
at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:68)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:140)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4206)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1648)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5288)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3385)
... 30 more
Other error message:
[4/7] Parsing methods... [****] (19.9s # 2.51GB)
2 fatal errors detected:
Fatal error: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaType.toJavaName()" because "type" is null
at parsing org.springframework.format.support.DefaultFormattingConversionService.addDefaultFormatters(DefaultFormattingConversionService.java:110)
at method: void org.springframework.format.support.DefaultFormattingConversionService.addDefaultFormatters(FormatterRegistry)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2518)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3393)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.iterateBytecodesForBlock(HostedGraphBuilderPhase.java:201)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3345)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3190)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.build(HostedGraphBuilderPhase.java:144)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:97)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.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:446)
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.svm.hosted.code.CompileQueue.defaultParseFunction(CompileQueue.java:1145)
at com.oracle.svm.hosted.code.CompileQueue.doParse(CompileQueue.java:857)
at com.oracle.svm.hosted.code.CompileQueue$ParseTask.run(CompileQueue.java:386)
at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaType.toJavaName()" because "type" is null
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedType(SharedGraphBuilderPhase.java:290)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedNewInstance(SharedGraphBuilderPhase.java:204)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4501)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4494)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5291)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3385)
... 23 more
Fatal error: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaType.toJavaName()" because "type" is null
at parsing org.springframework.boot.autoconfigure.web.format.WebConversionService.addFormatters(WebConversionService.java:70)
at method: void org.springframework.boot.autoconfigure.web.format.WebConversionService.addFormatters(DateTimeFormatters)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2518)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3393)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.iterateBytecodesForBlock(HostedGraphBuilderPhase.java:201)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3345)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3190)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
at com.oracle.svm.hosted.phases.HostedBytecodeParser.build(HostedGraphBuilderPhase.java:144)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:97)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.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:446)
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.svm.hosted.code.CompileQueue.defaultParseFunction(CompileQueue.java:1145)
at com.oracle.svm.hosted.code.CompileQueue.doParse(CompileQueue.java:857)
at com.oracle.svm.hosted.code.CompileQueue$ParseTask.run(CompileQueue.java:386)
at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaType.toJavaName()" because "type" is null
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedType(SharedGraphBuilderPhase.java:290)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedNewInstance(SharedGraphBuilderPhase.java:204)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4501)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4494)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5291)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3385)
... 23 more

This is a known bug, tracked here: https://github.com/oracle/graal/issues/4473

Related

Form view triggering error when submitted

I am very new to NativeScript (few hours) and I am trying to follow the tutorial on their site. When running the code at step 12 of the tutorial, the app is failing (when I submit the login form only) and crashes with the following error stack:
2018-10-10 20:35:06.321 nsplaydev[2295:419329] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: user.login is not a function. (In 'user.login()', 'user.login' is undefined)
at
1 signIn#file:///app/views/login/login-page.js:17:15
2 notify#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:110:31
3 _emit#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
4 tap#file:///app/tns_modules/tns-core-modules/ui/button/button.js:207:24
5 UIApplicationMain#[native code]
6 start#file:///app/tns_modules/tns-core-modules/application/application.js:272:26
7 run#file:///app/tns_modules/tns-core-modules/application/application.js:300:10
8 anonymous#file:///app/app.js:2:22
9 evaluate#[native code]
10 moduleEvaluation#[native code]
11 #[native code]
12 promiseReactionJob#[native code]
', reason: '(null)'
*** First throw call stack:
(0x211e5bf78 0x211054284 0x102e67e60 0x102e8d2e4 0x10378f088 0x1037901b4 0x21104f900 0x23f731a98 0x23f19be18 0x23f19c14c 0x23f19b0ec 0x23f76d208 0x23f76e468 0x23f74cb70 0x23f81d024 0x23f81fb50 0x23f81fec8 0x23f81854c 0x211de8a50 0x211de89cc 0x211de8284 0x211de2f64 0x211de2844 0x214091be8 0x23f73031c 0x103790044 0x10378e7a4 0x10378e26c 0x102e45630 0x103440e14 0x103449a24 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546b9c 0x102e5a354 0x1035e2964 0x10344a494 0x103449a34 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546c80 0x1035de8e0 0x102e51898 0x102e97f50 0x102ac8198 0x10257d3dc 0x211898020)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-10-10 20:35:06.321 nsplaydev[2295:419329] PlayLiveSync: Uncaught Exception
To learn the framework, I was purposefully typing each line manually to learn. Thought that could have introduced the error, so I went back and copy pasted their exact code. Still getting an issue.
Update: The link to the tutorial is here
Thanks
Based on the error log it looks like you haven't defined login function in your view model.

CQ 5.6.1 getWorkflowSession cause Uncaught Throwable java.lang.NullPointerException

at com.cuso.Mao.doGet(Mao.java:97)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:508)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:356)
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:168)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:254)
line 97 is just calling the WorkflowSession wf = workflowServiceObject.getWorkflowSession(jcrsessionObject);
Should I use JACKRABBIT SESSION instead of jcrSession? Which one is right?
I was facing a similar situation.There is nothing wrong with the model node that you are passing.
Getting new workflowSession from workflowService was giving nullpointer so I had to get the workflowService inside my Activator using the getServiceReference way and have it assigned to a static variable in a utility class.Still I got:
and following was getting logged:-
Cannot read workflow model from node: /etc/workflow/models/deletecontent/jcr:content/model
And there was one more "session already closed" issue. For that I again made the resolverFactory a part of my utility class using which I could get administrativeResourceResolver in my servlet.

Bootstrapped Pattern Extraction Method Error while I tried patternScoring=LOGREG

I would like to try a pattern extraction method by using Stanford CoreNLP 3.6.0 on Ubuntu.
It worked as a default setting (through patterns/example.properties) by running Pattern Extraction method as follows:
java -mx1000m -cp "*" edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass -props patterns/example.properties
However, when I changed the Pattern Scoring setting in the example.properties to "patternScoring=LOGREG", I encountered an error as follows:
Cannot assign option field: java.lang.Class edu.stanford.nlp.patterns.ScorePhrases.phraseScorerClass value: edu.stanford.nlp.patterns.ScorePhrasesLearnFeatWt; invalid type
java.lang.RuntimeException: [Ljava.lang.Object;#466dd2b7
edu.stanford.nlp.util.logging.Redwood$Util.runtimeException(Redwood.java:973)
edu.stanford.nlp.util.Execution.fillField(Execution.java:243)
edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:477)
edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:536)
edu.stanford.nlp.util.Execution.fillOptions(Execution.java:599)
edu.stanford.nlp.util.Execution.fillOptions(Execution.java:603)
edu.stanford.nlp.patterns.ScorePhrases.<init>(ScorePhrases.java:50)
edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.convert2OneDim(ScorePatternsRatioModifiedFreq.java:198)
edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.score(ScorePatternsRatioModifiedFreq.java:89)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.getPatterns(GetPatternsFromDataMultiClass.java:1318)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply4Label(GetPatternsFromDataMultiClass.java:2310)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply(GetPatternsFromDataMultiClass.java:2124)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.runNineYards(GetPatternsFromDataMultiClass.java:3330)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.run(GetPatternsFromDataMultiClass.java:3310)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.main(GetPatternsFromDataMultiClass.java:3611)
Cannot assign option field: edu.stanford.nlp.patterns.ScorePhrases.phraseScorerClass value: edu.stanford.nlp.patterns.ScorePhrasesLearnFeatWt cause: [Ljava.lang.Object;#466dd2b7
java.lang.RuntimeException: [Ljava.lang.Object;#3cfb55fe
at edu.stanford.nlp.util.logging.Redwood$Util.runtimeException(Redwood.java:973)
at edu.stanford.nlp.util.Execution.fillField(Execution.java:257)
at edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:477)
at edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:536)
at edu.stanford.nlp.util.Execution.fillOptions(Execution.java:599)
at edu.stanford.nlp.util.Execution.fillOptions(Execution.java:603)
at edu.stanford.nlp.patterns.ScorePhrases.<init>(ScorePhrases.java:50)
at edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.convert2OneDim(ScorePatternsRatioModifiedFreq.java:198)
at edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.score(ScorePatternsRatioModifiedFreq.java:89)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.getPatterns(GetPatternsFromDataMultiClass.java:1318)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply4Label(GetPatternsFromDataMultiClass.java:2310)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply(GetPatternsFromDataMultiClass.java:2124)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.runNineYards(GetPatternsFromDataMultiClass.java:3330)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.run(GetPatternsFromDataMultiClass.java:3310)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.main(GetPatternsFromDataMultiClass.java:3611)
Does someone know how to fix this problem?
Thanks,

Syntax for release-strategy-expression in spring integration

Here is the code snippet of what is expected:
<int:resequencer input-channel="resequencerChannel" output-channel="headerRoutingChannel"
send-timeout="10000" release-strategy-expression="size() eq (T(java.lang.Runtime).getRuntime().availableProcessors() * 3)"/>
But the syntax seems to be incorrect. I would like to know the actual syntax for the release-strategy-expression.
Thanks in advance.
Stack Trace:
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1005E:(pos 8): Type cannot be found 'org.springframework.util.Assert'
at org.springframework.expression.spel.support.StandardTypeLocator.findType(StandardTypeLocator.java:115)
at org.springframework.expression.spel.ExpressionState.findType(ExpressionState.java:138)
at org.springframework.expression.spel.ast.TypeReference.getValueInternal(TypeReference.java:58)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:48)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84)
at org.springframework.expression.spel.ast.Ternary.getValueInternal(Ternary.java:57)
at org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:147)
at org.springframework.expression.spel.ast.MethodReference.getValueRef(MethodReference.java:66)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:63)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84)
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:114)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:111)
at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:144)
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:268)
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:142)
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:73)
If you are trying to release when the group size reaches 3x the available processors...
size() eq ... ?

Java.Lang.ClassNotFoundException: com.tridion.broker.querying.Query

I am trying to contact tridion content broker database to get published contents using Tridion.contentDelivery dll. When i tried executing the application i am getting the below exception.
Please help
Exception Details: Java.Lang.ClassNotFoundException: com.tridion.broker.querying.Query
Source Error:
Line 107:
Line 108: LoggerService.Debug("GetContentByUrl: about to create query", LoggingCategory.Performance);
Line 109: Query pageQuery = new Query();
Line 110: LoggerService.Debug("GetContentByUrl: created query", LoggingCategory.Performance);
Line 111: ItemTypeCriteria isPage = new ItemTypeCriteria(64); // TODO There must be an enum of these somewhere
Source File: C:\MyProjects\DD4T\dotnet\DD4T.Providers.SDLTridion2011sp1\TridionPageProvider.cs Line: 109
Stack Trace:
[ClassNotFoundException: com.tridion.broker.querying.Query]
Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +574
Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1361
Codemesh.JuggerNET.JavaClass.init() +390
Codemesh.JuggerNET.JavaClass.get_JObject() +51
Codemesh.JuggerNET.JavaMethod.init() +1652
Codemesh.JuggerNET.JavaMethod.get_MethodPtr() +61
Codemesh.JuggerNET.JavaMethod.get_Handle() +80
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo) +493
Com.Tridion.Broker.Querying.Query..ctor() +57
Tridion.ContentDelivery.DynamicContent.Query.Query..ctor() +32
Review the jar files that are located in the lib folder of your application.
There should be a cd_broker.jar there.
You can review that following these installation instructions (for .NET).

Resources