Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Weblogic/IntelliJ/Ant conflict?

Reply
Thread Tools

Weblogic/IntelliJ/Ant conflict?

 
 
Charles Tryon
Guest
Posts: n/a
 
      12-09-2005
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?
 
Reply With Quote
 
 
 
 
Brandon McCombs
Guest
Posts: n/a
 
      12-10-2005
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?
 
Reply With Quote
 
 
 
 
Charles Tryon
Guest
Posts: n/a
 
      12-10-2005
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.
 
Reply With Quote
 
EricF
Guest
Posts: n/a
 
      12-10-2005
In article <uKnmf.14732$(E-Mail Removed)>, Charles Tryon <(E-Mail Removed)> 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.servi cegen.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
 
Reply With Quote
 
Charles Tryon
Guest
Posts: n/a
 
      12-10-2005

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$(E-Mail Removed)>, Charles Tryon <(E-Mail Removed)> 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.servi cegen.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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments