-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample of asyncApi not generated. End with java.util.regex.PatternSyntaxException: Stack overflow during pattern compilation near index 1 ([./]) #292
Comments
Thank you for collaborating with the project by giving us feedback! Cheers! |
Sorry the regx should be |
Hi @devNbis, Cheers. |
Thanks a lot, "EventDataDTO": {
"name":" EventDataDTO",
"$id":"EventDataDTO",
"title": "Event",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"currency": {
"$ref": "#/components/schemas/Currency"
}
}
},
"Currency": {
"type": "string",
"format": "currency",
} Will result as But it should be |
Ok, |
After a small review, the regex was ok, problem came about how we were solving the reference. It found the same element always, the parameter definition, so start to walk through the Ref every time. Cheers |
I've test it and it would work on the Stream Bridge. |
Hi @devNbis, Consumer and supplier is another war, base on how Spring Cloud Stream works, defining functions (beans) by topics in the configuration part... I need to investigate how parameters work in this environment. |
@jemacineiras @RetryableTopic(attempts = "2",
include = {MyRetryException.class},
topicSuffixingStrategy=TopicSuffixingStrategy.SUFFIX_WITH_INDEX_VALUE,
backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 50000))
@KafkaListener(topics = "test-topic-retry", groupId="myPojo-listener",
properties={"spring.json.value.default.type=de.n-bis.consuming.retry.kafka.MyPojo",
"spring.kafka.consumer.properties.partition.assignment.strategy=org.apache.kafka.clients.consumer.CooperativeStickyAssignor,org.apache.kafka.clients.consumer.StickyAssignor",
"spring.json.type.mapping=MyPojo:de.n-bis.consuming.retry.kafka.MyPojo",
"spring.kafka.listener.ack-mode=MAUAL",
"spring.json.use.type.headersS=false",
"spring.json.remove.type.headers=false",
"spring.json.trusted.packages=*",
"value.deserializer=org.springframework.kafka.support.serializer.ErrorHandlingDeserializer",
"spring.message.value.parser=org.springframework.kafka.support.serializer.JsonDeserializer",
"spring.deserializer.value.delegate.class=org.springframework.kafka.support.serializer.JsonDeserializer"
}
)
public void processMessage(ConsumerRecord<String, MyPojo> rec, Acknowledgment ack) {
} When you need something like this it is very hard to use auto generated classes. But they are there and also |
Hi @devNbis, We have another issue to support Kafka Listeners, so we are gonna implement something for it. Cheers |
Hi @jemacineiras , |
I've try ed to use the original asyncApi sample from the editor as source and want to generate the code from it.
Simple.txt
It stops with the rerror in maven:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.sngular:scs-multiapi-maven-plugin:4.9.12:asyncapi-generation (default) on project consuming-retry: Execution default of goal com.sngular:scs-multiapi-maven-plugin:4.9.12:asyncapi-generation failed: Stack overflow during pattern compilation near index 1
([./])
^
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:298)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.sngular:scs-multiapi-maven-plugin:4.9.12:asyncapi-generation failed: Stack overflow during pattern compilation near index 1
([./])
I dig into the code a little bit and wondering of the regx
private static final String DIVISOR = "([./])";
Would you like have every char as an array entry?
Should the regx not be
private static final String DIVISOR = "([./])";
The text was updated successfully, but these errors were encountered: