Weblogic/IntelliJ/Ant conflict?

Discussion in 'Java' started by Charles Tryon, Dec 9, 2005.

  1. I've been hunting all over the place for this one and have come up empty...

    I have been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1) Web
    services application, and found that it works very well. I have a large
    ANT task (build.xml) which defines various build and deploy tasks. Some
    of the tasks use BEA specific extensions (taskdef tags) to build various
    components. The way I've found to get this to work is to include the
    weblogic and webservices JAR files in the "Additional Classes" tab on
    the build preferences. Life is wonderful. Life is grand.

    Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM*

    Everything in IntelliJ works just fine, except that any and all ANT
    tasks immediately exit with a "success" status with no explaination as
    to what they may or may have done. No error logs or anything.

    I finally trace it back to the webservices.jar file which contains the
    required classes for the taskref definition. If I take this jar file
    out, it runs ANT, but fails with a "Class not found" error. If I put it
    back in, it just exits. Note that this is NOT a problem in the older
    IntelliJ 4.x (or even in some of the EAP builds between 4 and 5).

    Any idea what might be going on, and how I might be able to get around
    this problem in IntelliJ?
     
    Charles Tryon, Dec 9, 2005
    #1
    1. Advertising

  2. Charles Tryon wrote:
    > I've been hunting all over the place for this one and have come up empty...
    >
    > I have been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1) Web
    > services application, and found that it works very well. I have a large
    > ANT task (build.xml) which defines various build and deploy tasks. Some
    > of the tasks use BEA specific extensions (taskdef tags) to build various
    > components. The way I've found to get this to work is to include the
    > weblogic and webservices JAR files in the "Additional Classes" tab on
    > the build preferences. Life is wonderful. Life is grand.
    >
    > Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM*
    >
    > Everything in IntelliJ works just fine, except that any and all ANT
    > tasks immediately exit with a "success" status with no explaination as
    > to what they may or may have done. No error logs or anything.
    >
    > I finally trace it back to the webservices.jar file which contains the
    > required classes for the taskref definition. If I take this jar file
    > out, it runs ANT, but fails with a "Class not found" error. If I put it
    > back in, it just exits. Note that this is NOT a problem in the older
    > IntelliJ 4.x (or even in some of the EAP builds between 4 and 5).
    >
    > Any idea what might be going on, and how I might be able to get around
    > this problem in IntelliJ?


    Did you pay for support for intelliJ?
     
    Brandon McCombs, Dec 10, 2005
    #2
    1. Advertising

  3. Brandon McCombs wrote:
    > Charles Tryon wrote:
    >
    >> I've been hunting all over the place for this one and have come up
    >> empty...
    >>
    >> I have been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1)
    >> Web services application, and found that it works very well. I have a
    >> large ANT task (build.xml) which defines various build and deploy
    >> tasks. Some of the tasks use BEA specific extensions (taskdef tags)
    >> to build various components. The way I've found to get this to work
    >> is to include the weblogic and webservices JAR files in the
    >> "Additional Classes" tab on the build preferences. Life is
    >> wonderful. Life is grand.
    >>
    >> Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM*
    >>
    >> Everything in IntelliJ works just fine, except that any and all ANT
    >> tasks immediately exit with a "success" status with no explaination as
    >> to what they may or may have done. No error logs or anything.
    >>
    >> I finally trace it back to the webservices.jar file which contains the
    >> required classes for the taskref definition. If I take this jar file
    >> out, it runs ANT, but fails with a "Class not found" error. If I put
    >> it back in, it just exits. Note that this is NOT a problem in the
    >> older IntelliJ 4.x (or even in some of the EAP builds between 4 and 5).
    >>
    >> Any idea what might be going on, and how I might be able to get around
    >> this problem in IntelliJ?

    >
    >
    > Did you pay for support for intelliJ?


    yes

    Their help has been.... less than helpful so far. I will check with
    them however.
     
    Charles Tryon, Dec 10, 2005
    #3
  4. Charles Tryon

    EricF Guest

    In article <uKnmf.14732$>, Charles Tryon <> wrote:
    >I've been hunting all over the place for this one and have come up empty...
    >
    >I have been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1) Web
    >services application, and found that it works very well. I have a large
    >ANT task (build.xml) which defines various build and deploy tasks. Some
    >of the tasks use BEA specific extensions (taskdef tags) to build various
    >components. The way I've found to get this to work is to include the
    >weblogic and webservices JAR files in the "Additional Classes" tab on
    >the build preferences. Life is wonderful. Life is grand.
    >
    >Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM*
    >
    >Everything in IntelliJ works just fine, except that any and all ANT
    >tasks immediately exit with a "success" status with no explaination as
    >to what they may or may have done. No error logs or anything.
    >
    >I finally trace it back to the webservices.jar file which contains the
    >required classes for the taskref definition. If I take this jar file
    >out, it runs ANT, but fails with a "Class not found" error. If I put it
    >back in, it just exits. Note that this is NOT a problem in the older
    >IntelliJ 4.x (or even in some of the EAP builds between 4 and 5).
    >
    >Any idea what might be going on, and how I might be able to get around
    >this problem in IntelliJ?


    This is not so much an Intellij issue (great IDE), it's an Ant issue. I think.

    BEA has their own version of Ant that have the BEA tags defined. (Functionally
    they work that way - I've never really looked at them).

    You might be able to replace the ant that Intellij provides with BEA's. I
    don't typically use ant in Idea to do my build's - but there is an option to
    not use the bundled ant.

    Personally I don't like being tied to BEA's ant. So in my build files, I have
    the taskdefs I need. It sounds like you may be doing this but here's my
    servicegen definition as an example ...

    <!-- Define the WL servicegen task -->
    <taskdef
    name="servicegen"
    classpathref="weblogic.webservices.classpath"

    classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask"
    />

    The weblogic.webservices.classpath points to weblogic.jar and webservices,jar,
    as well as the jdk tools.jar ...

    <!--classpath for web service tasks -->
    <path id="weblogic.webservices.classpath">
    <fileset dir="${wl.home}/lib">
    <include name="*.jar"/>
    </fileset>
    <pathelement location="${java.home}/lib/tools.jar"/>
    </path>

    This works fine for me - but I do my builds from the command line.

    I suspect you'd be better off defining the weblogic specific jars in the
    build.xml file instead of the Ide build preferences. But I may be wrong. And
    note that tools.jar is in the classpath.

    Hopefully I've given enough tips that you can figure out the problem.

    Some advice: Get a build script that works from the command line. Once that is
    done, I would think you could run the same script from Idea.

    HTH

    Eric
     
    EricF, Dec 10, 2005
    #4
  5. Eric,

    Thanks -- I haven't tried this yet, but you've filled in some holes
    in what I was trying to do but couldn't figure out. You are absolutely
    correct about the command line, but unfortunately, I inherited this very
    big and complex project, so I'm not always able to do what I would LIKE
    to do.

    I *DID* get a reply from IntelliJ, and I wanted to share it here as it
    sheds more light on the situation:

    = = = = = = = = = = =
    It's a well known problem. Ant 1.6 is not compatible with Ant
    1.5 taskdefs defined in optional.jar file. For some unknown reason the
    optional taskdefs from Ant 1.5 optional.jar are included into
    weblogic.jar and it leads to the problem.

    Workarounds:

    - Configure your build to run under Ant 1.5
    - Delete Ant 1.5 optional taskdef packages from the jars which are in
    the Ant's classpath

    See comments to this issue: http://jetbrains.net/jira/browse/IDEA-4317
    = = = = = = = = = = =

    So, I'm not sure if I have a solution yet, but I know better what is
    going on, and I have a couple of things to try. Thanks to all!


    EricF wrote:
    > In article <uKnmf.14732$>, Charles Tryon <> wrote:
    >
    >>I've been hunting all over the place for this one and have come up empty...
    >>
    >>I have been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1) Web
    >>services application, and found that it works very well. I have a large
    >>ANT task (build.xml) which defines various build and deploy tasks. Some
    >>of the tasks use BEA specific extensions (taskdef tags) to build various
    >>components. The way I've found to get this to work is to include the
    >>weblogic and webservices JAR files in the "Additional Classes" tab on
    >>the build preferences. Life is wonderful. Life is grand.
    >>
    >>Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM*
    >>
    >>Everything in IntelliJ works just fine, except that any and all ANT
    >>tasks immediately exit with a "success" status with no explaination as
    >>to what they may or may have done. No error logs or anything.
    >>
    >>I finally trace it back to the webservices.jar file which contains the
    >>required classes for the taskref definition. If I take this jar file
    >>out, it runs ANT, but fails with a "Class not found" error. If I put it
    >>back in, it just exits. Note that this is NOT a problem in the older
    >>IntelliJ 4.x (or even in some of the EAP builds between 4 and 5).
    >>
    >>Any idea what might be going on, and how I might be able to get around
    >>this problem in IntelliJ?

    >
    >
    > This is not so much an Intellij issue (great IDE), it's an Ant issue. I think.
    >
    > BEA has their own version of Ant that have the BEA tags defined. (Functionally
    > they work that way - I've never really looked at them).
    >
    > You might be able to replace the ant that Intellij provides with BEA's. I
    > don't typically use ant in Idea to do my build's - but there is an option to
    > not use the bundled ant.
    >
    > Personally I don't like being tied to BEA's ant. So in my build files, I have
    > the taskdefs I need. It sounds like you may be doing this but here's my
    > servicegen definition as an example ...
    >
    > <!-- Define the WL servicegen task -->
    > <taskdef
    > name="servicegen"
    > classpathref="weblogic.webservices.classpath"
    >
    > classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask"
    > />
    >
    > The weblogic.webservices.classpath points to weblogic.jar and webservices,jar,
    > as well as the jdk tools.jar ...
    >
    > <!--classpath for web service tasks -->
    > <path id="weblogic.webservices.classpath">
    > <fileset dir="${wl.home}/lib">
    > <include name="*.jar"/>
    > </fileset>
    > <pathelement location="${java.home}/lib/tools.jar"/>
    > </path>
    >
    > This works fine for me - but I do my builds from the command line.
    >
    > I suspect you'd be better off defining the weblogic specific jars in the
    > build.xml file instead of the Ide build preferences. But I may be wrong. And
    > note that tools.jar is in the classpath.
    >
    > Hopefully I've given enough tips that you can figure out the problem.
    >
    > Some advice: Get a build script that works from the command line. Once that is
    > done, I would think you could run the same script from Idea.
    >
    > HTH
    >
    > Eric
     
    Charles Tryon, Dec 10, 2005
    #5
    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. Chris Bedford
    Replies:
    6
    Views:
    2,245
  2. matt

    ant ftp and Intellij

    matt, Jan 16, 2004, in forum: Java
    Replies:
    3
    Views:
    754
  3. paolo

    ant weblogic

    paolo, Jan 29, 2004, in forum: Java
    Replies:
    1
    Views:
    521
    Theodor Willax
    Jan 30, 2004
  4. john martin
    Replies:
    2
    Views:
    2,221
    john martin
    Apr 7, 2005
  5. charles cashion

    css conflict (or html conflict)

    charles cashion, Feb 18, 2009, in forum: HTML
    Replies:
    2
    Views:
    795
    charles cashion
    Feb 18, 2009
Loading...

Share This Page