Strange error while parsing xml

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange error while parsing xml

Tom Masterson-2
Good Morning

I have a problem that I can't find the solution for.  This probelm occurs in both 1.4.2 and 1.6-SNAPSHOT.

I have the following configuration, Note this is only a part of the total configuration:

     <jb:bean beanId="domesticCitation" class="gov.uspto.pe2e.esb.model.IngestCitation" createOnElement="DomesticPatentDocument">
         <jb:value property="officialId" data="patentIdentification/grantIdentification/grantNumber"/>
         <jb:value property="country" data="patentIdentification/grantIdentification/countryCode"/>
         <jb:value property="publicationDate" data="patentIdentification/grantIdentification/issueDateText"/>
         <jb:value property="author" data="inventorName/personFullName"/>
         <jb:value property="citedBy" data="citedByExaminerIndicator"/>
         <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
         <jb:value property="strippedGrantName" data="patentIdentification/grantIdentification/grantNumber">
             <jb:decodeParam name="valuePreprocess">value.replaceAll(" ", "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.", "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
         </jb:value>
         <jb:expression property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
     </jb:bean>

If it is run with the following code:

         ExecutionContext executionContext = smooks.createExecutionContext();
         JavaResult result = new JavaResult();
         executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
         smooks.filterSource(executionContext, new StringSource(messageIn), result);

everything works just fine and I get the expected results.  However if you run it as follows:

         ExecutionContext executionContext = smooks.createExecutionContext();
         JavaResult result = new JavaResult();
         //executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
         smooks.filterSource(executionContext, new StringSource(messageIn), result);

I get the following error:

org.milyn.SmooksException: Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile].
  at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
  at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
  at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
  at org.milyn.Smooks._filter(Smooks.java:516)
  at org.milyn.Smooks.filterSource(Smooks.java:475)
  at gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
  at gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
  at gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
  at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
  at org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
  at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
  at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
  at org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
  at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
  at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
  at org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
  at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
  at org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
  at org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
  at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
  at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
  at org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
  at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
  at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
  at $Proxy0.invoke(Unknown Source)
  at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
  at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: org.milyn.expression.ExpressionEvaluationException: Error evaluating MVEL expression 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'. Common issues include:
  1. Referencing a variable that is not bound into the context. In this case use the 'isdef' operator to check if the variable is bound in the context.
  2. Invalid expression reference to a List/Array based variable token.  Example List/Array referencing expression token: 'order.orderItems[0].productId'.
  at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
  at org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
  at org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
  at org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
  at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
  at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
  at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
  at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
  at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
  at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
  ... 38 more
Caused by: [Error: value US_PATENT]
[Near : {... Unknown ....}]
              ^
[Line: 1, Column: 0]
  at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
  at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
  at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
  at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
  at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
  at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
  at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
  at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
  ... 47 more
Caused by: java.lang.IllegalArgumentException: value US_PATENT
  at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
  at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
  at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
  at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
  ... 54 more

I can also avoid the error by setting smooks to debug in the log4j properties file.  Also the error disappears if I comment out the jb:expression line in the config.

Can anyone suggest what is going on here?

Tom Masterson

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Fennelly
I'm fairly sure the error you are seeing (on the second run) happens in
both cases.  You don't see it so visibly in the first run because smooks
doesn't abort when you run with an event listener enabled (but you
should be able to see it somewhere in the report).

