Screencast #31: Java EE 6 using GlassFish and Eclipse 3.6 - Oracle Enterprise Pack for Eclipse 11.1.1.6 is now available - 5 new screencasts

Oracle Enterprise Pack for Eclipse 11.1.1.6 is now available - download here.

This is a set of plugins for Eclipse 3.6 that provide support for Oracle Coherence, Weblogic Scripting Tool (WLST), WebLogic server JDBC deployment descriptor and Web services annotation editor, and now Java EE 6 & GlassFish as well!

The plugins can also be downloaded from Eclipse Marketplace.

This video tutorial shows:

  1. Getting started with GlassFish in OEPE
  2. A simple Java EE 6 application (JSP, Servlets, EJB)
  3. Reading database table using Java Persistence API 2
  4. Using Facelets with Java Server Faces 2
  5. RESTful Web services using JAX-RS

Enjoy!

Note, this is a playlist of all the videos so click on little arrows (shown as "<" or ">") to view the different videos.

Please give us feedback on GlassFish Forums.

Technorati: screencast javaee6 glassfish tutorial eclipse oepe oracle

Comments:

Great, Arun !

I was waiting for that since our chat at FISL!

Keep up the good work and thanks for all!

Posted by Alessandro Dias on August 02, 2010 at 10:48 AM PDT #

Excellent presentation!

Posted by Sam on October 18, 2010 at 07:02 AM PDT #

This tutorial helped me a lot!
Thank you very much!

Next time specify please the exact version of eclipse you're using. (I had the M6 release and installing OEPE through the remote site did not work)

Posted by seaqxx on October 28, 2010 at 06:44 AM PDT #

Hi Arun,

You webcast helped me a lot. Thanks for it.

I was trying to configure my existing projects in glassfish + eclipse combination.

I have a dynamic web project, which is dependent upon few other java projects. (where my business logic is).

When i deploy web project on glass fish. and from open/launch configuration give in server class path all my java projects and other third party jars needed.

they r not detected by glass fish. and i get class not found exception.

same thing works for TOMCAT. but somehow its not working for glassfish.

can you please suggest what I can do to make it work.

Posted by Praveen on October 31, 2010 at 05:36 PM PDT #

Praveen,

Have you tried posting your question to users@glassfishplugins.dev.java.net ?

Posted by Arun Gupta on November 01, 2010 at 03:45 AM PDT #

yes...
Well I posted question there and on your blog together. Still waiting for response from there.

Posted by Praveen on November 01, 2010 at 04:42 AM PDT #

This blog mentions a version of OEPE that has been updated since August 2010.
Try the October 2010 release from http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html

It might help, as some fixes where done both on WTP and the plugin to address dependent libs issues.

Posted by ludo on November 01, 2010 at 08:30 AM PDT #

Praveen,

Hope that answers your question now. BTW, I don't see your question posted at:

https://glassfishplugins.dev.java.net/servlets/SummarizeList?listName=users

Posted by Arun Gupta on November 01, 2010 at 08:59 AM PDT #

Thanks for a great tutorial, it helped me a lot!

I found one problem with JSF - in the latest version I installed (oepe-helios-all-in-one-11.1.1.6.1 for Win32), I have to first check the "JavaServer Faces" under project properties - "Project Facets, otherwise the URL mapping to "/faces" and the templating mechanism did not work.
This was not mentioned in the tutorial, so I suppose this was checked by default in the version that Arun used when creating the tutorial.
But maybe this note will help people suffering with the same problem with JSF.

Posted by Michal Aron on January 29, 2011 at 10:20 PM PST #

sir i m getting this bug while starting glassfish server.. "GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section." but i hav installed the latest jdk-6u24 --windows-i586.exe .plz help me out i will be very thankful to u

Posted by kamal garg on February 23, 2011 at 02:46 PM PST #

Thanks Michal for your comment.

Kamal,

Check if your JAVA_HOME is pointing to JDK or JRE ?

Posted by Arun Gupta on February 25, 2011 at 09:13 AM PST #

im getting below error msg while i start GF server in eclipse 3.6

GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section.

please help.

