Java EE Applications tutorial help desired

View: New views
5 Messages — Rating Filter:   Alert me  

Java EE Applications tutorial help desired

by Russ ² :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello, I'm trying to complete the Getting Started with Java EE Applications tutorial located here http://www.netbeans.org/kb/60/javaee/ejb30.html
I'm using Netbeans 6.1 with everything default during setup

Everything goes fine until I try to run it, and the glassfish server gives me this error about the ListNews servlet

        Class [ Lejb/NewsEntityFacadeLocal; ] not found. Error while loading [ class web.ListNews ]
        Error in annotation processing: java.lang.NoClassDefFoundError: Lejb/NewsEntityFacadeLocal;
        deployed with moduleid = NewsApp
        StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for servlet ListNews threw exception
        java.lang.NoClassDefFoundError: ejb/NewsEntityFacadeLocal

And this error with the PostMessage servlet

        StandardWrapperValve[PostMessage]: PWC1406: Servlet.service() for servlet PostMessage threw exception
        java.lang.NullPointerException

I have been unable to determine on my own, or with google's help, what the problem is.  It appears that the EJB binding isn't happening, but I'm clueless how to debug or fix.



So I try this tutorial on a fresh install on a different computer, and I can't even get the servlet to call the bean
This part of the instructions:

        When you click Finish, the class ListNews.java opens in the Source Editor. In the Source Editor, do the following:
           1. Right-click in the source code and select Enterprise Resources > Call Enterprise Bean.
           2. In the Call Enterprise Bean dialog box, select NewsEntityFacade and click OK. When you click OK, the entity bean resource is injected in the servlet using the @EJB annotation.
   
When I select NewsEntityFacade, the UI says "Selected bean is not in the same module or enterprise application"

This is another problem I'm confused about, both the war and ejb are in my enterprise application, so what could be the problem?


Other problems:
        When clicking finish on the Create New Enterprise Application, it frequently stalls at 11% and "Creating new project"
        Cancelling and redoing the dialog is a work around


Thanks for your help - Russ


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

RE: Java EE Applications tutorial help desired

by Gavin Ross(i) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Russ,

Your problem is a typo some where in your NewsEntityFacadeLocal. Refer to
error "Lejb/NewsEntityFacadeLocal" versus expected
"ejb/NewsEntityFacadeLocal". Note the "L" infornt of the ejb.

Regards
Gavin

-----Original Message-----
From: Russ ² [mailto:toolshed51@...]
Sent: 07 May 2008 08:54 PM
To: nbj2ee@...
Subject: [nbj2ee] Java EE Applications tutorial help desired



Hello, I'm trying to complete the Getting Started with Java EE Applications
tutorial located here http://www.netbeans.org/kb/60/javaee/ejb30.html
I'm using Netbeans 6.1 with everything default during setup

Everything goes fine until I try to run it, and the glassfish server gives
me this error about the ListNews servlet

        Class [ Lejb/NewsEntityFacadeLocal; ] not found. Error while loading
[ class web.ListNews ]
        Error in annotation processing: java.lang.NoClassDefFoundError:
Lejb/NewsEntityFacadeLocal;
        deployed with moduleid = NewsApp
        StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for
servlet ListNews threw exception
        java.lang.NoClassDefFoundError: ejb/NewsEntityFacadeLocal

And this error with the PostMessage servlet

        StandardWrapperValve[PostMessage]: PWC1406: Servlet.service() for
servlet PostMessage threw exception
        java.lang.NullPointerException

I have been unable to determine on my own, or with google's help, what the
problem is.  It appears that the EJB binding isn't happening, but I'm
clueless how to debug or fix.



So I try this tutorial on a fresh install on a different computer, and I
can't even get the servlet to call the bean This part of the instructions:

        When you click Finish, the class ListNews.java opens in the Source
Editor. In the Source Editor, do the following:
           1. Right-click in the source code and select Enterprise Resources
> Call Enterprise Bean.
           2. In the Call Enterprise Bean dialog box, select
NewsEntityFacade and click OK. When you click OK, the entity bean resource
is injected in the servlet using the @EJB annotation.
   
When I select NewsEntityFacade, the UI says "Selected bean is not in the
same module or enterprise application"

This is another problem I'm confused about, both the war and ejb are in my
enterprise application, so what could be the problem?


Other problems:
        When clicking finish on the Create New Enterprise Application, it
frequently stalls at 11% and "Creating new project"
        Cancelling and redoing the dialog is a work around


Thanks for your help - Russ


 
____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.9/1418 - Release Date: 2008/05/06
05:17 PM



Re: Java EE Applications tutorial help desired

by wbossons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Regarding the issue with the class not found, make sure that you are
using the facade class in your bean, and not annotating directly to
local. The tutorial creates a NewsEntityFacade that should implement the
NewsEntityFacadeLocal, and the former is what you should have annotated.

Regarding nb stalling. Did your Netbeans crash recently? I had a similar
issue with NB some months ago after a crash. Check if there are any
hanging processes that were not stopped when you restarted if that's the
case. Also, check the NB logs for more info, and delete any unneeded
.Netbeans cache files.

..\W


Russ ² wrote:

> Hello, I'm trying to complete the Getting Started with Java EE Applications tutorial located here http://www.netbeans.org/kb/60/javaee/ejb30.html
> I'm using Netbeans 6.1 with everything default during setup
>
> Everything goes fine until I try to run it, and the glassfish server gives me this error about the ListNews servlet
>
> Class [ Lejb/NewsEntityFacadeLocal; ] not found. Error while loading [ class web.ListNews ]
> Error in annotation processing: java.lang.NoClassDefFoundError: Lejb/NewsEntityFacadeLocal;
> deployed with moduleid = NewsApp
> StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for servlet ListNews threw exception
> java.lang.NoClassDefFoundError: ejb/NewsEntityFacadeLocal
>
> And this error with the PostMessage servlet
>
> StandardWrapperValve[PostMessage]: PWC1406: Servlet.service() for servlet PostMessage threw exception
> java.lang.NullPointerException
>
> I have been unable to determine on my own, or with google's help, what the problem is.  It appears that the EJB binding isn't happening, but I'm clueless how to debug or fix.
>
>
>
> So I try this tutorial on a fresh install on a different computer, and I can't even get the servlet to call the bean
> This part of the instructions:
>
> When you click Finish, the class ListNews.java opens in the Source Editor. In the Source Editor, do the following:
>   1. Right-click in the source code and select Enterprise Resources > Call Enterprise Bean.
>   2. In the Call Enterprise Bean dialog box, select NewsEntityFacade and click OK. When you click OK, the entity bean resource is injected in the servlet using the @EJB annotation.
>    
> When I select NewsEntityFacade, the UI says "Selected bean is not in the same module or enterprise application"
>
> This is another problem I'm confused about, both the war and ejb are in my enterprise application, so what could be the problem?
>
>
> Other problems:
> When clicking finish on the Create New Enterprise Application, it frequently stalls at 11% and "Creating new project"
> Cancelling and redoing the dialog is a work around
>
>
> Thanks for your help - Russ
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>  

--
..\Wendy
Wendy Bossons
Senior User Interface Developer
Harvard-MIT Data Center
Office Phone:  617-384-5701
Email: wbossons <at> hmdc.harvard.edu


[wbossons.vcf]

begin:vcard
fn:Wendy Bossons
n:Bossons;Wendy
tel;work:617-384-5701
note:wbossons <at> hmdc.harvard.edu
version:2.1
end:vcard



Re: Java EE Applications tutorial help desired

by Russ ² :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Thank you for your help.  I tried changing the import and @EJB from the NewsEntityFacadeLocal to NewsEntityFacade and it gives me the same error with a new class name.  However it does now have a new line in the output regarding a binding name.  I thought this was strange because its regarding the PostMessage servlet, in the middle of all these messages for my ListNews servlet.

Class [ Lejb/NewsEntityFacade; ] not found. Error while loading [ class web.ListNews ]
Error in annotation processing: java.lang.NoClassDefFoundError: Lejb/NewsEntityFacade;
deployed with moduleid = NewsApp
Binding name:`java:comp/env/web.PostMessage/queue`
StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for servlet ListNews threw exception
java.lang.NoClassDefFoundError: ejb/NewsEntityFacade



--- On Wed, 5/7/08, Wendy Bossons <wbossons@...> wrote:

> From: Wendy Bossons <wbossons@...>
> Subject: Re: [nbj2ee] Java EE Applications tutorial help desired
> To: nbj2ee@...
> Date: Wednesday, May 7, 2008, 1:11 PM
> Regarding the issue with the class not found, make sure that
> you are
> using the facade class in your bean, and not annotating
> directly to
> local. The tutorial creates a NewsEntityFacade that should
> implement the
> NewsEntityFacadeLocal, and the former is what you should
> have annotated.
>
> Regarding nb stalling. Did your Netbeans crash recently? I
> had a similar
> issue with NB some months ago after a crash. Check if there
> are any
> hanging processes that were not stopped when you restarted
> if that's the
> case. Also, check the NB logs for more info, and delete any
> unneeded
> .Netbeans cache files.
>
> ..\W
>
>
> Russ ² wrote:
> > Hello, I'm trying to complete the Getting Started
> with Java EE Applications tutorial located here
> http://www.netbeans.org/kb/60/javaee/ejb30.html
> > I'm using Netbeans 6.1 with everything default
> during setup
> >
> > Everything goes fine until I try to run it, and the
> glassfish server gives me this error about the ListNews
> servlet
> >
> > Class [ Lejb/NewsEntityFacadeLocal; ] not found.
> Error while loading [ class web.ListNews ]
> > Error in annotation processing:
> java.lang.NoClassDefFoundError: Lejb/NewsEntityFacadeLocal;
> > deployed with moduleid = NewsApp
> > StandardWrapperValve[ListNews]: PWC1406:
> Servlet.service() for servlet ListNews threw exception
> > java.lang.NoClassDefFoundError:
> ejb/NewsEntityFacadeLocal
> >
> > And this error with the PostMessage servlet
> >
> > StandardWrapperValve[PostMessage]: PWC1406:
> Servlet.service() for servlet PostMessage threw exception
> > java.lang.NullPointerException
> >
> > I have been unable to determine on my own, or with
> google's help, what the problem is.  It appears that
> the EJB binding isn't happening, but I'm clueless
> how to debug or fix.
> >
> >
> >
> > So I try this tutorial on a fresh install on a
> different computer, and I can't even get the servlet to
> call the bean
> > This part of the instructions:
> >
> > When you click Finish, the class ListNews.java opens
> in the Source Editor. In the Source Editor, do the
> following:
> >   1. Right-click in the source code and select
> Enterprise Resources > Call Enterprise Bean.
> >   2. In the Call Enterprise Bean dialog box, select
> NewsEntityFacade and click OK. When you click OK, the
> entity bean resource is injected in the servlet using the
> @EJB annotation.
> >    
> > When I select NewsEntityFacade, the UI says
> "Selected bean is not in the same module or enterprise
> application"
> >
> > This is another problem I'm confused about, both
> the war and ejb are in my enterprise application, so what
> could be the problem?
> >
> >
> > Other problems:
> > When clicking finish on the Create New Enterprise
> Application, it frequently stalls at 11% and "Creating
> new project"
> > Cancelling and redoing the dialog is a work around
> >
> >
> > Thanks for your help - Russ
> >
> >
> >      
> ____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >  
>
>
> --
> ..\Wendy
> Wendy Bossons
> Senior User Interface Developer
> Harvard-MIT Data Center
> Office Phone:  617-384-5701
> Email: wbossons <at> hmdc.harvard.edu


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Re: Java EE Applications tutorial help desired

by wbossons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There may be something in this thread that can help you -- apparently other folks have had similar issues...

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=11&t=013120

hope it helps

..\W


uss ² wrote:
Thank you for your help.  I tried changing the import and @EJB from the NewsEntityFacadeLocal to NewsEntityFacade and it gives me the same error with a new class name.  However it does now have a new line in the output regarding a binding name.  I thought this was strange because its regarding the PostMessage servlet, in the middle of all these messages for my ListNews servlet.