So... your expression config is not right (MVEL doesn't like it).

Regards,

Tom.


On 12/06/2012 19:34, Tom Masterson wrote:

> Good Morning
>
> I have a problem that I can't find the solution for.  This probelm
> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>
> I have the following configuration, Note this is only a part of the
> total configuration:
>
> <jb:bean beanId="domesticCitation"
> class="gov.uspto.pe2e.esb.model.IngestCitation"
> createOnElement="DomesticPatentDocument">
> <jb:value property="officialId"
> data="patentIdentification/grantIdentification/grantNumber"/>
> <jb:value property="country"
> data="patentIdentification/grantIdentification/countryCode"/>
> <jb:value property="publicationDate"
> data="patentIdentification/grantIdentification/issueDateText"/>
> <jb:value property="author" data="inventorName/personFullName"/>
> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
> <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
> <jb:value property="strippedGrantName"
> data="patentIdentification/grantIdentification/grantNumber">
> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
> </jb:value>
> <jb:expression
> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
> </jb:bean>
>
> If it is run with the following code:
>
>         ExecutionContext executionContext =
> smooks.createExecutionContext();
>         JavaResult result = new JavaResult();
>         executionContext.setEventListener(new
> HtmlReportGenerator("target/report/report.html"));
>         smooks.filterSource(executionContext, new
> StringSource(messageIn), result);
>
> everything works just fine and I get the expected results.  However if
> you run it as follows:
>
>         ExecutionContext executionContext =
> smooks.createExecutionContext();
>         JavaResult result = new JavaResult();
>         //executionContext.setEventListener(new
> HtmlReportGenerator("target/report/report.html"));
>         smooks.filterSource(executionContext, new
> StringSource(messageIn), result);
>
> I get the following error:
>
> org.milyn.SmooksException: Unable to filter InputStream for target
> profile [org.milyn.profile.Profile#default_profile].
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>     at org.milyn.Smooks._filter(Smooks.java:516)
>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>     at
> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>     at
> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>     at
> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>     at
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>     at
> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>     at
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>     at
> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>     at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>     at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>     at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>     at
> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>     at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>     at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>     at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>     at $Proxy0.invoke(Unknown Source)
>     at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>     at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>     at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
> evaluating MVEL expression
> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
> Common issues include:
>         1. Referencing a variable that is not bound into the context.
> In this case use the 'isdef' operator to check if the variable is
> bound in the context.
>         2. Invalid expression reference to a List/Array based variable
> token.  Example List/Array referencing expression token:
> 'order.orderItems[0].productId'.
>     at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>     at
> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>     at
> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>     at
> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>     at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>     ... 38 more
> Caused by: [Error: value US_PATENT]
> [Near : {... Unknown ....}]
>              ^
> [Line: 1, Column: 0]
>     at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>     at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>     at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>     at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>     at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>     at
> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>     at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>     ... 47 more
> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>     at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>     at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>     ... 54 more
>
> I can also avoid the error by setting smooks to debug in the log4j
> properties file.  Also the error disappears if I comment out the
> jb:expression line in the config.
>
> Can anyone suggest what is going on here?
>
> Tom Masterson
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
Sorry to disappoint but when run the first way, with the eventlistener
active, there are no exceptions in either the report or the log, no
mention of MVEL, and the code from the expression is put in the result as
it should be.  In the second case, eventlistener inactive, the exception
is in the log and the code is not put in the result.

Tom

On Tue, 12 Jun 2012, Tom Fennelly wrote:

> I'm fairly sure the error you are seeing (on the second run) happens in both
> cases.  You don't see it so visibly in the first run because smooks doesn't
> abort when you run with an event listener enabled (but you should be able to
> see it somewhere in the report).
>
> So... your expression config is not right (MVEL doesn't like it).
>
> Regards,
>
> Tom.
>
>
> On 12/06/2012 19:34, Tom Masterson wrote:
>> Good Morning
>>
>> I have a problem that I can't find the solution for.  This probelm occurs
>> in both 1.4.2 and 1.6-SNAPSHOT.
>>
>> I have the following configuration, Note this is only a part of the total
>> configuration:
>>
>> <jb:bean beanId="domesticCitation"
>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>> createOnElement="DomesticPatentDocument">
>> <jb:value property="officialId"
>> data="patentIdentification/grantIdentification/grantNumber"/>
>> <jb:value property="country"
>> data="patentIdentification/grantIdentification/countryCode"/>
>> <jb:value property="publicationDate"
>> data="patentIdentification/grantIdentification/issueDateText"/>
>> <jb:value property="author" data="inventorName/personFullName"/>
>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>> <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
>> <jb:value property="strippedGrantName"
>> data="patentIdentification/grantIdentification/grantNumber">
>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>> </jb:value>
>> <jb:expression
>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>> </jb:bean>
>>
>> If it is run with the following code:
>>
>>         ExecutionContext executionContext =
>> smooks.createExecutionContext();
>>         JavaResult result = new JavaResult();
>>         executionContext.setEventListener(new
>> HtmlReportGenerator("target/report/report.html"));
>>         smooks.filterSource(executionContext, new StringSource(messageIn),
>> result);
>>
>> everything works just fine and I get the expected results.  However if you
>> run it as follows:
>>
>>         ExecutionContext executionContext =
>> smooks.createExecutionContext();
>>         JavaResult result = new JavaResult();
>>         //executionContext.setEventListener(new
>> HtmlReportGenerator("target/report/report.html"));
>>         smooks.filterSource(executionContext, new StringSource(messageIn),
>> result);
>>
>> I get the following error:
>>
>> org.milyn.SmooksException: Unable to filter InputStream for target profile
>> [org.milyn.profile.Profile#default_profile].
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>     at
>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>     at
>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>     at
>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>     at
>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>     at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>     at
>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>     at
>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>     at
>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>     at
>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>     at
>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>     at
>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>     at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>     at
>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>     at
>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at
>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>     at $Proxy0.invoke(Unknown Source)
>>     at
>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>     at
>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>     at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>> evaluating MVEL expression
>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>> Common issues include:
>>         1. Referencing a variable that is not bound into the context. In
>> this case use the 'isdef' operator to check if the variable is bound in the
>> context.
>>         2. Invalid expression reference to a List/Array based variable
>> token.  Example List/Array referencing expression token:
>> 'order.orderItems[0].productId'.
>>     at
>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>     at
>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>     at
>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>     at
>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>     at
>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>     ... 38 more
>> Caused by: [Error: value US_PATENT]
>> [Near : {... Unknown ....}]
>>              ^
>> [Line: 1, Column: 0]
>>     at
>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>     at
>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>     at
>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>     at
>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>     at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>     at
>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>     at
>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>     ... 47 more
>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>     at
>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>     at
>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>     ... 54 more
>>
>> I can also avoid the error by setting smooks to debug in the log4j
>> properties file.  Also the error disappears if I comment out the
>> jb:expression line in the config.
>>
>> Can anyone suggest what is going on here?
>>
>> Tom Masterson
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Fennelly
I'm not disappointed at all :)

Take the second case again (the one that's failing) and turn off
"terminateOnException" and see what happen.  See
http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings


On 12/06/2012 20:22, Tom Masterson wrote:

> Sorry to disappoint but when run the first way, with the eventlistener
> active, there are no exceptions in either the report or the log, no
> mention of MVEL, and the code from the expression is put in the result
> as it should be.  In the second case, eventlistener inactive, the
> exception is in the log and the code is not put in the result.
>
> Tom
>
> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>
>> I'm fairly sure the error you are seeing (on the second run) happens
>> in both cases.  You don't see it so visibly in the first run because
>> smooks doesn't abort when you run with an event listener enabled (but
>> you should be able to see it somewhere in the report).
>>
>> So... your expression config is not right (MVEL doesn't like it).
>>
>> Regards,
>>
>> Tom.
>>
>>
>> On 12/06/2012 19:34, Tom Masterson wrote:
>>> Good Morning
>>>
>>> I have a problem that I can't find the solution for.  This probelm
>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>
>>> I have the following configuration, Note this is only a part of the
>>> total configuration:
>>>
>>> <jb:bean beanId="domesticCitation"
>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>> createOnElement="DomesticPatentDocument">
>>> <jb:value property="officialId"
>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>> <jb:value property="country"
>>> data="patentIdentification/grantIdentification/countryCode"/>
>>> <jb:value property="publicationDate"
>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>> <jb:value property="author" data="inventorName/personFullName"/>
>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>> <jb:value property="consideredBy"
>>> data="consideredByExaminerIndicator"/>
>>> <jb:value property="strippedGrantName"
>>> data="patentIdentification/grantIdentification/grantNumber">
>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>> </jb:value>
>>> <jb:expression
>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>> </jb:bean>
>>>
>>> If it is run with the following code:
>>>
>>>         ExecutionContext executionContext =
>>> smooks.createExecutionContext();
>>>         JavaResult result = new JavaResult();
>>>         executionContext.setEventListener(new
>>> HtmlReportGenerator("target/report/report.html"));
>>>         smooks.filterSource(executionContext, new
>>> StringSource(messageIn), result);
>>>
>>> everything works just fine and I get the expected results.  However
>>> if you run it as follows:
>>>
>>>         ExecutionContext executionContext =
>>> smooks.createExecutionContext();
>>>         JavaResult result = new JavaResult();
>>>         //executionContext.setEventListener(new
>>> HtmlReportGenerator("target/report/report.html"));
>>>         smooks.filterSource(executionContext, new
>>> StringSource(messageIn), result);
>>>
>>> I get the following error:
>>>
>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>> profile [org.milyn.profile.Profile#default_profile].
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>     at
>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>     at
>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>     at
>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>     at
>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>     at
>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>     at $Proxy0.invoke(Unknown Source)
>>>     at
>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>     at
>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>     at
>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>
>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>> evaluating MVEL expression
>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object
>>> type
>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>> Common issues include:
>>>         1. Referencing a variable that is not bound into the
>>> context. In this case use the 'isdef' operator to check if the
>>> variable is bound in the context.
>>>         2. Invalid expression reference to a List/Array based
>>> variable token.  Example List/Array referencing expression token:
>>> 'order.orderItems[0].productId'.
>>>     at
>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>     ... 38 more
>>> Caused by: [Error: value US_PATENT]
>>> [Near : {... Unknown ....}]
>>>              ^
>>> [Line: 1, Column: 0]
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>     at
>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>     at
>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>     at
>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>     at
>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>     at
>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>     ... 47 more
>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>     ... 54 more
>>>
>>> I can also avoid the error by setting smooks to debug in the log4j
>>> properties file.  Also the error disappears if I comment out the
>>> jb:expression line in the config.
>>>
>>> Can anyone suggest what is going on here?
>>>
>>> Tom Masterson
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
More and more interesting!

I have two xml files that get processed through that particular fragment
sequentially with smooks.close() being executed between each and it
appears to be having the issue on the second one.  Even with
terminateOnException set to false I get an exception on the second file.
Note that either file runs fine if run individually by hand I.E put a
single file in the eirectory and run it and then put the other in and run
again.  Could this be a problem where smooks is not fully closing before I
create a new instance and run the next file?

The same thing happens when terminateOnException is set to true.

Tom

On Tue, 12 Jun 2012, Tom Fennelly wrote:

> I'm not disappointed at all :)
>
> Take the second case again (the one that's failing) and turn off
> "terminateOnException" and see what happen.  See
> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>
>
> On 12/06/2012 20:22, Tom Masterson wrote:
>> Sorry to disappoint but when run the first way, with the eventlistener
>> active, there are no exceptions in either the report or the log, no mention
>> of MVEL, and the code from the expression is put in the result as it should
>> be.  In the second case, eventlistener inactive, the exception is in the
>> log and the code is not put in the result.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>> both cases.  You don't see it so visibly in the first run because smooks
>>> doesn't abort when you run with an event listener enabled (but you should
>>> be able to see it somewhere in the report).
>>>
>>> So... your expression config is not right (MVEL doesn't like it).
>>>
>>> Regards,
>>>
>>> Tom.
>>>
>>>
>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>> Good Morning
>>>>
>>>> I have a problem that I can't find the solution for.  This probelm occurs
>>>> in both 1.4.2 and 1.6-SNAPSHOT.
>>>>
>>>> I have the following configuration, Note this is only a part of the total
>>>> configuration:
>>>>
>>>> <jb:bean beanId="domesticCitation"
>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>> createOnElement="DomesticPatentDocument">
>>>> <jb:value property="officialId"
>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>> <jb:value property="country"
>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>> <jb:value property="publicationDate"
>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>> <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
>>>> <jb:value property="strippedGrantName"
>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>> </jb:value>
>>>> <jb:expression
>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>> </jb:bean>
>>>>
>>>> If it is run with the following code:
>>>>
>>>>         ExecutionContext executionContext =
>>>> smooks.createExecutionContext();
>>>>         JavaResult result = new JavaResult();
>>>>         executionContext.setEventListener(new
>>>> HtmlReportGenerator("target/report/report.html"));
>>>>         smooks.filterSource(executionContext, new
>>>> StringSource(messageIn), result);
>>>>
>>>> everything works just fine and I get the expected results.  However if
>>>> you run it as follows:
>>>>
>>>>         ExecutionContext executionContext =
>>>> smooks.createExecutionContext();
>>>>         JavaResult result = new JavaResult();
>>>>         //executionContext.setEventListener(new
>>>> HtmlReportGenerator("target/report/report.html"));
>>>>         smooks.filterSource(executionContext, new
>>>> StringSource(messageIn), result);
>>>>
>>>> I get the following error:
>>>>
>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>     at
>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>     at
>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>     at
>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>     at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>     at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>     at
>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>     at
>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>     at
>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>     at
>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>     at
>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>     at
>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>     at
>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>     at
>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>     at
>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>     at
>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>     at
>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>     at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>     at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>     at
>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>     at $Proxy0.invoke(Unknown Source)
>>>>     at
>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>     at
>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>     at
>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>> evaluating MVEL expression
>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>> Common issues include:
>>>>         1. Referencing a variable that is not bound into the context. In
>>>> this case use the 'isdef' operator to check if the variable is bound in
>>>> the context.
>>>>         2. Invalid expression reference to a List/Array based variable
>>>> token.  Example List/Array referencing expression token:
>>>> 'order.orderItems[0].productId'.
>>>>     at
>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>     at
>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>     at
>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>     at
>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>     at
>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>     ... 38 more
>>>> Caused by: [Error: value US_PATENT]
>>>> [Near : {... Unknown ....}]
>>>>              ^
>>>> [Line: 1, Column: 0]
>>>>     at
>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>     at
>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>     at
>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>     at
>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>     at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>     at
>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>     at
>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>     ... 47 more
>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>     at
>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>     at
>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>     ... 54 more
>>>>
>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>> properties file.  Also the error disappears if I comment out the
>>>> jb:expression line in the config.
>>>>
>>>> Can anyone suggest what is going on here?
>>>>
>>>> Tom Masterson
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Fennelly
You'd need to package up an example that reproduces this.  Too hard to
diagnose in an email.  See http://goo.gl/vYHuC

On 12/06/2012 22:48, Tom Masterson wrote:

> More and more interesting!
>
> I have two xml files that get processed through that particular
> fragment sequentially with smooks.close() being executed between each
> and it appears to be having the issue on the second one.  Even with
> terminateOnException set to false I get an exception on the second
> file. Note that either file runs fine if run individually by hand I.E
> put a single file in the eirectory and run it and then put the other
> in and run again.  Could this be a problem where smooks is not fully
> closing before I create a new instance and run the next file?
>
> The same thing happens when terminateOnException is set to true.
>
> Tom
>
> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>
>> I'm not disappointed at all :)
>>
>> Take the second case again (the one that's failing) and turn off
>> "terminateOnException" and see what happen.  See
>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>
>>
>> On 12/06/2012 20:22, Tom Masterson wrote:
>>> Sorry to disappoint but when run the first way, with the
>>> eventlistener active, there are no exceptions in either the report
>>> or the log, no mention of MVEL, and the code from the expression is
>>> put in the result as it should be.  In the second case,
>>> eventlistener inactive, the exception is in the log and the code is
>>> not put in the result.
>>>
>>> Tom
>>>
>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>
>>>> I'm fairly sure the error you are seeing (on the second run)
>>>> happens in both cases.  You don't see it so visibly in the first
>>>> run because smooks doesn't abort when you run with an event
>>>> listener enabled (but you should be able to see it somewhere in the
>>>> report).
>>>>
>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>
>>>> Regards,
>>>>
>>>> Tom.
>>>>
>>>>
>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>> Good Morning
>>>>>
>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>
>>>>> I have the following configuration, Note this is only a part of
>>>>> the total configuration:
>>>>>
>>>>> <jb:bean beanId="domesticCitation"
>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>> createOnElement="DomesticPatentDocument">
>>>>> <jb:value property="officialId"
>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>> <jb:value property="country"
>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>> <jb:value property="publicationDate"
>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>> <jb:value property="consideredBy"
>>>>> data="consideredByExaminerIndicator"/>
>>>>> <jb:value property="strippedGrantName"
>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>> </jb:value>
>>>>> <jb:expression
>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>> </jb:bean>
>>>>>
>>>>> If it is run with the following code:
>>>>>
>>>>>         ExecutionContext executionContext =
>>>>> smooks.createExecutionContext();
>>>>>         JavaResult result = new JavaResult();
>>>>>         executionContext.setEventListener(new
>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>         smooks.filterSource(executionContext, new
>>>>> StringSource(messageIn), result);
>>>>>
>>>>> everything works just fine and I get the expected results.  
>>>>> However if you run it as follows:
>>>>>
>>>>>         ExecutionContext executionContext =
>>>>> smooks.createExecutionContext();
>>>>>         JavaResult result = new JavaResult();
>>>>>         //executionContext.setEventListener(new
>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>         smooks.filterSource(executionContext, new
>>>>> StringSource(messageIn), result);
>>>>>
>>>>> I get the following error:
>>>>>
>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>     at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>     at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>     at
>>>>> org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>     at
>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>     at
>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>     at
>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>     at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>     at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException:
>>>>> Error evaluating MVEL expression
>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object
>>>>> type
>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>> Common issues include:
>>>>>         1. Referencing a variable that is not bound into the
>>>>> context. In this case use the 'isdef' operator to check if the
>>>>> variable is bound in the context.
>>>>>         2. Invalid expression reference to a List/Array based
>>>>> variable token.  Example List/Array referencing expression token:
>>>>> 'order.orderItems[0].productId'.
>>>>>     at
>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>
>>>>>     ... 38 more
>>>>> Caused by: [Error: value US_PATENT]
>>>>> [Near : {... Unknown ....}]
>>>>>              ^
>>>>> [Line: 1, Column: 0]
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>     at
>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>     at
>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>     at
>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>     at
>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>     at
>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>     ... 47 more
>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>     ... 54 more
>>>>>
>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>> properties file.  Also the error disappears if I comment out the
>>>>> jb:expression line in the config.
>>>>>
>>>>> Can anyone suggest what is going on here?
>>>>>
>>>>> Tom Masterson
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
Ok I reworked the xml-to-java example to create the same error I am
seeing.  I did not go through and change all the comments etc and the data
is totally fake but the results are precisely the same.

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

xml-to-java.zip (82K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
In reply to this post by Tom Fennelly
This appears to have fixed the problem but if someone can explain why this
works it would be wonderful.  Note the only change is in the
smooks-config.xml.  It is not putting the correct citationType on foreign
citations but I will look at that further.

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

xml-to-java.zip (40K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: several messages

Tom Masterson-2
Further report.  the second package sent appears to solve it for the
sample data given but not for the larger set of data.  Rechicking package
to be sure I did not do something else odd.

Tom

On Tue, 12 Jun 2012, Tom Masterson wrote:

> Good Morning
>
> I have a problem that I can't find the solution for.  This probelm occurs in
> both 1.4.2 and 1.6-SNAPSHOT.
>
> I have the following configuration, Note this is only a part of the total
> configuration:
>
>    <jb:bean beanId="domesticCitation"
> class="gov.uspto.pe2e.esb.model.IngestCitation"
> createOnElement="DomesticPatentDocument">
>        <jb:value property="officialId"
> data="patentIdentification/grantIdentification/grantNumber"/>
>        <jb:value property="country"
> data="patentIdentification/grantIdentification/countryCode"/>
>        <jb:value property="publicationDate"
> data="patentIdentification/grantIdentification/issueDateText"/>
>        <jb:value property="author" data="inventorName/personFullName"/>
>        <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>        <jb:value property="consideredBy"
> data="consideredByExaminerIndicator"/>
>        <jb:value property="strippedGrantName"
> data="patentIdentification/grantIdentification/grantNumber">
>            <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>        </jb:value>
>        <jb:expression
> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>    </jb:bean>
>
> If it is run with the following code:
>
>        ExecutionContext executionContext = smooks.createExecutionContext();
>        JavaResult result = new JavaResult();
>        executionContext.setEventListener(new
> HtmlReportGenerator("target/report/report.html"));
>        smooks.filterSource(executionContext, new StringSource(messageIn),
> result);
>
> everything works just fine and I get the expected results.  However if you
> run it as follows:
>
>        ExecutionContext executionContext = smooks.createExecutionContext();
>        JavaResult result = new JavaResult();
>        //executionContext.setEventListener(new
> HtmlReportGenerator("target/report/report.html"));
>        smooks.filterSource(executionContext, new StringSource(messageIn),
> result);
>
> I get the following error:
>
> org.milyn.SmooksException: Unable to filter InputStream for target profile
> [org.milyn.profile.Profile#default_profile].
> at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
> at
> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
> at
> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
> at org.milyn.Smooks._filter(Smooks.java:516)
> at org.milyn.Smooks.filterSource(Smooks.java:475)
> at
> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
> at
> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
> at
> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
> at
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
> at
> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
> at
> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
> at
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
> at
> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
> at
> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
> at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
> at
> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
> at
> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
> at
> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
> at
> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
> at $Proxy0.invoke(Unknown Source)
> at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
> at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
> evaluating MVEL expression 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT'
> against object type
> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
> Common issues include:
> 1. Referencing a variable that is not bound into the context.
> In this case use the 'isdef' operator to check if the variable is bound in
> the context.
> 2. Invalid expression reference to a List/Array based
> variable token.  Example List/Array referencing expression token:
> 'order.orderItems[0].productId'.
> at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
> at
> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
> at
> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
> at
> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
> at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
> at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
> at
> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
> at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
> at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
> at
> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
> ... 38 more
> Caused by: [Error: value US_PATENT]
> [Near : {... Unknown ....}]
>             ^
> [Line: 1, Column: 0]
> at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
> at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
> at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
> at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
> at
> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
> at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
> at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
> ... 47 more
> Caused by: java.lang.IllegalArgumentException: value US_PATENT
> at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
> at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
> at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
> at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
> ... 54 more
>
> I can also avoid the error by setting smooks to debug in the log4j properties
> file.  Also the error disappears if I comment out the jb:expression line in
> the config.
>
> Can anyone suggest what is going on here?
>
> Tom Masterson
>

On Tue, 12 Jun 2012, Tom Masterson wrote:

> Sorry to disappoint but when run the first way, with the eventlistener
> active, there are no exceptions in either the report or the log, no mention
> of MVEL, and the code from the expression is put in the result as it should
> be.  In the second case, eventlistener inactive, the exception is in the log
> and the code is not put in the result.
>
> Tom
>
> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>
>> I'm fairly sure the error you are seeing (on the second run) happens in
>> both cases.  You don't see it so visibly in the first run because smooks
>> doesn't abort when you run with an event listener enabled (but you should
>> be able to see it somewhere in the report).
>>
>> So... your expression config is not right (MVEL doesn't like it).
>>
>> Regards,
>>
>> Tom.
>>
>>
>> On 12/06/2012 19:34, Tom Masterson wrote:
>>> Good Morning
>>>
>>> I have a problem that I can't find the solution for.  This probelm occurs
>>> in both 1.4.2 and 1.6-SNAPSHOT.
>>>
>>> I have the following configuration, Note this is only a part of the total
>>> configuration:
>>>
>>> <jb:bean beanId="domesticCitation"
>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>> createOnElement="DomesticPatentDocument">
>>> <jb:value property="officialId"
>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>> <jb:value property="country"
>>> data="patentIdentification/grantIdentification/countryCode"/>
>>> <jb:value property="publicationDate"
>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>> <jb:value property="author" data="inventorName/personFullName"/>
>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>> <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
>>> <jb:value property="strippedGrantName"
>>> data="patentIdentification/grantIdentification/grantNumber">
>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>> </jb:value>
>>> <jb:expression
>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>> </jb:bean>
>>>
>>> If it is run with the following code:
>>>
>>>         ExecutionContext executionContext =
>>> smooks.createExecutionContext();
>>>         JavaResult result = new JavaResult();
>>>         executionContext.setEventListener(new
>>> HtmlReportGenerator("target/report/report.html"));
>>>         smooks.filterSource(executionContext, new StringSource(messageIn),
>>> result);
>>>
>>> everything works just fine and I get the expected results.  However if you
>>> run it as follows:
>>>
>>>         ExecutionContext executionContext =
>>> smooks.createExecutionContext();
>>>         JavaResult result = new JavaResult();
>>>         //executionContext.setEventListener(new
>>> HtmlReportGenerator("target/report/report.html"));
>>>         smooks.filterSource(executionContext, new StringSource(messageIn),
>>> result);
>>>
>>> I get the following error:
>>>
>>> org.milyn.SmooksException: Unable to filter InputStream for target profile
>>> [org.milyn.profile.Profile#default_profile].
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>     at
>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>     at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>     at
>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>     at
>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>     at
>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>     at
>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>     at
>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>     at
>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>     at
>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>     at $Proxy0.invoke(Unknown Source)
>>>     at
>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>     at
>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>     at
>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>> evaluating MVEL expression
>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>> Common issues include:
>>>         1. Referencing a variable that is not bound into the context. In
>>> this case use the 'isdef' operator to check if the variable is bound in
>>> the context.
>>>         2. Invalid expression reference to a List/Array based variable
>>> token.  Example List/Array referencing expression token:
>>> 'order.orderItems[0].productId'.
>>>     at
>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>     at
>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>     at
>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>     ... 38 more
>>> Caused by: [Error: value US_PATENT]
>>> [Near : {... Unknown ....}]
>>>              ^
>>> [Line: 1, Column: 0]
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>     at
>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>     at
>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>     at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>     at
>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>     at
>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>     ... 47 more
>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>     at
>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>     ... 54 more
>>>
>>> I can also avoid the error by setting smooks to debug in the log4j
>>> properties file.  Also the error disappears if I comment out the
>>> jb:expression line in the config.
>>>
>>> Can anyone suggest what is going on here?
>>>
>>> Tom Masterson
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>

On Tue, 12 Jun 2012, Tom Masterson wrote:

> More and more interesting!
>
> I have two xml files that get processed through that particular fragment
> sequentially with smooks.close() being executed between each and it appears
> to be having the issue on the second one.  Even with terminateOnException set
> to false I get an exception on the second file. Note that either file runs
> fine if run individually by hand I.E put a single file in the eirectory and
> run it and then put the other in and run again.  Could this be a problem
> where smooks is not fully closing before I create a new instance and run the
> next file?
>
> The same thing happens when terminateOnException is set to true.
>
> Tom
>
> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>
>> I'm not disappointed at all :)
>>
>> Take the second case again (the one that's failing) and turn off
>> "terminateOnException" and see what happen.  See
>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>
>>
>> On 12/06/2012 20:22, Tom Masterson wrote:
>>> Sorry to disappoint but when run the first way, with the eventlistener
>>> active, there are no exceptions in either the report or the log, no
>>> mention of MVEL, and the code from the expression is put in the result as
>>> it should be.  In the second case, eventlistener inactive, the exception
>>> is in the log and the code is not put in the result.
>>>
>>> Tom
>>>
>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>
>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>> doesn't abort when you run with an event listener enabled (but you should
>>>> be able to see it somewhere in the report).
>>>>
>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>
>>>> Regards,
>>>>
>>>> Tom.
>>>>
>>>>
>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>> Good Morning
>>>>>
>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>
>>>>> I have the following configuration, Note this is only a part of the
>>>>> total configuration:
>>>>>
>>>>> <jb:bean beanId="domesticCitation"
>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>> createOnElement="DomesticPatentDocument">
>>>>> <jb:value property="officialId"
>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>> <jb:value property="country"
>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>> <jb:value property="publicationDate"
>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>> <jb:value property="consideredBy" data="consideredByExaminerIndicator"/>
>>>>> <jb:value property="strippedGrantName"
>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>> </jb:value>
>>>>> <jb:expression
>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>> </jb:bean>
>>>>>
>>>>> If it is run with the following code:
>>>>>
>>>>>         ExecutionContext executionContext =
>>>>> smooks.createExecutionContext();
>>>>>         JavaResult result = new JavaResult();
>>>>>         executionContext.setEventListener(new
>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>         smooks.filterSource(executionContext, new
>>>>> StringSource(messageIn), result);
>>>>>
>>>>> everything works just fine and I get the expected results.  However if
>>>>> you run it as follows:
>>>>>
>>>>>         ExecutionContext executionContext =
>>>>> smooks.createExecutionContext();
>>>>>         JavaResult result = new JavaResult();
>>>>>         //executionContext.setEventListener(new
>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>         smooks.filterSource(executionContext, new
>>>>> StringSource(messageIn), result);
>>>>>
>>>>> I get the following error:
>>>>>
>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>     at
>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>     at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>     at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>     at
>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>     at
>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>     at
>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>     at
>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>     at
>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>     at
>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>     at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>     at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>     at
>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>> evaluating MVEL expression
>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>> Common issues include:
>>>>>         1. Referencing a variable that is not bound into the context. In
>>>>> this case use the 'isdef' operator to check if the variable is bound in
>>>>> the context.
>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>> token.  Example List/Array referencing expression token:
>>>>> 'order.orderItems[0].productId'.
>>>>>     at
>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>     at
>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>     at
>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>     ... 38 more
>>>>> Caused by: [Error: value US_PATENT]
>>>>> [Near : {... Unknown ....}]
>>>>>              ^
>>>>> [Line: 1, Column: 0]
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>     at
>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>     at
>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>     at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>     at
>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>     at
>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>     ... 47 more
>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>     at
>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>     ... 54 more
>>>>>
>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>> properties file.  Also the error disappears if I comment out the
>>>>> jb:expression line in the config.
>>>>>
>>>>> Can anyone suggest what is going on here?
>>>>>
>>>>> Tom Masterson
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>

On Wed, 13 Jun 2012, Tom Masterson wrote:

> Ok I reworked the xml-to-java example to create the same error I am seeing.
> I did not go through and change all the comments etc and the data is totally
> fake but the results are precisely the same.
>
> Tom
>
> On Wed, 13 Jun 2012, Tom Fennelly wrote:
>
>> You'd need to package up an example that reproduces this.  Too hard to
>> diagnose in an email.  See http://goo.gl/vYHuC
>>
>> On 12/06/2012 22:48, Tom Masterson wrote:
>>> More and more interesting!
>>>
>>> I have two xml files that get processed through that particular fragment
>>> sequentially with smooks.close() being executed between each and it
>>> appears to be having the issue on the second one.  Even with
>>> terminateOnException set to false I get an exception on the second file.
>>> Note that either file runs fine if run individually by hand I.E put a
>>> single file in the eirectory and run it and then put the other in and run
>>> again.  Could this be a problem where smooks is not fully closing before I
>>> create a new instance and run the next file?
>>>
>>> The same thing happens when terminateOnException is set to true.
>>>
>>> Tom
>>>
>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>
>>>> I'm not disappointed at all :)
>>>>
>>>> Take the second case again (the one that's failing) and turn off
>>>> "terminateOnException" and see what happen.  See
>>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>>
>>>>
>>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>>> active, there are no exceptions in either the report or the log, no
>>>>> mention of MVEL, and the code from the expression is put in the result
>>>>> as it should be.  In the second case, eventlistener inactive, the
>>>>> exception is in the log and the code is not put in the result.
>>>>>
>>>>> Tom
>>>>>
>>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>>
>>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>>> both cases.  You don't see it so visibly in the first run because
>>>>>> smooks doesn't abort when you run with an event listener enabled (but
>>>>>> you should be able to see it somewhere in the report).
>>>>>>
>>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Tom.
>>>>>>
>>>>>>
>>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>>> Good Morning
>>>>>>>
>>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>>
>>>>>>> I have the following configuration, Note this is only a part of the
>>>>>>> total configuration:
>>>>>>>
>>>>>>> <jb:bean beanId="domesticCitation"
>>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>>> createOnElement="DomesticPatentDocument">
>>>>>>> <jb:value property="officialId"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>>> <jb:value property="country"
>>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>>> <jb:value property="publicationDate"
>>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>>> <jb:value property="consideredBy"
>>>>>>> data="consideredByExaminerIndicator"/>
>>>>>>> <jb:value property="strippedGrantName"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>>> </jb:value>
>>>>>>> <jb:expression
>>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>>> </jb:bean>
>>>>>>>
>>>>>>> If it is run with the following code:
>>>>>>>
>>>>>>>         ExecutionContext executionContext =
>>>>>>> smooks.createExecutionContext();
>>>>>>>         JavaResult result = new JavaResult();
>>>>>>>         executionContext.setEventListener(new
>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>         smooks.filterSource(executionContext, new
>>>>>>> StringSource(messageIn), result);
>>>>>>>
>>>>>>> everything works just fine and I get the expected results.  However if
>>>>>>> you run it as follows:
>>>>>>>
>>>>>>>         ExecutionContext executionContext =
>>>>>>> smooks.createExecutionContext();
>>>>>>>         JavaResult result = new JavaResult();
>>>>>>>         //executionContext.setEventListener(new
>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>         smooks.filterSource(executionContext, new
>>>>>>> StringSource(messageIn), result);
>>>>>>>
>>>>>>> I get the following error:
>>>>>>>
>>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>     at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>     at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>     at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>     at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>>> evaluating MVEL expression
>>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>>> Common issues include:
>>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>>> In this case use the 'isdef' operator to check if the variable is
>>>>>>> bound in the context.
>>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>>> token.  Example List/Array referencing expression token:
>>>>>>> 'order.orderItems[0].productId'.
>>>>>>>     at
>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>>     ... 38 more
>>>>>>> Caused by: [Error: value US_PATENT]
>>>>>>> [Near : {... Unknown ....}]
>>>>>>>              ^
>>>>>>> [Line: 1, Column: 0]
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>>     at
>>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>>     at
>>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>>     at
>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>>     ... 47 more
>>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>>     ... 54 more
>>>>>>>
>>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>>> jb:expression line in the config.
>>>>>>>
>>>>>>> Can anyone suggest what is going on here?
>>>>>>>
>>>>>>> Tom Masterson
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>   http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>

On Wed, 13 Jun 2012, Tom Masterson wrote:

> This appears to have fixed the problem but if someone can explain why this
> works it would be wonderful.  Note the only change is in the
> smooks-config.xml.  It is not putting the correct citationType on foreign
> citations but I will look at that further.
>
> Tom
>
> On Wed, 13 Jun 2012, Tom Fennelly wrote:
>
>> You'd need to package up an example that reproduces this.  Too hard to
>> diagnose in an email.  See http://goo.gl/vYHuC
>>
>> On 12/06/2012 22:48, Tom Masterson wrote:
>>> More and more interesting!
>>>
>>> I have two xml files that get processed through that particular fragment
>>> sequentially with smooks.close() being executed between each and it
>>> appears to be having the issue on the second one.  Even with
>>> terminateOnException set to false I get an exception on the second file.
>>> Note that either file runs fine if run individually by hand I.E put a
>>> single file in the eirectory and run it and then put the other in and run
>>> again.  Could this be a problem where smooks is not fully closing before I
>>> create a new instance and run the next file?
>>>
>>> The same thing happens when terminateOnException is set to true.
>>>
>>> Tom
>>>
>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>
>>>> I'm not disappointed at all :)
>>>>
>>>> Take the second case again (the one that's failing) and turn off
>>>> "terminateOnException" and see what happen.  See
>>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>>
>>>>
>>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>>> active, there are no exceptions in either the report or the log, no
>>>>> mention of MVEL, and the code from the expression is put in the result
>>>>> as it should be.  In the second case, eventlistener inactive, the
>>>>> exception is in the log and the code is not put in the result.
>>>>>
>>>>> Tom
>>>>>
>>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>>
>>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>>> both cases.  You don't see it so visibly in the first run because
>>>>>> smooks doesn't abort when you run with an event listener enabled (but
>>>>>> you should be able to see it somewhere in the report).
>>>>>>
>>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Tom.
>>>>>>
>>>>>>
>>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>>> Good Morning
>>>>>>>
>>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>>
>>>>>>> I have the following configuration, Note this is only a part of the
>>>>>>> total configuration:
>>>>>>>
>>>>>>> <jb:bean beanId="domesticCitation"
>>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>>> createOnElement="DomesticPatentDocument">
>>>>>>> <jb:value property="officialId"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>>> <jb:value property="country"
>>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>>> <jb:value property="publicationDate"
>>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>>> <jb:value property="consideredBy"
>>>>>>> data="consideredByExaminerIndicator"/>
>>>>>>> <jb:value property="strippedGrantName"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>>> </jb:value>
>>>>>>> <jb:expression
>>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>>> </jb:bean>
>>>>>>>
>>>>>>> If it is run with the following code:
>>>>>>>
>>>>>>>         ExecutionContext executionContext =
>>>>>>> smooks.createExecutionContext();
>>>>>>>         JavaResult result = new JavaResult();
>>>>>>>         executionContext.setEventListener(new
>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>         smooks.filterSource(executionContext, new
>>>>>>> StringSource(messageIn), result);
>>>>>>>
>>>>>>> everything works just fine and I get the expected results.  However if
>>>>>>> you run it as follows:
>>>>>>>
>>>>>>>         ExecutionContext executionContext =
>>>>>>> smooks.createExecutionContext();
>>>>>>>         JavaResult result = new JavaResult();
>>>>>>>         //executionContext.setEventListener(new
>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>         smooks.filterSource(executionContext, new
>>>>>>> StringSource(messageIn), result);
>>>>>>>
>>>>>>> I get the following error:
>>>>>>>
>>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>>     at
>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>     at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>     at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>>     at
>>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>>     at
>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>     at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>     at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>>     at
>>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>>> evaluating MVEL expression
>>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>>> Common issues include:
>>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>>> In this case use the 'isdef' operator to check if the variable is
>>>>>>> bound in the context.
>>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>>> token.  Example List/Array referencing expression token:
>>>>>>> 'order.orderItems[0].productId'.
>>>>>>>     at
>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>>     at
>>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>>     at
>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>>     ... 38 more
>>>>>>> Caused by: [Error: value US_PATENT]
>>>>>>> [Near : {... Unknown ....}]
>>>>>>>              ^
>>>>>>> [Line: 1, Column: 0]
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>>     at
>>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>>     at
>>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>>     at
>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>>     ... 47 more
>>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>>     at
>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>>     ... 54 more
>>>>>>>
>>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>>> jb:expression line in the config.
>>>>>>>
>>>>>>> Can anyone suggest what is going on here?
>>>>>>>
>>>>>>> Tom Masterson
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>   http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
In reply to this post by Tom Fennelly
It seems to have something to do with the number of items in the list
maybe?  When there ar a large number is citations of any type I seem to
get the error.  I wouldn't think this was an issue but maybe???

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
In reply to this post by Tom Fennelly
This appears to be numbers related.  I have attached a message2.xml which
if dropped in to the package I posted previously will cause the error.  It
appears to happen at around 52 domesticpatentdocument entries.  Have not
tried for a number on the nplcitation entries but that also seems to be
related to how many there are in the document.

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

message2.xml (48K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Masterson-2
In reply to this post by Tom Fennelly
For the sake of completeness I have attached a new package that reflects
some changes in the smooks-config and teh addition of a log4j.xml that
properly puts logging to a file.  THe latest log is also included.  This
particular one fails.  To make it succeded you can uncomment the
eventlistener lin in Main.java or set the org.milyn.javabean entry in the
log4j.xml file to debug.

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

xml-to-java.zip (52K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

lvdhoek
Sorry for resurrecting this old thread, but I myself continue to experience exactly this problem, even using the latest MVEL 2.1.6.Final release. Also, this is the only mention of this issue I can find on Google.

I'm wondering if you did solve the problem in the end? I couldn't find a JIRA ticket, should we make one?

Thanks,

László

Tom Masterson-2 wrote
For the sake of completeness I have attached a new package that reflects
some changes in the smooks-config and teh addition of a log4j.xml that
properly puts logging to a file.  THe latest log is also included.  This
particular one fails.  To make it succeded you can uncomment the
eventlistener lin in Main.java or set the org.milyn.javabean entry in the
log4j.xml file to debug.

Tom

On Wed, 13 Jun 2012, Tom Fennelly wrote:

> You'd need to package up an example that reproduces this.  Too hard to
> diagnose in an email.  See http://goo.gl/vYHuC
>
> On 12/06/2012 22:48, Tom Masterson wrote:
>> More and more interesting!
>>
>> I have two xml files that get processed through that particular fragment
>> sequentially with smooks.close() being executed between each and it appears
>> to be having the issue on the second one.  Even with terminateOnException
>> set to false I get an exception on the second file. Note that either file
>> runs fine if run individually by hand I.E put a single file in the
>> eirectory and run it and then put the other in and run again.  Could this
>> be a problem where smooks is not fully closing before I create a new
>> instance and run the next file?
>>
>> The same thing happens when terminateOnException is set to true.
>>
>> Tom
>>
>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>
>>> I'm not disappointed at all :)
>>>
>>> Take the second case again (the one that's failing) and turn off
>>> "terminateOnException" and see what happen.  See
>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>
>>>
>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>> active, there are no exceptions in either the report or the log, no
>>>> mention of MVEL, and the code from the expression is put in the result as
>>>> it should be.  In the second case, eventlistener inactive, the exception
>>>> is in the log and the code is not put in the result.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm fairly sure the error you are seeing (on the second run) happens in
>>>>> both cases.  You don't see it so visibly in the first run because smooks
>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>> should be able to see it somewhere in the report).
>>>>>
>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tom.
>>>>>
>>>>>
>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>> Good Morning
>>>>>>
>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>
>>>>>> I have the following configuration, Note this is only a part of the
>>>>>> total configuration:
>>>>>>
>>>>>> <jb:bean beanId="domesticCitation"
>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>> createOnElement="DomesticPatentDocument">
>>>>>> <jb:value property="officialId"
>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>>>>>> <jb:value property="country"
>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>>>>>> <jb:value property="publicationDate"
>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>>>>>> <jb:value property="author" data="inventorName/personFullName"/>
>>>>>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>>>>>> <jb:value property="consideredBy"
>>>>>> data="consideredByExaminerIndicator"/>
>>>>>> <jb:value property="strippedGrantName"
>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>>>>>> <jb:decodeParam name="valuePreprocess">value.replaceAll(" ",
>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>> "").replaceAll(",", "").replaceAll("#", "")</jb:decodeParam>
>>>>>> </jb:value>
>>>>>> <jb:expression
>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT</jb:expression>
>>>>>> </jb:bean>
>>>>>>
>>>>>> If it is run with the following code:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> everything works just fine and I get the expected results.  However if
>>>>>> you run it as follows:
>>>>>>
>>>>>>         ExecutionContext executionContext =
>>>>>> smooks.createExecutionContext();
>>>>>>         JavaResult result = new JavaResult();
>>>>>>         //executionContext.setEventListener(new
>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>         smooks.filterSource(executionContext, new
>>>>>> StringSource(messageIn), result);
>>>>>>
>>>>>> I get the following error:
>>>>>>
>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>     at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>     at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>     at
>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>     at
>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>     at
>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>     at
>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>     at
>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>     at
>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>     at $Proxy0.invoke(Unknown Source)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>     at
>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>> evaluating MVEL expression
>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object type
>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>> Common issues include:
>>>>>>         1. Referencing a variable that is not bound into the context.
>>>>>> In this case use the 'isdef' operator to check if the variable is bound
>>>>>> in the context.
>>>>>>         2. Invalid expression reference to a List/Array based variable
>>>>>> token.  Example List/Array referencing expression token:
>>>>>> 'order.orderItems[0].productId'.
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>     at
>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>     at
>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>     ... 38 more
>>>>>> Caused by: [Error: value US_PATENT]
>>>>>> [Near : {... Unknown ....}]
>>>>>>              ^
>>>>>> [Line: 1, Column: 0]
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>     at
>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>     at
>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>     at
>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>     at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>     at
>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>     ... 47 more
>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>     at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>     at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>     at
>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>     ... 54 more
>>>>>>
>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>> jb:expression line in the config.
>>>>>>
>>>>>> Can anyone suggest what is going on here?
>>>>>>
>>>>>> Tom Masterson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>   http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


xml-to-java.zip (52K) <http://milyn.996300.n3.nabble.com/attachment/2765/0/xml-to-java.zip>
Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Fennelly
Sorry... can you outline the problem you are having.  The thread you are
referring to is a bit confusing because I think a number of things were
going wrong there, possibly from invalid use of the smooks instance
(possibly calling smooks.close() and then reusing the smooks instance).

On 17/09/2013 11:27, lvdhoek wrote:

> Sorry for resurrecting this old thread, but I myself continue to experience
> exactly this problem, even using the latest MVEL 2.1.6.Final release. Also,
> this is the only mention of this issue I can find on Google.
>
> I'm wondering if you did solve the problem in the end? I couldn't find a
> JIRA ticket, should we make one?
>
> Thanks,
>
> László
>
>
> Tom Masterson-2 wrote
>> For the sake of completeness I have attached a new package that reflects
>> some changes in the smooks-config and teh addition of a log4j.xml that
>> properly puts logging to a file.  THe latest log is also included.  This
>> particular one fails.  To make it succeded you can uncomment the
>> eventlistener lin in Main.java or set the org.milyn.javabean entry in the
>> log4j.xml file to debug.
>>
>> Tom
>>
>> On Wed, 13 Jun 2012, Tom Fennelly wrote:
>>
>>> You'd need to package up an example that reproduces this.  Too hard to
>>> diagnose in an email.  See http://goo.gl/vYHuC
>>>
>>> On 12/06/2012 22:48, Tom Masterson wrote:
>>>> More and more interesting!
>>>>
>>>> I have two xml files that get processed through that particular fragment
>>>> sequentially with smooks.close() being executed between each and it
>>>> appears
>>>> to be having the issue on the second one.  Even with
>>>> terminateOnException
>>>> set to false I get an exception on the second file. Note that either
>>>> file
>>>> runs fine if run individually by hand I.E put a single file in the
>>>> eirectory and run it and then put the other in and run again.  Could
>>>> this
>>>> be a problem where smooks is not fully closing before I create a new
>>>> instance and run the next file?
>>>>
>>>> The same thing happens when terminateOnException is set to true.
>>>>
>>>> Tom
>>>>
>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>
>>>>> I'm not disappointed at all :)
>>>>>
>>>>> Take the second case again (the one that's failing) and turn off
>>>>> "terminateOnException" and see what happen.  See
>>>>> http://www.smooks.org/mediawiki/index.php?title=V1.5:Smooks_v1.5_User_Guide#Filter_Settings
>>>>>
>>>>>
>>>>> On 12/06/2012 20:22, Tom Masterson wrote:
>>>>>> Sorry to disappoint but when run the first way, with the eventlistener
>>>>>> active, there are no exceptions in either the report or the log, no
>>>>>> mention of MVEL, and the code from the expression is put in the result
>>>>>> as
>>>>>> it should be.  In the second case, eventlistener inactive, the
>>>>>> exception
>>>>>> is in the log and the code is not put in the result.
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> On Tue, 12 Jun 2012, Tom Fennelly wrote:
>>>>>>
>>>>>>> I'm fairly sure the error you are seeing (on the second run) happens
>>>>>>> in
>>>>>>> both cases.  You don't see it so visibly in the first run because
>>>>>>> smooks
>>>>>>> doesn't abort when you run with an event listener enabled (but you
>>>>>>> should be able to see it somewhere in the report).
>>>>>>>
>>>>>>> So... your expression config is not right (MVEL doesn't like it).
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Tom.
>>>>>>>
>>>>>>>
>>>>>>> On 12/06/2012 19:34, Tom Masterson wrote:
>>>>>>>> Good Morning
>>>>>>>>
>>>>>>>> I have a problem that I can't find the solution for.  This probelm
>>>>>>>> occurs in both 1.4.2 and 1.6-SNAPSHOT.
>>>>>>>>
>>>>>>>> I have the following configuration, Note this is only a part of the
>>>>>>>> total configuration:
>>>>>>>>
>>>>>>>>
>> <jb:bean beanId="domesticCitation"
>>>>>>> class="gov.uspto.pe2e.esb.model.IngestCitation"
>>>>>>>> createOnElement="DomesticPatentDocument">
>>>>>>>>
>> <jb:value property="officialId"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber"/>
>> <jb:value property="country"
>>>>>>> data="patentIdentification/grantIdentification/countryCode"/>
>> <jb:value property="publicationDate"
>>>>>>> data="patentIdentification/grantIdentification/issueDateText"/>
>> <jb:value property="author" data="inventorName/personFullName"/>
>> <jb:value property="citedBy" data="citedByExaminerIndicator"/>
>> <jb:value property="consideredBy"
>>>>>>> data="consideredByExaminerIndicator"/>
>> <jb:value property="strippedGrantName"
>>>>>>> data="patentIdentification/grantIdentification/grantNumber">
>> <jb:decodeParam name="valuePreprocess">
>> value.replaceAll(" ",
>>>>>>>> "").replaceAll("-", "").replaceAll("/", "").replaceAll("\\.",
>>>>>>>> "").replaceAll(",", "").replaceAll("#", "")
>> </jb:decodeParam>
>> </jb:value>
>> <jb:expression
>>>>>>> property="citationType">gov.uspto.pe2e.esb.model.CitationType.US_PATENT
>> </jb:expression>
>> </jb:bean>
>>>>>>>> If it is run with the following code:
>>>>>>>>
>>>>>>>>          ExecutionContext executionContext =
>>>>>>>> smooks.createExecutionContext();
>>>>>>>>          JavaResult result = new JavaResult();
>>>>>>>>          executionContext.setEventListener(new
>>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>>          smooks.filterSource(executionContext, new
>>>>>>>> StringSource(messageIn), result);
>>>>>>>>
>>>>>>>> everything works just fine and I get the expected results.  However
>>>>>>>> if
>>>>>>>> you run it as follows:
>>>>>>>>
>>>>>>>>          ExecutionContext executionContext =
>>>>>>>> smooks.createExecutionContext();
>>>>>>>>          JavaResult result = new JavaResult();
>>>>>>>>          //executionContext.setEventListener(new
>>>>>>>> HtmlReportGenerator("target/report/report.html"));
>>>>>>>>          smooks.filterSource(executionContext, new
>>>>>>>> StringSource(messageIn), result);
>>>>>>>>
>>>>>>>> I get the following error:
>>>>>>>>
>>>>>>>> org.milyn.SmooksException: Unable to filter InputStream for target
>>>>>>>> profile [org.milyn.profile.Profile#default_profile].
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
>>>>>>>>      at org.milyn.Smooks._filter(Smooks.java:516)
>>>>>>>>      at org.milyn.Smooks.filterSource(Smooks.java:475)
>>>>>>>>      at
>>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.parseDocument(ParseXml4ipAction.java:156)
>>>>>>>>      at
>>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipAction.ingest(ParseXml4ipAction.java:99)
>>>>>>>>      at
>>>>>>>> gov.uspto.pe2e.esb.action.ParseXml4ipActionTest.parseTest(ParseXml4ipActionTest.java:78)
>>>>>>>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>      at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>>      at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>>>>>>>      at
>>>>>>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>>>>>>>      at
>>>>>>>> org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
>>>>>>>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>      at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>>      at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>>>>>>>>      at $Proxy0.invoke(Unknown Source)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>>>>>>>>      at
>>>>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>>>>>>> Caused by: org.milyn.expression.ExpressionEvaluationException: Error
>>>>>>>> evaluating MVEL expression
>>>>>>>> 'gov.uspto.pe2e.esb.model.CitationType.US_PATENT' against object
>>>>>>>> type
>>>>>>>> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
>>>>>>>> Common issues include:
>>>>>>>>          1. Referencing a variable that is not bound into the
>>>>>>>> context.
>>>>>>>> In this case use the 'isdef' operator to check if the variable is
>>>>>>>> bound
>>>>>>>> in the context.
>>>>>>>>          2. Invalid expression reference to a List/Array based
>>>>>>>> variable
>>>>>>>> token.  Example List/Array referencing expression token:
>>>>>>>> 'order.orderItems[0].productId'.
>>>>>>>>      at
>>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>>>>>>>>      at
>>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>>>>>>>>      at
>>>>>>>> org.milyn.javabean.BeanInstancePopulator.bindDomDataValue(BeanInstancePopulator.java:382)
>>>>>>>>      at
>>>>>>>> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:319)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:778)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:717)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
>>>>>>>>      at
>>>>>>>> org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
>>>>>>>>      ... 38 more
>>>>>>>> Caused by: [Error: value US_PATENT]
>>>>>>>> [Near : {... Unknown ....}]
>>>>>>>>               ^
>>>>>>>> [Line: 1, Column: 0]
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:783)
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:255)
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
>>>>>>>>      at
>>>>>>>> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
>>>>>>>>      at
>>>>>>>> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
>>>>>>>>      at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
>>>>>>>>      at
>>>>>>>> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>>>>>>>>      ... 47 more
>>>>>>>> Caused by: java.lang.IllegalArgumentException: value US_PATENT
>>>>>>>>      at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:893)
>>>>>>>>      at
>>>>>>>> org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:996)
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1086)
>>>>>>>>      at
>>>>>>>> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:666)
>>>>>>>>      ... 54 more
>>>>>>>>
>>>>>>>> I can also avoid the error by setting smooks to debug in the log4j
>>>>>>>> properties file.  Also the error disappears if I comment out the
>>>>>>>> jb:expression line in the config.
>>>>>>>>
>>>>>>>> Can anyone suggest what is going on here?
>>>>>>>>
>>>>>>>> Tom Masterson
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>>
>>>>>>>>     http://xircles.codehaus.org/manage_email
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>     http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>     http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>      http://xircles.codehaus.org/manage_email
>>
>>
>> xml-to-java.zip (52K)
>> &lt;http://milyn.996300.n3.nabble.com/attachment/2765/0/xml-to-java.zip&gt;
>
>
>
>
> --
> View this message in context: http://milyn.996300.n3.nabble.com/Strange-error-while-parsing-xml-tp2759p8681.html
> Sent from the milyn - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

lvdhoek
The problem is that we're using Smooks to convert XML to an object model containing enums. Occasionally, the conversion fails with a stack trace almost identical to the one described in this thread:

org.milyn.SmooksException: Failed to filter source.
        at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)
        at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
        at org.milyn.Smooks._filter(Smooks.java:516)
        at org.milyn.Smooks.filterSource(Smooks.java:475)
        at org.milyn.container.plugin.PayloadProcessor.process(PayloadProcessor.java:112)
        at nl.company.esb.common.actions.SmooksAction.process(SmooksAction.java:282)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
        at org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
        at org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
        at sun.reflect.GeneratedMethodAccessor566.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205)
        at org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:258)
        at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:150)
        at $Proxy734.onMessage(Unknown Source)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:179)
        at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:167)
        at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:879)
        at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_2136239237.invoke(SessionAspect_z_handleRun_2136239237.java)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
        at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:236)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
