Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Acessing Classes in jar that are exported from J2EE Module Project
Acessing Classes in jar that are exported from J2EE Module Project [message #194977] Tue, 26 June 2007 07:04 Go to next message
Eclipse User
Originally posted by: pakulat.rostock.zgdv.de

Hi,

it seems like older posts are not read anymore, so I'm reposting this as
I now do have access to Eclipse 3.3 and WTP 2.0.

The question I have is, with the above given tools, how can I use the
jar files that are exported from a J2EE Module (lets call the project
mytaglib) from a web project (call mymedia)? I selected all the jar's in
the mytaglib project (its a simple Java project, with the Module facet
selected as well) to be exported, but the web project gives me various
errors when using the classes from those jars. mytaglib is selected as
Module Dependecy in mymedia project properties.

Rob told me before that there should be warning about the exported jars
and a Quickfix which would allow eclipse/wtp to build a mytaglib.jar
which includes the exported jars. However I don't get a warning and I
don't get the export jars in mytaglib.jar in mymedia's WEB-INF/lib dir.

I already tried to not export the jars but that didn't bring up any
warnings either. Do I miss something here?

Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #194998 is a reply to message #194977] Tue, 26 June 2007 09:00 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1298
Registered: July 2009
Senior Member
Just to be sure, are you looking for the warnings in the Problems view?
That is the only place they appear, and thus, the only place you can
access the Quickfix.

Cheers,
Larry

Andreas Pakulat wrote:
> Hi,
>
> it seems like older posts are not read anymore, so I'm reposting this as
> I now do have access to Eclipse 3.3 and WTP 2.0.
>
> The question I have is, with the above given tools, how can I use the
> jar files that are exported from a J2EE Module (lets call the project
> mytaglib) from a web project (call mymedia)? I selected all the jar's in
> the mytaglib project (its a simple Java project, with the Module facet
> selected as well) to be exported, but the web project gives me various
> errors when using the classes from those jars. mytaglib is selected as
> Module Dependecy in mymedia project properties.
>
> Rob told me before that there should be warning about the exported jars
> and a Quickfix which would allow eclipse/wtp to build a mytaglib.jar
> which includes the exported jars. However I don't get a warning and I
> don't get the export jars in mytaglib.jar in mymedia's WEB-INF/lib dir.
>
> I already tried to not export the jars but that didn't bring up any
> warnings either. Do I miss something here?
>
> Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195073 is a reply to message #194998] Wed, 27 June 2007 04:12 Go to previous messageGo to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 127
Registered: July 2009
Senior Member
Larry Isaacs wrote:

> Just to be sure, are you looking for the warnings in the Problems view?
> That is the only place they appear, and thus, the only place you can
> access the Quickfix.

Yes I am looking into the problems view, but there are no warnings regarding
the jar files (there are warnings about not-used variables and imports and
errors about other projects). Thats why I'm asking.

Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195089 is a reply to message #195073] Wed, 27 June 2007 08:37 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1298
Registered: July 2009
Senior Member
The configuration you describe for your projects works for me. It's not
clear what is different in your situation. There may be something amiss
in your workspace or Eclipse installation.

Could you try creating a utility project and a Dynamic Web Application
project in a new workspace and see if you still don't get the warning in
the Problems view? I tried the following, which worked for me:

1. Started Eclipse with new workspace.
2. Defined Tomcat Runtime (I used Tomcat 5.5).
3. Created Java project.
4. Configured Java Build Path to add an external jar.
5. Exported the added jar.
5. Created Dynamic Web Project
6. Opened Properties dialog and using the J2EE Module Dependencies page,
added the Java project as a dependency.
7. The "Classpath entry ... will not be exported or published." problem
appeared in the Problems view.

Cheers,
Larry

Andreas Pakulat wrote:
> Larry Isaacs wrote:
>
>> Just to be sure, are you looking for the warnings in the Problems view?
>> That is the only place they appear, and thus, the only place you can
>> access the Quickfix.
>
> Yes I am looking into the problems view, but there are no warnings regarding
> the jar files (there are warnings about not-used variables and imports and
> errors about other projects). Thats why I'm asking.
>
> Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195097 is a reply to message #195089] Wed, 27 June 2007 11:18 Go to previous messageGo to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 127
Registered: July 2009
Senior Member
Larry Isaacs wrote:

> The configuration you describe for your projects works for me. It's not
> clear what is different in your situation. There may be something amiss
> in your workspace or Eclipse installation.
>
> Could you try creating a utility project and a Dynamic Web Application
> project in a new workspace and see if you still don't get the warning in
> the Problems view? I tried the following, which worked for me:
>
> 1. Started Eclipse with new workspace.
> 2. Defined Tomcat Runtime (I used Tomcat 5.5).
> 3. Created Java project.
> 4. Configured Java Build Path to add an external jar.
> 5. Exported the added jar.
> 5. Created Dynamic Web Project
> 6. Opened Properties dialog and using the J2EE Module Dependencies page,
> added the Java project as a dependency.
> 7. The "Classpath entry ... will not be exported or published." problem
> appeared in the Problems view.

Worked on my home system perfectly fine. I'll try now with the "real"
project in a clean workspace.

Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195104 is a reply to message #195097] Wed, 27 June 2007 16:21 Go to previous messageGo to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 127
Registered: July 2009
Senior Member
Andreas Pakulat wrote:

> Larry Isaacs wrote:
>
>> The configuration you describe for your projects works for me. It's not
>> clear what is different in your situation. There may be something amiss
>> in your workspace or Eclipse installation.
>>
>> Could you try creating a utility project and a Dynamic Web Application
>> project in a new workspace and see if you still don't get the warning in
>> the Problems view? I tried the following, which worked for me:
>>
>> 1. Started Eclipse with new workspace.
>> 2. Defined Tomcat Runtime (I used Tomcat 5.5).
>> 3. Created Java project.
>> 4. Configured Java Build Path to add an external jar.
>> 5. Exported the added jar.
>> 5. Created Dynamic Web Project
>> 6. Opened Properties dialog and using the J2EE Module Dependencies page,
>> added the Java project as a dependency.
>> 7. The "Classpath entry ... will not be exported or published." problem
>> appeared in the Problems view.
>
> Worked on my home system perfectly fine. I'll try now with the "real"
> project in a clean workspace.

In the real project it worked as well. I'll have to see tomorrow at work
whats up there...

Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195153 is a reply to message #194998] Thu, 28 June 2007 17:16 Go to previous messageGo to next message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
Just replied to the old thread but looks like things have been sorted out
here - thanks, Larry

-Rob

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:f5r2kj$s6n$1@build.eclipse.org...
> Just to be sure, are you looking for the warnings in the Problems view?
> That is the only place they appear, and thus, the only place you can
> access the Quickfix.
>
> Cheers,
> Larry
>
> Andreas Pakulat wrote:
>> Hi,
>>
>> it seems like older posts are not read anymore, so I'm reposting this as
>> I now do have access to Eclipse 3.3 and WTP 2.0.
>>
>> The question I have is, with the above given tools, how can I use the jar
>> files that are exported from a J2EE Module (lets call the project
>> mytaglib) from a web project (call mymedia)? I selected all the jar's in
>> the mytaglib project (its a simple Java project, with the Module facet
>> selected as well) to be exported, but the web project gives me various
>> errors when using the classes from those jars. mytaglib is selected as
>> Module Dependecy in mymedia project properties.
>>
>> Rob told me before that there should be warning about the exported jars
>> and a Quickfix which would allow eclipse/wtp to build a mytaglib.jar
>> which includes the exported jars. However I don't get a warning and I
>> don't get the export jars in mytaglib.jar in mymedia's WEB-INF/lib dir.
>>
>> I already tried to not export the jars but that didn't bring up any
>> warnings either. Do I miss something here?
>>
>> Andreas
Re: Acessing Classes in jar that are exported from J2EE Module Project [message #195543 is a reply to message #195153] Tue, 03 July 2007 08:16 Go to previous message
Eclipse User
Originally posted by: pakulat.rostock.zgdv.de

Rob Frost schrieb:
> Just replied to the old thread but looks like things have been sorted out
> here - thanks, Larry

Unfortunatly its not been sorted out. At least not with the real
projects :( I still get a .jar in the webprojects that only has the
classes and .tld file that I written in the utility project.

I did run the quickfix for all jars that should be exported and all of
them are marked for exporting. Also I see the publish/export entry under
the buildpath.

Using a freshly created web application project it works, that is I can
add my existing utility module as J2EE module dependecy and when its
published the exported jars from the utility project show up under
WEB-INF/lib. The same thing doesn't work for existing web application
projects, no matter how often I add/remove the J2EE Module dependecy,
clean the project or freshly checkout the project.

Andreas
Previous Topic:Duplicate entry error when publishing webapps to tomcat
Next Topic:WTP all-in-one
Goto Forum:
  


Current Time: Sat Jul 26 11:32:30 EDT 2014

Powered by FUDForum. Page generated in 0.02925 seconds