Class [ Lejb/NewsEntityFacade; ] not found. Error while loading [ class web.ListNews ]
Error in annotation processing: java.lang.NoClassDefFoundError: Lejb/NewsEntityFacade;
deployed with moduleid = NewsApp
Binding name:`java:comp/env/web.PostMessage/queue`
StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for servlet ListNews threw exception
java.lang.NoClassDefFoundError: ejb/NewsEntityFacade



--- On Wed, 5/7/08, Wendy Bossons wbossons@... wrote:

  
From: Wendy Bossons wbossons@...
Subject: Re: [nbj2ee] Java EE Applications tutorial help desired
To: nbj2ee@...
Date: Wednesday, May 7, 2008, 1:11 PM
Regarding the issue with the class not found, make sure that
you are 
using the facade class in your bean, and not annotating
directly to 
local. The tutorial creates a NewsEntityFacade that should
implement the 
NewsEntityFacadeLocal, and the former is what you should
have annotated.

Regarding nb stalling. Did your Netbeans crash recently? I
had a similar 
issue with NB some months ago after a crash. Check if there
are any 
hanging processes that were not stopped when you restarted
if that's the 
case. Also, check the NB logs for more info, and delete any
unneeded 
.Netbeans cache files.

..\W


Russ ² wrote:
    
Hello, I'm trying to complete the Getting Started
      
with Java EE Applications tutorial located here
http://www.netbeans.org/kb/60/javaee/ejb30.html
    
I'm using Netbeans 6.1 with everything default
      
during setup
    
Everything goes fine until I try to run it, and the
      
glassfish server gives me this error about the ListNews
servlet
    
	Class [ Lejb/NewsEntityFacadeLocal; ] not found.
      
Error while loading [ class web.ListNews ]
    
	Error in annotation processing:
      
java.lang.NoClassDefFoundError: Lejb/NewsEntityFacadeLocal;
    
	deployed with moduleid = NewsApp
	StandardWrapperValve[ListNews]: PWC1406:
      
Servlet.service() for servlet ListNews threw exception
    
	java.lang.NoClassDefFoundError:
      
ejb/NewsEntityFacadeLocal
    
And this error with the PostMessage servlet

	StandardWrapperValve[PostMessage]: PWC1406:
      
Servlet.service() for servlet PostMessage threw exception
    
	java.lang.NullPointerException

I have been unable to determine on my own, or with
      
google's help, what the problem is.  It appears that
the EJB binding isn't happening, but I'm clueless
how to debug or fix.
    

So I try this tutorial on a fresh install on a
      
different computer, and I can't even get the servlet to
call the bean
    
This part of the instructions:

	When you click Finish, the class ListNews.java opens
      
in the Source Editor. In the Source Editor, do the
following:
    
	   1. Right-click in the source code and select
      
Enterprise Resources > Call Enterprise Bean.
    
	   2. In the Call Enterprise Bean dialog box, select
      
NewsEntityFacade and click OK. When you click OK, the
entity bean resource is injected in the servlet using the
@EJB annotation.
    
   
When I select NewsEntityFacade, the UI says
      
"Selected bean is not in the same module or enterprise
application"
    
This is another problem I'm confused about, both
      
the war and ejb are in my enterprise application, so what
could be the problem?
    
Other problems:
	When clicking finish on the Create New Enterprise
      
Application, it frequently stalls at 11% and "Creating
new project"
    
	Cancelling and redoing the dialog is a work around


Thanks for your help - Russ


     
      
____________________________________________________________________________________
    
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now. 
      
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
    
  
      
-- 
..\Wendy
Wendy Bossons
Senior User Interface Developer
Harvard-MIT Data Center
Office Phone:  617-384-5701
Email: wbossons <at> hmdc.harvard.edu
    


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
  


-- 
..\Wendy
Wendy Bossons
Senior User Interface Developer
Harvard-MIT Data Center
Office Phone:  617-384-5701
Email: wbossons <at> hmdc.harvard.edu 

[wbossons.vcf]

begin:vcard
fn:Wendy Bossons
n:Bossons;Wendy
tel;work:617-384-5701
note:wbossons <at> hmdc.harvard.edu
version:2.1
end:vcard