org.milyn.expression.ExpressionEvaluationException: Error evaluating MVEL expression 'nl.company.common.domain.Domain.MOP_ENTRY_TYPE' against object type 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'. Common issues include:
                1. Referencing a variable that is not bound into the context. In this case use the 'isdef' operator to check if the variable is bound in the context.
                2. Invalid expression reference to a List/Array based variable token.  Example List/Array referencing expression token: 'order.orderItems[0].productId'.
        at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
        at org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
        at org.milyn.javabean.BeanInstancePopulator.bindSaxDataValue(BeanInstancePopulator.java:416)
        at org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:348)
        at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:389)
        at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204)
        at org.milyn.delivery.SmooksContentHandler.endElement(SmooksContentHandler.java:83)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:70)
        at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
        ... 33 more
Caused by: [Error: value MOP_ENTRY_TYPE]
[Near : {... nl.company.common.domain.Do ....}]
             ^
[Line: 1, Column: 1]
        at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:883)
        at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:243)
        at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
        at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
        at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
        at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
        at org.mvel2.MVEL.executeExpression(MVEL.java:930)
        at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
        ... 49 more
Caused by: java.lang.IllegalArgumentException: value MOP_ENTRY_TYPE
        at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:906)
        at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1014)
        at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1229)
        at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanPropertyAO(ASMAccessorOptimizer.java:959)
        at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:808)
        ... 56 more


