spring-attic / spring-ide

Spring Development Environment for Eclipse
299 stars 126 forks source link

Tags in yaml files with dollar signs throw IllegalGroupReference (3.9.8.201903260659-RELEASE) #376

Closed jmax01 closed 5 years ago

jmax01 commented 5 years ago

This line throws java.lang.IllegalArgumentException: Illegal group reference whenever an edit is applied.

logging.level.org.springframework.kafka.listener.[KafkaMessageListenerContainer$ListenerConsumer]: INFO
java.lang.IllegalArgumentException: Illegal group reference
    at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
    at org.springsource.ide.eclipse.commons.core.util.StringUtil.camelCaseToHyphens(StringUtil.java:66)
    at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:149)
    at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:97)
    at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:83)
    at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:74)
    at org.springframework.ide.eclipse.editor.support.yaml.reconcile.YamlReconcileEngine.reconcile(YamlReconcileEngine.java:43)
    at org.springframework.ide.eclipse.editor.support.reconcile.ReconcileStrategy.reconcile(ReconcileStrategy.java:88)
    at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:76)
    at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210)
kdvolder commented 5 years ago

Can you please provide a more detailed example? It's easier than us trying to guess/create it ourselves based on your description. This seems to be an error from the reconciler. So pasting exact content of the editor should be good enough to reproduce it.

jmax01 commented 5 years ago

There is not really much more to add

  1. Open Error Log View
  2. Create an application-test.yml file.
  3. Add this line to the file:
    logging.level.org.springframework.kafka.listener.[KafkaMessageListenerContainer$ListenerConsumer]: INFO
  4. An error similar to this one should appear in the Error Log view:
    
    IllegalArgumentException: Illegal group reference

java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:857) at org.springsource.ide.eclipse.commons.core.util.StringUtil.camelCaseToHyphens(StringUtil.java:66) at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:149) at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:97) at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:83) at org.springframework.ide.eclipse.boot.properties.editor.yaml.reconcile.ApplicationYamlASTReconciler.reconcile(ApplicationYamlASTReconciler.java:74) at org.springframework.ide.eclipse.editor.support.yaml.reconcile.YamlReconcileEngine.reconcile(YamlReconcileEngine.java:43) at org.springframework.ide.eclipse.editor.support.reconcile.ReconcileStrategy.reconcile(ReconcileStrategy.java:88) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:76) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210) ``

kdvolder commented 5 years ago

Thanks for the example. It doesn't seem like much maybe, but this is exactly what I need:

logging.level.org.springframework.kafka.listener.[KafkaMessageListenerContainer$ListenerConsumer]: INFO

The saying is that a 'picture is worth a thousand words'. In our world however I'd say that it should rathe be 'an example is worth a thousand words' :-)

kdvolder commented 5 years ago

Github auto-closed this issue because I pushed a fix to STS 4 repo... however, still need to fix STS 3 legacy editor as well. So re-opening this.