Screencast #36: Web App Development using Java EE 6, GlassFish, and Eclipse - Webinar Recording

A recently concluded webinar on "Web Application Development with Java EE 6, GlassFish, and Eclipse" demonstrated:

  • Easy creation of web.xml-free and annotation-driven Servlets
  • HTTP session preservation across re-deploys to boost productivity
  • Creating JPA entities from an existing database table
  • Simplified packaging of EJB in a WAR file
  • Facelets as the templating language for JSF pages
  • Using EJB as backing bean for JSF pages
  • Publishing RESTful resources using JAX-RS
  • Injection in JAX-RS resources

And many other features!

The recording from the webinar is is now available:

The entire source code built during the webinar can be downloaded here.

How are you building your Java EE 6 applications ?

Technorati: webinar javaee6 glassfish eclipse screencast

Comments:

Hi I liked your blog. I m interested in cloud computing application are you ?

Posted by Anurag Gupta on December 19, 2010 at 10:02 PM PST #

Dear Arun
This is very good screencast, but one of the most important part is missing, that is SOAP based web services. Glassfish uses metro but eclipse uses Axis, what is the solution ?

As I know JAX-WS is the newest web service technology which is easy for WS development. However, this is very good screencast on EJB and JSF on Glassfish with Eclipse, sepcially REST part.

Posted by Ojitha Kumanayaka on December 20, 2010 at 04:23 PM PST #

Hi, Arun welldone. The recording is not available on this page. Kindly make it available. thanks

Posted by Salami olusola on December 20, 2010 at 05:32 PM PST #

Ojitha,

JAX-WS-based Web service creation is explained at:

http://blogs.sun.com/arungupta/entry/totd_98_create_a_metro

Salami,

Do you not see the youtube recording on this page ? You can also view it at:

http://www.youtube.com/watch?v=aBjlR9HoR50&feature=player_embedded

Posted by Arun Gupta on December 20, 2010 at 09:49 PM PST #

Anurag,

What kind of cloud computing applications are you interested in ?

Posted by Arun Gupta on December 20, 2010 at 09:50 PM PST #

After adding the FriendEJB.java create() method, at deployment I get the following exception:
org.glassfish.deployment.common.DeploymentException: WELD-001408 Injection point has unsatisfied dependencies. Injection point: field org.glassfish.samples.FriendEJB.f; Qualifiers: @javax.enterprise.inject.Default()]
--------------
I am using Glassfish 3.0.1 for this Eclipse project, but I had to manually create a User Library in order to satisfy the imports. This library does include the weld-osgi-bundle and weld-integration jars. What could i missing?
Thanks, Jeff

Posted by Jeff Edlund on December 22, 2010 at 03:47 PM PST #

Arun... So many thanks for these... I really want to know whats going on in the world of EE and i found all your videos really interesting... Thanks again...

Greetings from Argentina

Posted by Nicolas on December 27, 2010 at 01:04 AM PST #

Live Q&A about Dec 14th webinar replay - Arun Gupta, Adam Leftik, and other GlassFish team members live on IRC.

Tuesday Jan 12th, 2011
10:00am – 11:00am Pacific (GMT -08:00)

http://wikis.sun.com/display/GlassFish/ChatRooms

Posted by Pieter Humphrey on January 07, 2011 at 06:41 AM PST #

Hi Arun,
Nice job.
Could you also give similar webinar on J2EE in cloud (SaaS) based architecture .

Thanks

Posted by Sarad on January 16, 2011 at 02:32 AM PST #

Well done. I could follow the whole screen cast (though I had to configure the datasource "sample" first).

Good walkthrough in this short time.

Thanks and greetings from Germany

Posted by Lutz Hankewitz on January 21, 2011 at 05:36 AM PST #

Hi,
Thanks for your video.It's great.I want to design a Book cart for library infor.system using EJB statefull session bean.How can i do please give me some idea.

Posted by nikki on January 27, 2011 at 03:25 AM PST #

I've gone through the webcast tutorial a couple of times already, following exactly all the steps, but I still have a couple of issues to solve:

1) after I hit the submit button on the create.xhtml page I don't see the show.xhtml page loading, the create.xhtml page gets reloaded again instead..
2) the EJB timer is not executed, I can't see any logging coming from it, it should be every 10 seconds..

Is there anything in particular I might have missed? Any suggestions?

Thanks in advance.

Posted by MzC_ on February 10, 2011 at 01:18 AM PST #

Jeff,

Can you elaborate more on the "User library" ?

nikki,

You'll need to design Book information system and then use JSF for the front-end layer, EJB as the backing bean, and JPA for database operations. You may also consider exposing your entities as RESTful Web services and then hooking up with jQuery front-end.