The nl.company.esb.common.actions.SmooksAction is a very slightly modified version of the org.jboss.soa.esb.smooks.SmooksAction (part of JBoss SOA-Platform 5) that just adds some extra information about the Message being processed to the execution context. Also, I believe we had this problem before we added those customizations. nl.company.common.domain.Domain is an enum Class and MOP_ENTRY_TYPE is one if its 22 possible values.

The problem occurs intermittently and I cannot predict when it happens, and for which enum value. If I packed it up into a unit test and ran it 10000 times in a loop I'm pretty sure it would occur, though. This appears to happen when all the instanceof checks in ClassWriter.newConstItem() fail on the Object being passed in. I don't understand Smooks well enough to be able to draw any conclusions from that; can you?

We do have enterprise support from RedHat for our SOA-P deployment, and I might involve them too eventually, but I figured that if I went straight to the source with this problem, everybody profits.
Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Tom Fennelly
Hmmm... sounds like it might be a classloader issue, but is really hard
to tell.  Wild guess.... is the Smooks instance being cached in some way
by the ESB action class (or something else) that causes the domain model
classes to be held after an app restart?  I think you're going to need
to get RH help on this to be honest.

On 18/09/2013 11:05, lvdhoek wrote:

> The problem is that we're using Smooks to convert XML to an object model
> containing enums. Occasionally, the conversion fails with a stack trace
> almost identical to the one described in this thread:
>
> org.milyn.SmooksException: Failed to filter source.
>          at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)
>          at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
>          at org.milyn.Smooks._filter(Smooks.java:516)
>          at org.milyn.Smooks.filterSource(Smooks.java:475)
>          at
> org.milyn.container.plugin.PayloadProcessor.process(PayloadProcessor.java:112)
>          at
> nl.company.esb.common.actions.SmooksAction.process(SmooksAction.java:282)
>          at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
>          at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
>          at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
>          at
> org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
>          at
> org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
>          at sun.reflect.GeneratedMethodAccessor566.invoke(Unknown Source)
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>          at java.lang.reflect.Method.invoke(Method.java:616)
>          at
> org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205)
>          at
> org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:258)
>          at
> org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:150)
>          at $Proxy734.onMessage(Unknown Source)
>          at
> org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:179)
>          at
> org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:167)
>          at
> org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:879)
>          at
> org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_2136239237.invoke(SessionAspect_z_handleRun_2136239237.java)
>          at
> org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
>          at
> org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
>          at
> org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
>          at
> org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
>          at
> org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
>          at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
>          at
> org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:236)
>          at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
>          at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
>          at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>          at java.lang.Thread.run(Thread.java:679)
> org.milyn.expression.ExpressionEvaluationException: Error evaluating MVEL
> expression 'nl.company.common.domain.Domain.MOP_ENTRY_TYPE' against object
> type
> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
> Common issues include:
>                  1. Referencing a variable that is not bound into the
> context. In this case use the 'isdef' operator to check if the variable is
> bound in the context.
>                  2. Invalid expression reference to a List/Array based
> variable token.  Example List/Array referencing expression token:
> 'order.orderItems[0].productId'.
>          at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>          at
> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>          at
> org.milyn.javabean.BeanInstancePopulator.bindSaxDataValue(BeanInstancePopulator.java:416)
>          at
> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:348)
>          at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:389)
>          at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204)
>          at
> org.milyn.delivery.SmooksContentHandler.endElement(SmooksContentHandler.java:83)
>          at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
>          at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> Source)
>          at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>          at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>          at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:70)
>          at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
>          ... 33 more
> Caused by: [Error: value MOP_ENTRY_TYPE]
> [Near : {... nl.company.common.domain.Do ....}]
>               ^
> [Line: 1, Column: 1]
>          at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:883)
>          at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:243)
>          at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
>          at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
>          at
> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
>          at
> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
>          at org.mvel2.MVEL.executeExpression(MVEL.java:930)
>          at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>          ... 49 more
> Caused by: java.lang.IllegalArgumentException: value MOP_ENTRY_TYPE
>          at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:906)
>          at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1014)
>          at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1229)
>          at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanPropertyAO(ASMAccessorOptimizer.java:959)
>          at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:808)
>          ... 56 more
>
>
> The nl.company.esb.common.actions.SmooksAction is a very slightly modified
> version of the org.jboss.soa.esb.smooks.SmooksAction (part of JBoss
> SOA-Platform 5) that just adds some extra information about the Message
> being processed to the execution context. Also, I believe we had this
> problem before we added those customizations.
> nl.company.common.domain.Domain is an enum Class and MOP_ENTRY_TYPE is one
> if its 22 possible values.
>
> The problem occurs intermittently and I cannot predict when it happens, and
> for which enum value. If I packed it up into a unit test and ran it 10000
> times in a loop I'm pretty sure it would occur, though. This appears to
> happen when all the instanceof checks in ClassWriter.newConstItem() fail on
> the Object being passed in. I don't understand Smooks well enough to be able
> to draw any conclusions from that; can you?
>
> We do have enterprise support from RedHat for our SOA-P deployment, and I
> might involve them too eventually, but I figured that if I went straight to
> the source with this problem, everybody profits.
>
>
>
> --
> View this message in context: http://milyn.996300.n3.nabble.com/Strange-error-while-parsing-xml-tp2759p8683.html
> Sent from the milyn - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

