You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mike Engelhart <me...@earthtrip.com> on 2000/01/23 17:08:38 UTC

requires JDK 1.2

Hi -

Unfortunately I have found a Java 2 dependency in XSPClassLoader.java
(Cocoon 1.6)

Line 82-83 has this:

if (bits == null) {
   ClassLoader cl = getParent(); // Hmmm...

(Notice the comment in the source)


Can anyone tell me how to get around this so I can recompile and get this
working so I don't have to go back to the dreaded JSP model of programming.
I can't wait for Cocoon 1.7 to have this fixed.  I'm not sure what that call
is in there for so any workarounds would be greatly appreciated.
You also may want to change the docs to say that Cocoon requires Java 2 to
work with XSP so others don't get frustrated with this.

Thanks,

Mike


RE: requires JDK 1.2

Posted by Ricardo Rocha <ri...@apache.org>.
Ricardo Rocha wrote:
> Since this class was last modified on Jan-15 and Cocoon 1.6 was released
> on Jan-18, I can only assume your Cocoon version is out date. You may
> download the most recent Cocoon jar or check it out of the CVS.

Stefano Mazzocchi wrote:
> Wrong. I tagged Cocoon 1.6 the day _before_ Jan 15. BTW, I'm coming up
> with a 1.6.1 in a few days.

> Ok for you guys?

Sure thing!


Re: requires JDK 1.2

Posted by Stefano Mazzocchi <st...@apache.org>.
Ricardo Rocha wrote:
> 
> On Jan-23-2000 Mike Engelhart wrote:
> 
> > Unfortunately I have found a Java 2 dependency in XSPClassLoader.java
> > (Cocoon 1.6)
> > Line 82-83 has this:
> > if (bits == null) {
> >    ClassLoader cl = getParent(); // Hmmm...
> > (Notice the comment in the source)
> 
> This class (like all XSP-related classes) was modified to remove
> dependencies on Java2. In particular, getParent() (Java2) has
> been replaced by this.getClass().getClassLoader() (Jdk 1.1). XSP
> was never meant to require Java2, so all early-development
> dependencies were removed prior to releasing Cocoon 1.6.
> 
> > Can anyone tell me how to get around this so I can recompile and get this
> > working so I don't have to go back to the dreaded JSP model of
> > programming. I can't wait for Cocoon 1.7 to have this fixed.  I'm not sure
> > what that call is in there for so any workarounds would be greatly
> > appreciated. You also may want to change the docs to say that Cocoon
> > requires Java 2 to work with XSP so others don't get frustrated with this.
> 
> Since this class was last modified on Jan-15 and Cocoon 1.6 was released
> on Jan-18, I can only assume your Cocoon version is out date. You may
> download the most recent Cocoon jar or check it out of the CVS.

Wrong. I tagged Cocoon 1.6 the day _before_ Jan 15. BTW, I'm coming up
with a 1.6.1 in a few days.

Ok for you guys?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: requires JDK 1.2

Posted by Mike Engelhart <me...@earthtrip.com>.
Ricardo Rocha wrote:

> Holly Shit! I get your point now, Mike.
> 
> Please accept my apologies for my previous replies to you ("Go update
> your version!"). I thought you were using an old version drawn from the
> CVS...
>
>> For now I'll change the code myself and recompile.
> 
> I'd advise you to check the whole thing out from the CVS: that way
> you're insured against more lost changes in addition to the classLoader...
> 
> Regards,
> 
> Ricardo
At least I can cancel my appointment to the shrink.  I thought I was losing
it for a while there.

I actually am going to check out the whole thing.  I made that one change
but the XSP class loader can't "see" any files I add with <xsp:include>.
Basically XSP doesn't really work except for the examples. I haven't been
able to anything buta simple pages with things like <xsp:expr>new
Date()</xsp:expr>. Hopefully this is why!! :-)

Mike


RE: requires JDK 1.2

Posted by Ricardo Rocha <ri...@apache.org>.
On Jan-23-2000 Ricardo Rocha wrote:
> > Since this class was last modified on Jan-15 and Cocoon 1.6 was released
> > on Jan-18, I can only assume your Cocoon version is out date. You may
> > download the most recent Cocoon jar or check it out of the CVS.

On Jan-23-2000 Mike Engelhart wrote:
> This came up before but what I'm saying is that the Cocoon-1.6.jar that is
> at: http://xml.apache.org/dist/ "does" have this dependency in the code
> Maybe something is wrong with CVS? I'm not sure but try
> downloading the jar file yourself and see what's in the source.

Holly Shit! I get your point now, Mike.

Please accept my apologies for my previous replies to you ("Go update
your version!"). I thought you were using an old version drawn from the
CVS...

I followed your advice and downloaded Cocoon' distribution: the jar file
itself is at fault! I can't figure out exactly what other important changes
may have been missed during this packaging. I'll have to compare this with
the current CVS.

> For now I'll change the code myself and recompile.

I'd advise you to check the whole thing out from the CVS: that way
you're insured against more lost changes in addition to the classLoader...

Regards,

Ricardo



Re: requires JDK 1.2

Posted by Mike Engelhart <me...@earthtrip.com>.
Ricardo Rocha wrote:

> On Jan-23-2000 Mike Engelhart wrote:
> 
> This class (like all XSP-related classes) was modified to remove
> dependencies on Java2. In particular, getParent() (Java2) has
> been replaced by this.getClass().getClassLoader() (Jdk 1.1). XSP
> was never meant to require Java2, so all early-development
> dependencies were removed prior to releasing Cocoon 1.6.

> Since this class was last modified on Jan-15 and Cocoon 1.6 was released
> on Jan-18, I can only assume your Cocoon version is out date. You may
> download the most recent Cocoon jar or check it out of the CVS.
> 
> Regards,
> 
> Ricardo
hi Ricardo,

This came up before but what I'm saying is that the Cocoon-1.6.jar that is
at:
http://xml.apache.org/dist/

"does" have this dependency in the code (at least I continually get this
error AND the source code bundled with the jar has the code I posted).
I just (5 minutes ago) downloaded the jar file once again and below is
copied directly from the XSPClassLoader.java file in that jar:

  protected Class loadClass (String name, boolean resolve)
    throws ClassNotFoundException
  {
    Class c = findLoadedClass(name);

    if (c == null) {
      try {
        c = findSystemClass(name);
      } catch (ClassNotFoundException e) {
        byte[] bits = loadClassData (name);

        if (bits == null) {
          ClassLoader cl = getParent(); // Hmmm...

          if (cl != null)  {
            c = cl.loadClass (name);
          }
        } else {
          c = defineClass (null, bits, 0, bits.length);

          if (resolve) {
            resolveClass (c);
          }
        }
      }

      if (c == null) {
        throw new ClassNotFoundException (name);
      }
    }

    return c;
  }


Maybe something is wrong with CVS? I'm not sure but try downloading the jar
file yourself and see what's in the source.

For now I'll change the code myself and recompile.

Regards,

Mike


RE: requires JDK 1.2

Posted by Ricardo Rocha <ri...@apache.org>.
On Jan-23-2000 Mike Engelhart wrote:

> Unfortunately I have found a Java 2 dependency in XSPClassLoader.java
> (Cocoon 1.6)
> Line 82-83 has this:
> if (bits == null) {
>    ClassLoader cl = getParent(); // Hmmm...
> (Notice the comment in the source)

This class (like all XSP-related classes) was modified to remove
dependencies on Java2. In particular, getParent() (Java2) has
been replaced by this.getClass().getClassLoader() (Jdk 1.1). XSP
was never meant to require Java2, so all early-development
dependencies were removed prior to releasing Cocoon 1.6.

> Can anyone tell me how to get around this so I can recompile and get this
> working so I don't have to go back to the dreaded JSP model of
> programming. I can't wait for Cocoon 1.7 to have this fixed.  I'm not sure
> what that call is in there for so any workarounds would be greatly
> appreciated. You also may want to change the docs to say that Cocoon
> requires Java 2 to work with XSP so others don't get frustrated with this.

Since this class was last modified on Jan-15 and Cocoon 1.6 was released
on Jan-18, I can only assume your Cocoon version is out date. You may
download the most recent Cocoon jar or check it out of the CVS.

Regards,

Ricardo