MzC_,

In create.xhtml submit button, did you specify "show" as the action attribute ?

Are you using the web profile or full EE 6 bundle ?

Posted by Arun Gupta on February 12, 2011 at 06:15 PM PST #

Hello Arun,

Good Day!

Thank you very much of this tutorial. I am a Software Engineer and I am on a self-training on Java EE. I will be part of a team that will make a project using Java EE, GlassFish, Eclipse Indigo and JBoss Seam.

I am using a Java EE 6 Tutorial base on Oracle Jave EE page.

I have some few questions:
1. Do you have more video tutorials on JSF 2.0 and EJB? Please send me link if you have.
2. We will be using JBoss Seam, what should I needed to concentrate before going to Seam?

Need your guidance. Thank you so much.

Posted by Michael Manreza on March 14, 2012 at 10:11 AM PDT #

Michael,

Have you checked out Java EE 6 tutorial using Eclipse at:

https://blogs.oracle.com/arungupta/entry/web_app_development_using_java

I also blogged about running Seam samples on GlassFish at:

https://blogs.oracle.com/arungupta/entry/totd_77_running_seam_examples

Hope that helps. You can always ask your question at GlassFish forum:

http://www.java.net/forums/glassfish/glassfish

Posted by Arun Gupta on March 14, 2012 at 10:39 AM PDT #

The link to the resource is broken. I am getting a 404. Can you fixed it please?

--marky

Posted by marky on April 12, 2012 at 09:26 PM PDT #

Marky,

All the redirects to blogs.sun.com are removed and that's whe it was a broken link. Fixed anyway now!

Thanks for reporting.

Posted by Arun Gupta on April 13, 2012 at 02:50 AM PDT #

Thanks Arun..

Another thing to mention, while building your app and making my EJB as my managedbean. I have added the @Named annotation and even created my blank beans.xml.

During publishing to Glassfish, I am encountering this error at the Server log.

org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.jboss.weld.servlet.WeldListener

I used Eclipse Helios 3.6 and Glassfish 3.1.2 (build 23)

Would you know the rootcause?

Posted by guest on April 15, 2012 at 06:11 PM PDT #

Silly mistake Arun... a restart of glassfish has fixed my problem. Please negelect it.

--marky

Posted by Marky on April 15, 2012 at 06:28 PM PDT #

Marky,

I was about to suggest that to you :-)

Posted by Arun Gupta on April 22, 2012 at 03:47 AM PDT #

Hi Arun,

Just a thought regarding these steps as I am exactly following your setup. Have you tried setting a breakpoint in eclipse?

I have been trying to set a breakpoint and then instead of selecting Run On Server, I selected Debug on Server but I am not able to properly debug my application.

Just wondering if there's any specific setup for this?

Thanks

--marky

Posted by Marky on May 14, 2012 at 08:41 PM PDT #

Marky,

I've not tried debugging. Try asking your question on GlassFish forum:

http://www.java.net/forums/glassfish/glassfish

Posted by Arun Gupta on May 15, 2012 at 10:18 AM PDT #

Hi Arun,
nice job with the video unfortunately I keep getting an error when I try to view the contents of my database on a webpage. I believe this has something to do with the "persistence.xml" I was hoping you could help me out with that.

Here is the error message

WARNING: StandardWrapperValve[org.glassfish.samples.TestServlet]: PWC1406: Servlet.service() for servlet org.glassfish.samples.TestServlet threw exception
java.lang.VerifyError: Expecting a stackmap frame at branch target 16 in method model.Person._persistence_checkFetchedForSet(Ljava/lang/String;)V at offset 5
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:93)
at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
at org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:367)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:338)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:230)
at com.sun.enterprise.container.common.impl.EntityManagerFactoryWrapper.createEntityManager(EntityManagerFactoryWrapper.java:110)
at org.glassfish.samples.TestServlet.doGet(TestServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)

Posted by guest on August 21, 2012 at 06:44 AM PDT #

can you explain how to configure the datasource?

I have named my project as TestExample and calling the table friend as info.

I am getting this error:
cannot Deploy TestExample
Deployment Error for module: TestExample: Exception while preparing the app : java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/sun-appserv-samples' in SerialContext [Root exception is javax.naming.NameNotFoundException: sun-appserv-samples not found]

Posted by Aniket on June 10, 2013 at 08:34 AM PDT #

Aniket,

Refer to "create-jdbc-resource" command at: http://docs.oracle.com/cd/E18930_01/html/821-2432/gkyan.html to create a data source.

Posted by Arun Gupta on June 16, 2013 at 03:15 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today