Posted by please help.... on March 21, 2011 at 04:26 AM PDT #

please help,

You do need a JDK 1.6. It seems like you using JRE to run the GlassFish. Can you please download/install JDK 1.6 and configure it in Eclipse and for GlassFish ?

Posted by Arun Gupta on March 30, 2011 at 08:10 AM PDT #

Hi Arun,

Appreciate your efforts for publishing this tutorial. This was really helpful.

I tried the examples using oepe-helios-installer-11.1.1.7.1.201103091755-win32 and ogs-3.1-windows-ml.

While trying the example for JAX-RS (the last one), i facing NullPointerException while creating entity manager from the injected entity manager factory. below is the exception stacktrace. It would be helpful, to you know your insight. This exception occurs exactly while creating entity manager. However, the same approach works with other example when entitymanagerfactory is injected to HelloServlet.

SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
at resource.SimpleResource.getXml(SimpleResource.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:167)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
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:662)

WARNING: StandardWrapperValve[JAX-RS Servlet]: PWC1406: Servlet.service() for servlet JAX-RS Servlet threw exception
java.lang.NullPointerException
at resource.SimpleResource.getXml(SimpleResource.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:167)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
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:662)

Posted by Mathivanan on April 10, 2011 at 02:39 AM PDT #

Mathivanan,

Posted the response back on users@glassfish alias.

Did you add @ManagedBean on the JAX-RS resource ?

Posted by Arun Gupta on April 10, 2011 at 04:31 AM PDT #

Hy arun!

I try your guide but in the last video when I have to create in the project faces jax-rs I have a problem. Can't see the the configuration and if I click on "Further configuration required" I don't see nothing

please help me

Posted by vinz on July 08, 2011 at 11:38 PM PDT #

Vinz,

Are you using OEPE or Eclipse 3.7 with GlassFish adapter ?

Posted by Arun Gupta on July 12, 2011 at 10:29 AM PDT #

I'm using OEPE indigo

Posted by vinz on July 12, 2011 at 09:14 PM PDT #

I'm having the same problem here using eclipse Indigo. Configuration dialog doesnt show up after selecting jax-rs and clicking on "Further configuration required".

Posted by ibrahim on August 09, 2011 at 09:42 PM PDT #

Thanks for the push start tutorial: I am new to JEE6. I have followed the tutorial using Netbeans 7.0. I am at the 4th video - Java EE6 and GlassFish 3 with NetBeans 6.9 and I cannot understand why the 'Welcome.java' implementation of 'return "Hello " + name;' appears in the input box as 'Hello null'.

I notice that once I remove the "Hello " + from the 'return' statement, it gives the expected result - blank textbox ready for input.

Please can you advise me.

Posted by guest on August 18, 2011 at 04:46 AM PDT #

I'm using the Indigo version and facing the same issue as posted by Vinz. While adding the JAX-RS (REST Web Services)faces, and after clicking on the hyperlink "Further configuration required...", it hangs!

Thanks,
das

Posted by das on August 25, 2011 at 01:18 AM PDT #

I am also using the Indigo version and having the same issue as posted by Vinz and das. In the last slide tutorial, while adding the JAX-RS (REST Web Services)faces, and after clicking on the hyperlink "Further configuration required...", it hangs!
Is there a work around?

Thanks,
-Alka

Posted by Alka on October 01, 2011 at 01:20 PM PDT #

"I'm using the Indigo version and facing the same issue as posted by Vinz. While adding the JAX-RS (REST Web Services)faces, and after clicking on the hyperlink "Further configuration required...", it hangs!"
-Das

Same here.

Posted by guest on October 02, 2011 at 08:57 AM PDT #

Hi Arun, thank you very much for the useful tutorials on screen-cast. For Part 5 of the screencast (on JAX-RS), under the Properties dialog for HelloWorld, I have checked "JAX-RS (REST Web Services). However when I clicked on "Further configuration required...", I did not get any response or see the "Modify Facet Project" dialog (as was shown on your screen-cast). There were also no error messages.

Thank you.

Posted by wjy on October 16, 2011 at 08:15 PM 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