Invalid final field ...DependencyInfo.dependency

View: New views
4 Messages — Rating Filter:   Alert me  

Invalid final field ...DependencyInfo.dependency

by Jesfre :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone...
I have an error with this description... And I'm confused because I run ">mvn clean install" with SUCCESSFUL result but when I try to run it on the host of the customer the build fails... And, more rare, fails only with webapp submodules...

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building t0_regionalWebApp
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /daltio/develop/Kronos/src/migration/t0+regional_WL6.1/implementacion/webApplications/t0/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 409 source files to /daltio/develop/Kronos/src/migration/t0+regional_WL6.1/implementacion/webApplications/t0/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /daltio/develop/Kronos/src/migration/t0+regional_WL6.1/implementacion/webApplications/t0/src/test/resources
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[t0_regional] in [/daltio/develop/Kronos/src/migration/t0+regional_WL6.1/implementacion/webApplications/t0/target/t0_regional]
[INFO] Processing war project
[INFO] Copying webapp resources[/daltio/develop/Kronos/src/migration/t0+regional_WL6.1/implementacion/webApplications/t0/src/main/webapp]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Invalid final field org.apache.maven.plugin.war.util.DependencyInfo.dependency
[INFO] ------------------------------------------------------------------------
[INFO] Trace
com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Invalid final field org.apache.maven.plugin.war.util.DependencyInfo.dependency
        at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.validateFieldAccess(Ljava.lang.reflect.Field;)V(PureJavaReflectionProvider.java:161)
        at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.reflection.ReflectionProvider$Visitor;)V(PureJavaReflectionProvider.java:114)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:51)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:43)
        at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.Converter;)V(AbstractReferenceMarshaller.java:55)
        at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(Ljava.lang.Object;)V(TreeMarshaller.java:50)
        at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.MarshallingContext;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;)V(AbstractCollectionConverter.java:52)
        at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(CollectionConverter.java:44)
        at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.Converter;)V(AbstractReferenceMarshaller.java:55)
        at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(Ljava.lang.Object;)V(TreeMarshaller.java:50)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(Lcom.thoughtworks.xstream.converters.MarshallingContext;Ljava.lang.Object;Ljava.lang.reflect.Field;)V(AbstractReflectionConverter.java:120)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(Ljava.lang.String;Ljava.lang.String;Ljava.lang.Class;Ljava.lang.Class;Ljava.lang.Object;)V(AbstractReflectionConverter.java:112)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(Ljava.lang.String;Ljava.lang.Class;Ljava.lang.Class;Ljava.lang.Object;)V(AbstractReflectionConverter.java:88)
        at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.reflection.ReflectionProvider$Visitor;)V(PureJavaReflectionProvider.java:117)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:73)
        at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:43)
        at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.Converter;)V(AbstractReferenceMarshaller.java:55)
        at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(Ljava.lang.Object;)V(TreeMarshaller.java:50)
        at com.thoughtworks.xstream.core.TreeMarshaller.start(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.DataHolder;)V(TreeMarshaller.java:73)
        at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marshal(Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.ConverterLookup;Lcom.thoughtworks.xstream.mapper.Mapper;Lcom.thoughtworks.xstream.converters.DataHolder;)V(ReferenceByXPathMarshallingStrategy.java:34)
        at com.thoughtworks.xstream.XStream.marshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.DataHolder;)V(XStream.java:765)
        at com.thoughtworks.xstream.XStream.marshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;)V(XStream.java:754)
        at com.thoughtworks.xstream.XStream.toXML(Ljava.lang.Object;Ljava.io.Writer;)V(XStream.java:735)
        at org.apache.maven.plugin.war.util.WebappStructureSerializer.toXml(Lorg.apache.maven.plugin.war.util.WebappStructure;Ljava.io.File;)V(WebappStructureSerializer.java:105)
        at org.apache.maven.plugin.war.packaging.SaveWebappStructurePostPackagingTask.performPostPackaging(Lorg.apache.maven.plugin.war.packaging.WarPackagingContext;)V(SaveWebappStructurePostPackagingTask.java:62)
        at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(Lorg.apache.maven.project.MavenProject;Ljava.io.File;)V(AbstractWarMojo.java:448)
        at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(Ljava.io.File;)V(AbstractWarMojo.java:375)
        at org.apache.maven.plugin.war.WarMojo.performPackaging(Ljava.io.File;)V(WarMojo.java:181)
        at org.apache.maven.plugin.war.WarMojo.execute()V(WarMojo.java:143)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(Lorg.apache.maven.project.MavenProject;Lorg.apache.maven.plugin.MojoExecution;Lorg.apache.maven.execution.MavenSession;)V(DefaultPluginManager.java:453)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Ljava.util.List;Ljava.util.Stack;Lorg.apache.maven.execution.MavenSession;Lorg.apache.maven.project.MavenProject;)V(DefaultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(Ljava.lang.String;Ljava.util.Stack;Lorg.apache.maven.execution.MavenSession;Ljava.util.Map;Lorg.apache.maven.project.MavenProject;Lorg.apache.maven.lifecycle.Lifecycle;)V(DefaultLifecycleExecutor.java:500)

Re: Invalid final field ...DependencyInfo.dependency

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Jesfre wrote at Freitag, 3. Juli 2009 01:05:

>
> Hi everyone...
> I have an error with this description... And I'm confused because I run
> ">mvn clean install" with SUCCESSFUL result but when I try to run it on
> the host of the customer the build fails... And, more rare, fails only
> with webapp submodules...

[snip]

> [INFO] Trace
> com.thoughtworks.xstream.converters.reflection.ObjectAccessException:
> Invalid final field
> org.apache.maven.plugin.war.util.DependencyInfo.dependency
>         at
>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.validateFieldAccess(Ljava.lang.reflect.Field;)V(PureJavaReflectionProvider.java:161)
>         at
>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.reflection.ReflectionProvider$Visitor;)V(PureJavaReflectionProvider.java:114)
>         at
>
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:51)

