Jbuilder causes incompatible class change error

Discussion in 'Java' started by Eric, Nov 29, 2006.

  1. Eric

    Eric Guest

    I have a web application class file that added a static variable from
    v1 to v2. Version 2 code is a subset of Version 1 with v2 overwriting
    duplicates.

    version 1 - The mfr gets set on context initialization via
    context.setAttribute("mfr", new ManufacturerClass()).
    SessionMgr implements java.io.Serializable
    public ManufacturerClass getMfr() {
    return
    (ManufacturerClass)getHttpSession().getServletContext().getAttribute("mfr");
    }

    version 2 - The mfr gets set during context initialization via a static
    call SessionMgr.setMfr(new ManufacturerClass())
    SessionMgr implements java.io.Serializable
    private static ManufacturerClass mfr;
    public ManufacturerClass getMfr() {
    return mfr;
    }

    Command line javac points to the same javac that Jbuilder points to..
    jdk version 1.5.0_06-b05.

    When I compile v1 and v2 from command line, I have no compile or
    runtime errors.

    When I compile v1 and v2 from Jbuilder, I have no compile errors, but
    during runtime the first time I try to call SessionMgr.getMfr(), I get
    an IncompatibleClassChangeError.

    My question is, what does Jbuilder do during compilation to interfere
    with ManufacturerClass and/or SessionMgr versus what a command line
    compile would do?
     
    Eric, Nov 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier Osa
    Replies:
    0
    Views:
    639
    Xavier Osa
    Jan 9, 2004
  2. Tris Orendorff
    Replies:
    0
    Views:
    1,526
    Tris Orendorff
    Jul 16, 2003
  3. davout
    Replies:
    1
    Views:
    572
  4. Ramon F Herrera
    Replies:
    6
    Views:
    672
    Ramon F Herrera
    Nov 11, 2007
  5. Ferenc Engard
    Replies:
    2
    Views:
    111
    Ferenc Engard
    Aug 29, 2004
Loading...

Share This Page