Dominik Baranowski
In reply to this post by lvdhoek
I ran into this problem as well. It does seem like its a classloader issue but I gave up trying to debug it. Instead I worked around it by writing a helper method that takes the value of the enum and converts it to the enum inside the java class. (Instead of getting smooks to do the enum conversion)

cheers
-dom

Sent from my iPhone

On Sep 18, 2013, at 3:05 AM, lvdhoek <[hidden email]> wrote:

> The problem is that we're using Smooks to convert XML to an object model
> containing enums. Occasionally, the conversion fails with a stack trace
> almost identical to the one described in this thread:
>
> org.milyn.SmooksException: Failed to filter source.
>        at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)
>        at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
>        at org.milyn.Smooks._filter(Smooks.java:516)
>        at org.milyn.Smooks.filterSource(Smooks.java:475)
>        at
> org.milyn.container.plugin.PayloadProcessor.process(PayloadProcessor.java:112)
>        at
> nl.company.esb.common.actions.SmooksAction.process(SmooksAction.java:282)
>        at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
>        at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
>        at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
>        at
> org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
>        at
> org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
>        at sun.reflect.GeneratedMethodAccessor566.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:616)
>        at
> org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205)
>        at
> org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:258)
>        at
> org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:150)
>        at $Proxy734.onMessage(Unknown Source)
>        at
> org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:179)
>        at
> org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:167)
>        at
> org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:879)
>        at
> org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_2136239237.invoke(SessionAspect_z_handleRun_2136239237.java)
>        at
> org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
>        at
> org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
>        at
> org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
>        at
> org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
>        at
> org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
>        at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
>        at
> org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:236)
>        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
>        at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
>        at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>        at java.lang.Thread.run(Thread.java:679)
> org.milyn.expression.ExpressionEvaluationException: Error evaluating MVEL
> expression 'nl.company.common.domain.Domain.MOP_ENTRY_TYPE' against object
> type
> 'org.milyn.javabean.context.StandaloneBeanContext$BeanContextMapAdapter'.
> Common issues include:
>                1. Referencing a variable that is not bound into the
> context. In this case use the 'isdef' operator to check if the variable is
> bound in the context.
>                2. Invalid expression reference to a List/Array based
> variable token.  Example List/Array referencing expression token:
> 'order.orderItems[0].productId'.
>        at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
>        at
> org.milyn.javabean.BeanInstancePopulator.bindExpressionValue(BeanInstancePopulator.java:476)
>        at
> org.milyn.javabean.BeanInstancePopulator.bindSaxDataValue(BeanInstancePopulator.java:416)
>        at
> org.milyn.javabean.BeanInstancePopulator.visitAfter(BeanInstancePopulator.java:348)
>        at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:389)
>        at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204)
>        at
> org.milyn.delivery.SmooksContentHandler.endElement(SmooksContentHandler.java:83)
>        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>        at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:70)
>        at
> org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
>        ... 33 more
> Caused by: [Error: value MOP_ENTRY_TYPE]
> [Near : {... nl.company.common.domain.Do ....}]
>             ^
> [Line: 1, Column: 1]
>        at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:883)
>        at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:243)
>        at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
>        at
> org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
>        at
> org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
>        at
> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
>        at org.mvel2.MVEL.executeExpression(MVEL.java:930)
>        at
> org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:97)
>        ... 49 more
> Caused by: java.lang.IllegalArgumentException: value MOP_ENTRY_TYPE
>        at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:906)
>        at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1014)
>        at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1229)
>        at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanPropertyAO(ASMAccessorOptimizer.java:959)
>        at
> org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:808)
>        ... 56 more
>
>
> The nl.company.esb.common.actions.SmooksAction is a very slightly modified
> version of the org.jboss.soa.esb.smooks.SmooksAction (part of JBoss
> SOA-Platform 5) that just adds some extra information about the Message
> being processed to the execution context. Also, I believe we had this
> problem before we added those customizations.
> nl.company.common.domain.Domain is an enum Class and MOP_ENTRY_TYPE is one
> if its 22 possible values.
>
> The problem occurs intermittently and I cannot predict when it happens, and
> for which enum value. If I packed it up into a unit test and ran it 10000
> times in a loop I'm pretty sure it would occur, though. This appears to
> happen when all the instanceof checks in ClassWriter.newConstItem() fail on
> the Object being passed in. I don't understand Smooks well enough to be able
> to draw any conclusions from that; can you?
>
> We do have enterprise support from RedHat for our SOA-P deployment, and I
> might involve them too eventually, but I figured that if I went straight to
> the source with this problem, everybody profits.
>
>
>
> --
> View this message in context: http://milyn.996300.n3.nabble.com/Strange-error-while-parsing-xml-tp2759p8683.html
> Sent from the milyn - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Strange error while parsing xml

lvdhoek
Hi Dominik,

that sounds like a nice workaround, and at any rate a lot less work than reliably reproducing (let alone fixing) this issue within Milyn. I'll give it a try.