[snip]

Which JDK version of what vendor is on the host?

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invalid final field ...DependencyInfo.dependency

by Jesfre :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry...
I'm using:

Maven 2
JDK 1.4
App server Weblogic 8.1 SP3
Platform Linux


Jörg Schaible-2 wrote:
Hi,

Jesfre wrote at Freitag, 3. Juli 2009 01:05:

>
> Hi everyone...
> I have an error with this description... And I'm confused because I run
> ">mvn clean install" with SUCCESSFUL result but when I try to run it on
> the host of the customer the build fails... And, more rare, fails only
> with webapp submodules...

[snip]

> [INFO] Trace
> com.thoughtworks.xstream.converters.reflection.ObjectAccessException:
> Invalid final field
> org.apache.maven.plugin.war.util.DependencyInfo.dependency
>         at
>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.validateFieldAccess(Ljava.lang.reflect.Field;)V(PureJavaReflectionProvider.java:161)
>         at
>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.reflection.ReflectionProvider$Visitor;)V(PureJavaReflectionProvider.java:114)
>         at
>
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:51)

[snip]

Which JDK version of what vendor is on the host?

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Re: Invalid final field ...DependencyInfo.dependency

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Jesfre wrote at Freitag, 3. Juli 2009 08:45:

> Jörg Schaible-2 wrote:
>>
>> Jesfre wrote at Freitag, 3. Juli 2009 01:05:
>>
>>>
>>> Hi everyone...
>>> I have an error with this description... And I'm confused because I run
>>> ">mvn clean install" with SUCCESSFUL result but when I try to run it on
>>> the host of the customer the build fails... And, more rare, fails only
>>> with webapp submodules...
>>
>> [snip]
>>
>>> [INFO] Trace
>>> com.thoughtworks.xstream.converters.reflection.ObjectAccessException:
>>> Invalid final field
>>> org.apache.maven.plugin.war.util.DependencyInfo.dependency
>>>         at
>>>
>>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.validateFieldAccess(Ljava.lang.reflect.Field;)V(PureJavaReflectionProvider.java:161)
>>>         at
>>>
>>
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(Ljava.lang.Object;Lcom.thoughtworks.xstream.converters.reflection.ReflectionProvider$Visitor;)V(PureJavaReflectionProvider.java:114)
>>>         at
>>>
>>
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(Ljava.lang.Object;Lcom.thoughtworks.xstream.io.HierarchicalStreamWriter;Lcom.thoughtworks.xstream.converters.MarshallingContext;)V(AbstractReflectionConverter.java:51)

>>
>> [snip]
>>
>> Which JDK version of what vendor is on the host?
>
> Sorry...
> I'm using:
>
> Maven 2
> JDK 1.4
> App server Weblogic 8.1 SP3
> Platform Linux

OK. Can you open a JIRA issue in the war plugin? The version you're using is
not JDK 1.4 compatible, but I simply guess that the developer was not aware
of it.

Background: XStream is a small library converting objects to XML and back.
The developers of the war plugin used it to convert somewhere between this
DependencyInfo and XML. However, this type has a final field "dependency".
Since JDK 5 it is possible to write into final fields using reflection (see
Javadoc), but it is simply not possible with JDK 1.4. For JDK 1.4 support
the field may not be declared final.

- Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...