Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Warning message about ClassNotFoundException in a new web project
Warning message about ClassNotFoundException in a new web project [message #192087] Fri, 04 May 2007 12:34 Go to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
- Eclipse 3.3M6
- Web Tools Platform 2.0M6

Hello, everybody!
I created a Dynamic Web Project using JSF and JPA, but I'm getting the
following
warning message in the Problems view:

Classpath entry org.eclipse.jdt.USER_LIBRARY/Biblioteca JPA will not be
exported or published. Runtime ClassNotFoundExceptions may result.

This user library, Biblioteca JPA, is composed of this jars:

antlr-2.7.6.jar
cglib.jar
dom4j.jar
ejb3-persistence.jar
hibernate3.jar
hibernate-annotations.jar
hibernate-entitymanager.jar
hsqldb.jar
jboss-hibernate.jar

In the project I also have these libraries:

Biblioteca JSF:
---------------

commons-collections.jar
jstl.jar
myfaces-api.jar
myfaces-impl.jar

JBoss v4.0:
-----------

jboss-j2ee.jar
jbossall-client.jar
javax.servlet.jar
javax.servlet.jsp.jar
activation.jar
mail.jar

So, I would like to know how do I configure the Bliblioteca JPA to disable
possible
problems with ClassNotFoundExceptions happening at runtime. What do I have
to add or
change on it to get rid of the warning message? Or whatever is the
solution that you
use when this message appear.

Thank you in advance.

Marcos
Re: Warning message about ClassNotFoundException in a new web project [message #192104 is a reply to message #192087] Fri, 04 May 2007 14:44 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
Hi Marcos,

See the following thread for details on this warning and on the associated
classpath entry publish/export support:

http://dev.eclipse.org/newslists/news.eclipse.webtools/msg13 677.html

To answer your question:

>So, I would like to know how do I configure the Bliblioteca JPA to disable
>possible
> problems with ClassNotFoundExceptions happening at runtime. What do I have
> to add or
> change on it to get rid of the warning message? Or whatever is the
> solution that you
> use when this message appear.

If you know that the classes exposed by that library will be available to
deployed code at runtime, then you do not need to worry about possible
ClassNotFoundExceptions at runtime.

If those classes will not be available at runtime, then you must ensure that
they are packaged with the module and that is now supported for classpath
entries: if you have this week's I-build you can accomplish that directly
using a QuickFix on the warning, otherwise, open the "J2EE Module
Dependencies" UI and select the classpath entry in the table of potential
entries (the resolved JARs will be packaged in either WEB-INF/lib or the
root of the EAR, referenced via the Manifest classpath, depending on the
type of dependency).

Note: the JSF New and Noteworthy for M6 includes some specific information
about configuring JSF libraries using this new feature:
http://www.eclipse.org/webtools/development/news/2.0M6/main. php

-Rob

"Marcos" <marcosantoniops@bol.com.br> wrote in message
news:e9bfd0603700f90530da201ea6cf914a$1@www.eclipse.org...
>- Eclipse 3.3M6
> - Web Tools Platform 2.0M6
>
> Hello, everybody!
> I created a Dynamic Web Project using JSF and JPA, but I'm getting the
> following
> warning message in the Problems view:
>
> Classpath entry org.eclipse.jdt.USER_LIBRARY/Biblioteca JPA will not be
> exported or published. Runtime ClassNotFoundExceptions may result.
>
> This user library, Biblioteca JPA, is composed of this jars:
>
> antlr-2.7.6.jar
> cglib.jar
> dom4j.jar
> ejb3-persistence.jar
> hibernate3.jar
> hibernate-annotations.jar
> hibernate-entitymanager.jar
> hsqldb.jar
> jboss-hibernate.jar
>
> In the project I also have these libraries:
>
> Biblioteca JSF:
> ---------------
>
> commons-collections.jar
> jstl.jar
> myfaces-api.jar
> myfaces-impl.jar
>
> JBoss v4.0:
> -----------
>
> jboss-j2ee.jar
> jbossall-client.jar
> javax.servlet.jar
> javax.servlet.jsp.jar
> activation.jar
> mail.jar
>
> So, I would like to know how do I configure the Bliblioteca JPA to disable
> possible
> problems with ClassNotFoundExceptions happening at runtime. What do I have
> to add or
> change on it to get rid of the warning message? Or whatever is the
> solution that you
> use when this message appear.
>
> Thank you in advance.
>
> Marcos
>
Re: Warning message about ClassNotFoundException in a new web project [message #192117 is a reply to message #192104] Fri, 04 May 2007 16:49 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Rob!
As I don't have this week's I-build I used the "J2EE Module Dependencies"
UI and the message went away. The thread about the warning and about the
classpath entry publish/export was also very helpful.
Thank you very much.

Marcos

Rob Frost wrote:

> Hi Marcos,

> See the following thread for details on this warning and on the associated
> classpath entry publish/export support:

> http://dev.eclipse.org/newslists/news.eclipse.webtools/msg13 677.html

> To answer your question:

>>So, I would like to know how do I configure the Bliblioteca JPA to disable
>>possible
>> problems with ClassNotFoundExceptions happening at runtime. What do I have
>> to add or
>> change on it to get rid of the warning message? Or whatever is the
>> solution that you
>> use when this message appear.

> If you know that the classes exposed by that library will be available to
> deployed code at runtime, then you do not need to worry about possible
> ClassNotFoundExceptions at runtime.

> If those classes will not be available at runtime, then you must ensure that
> they are packaged with the module and that is now supported for classpath
> entries: if you have this week's I-build you can accomplish that directly
> using a QuickFix on the warning, otherwise, open the "J2EE Module
> Dependencies" UI and select the classpath entry in the table of potential
> entries (the resolved JARs will be packaged in either WEB-INF/lib or the
> root of the EAR, referenced via the Manifest classpath, depending on the
> type of dependency).

> Note: the JSF New and Noteworthy for M6 includes some specific information
> about configuring JSF libraries using this new feature:
> http://www.eclipse.org/webtools/development/news/2.0M6/main. php

> -Rob
Re: Warning message about ClassNotFoundException in a new web project [message #192684 is a reply to message #192104] Thu, 17 May 2007 14:15 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
- Java 5.0 Update 11
- JBoss 4.2.0GA
- Eclipse 3.3M6
- Web Tools Platform 2.0M6

Hello, everybody!
I don't know what happened as this problem (the warning message) was
already
solved. But I deleted and created my projects from scratch again (EAR, EJB
and WEB projects) to finally work seriously on it (using Java 5.0 and
JBoss 4.2). So the warning message appeared again:

Classpath entry org.eclipse.jdt.USER_LIBRARY/Biblioteca JPA will not be
exported or published. Runtime ClassNotFoundExceptions may result.

But when I went to the "J2EE Module Dependencies" UI of the EJB project to
remove the message again, there wasn't any classpath entries in the table
of
potential entries to select. It says there:

"This property page lets you setup the j2ee module dependencies with other
j2ee
modules within an Enterprise Application. All modules involved in the
dependency need to belong to the same Enterprise Application."

but there's nothing there to select. So, how can I get rid of the message
this
time? Do I have to upgrade WTP? The BibliotecaJPA is composed of this jars:

antlr.jar
cglib.jar
dom4j.jar
ejb3-persistence.jar
hibernate3.jar
hibernate-annotations.jar
hibernate-entitymanager.jar
hsqldb.jar
jboss-hibernate.jar

Thank you.

Marcos
Re: Warning message about ClassNotFoundException in a new web project [message #192709 is a reply to message #192684] Thu, 17 May 2007 17:43 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
Hi Marcos,

Hmmm, I do not see this issue. Can you confirm that the warning is for the
EJB project? If you add a Utility project to the EAR, is that visible as a
potential dependency for the EJB?

Do you see any exceptions in the .log?

-Rob

"Marcos" <marcosantoniops@bol.com.br> wrote in message
news:a09eda38380fd8d9c5b1d008559c5355$1@www.eclipse.org...
>- Java 5.0 Update 11
> - JBoss 4.2.0GA
> - Eclipse 3.3M6
> - Web Tools Platform 2.0M6
>
> Hello, everybody!
> I don't know what happened as this problem (the warning message) was
> already
> solved. But I deleted and created my projects from scratch again (EAR, EJB
> and WEB projects) to finally work seriously on it (using Java 5.0 and
> JBoss 4.2). So the warning message appeared again:
>
> Classpath entry org.eclipse.jdt.USER_LIBRARY/Biblioteca JPA will not be
> exported or published. Runtime ClassNotFoundExceptions may result.
>
> But when I went to the "J2EE Module Dependencies" UI of the EJB project to
> remove the message again, there wasn't any classpath entries in the table
> of
> potential entries to select. It says there:
>
> "This property page lets you setup the j2ee module dependencies with other
> j2ee
> modules within an Enterprise Application. All modules involved in the
> dependency need to belong to the same Enterprise Application."
>
> but there's nothing there to select. So, how can I get rid of the message
> this
> time? Do I have to upgrade WTP? The BibliotecaJPA is composed of this
> jars:
>
> antlr.jar
> cglib.jar
> dom4j.jar
> ejb3-persistence.jar
> hibernate3.jar
> hibernate-annotations.jar
> hibernate-entitymanager.jar
> hsqldb.jar
> jboss-hibernate.jar
>
> Thank you.
>
> Marcos
>
Re: Warning message about ClassNotFoundException in a new web project [message #192723 is a reply to message #192709] Thu, 17 May 2007 18:21 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello!
I suppose that the warning is for the EJB project because if I don't add
the user library in question (Biblioteca JPA) to it, the warning doesn't
appear.
I have two projects add to the EAR: the EJB project and the EJBClient
project and I can see them referenced from the EAR's "J2EE Module
Dependencies" UI.
I had a look at the .log and I didn't see any exceptions there. What is
interesting, as I said, is that I got rid of this message when I first
created the project, but I can't do this now.

Marcos

Rob Frost wrote:

> Hi Marcos,

> Hmmm, I do not see this issue. Can you confirm that the warning is for the
> EJB project? If you add a Utility project to the EAR, is that visible as a
> potential dependency for the EJB?

> Do you see any exceptions in the .log?

> -Rob
Re: Warning message about ClassNotFoundException in a new web project [message #192762 is a reply to message #192709] Fri, 18 May 2007 10:50 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello!
I suppose that the warning is for the EJB project because if I don't add
the
user library in question (Biblioteca JPA) to it, the warning doesn't
appear.
I have two projects add to the EAR: the EJB project and the EJBClient
project
and I can see them referenced from the EAR's "J2EE Module Dependencies" UI.
I had a look at the .log and I didn't see any exceptions there. What is
interesting, as I said, is that I got rid of this message when I first
created
the project, but I can't do this now.

*** EDITED ***:

Thinking better, I think that the reason why I could eliminate the message
for
the first time was because the warning message was coming from a
Dynamic Web Project, not an EJB Project. So, the "J2EE Module
Dependencies" UI
of a Dynamic Web Project allows me to select the classpath entry in the
table
of potential entries, but the "J2EE Module Dependencies" UI of an EJB
Project
don't, what is happening now. So, do you have any ideas about how I can
solve
this. Even a manually solution would be accepted. I really wouldn't like to
have a project that is just beginning contains warning messages.

Thank you.

Marcos

> Rob Frost wrote:

> Hi Marcos,

> Hmmm, I do not see this issue. Can you confirm that the warning is for the
> EJB project? If you add a Utility project to the EAR, is that visible as a
> potential dependency for the EJB?

> Do you see any exceptions in the .log?

> -Rob
Re: Warning message about ClassNotFoundException in a new web project [message #192801 is a reply to message #192762] Fri, 18 May 2007 17:59 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
hi Marcos,

You can determine which project the warning is associated with by looking at
the "Resource" column for that warning in the Problems view.

Q: Do you correctly see the EJB client project listed as a selected
dependency in the J2EE Module Dependencies UI for that EJB project?

If you do correctly see the EJB client project as a dependency and that
warning is being generated for a classpath entry on the EJB project but you
are failing to see it as a selectable entry in the J2EE Module Dependencies
UI, then it is a bug (though I can't think of how that might be
happening...).

In that case, please open a bugzilla entry and attach the relevant projects
so I can take a look.

thanks,

Rob


"Marcos" <marcosantoniops@bol.com.br> wrote in message
news:bd5e3ad5cd1fef4e3b5e9ae04efe0063$1@www.eclipse.org...
> Hello!
> I suppose that the warning is for the EJB project because if I don't add
> the
> user library in question (Biblioteca JPA) to it, the warning doesn't
> appear.
> I have two projects add to the EAR: the EJB project and the EJBClient
> project
> and I can see them referenced from the EAR's "J2EE Module Dependencies"
> UI.
> I had a look at the .log and I didn't see any exceptions there. What is
> interesting, as I said, is that I got rid of this message when I first
> created
> the project, but I can't do this now.
>
> *** EDITED ***:
>
> Thinking better, I think that the reason why I could eliminate the message
> for
> the first time was because the warning message was coming from a
> Dynamic Web Project, not an EJB Project. So, the "J2EE Module
> Dependencies" UI
> of a Dynamic Web Project allows me to select the classpath entry in the
> table
> of potential entries, but the "J2EE Module Dependencies" UI of an EJB
> Project
> don't, what is happening now. So, do you have any ideas about how I can
> solve
> this. Even a manually solution would be accepted. I really wouldn't like
> to
> have a project that is just beginning contains warning messages.
>
> Thank you.
>
> Marcos
>
>> Rob Frost wrote:
>
>> Hi Marcos,
>
>> Hmmm, I do not see this issue. Can you confirm that the warning is for
>> the EJB project? If you add a Utility project to the EAR, is that visible
>> as a potential dependency for the EJB?
>
>> Do you see any exceptions in the .log?
>
>> -Rob
>
Re: Warning message about ClassNotFoundException in a new web project [message #192815 is a reply to message #192801] Fri, 18 May 2007 18:32 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Rob!

> You can determine which project the warning is associated with by looking at
> the "Resource" column for that warning in the Problems view.

The "Resource" column of the warning says: LaboratorioInformaticaEJB
(that's the name of my EJB project). So we can be sure now that the
message is coming from the EJB project.

> Q: Do you correctly see the EJB client project listed as a selected
> dependency in the J2EE Module Dependencies UI for that EJB project?

No. The EJB client project isn't listed as a selected dependency in the
J2EE Module Dependencies UI for the EJB project. There's nothing selected
as a dependency in the J2EE Module Dependencies UI of the EJB project. But
the EJB project is referenced in the WEB project.

Thank you.

Marcos
Re: Warning message about ClassNotFoundException in a new web project [message #192836 is a reply to message #192815] Fri, 18 May 2007 19:36 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
If your EAR includes both EJB and EJB client projects and you do not see the
EJB client project in the list of available dependencies for the EJB project
(doesn't necessarily need to be selected), then something more general
involving the J2EE Module Dependencies is wrong.

Please go ahead and open a bugzilla and attach the projects and it will get
routed to the right person.

-Rob

"Marcos" <marcosantoniops@bol.com.br> wrote in message
news:16bf14d91032b4fccf458d0bf1e19703$1@www.eclipse.org...
> Hello, Rob!
>
>> You can determine which project the warning is associated with by looking
>> at the "Resource" column for that warning in the Problems view.
>
> The "Resource" column of the warning says: LaboratorioInformaticaEJB
> (that's the name of my EJB project). So we can be sure now that the
> message is coming from the EJB project.
>
>> Q: Do you correctly see the EJB client project listed as a selected
>> dependency in the J2EE Module Dependencies UI for that EJB project?
>
> No. The EJB client project isn't listed as a selected dependency in the
> J2EE Module Dependencies UI for the EJB project. There's nothing selected
> as a dependency in the J2EE Module Dependencies UI of the EJB project. But
> the EJB project is referenced in the WEB project.
>
> Thank you.
>
> Marcos
>
Re: Warning message about ClassNotFoundException in a new web project [message #192844 is a reply to message #192836] Fri, 18 May 2007 19:51 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Rob!
Yes, just to confirm, my EAR includes both EJB and EJB client projects.
I'll open a bugzilla with all the projects.
Thank you.

Marcos

Rob Frost wrote:
> If your EAR includes both EJB and EJB client projects and you do not see the
> EJB client project in the list of available dependencies for the EJB project
> (doesn't necessarily need to be selected), then something more general
> involving the J2EE Module Dependencies is wrong.

> Please go ahead and open a bugzilla and attach the projects and it will get
> routed to the right person.

> -Rob
Previous Topic:New Server Runtime is blank
Next Topic:newbie question: how to find who's using a port?
Goto Forum:
  


Current Time: Fri Mar 29 06:45:19 GMT 2024

Powered by FUDForum. Page generated in 0.02949 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top