Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7871

[camel-barcode] failed to create AZTEC barcode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.0
    • Fix Version/s: 2.14.1, 2.15.0
    • Component/s: camel-barcode
    • Labels:
    • Environment:

      Spring
      camel-barcode

    • Estimated Complexity:
      Unknown

      Description

      I'm testing camel-barcode to create AZTEC barcode format with the following spring xml.

          <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring">
      
              <dataFormats>
                  <barcode id="AZTEC" width="200" height="200" imageType="JPG" barcodeFormat="AZTEC"/>
              </dataFormats>
      
              <route>
                  <from uri="direct:AZTEC"/>
                  <marshal ref="AZTEC"/>
                  <to uri="file:target/out?fileName=aztec.jpg"/>
              </route>
          </camelContext>
      

      But I get the following stack trace.

      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      java.lang.ClassCastException: com.google.zxing.qrcode.decoder.ErrorCorrectionLevel cannot be cast to java.lang.Number
      	at com.google.zxing.aztec.AztecWriter.encode(AztecWriter.java:41)
      	at com.google.zxing.MultiFormatWriter.encode(MultiFormatWriter.java:94)
      	at org.apache.camel.dataformat.barcode.BarcodeDataFormat.printImage(BarcodeDataFormat.java:231)
      	at org.apache.camel.dataformat.barcode.BarcodeDataFormat.marshal(BarcodeDataFormat.java:162)
      	at org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:81)
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
      	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:74)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:375)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)
      	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:184)
      	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:137)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:144)
      	at org.apache.camel.dataformat.barcode.BarcodeFormatTest.tesAZTEC(BarcodeFormatTest.java:61)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:72)
      	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:81)
      	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60)
      	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:67)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:162)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              ssogabe Seiji Sogabe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: