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 08:34  |
Eclipse User |
|
|
|
- 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 10:44   |
Eclipse User |
|
|
|
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 12:49   |
Eclipse User |
|
|
|
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 #192762 is a reply to message #192709] |
Fri, 18 May 2007 06:50   |
Eclipse User |
|
|
|
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 13:59   |
Eclipse User |
|
|
|
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 #192844 is a reply to message #192836] |
Fri, 18 May 2007 15:51  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Thu Mar 13 17:04:48 EDT 2025
Powered by FUDForum. Page generated in 0.06062 seconds
|