openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jack.terranova" <jack.terran...@gmail.com>
Subject Re: Cannot enhance at build time - strange ZipException
Date Sat, 12 Sep 2009 13:41:09 GMT

Cool.  Thanks, Donald.

On Fri, Sep 11, 2009 at 2:06 PM, DWoods (via Nabble) <
ml-user+166296-823901784@n2.nabble.com<ml-user%2B166296-823901784@n2.nabble.com>
> wrote:

> Take a look at the following wiki page [1], which has an example ANT
> task, which can be used with the complete OpenJPA binary download (as
> there are some required JARs included in the lib directory, which
> includes commons-lang-2.1.jar).
>
> [1] http://openjpa.apache.org/enhancement-with-ant.html
>
>
> -Donald
>
>
> jack.terranova wrote:
> > Sounds like this poster had this issue too ...
> >
> >
> http://n2.nabble.com/Please-help-me-enhancing-my-classes-td209164.html#a209166
> >
> http://n2.nabble.com/Please-help-me-enhancing-my-classes-td209164.html#a209166
>
> >
> > ... but their issue just went away.
> >
> > I am trying to enhance at build time using Ant...
> >
> > <target name="enhance">
> >   <!-- define the openjpac task; this can be done at the top of the
>  -->
> >   <!-- build.xml file, so it will be available for all targets     -->
> >   <taskdef name="openjpac"
> > classname="org.apache.openjpa.ant.PCEnhancerTask">
> >   <classpath>
> >
> >     <fileset dir="src/META-INF" >
> > </fileset>
> > <pathelement
> > path="/home/jack/programs/commons-lang-2.4/commons-lang-2.4.jar" />
> >     <pathelement
> > path="/home/jack/programs/apache-openjpa-1.2.1/openjpa-1.2.1.jar" />
> >   </classpath>
> >   </taskdef>
> >
> >   <!-- invoke enhancer on all .java files below the model directory -->
> >   <openjpac>
> >    <fileset dir="build/classes">
> >     <include name="**/*.class"/>
> >     </fileset>
> >   </openjpac>
> > </target>
> >
> >
> > commons-lang-2.4.jar seems to be the culprit.   Originally I was getting
> a
> > ClassNotFound for a commons/lang class.  So I added the jar into the
> > classpath and get this exception ...
> >
> >
> > [openjpac] java.util.zip.ZipException: error in opening zip file
> >  [openjpac] at java.util.zip.ZipFile.open(Native Method)
> >  [openjpac] at java.util.zip.ZipFile.<init>(Unknown Source)
> >  [openjpac] at java.util.zip.ZipFile.<init>(Unknown Source)
> >  [openjpac] at
> >
> org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
>
> >  [openjpac] at
> >
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
>
> >  [openjpac] at
> >
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
>
> >  [openjpac] at
> >
> org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:975)
> >  [openjpac] at java.lang.ClassLoader.getResources(Unknown Source)
> >
> >
> > ...I've struggles with all sorts of workarounds including downloading
> > different versions of common-lang thinking maybe the jar is corrupt.  But
> I
> > think this is an openjpa issue.
> >
> > Enhancing at runtime works great with the agent - so that is my
> workaround
> > for now.
> >
> > Thanks in advance.
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/Cannot-enhance-at-build-time-strange-ZipException-tp3590538p3627408.html
> To unsubscribe from Cannot enhance at build time - strange ZipException, click
> here< (link removed) ==>.
>
>
>

-- 
View this message in context: http://n2.nabble.com/Cannot-enhance-at-build-time-strange-ZipException-tp3590538p3631959.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message