<< Back to previous view

[JAVAEETUTORIAL-267] Confusing paragraph in Section 30.1.1.3, "Setting Path Parameters in Targets" Created: 11/Apr/14  Updated: 11/Apr/14

Status: Open
Project: javaeetutorial
Component/s: doc
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: jendrock Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock

 Description   

A user sent this issue to the javaeetutorial-feedback mailing list. The issue concerns Section 30.1.1.3, "Setting Path Parameters in Targets," which can be found here:

http://docs.oracle.com/javaee/7/tutorial/doc/jaxrs-client001.htm#sthref1526

Currently, the section reads as follows.

Path parameters in client requests can be specified as URI template
parameters, similar to the template parameters used when defining a
resource URI in a JAX-RS service. Template parameters are specified
by surrounding the template variable with curly brackets ({}). Call
the WebTarget.queryParam method on the target to set the parameters
by passing in the template parameter name and value or values.

WebTarget myResource = client.target("http://example.com/webapi/read")
.path("{userName}");
Response response = myResource.queryParam("userName", "janedoe")
.request(...)
.get();

This implies that the call to queryParam will actually substitute the template variable with the value passed in. However, this implication is probably not what was intended. The .queryParam will actually append a query parameter-value to the URI. To substitute the template variable, .resolveTemplate(...) must be used.

It would be clearer if the passage recommended using the .resolveTemplate parameter to substitute the {username}, followed by the .queryParam parameter to add another variable.

For example,

WebTarget myResource = client.target("http://example.com/webapi/read")
.path("{userName}")
.resolveTemplate("userName", "janedoe")
.queryParam("chapter", "1");

// http://example.com/webapi/read/janedoe?chapter=1

Response response = myResource.request(...)
.get();






[JAVAEETUTORIAL-266] Java EE tutorial 7 error.build the hello1 Web Module‏ Created: 04/Apr/14  Updated: 04/Apr/14

Status: Open
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pinostudente Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

netbeans IDE 8.0


Tags:
Participants: jendrock and pinostudente

 Description   

Hi in the Java EE tutorial 7 at page:103
6.3.2.1 To Build and Package the hello1 Web Module Using NetBeans IDE.
1. Start the GlassFish Server as described in To Start the GlassFish Server Using
NetBeans IDE, if you have not already done so.
2. From the Filemenu, select Open Project.
3. In the Open Project dialog box, navigate to:
tut-install/examples/web/jsf
4. Select the hello1folder.
5. Click Open Project.
6. In the Projectstab, right-click the hello1project and select Build. This command
deploys the project to the server.

it is imposible to Build the hello1 example. If i click on the hello1 project and click Build an error is occured.

" Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello2: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Cannot find the GlassFish admin CLI JAR: admin-cli.jar -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException "
If i go at the webpage: http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
no solution is available at the page above.



 Comments   
Comment by jendrock [ 04/Apr/14 02:58 PM ]

The error message that you passed along indicates a problem with your environment, more specifically the location in which you installed GlassFish Server (as opposed to the Java EE 7 SDK).

If you followed the instructions in Chapter 2, "Using the Tutorial Examples," you installed the SDK, which includes GlassFish Server and the Java EE 7 Tutorial. If you did not follow the aforementioned instructions and installed GlassFish Server as part of your NetBeans 8.0 installation or if you installed GlassFish Server by itself, you would encounter path problems similar in nature to the one that you did encounter.

Please reread the instructions for setting everything up: http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAB

Ensure that NetBeans IDE points to GlassFish Server in the SDK, not in the location that NetBeans installs GlassFish Server. If you still encounter the same issue, please use a comment to add more information to this issue. That information would include the location of your SDK, GlassFish Server, and tutorial examples. The tutorial (and its examples) should be in a location that is relative to GlassFish Server, as it is in the SDK.

Comment by pinostudente [ 04/Apr/14 06:19 PM ]

Thanks. Now it works! I just looked at the page like you said: http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAB
and changed the installation directory from galssfish4 server and following step by step the description of the link you sent to me. Now it works perfectly!





[JAVAEETUTORIAL-265] hello1-rlc in Tutorial in Chapter 8.8. The greeting.xhtml displays response.xhtml and vice versa pages, Created: 23/Mar/14  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.3
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Argyleghost Assignee: Kim Haase
Resolution: Works as designed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Netbeans7.4


Tags:
Participants: Argyleghost and Kim Haase

 Description   

When you run the app with the default settings from your tutorial, I noticed that that the the page loads with the url "http://localhost:8080/hello1-rlc/reply/response.xhtml", but it says Hio and whats your name. and when you enter it, it brings you to the greeting.xhtml and says your name.



 Comments   
Comment by Argyleghost [ 23/Mar/14 11:40 PM ]

This is in the Oracle EE 7 documentation tutorial (http://docs.oracle.com/javaee/7/tutorial/doc/jsf-facelets008.htm)

Comment by Argyleghost [ 23/Mar/14 11:45 PM ]

Actually the URL is correct ay first but after you enter your name for the first time then the URl says greeting.xhtml, clicking the back button brings you to reply/response.xhtml, which actually greets you.

I know, not a big deal.

Comment by Kim Haase [ 25/Mar/14 06:17 PM ]

This is a feature of Facelets in JavaServer Faces technology. See https://java.net/jira/browse/JAVAEETUTORIAL-156 for more information.

Thanks for your interest in Java EE.





[JAVAEETUTORIAL-264] Would you please supply moblie format such as epub Created: 05/Mar/14  Updated: 05/Mar/14  Resolved: 05/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: zwe Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and zwe

 Description   

JavaEE 7 tutorial supplies PDF, which is good for PCs (and may be tablets), but it is not easy to read on a phone. Almost every body has a phone today, would you please supply a mobile format? Or a single page HTML version(it is easy to convert to mobile format)



 Comments   
Comment by jendrock [ 05/Mar/14 03:34 PM ]

This issue is a duplicate of JAVAEETUTORIAL-67. At the time I responded to that issue, I indicated that Mobi and ePub formats of the tutorial would be available as soon as we switched production systems. Due to changing circumstances, that will not occur going forward. However, the tutorial will be published as a 2-volume set by Pearson Education and will be available for purchase in print as well as in Mobi and ePub formats.

Here are the links to the prepublication pages for both volumes of the tutorial on amazon.com. Be sure to click the link on the right side of the page to have Amazon tell our publisher that you want to see the electronic version of the volume made available.

For Volume 1, see:

http://www.amazon.com/The-Java-EE-Tutorial-Edition/dp/0321994922/ref=pd_sim_sbs_b_1?ie=UTF8&refRID=140GAT6H8ZRJFTFERGR7

For Volume 2, see:

http://www.amazon.com/The-Java-EE-Tutorial-Edition/dp/0321980085/ref=pd_sim_sbs_b_1?ie=UTF8&refRID=0FP0CHGC662997762GDX

Comment by jendrock [ 05/Mar/14 03:37 PM ]

I am closing the issue because it is a duplicate of JAVAEETUTORIAL-67. Please read the previous comment for more information about how and when electronic formats of the tutorial will be commercially available.





[JAVAEETUTORIAL-263] dukes-forest build failed - Authentication failed for user: null Created: 02/Mar/14  Updated: 03/Mar/14  Resolved: 03/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: davidsk Assignee: Unassigned
Resolution: Invalid Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP


Tags:
Participants: davidsk and Kim Haase

 Description   

When I run build on dukes-forest project, I received the following error message:

— exec-maven-plugin:1.2.1:exec (default) @ dukes-store —
Command set failed.
Authentication failed for user: null
(Usually, this means invalid user name and/or password)
------------------------------------------------------------------------
Reactor Summary:

dukes-forest ...................................... SUCCESS [1.203s]
events ............................................ SUCCESS [3.672s]
entities .......................................... SUCCESS [3.219s]
dukes-resources ................................... SUCCESS [1.656s]
dukes-payment ..................................... SUCCESS [6.297s]
dukes-store ....................................... FAILURE [3.469s]
dukes-shipment .................................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------

Can you tell me what I may miss?



 Comments   
Comment by davidsk [ 02/Mar/14 10:13 PM ]

It is not an issue. The problem occured when I change the GlassFish Console admin password. After changing it back to the default empty password, it is working.

Comment by Kim Haase [ 03/Mar/14 02:24 PM ]

Thank you very much for the quick explanation of the problem.

We appreciate your interest in the tutorial.





[JAVAEETUTORIAL-262] Java EE 6 tutorial example clientsessionmdb add-resources glassfish-resources.xml gives resourcename.isnot.unique error Created: 27/Feb/14  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: amyk Assignee: Kim Haase
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: amyk and Kim Haase

 Description   

The workaround is to rename the connector-resource 'pool-name' and connector-connection-pool 'name' in the example's glassfish-resources.xml or use example from Java EE tutorial 7.0.3 for GlassFish 4

1. install GlassFish 4.0
2. svn co https://svn.java.net/svn/javaeetutorial~svn/branches/javaee-tutorial-6/examples
asadmin add-resources examples/jms/clientsessionmdb/setup/glassfish-resources.xml

Connector connection pool jms/ConnectionFactory created.
Administered object jms/Topic created.
Unable to create connector resource jms/ConnectionFactory. Constraints for this ConnectorResource configuration have been violated: on property [ ] violation reason [ {resourcename.isnot.unique} ]
Command add-resources executed successfully.



 Comments   
Comment by Kim Haase [ 25/Mar/14 06:55 PM ]

We recommend that with GlassFish 4 you follow the Java EE 7 Tutorial and use the Java EE 7 examples. The Java EE 6 examples are not guaranteed to work with GlassFish 4, only with GlassFish 3, which supports Java EE 6. The Java EE 6 examples are not being maintained.

Thank you for your interest in the Java EE platform.





[JAVAEETUTORIAL-261] dukes-boookstore example, wrong description in bookdetails.html Created: 11/Feb/14  Updated: 11/Feb/14  Resolved: 11/Feb/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.3
Fix Version/s: 7.0.4

Type: Bug Priority: Trivial
Reporter: dejf.mountain Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: dejf.mountain and Kim Haase

 Description   

Comment in <h:form> in bookdetails.html should be

<!-- Retrieve the "selected" value placed in the session map by the
CatalogBean.details method. -->

instead of

<!-- Retrieve the "selected" value placed in the session map by the
BookstoreBean.details method. -->



 Comments   
Comment by Kim Haase [ 11/Feb/14 03:51 PM ]

Thanks for your attention to detail! In fact that value is placed in the map by both the BookstoreBean and the CatalogBean, so that the details can be retrieved from either page. We will add that information.

Comment by Kim Haase [ 11/Feb/14 06:56 PM ]

Committed fix at revision 1734.

Comment by Kim Haase [ 11/Feb/14 07:08 PM ]

Fixed in source, will appear in next release.





[JAVAEETUTORIAL-260] Wrong CriteriaQuery.join() examples in the Criteria API documentation Created: 30/Jan/14  Updated: 30/Jan/14  Resolved: 30/Jan/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Major
Reporter: patrik.varga Assignee: Kim Haase
Resolution: Fixed Votes: 1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: CriteriaQuery criteria join
Participants: Kim Haase and patrik.varga

 Description   

There are some examples of CriteriaQuery.join() calls in the Criteria API documentation.
Neither CriteriaQuery nor its superinterface AbstractQuery have a join() method.
These local variables should refer to the root node "pet" instead of the CriteriaQuery "cq".

Occurences in "Using the Criteria API and Metamodel API to Create Basic Typesafe Queries":

"Querying Relationships Using Joins":
Join<Owner, Address> address = cq.join(Pet_.owners).join(Owner_.addresses);

"Ordering Results":
Join<Owner, Address> address = cq.join(Pet_.owners).join(Owner_.address);
Join<Pet, Owner> owner = cq.join(Pet_.owners);



 Comments   
Comment by Kim Haase [ 30/Jan/14 05:13 PM ]

Thank you very much for pointing out these errors. The fixes will appear in the next Tutorial update.

We appreciate your interest in the Tutorial.

Comment by Kim Haase [ 30/Jan/14 05:14 PM ]

Fixed in documentation source.





[JAVAEETUTORIAL-259] Tutorial uses nonexisting command: asadmin command create-resources Created: 28/Jan/14  Updated: 28/Jan/14  Resolved: 28/Jan/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Major
Reporter: geirot Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: geirot and Kim Haase

 Description   

Totorial Java EE 7 chapter 3.3 Creating Resources Administratively
uses: asadmin create-resources glassfish-resources.xml
this command doesn't exist
should use: asadmin add-resources glassfish-resources.xml



 Comments   
Comment by Kim Haase [ 28/Jan/14 02:16 PM ]

Thank you very much for pointing out this error.

Comment by Kim Haase [ 28/Jan/14 02:33 PM ]

Fixed in FrameMaker source.





[JAVAEETUTORIAL-258] Websocket dukeetf2 and websocketbot, socket remains open after browser tab closed Created: 20/Jan/14  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pggeldenhuys Assignee: Unassigned
Resolution: Works as designed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Chrome Version 32.0.1700.77 GlassFish Server Open Source Edition 4.0 (build 89) OSX 10.9.1


Tags: websocket examples
Participants: jendrock and pggeldenhuys

 Description   

In the dukeetf2 websocket example:

Why does the server keep sending the messages after the browser tab on the client is closed? Why is the ETFEndpoint @OnClose never called? I understand that the timer service keeps hitting send every second, but the connection should be closed surely, and its session removed from the queue? After which the queue should be empty?

The websocketbot application also does the same, it does not close the connections, from both Chrome and Safari, neither closing the tabs nor the browser works on my machine



 Comments   
Comment by jendrock [ 25/Mar/14 08:44 PM ]

Closing the browser tab does not undeploy the application. If you undeploy the example, the socket closes and the issue no longer exists.





[JAVAEETUTORIAL-257] JAX-WS tutorial chapter doesn't match what is in the code examples Created: 23/Dec/13  Updated: 23/Dec/13  Resolved: 23/Dec/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

Actually this applies to both the doc and the examples; some fixes are needed to both.

The example source code for the JAX-WS web service, app client, and web client examples has been updated, but the code shown in the tutorial has not been updated to match it. Also, the WSDL URL in the source code is incorrect, so the clients do not run.



 Comments   
Comment by Kim Haase [ 23/Dec/13 08:09 PM ]

Checked in code fixes at revision 1713. Also checked in fixes in FrameMaker source.





[JAVAEETUTORIAL-256] Update Tag Libraries Supported by Facelets section Created: 15/Dec/13  Updated: 16/Dec/13  Resolved: 16/Dec/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: sudheer_jonna Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and sudheer_jonna

 Description   

Tag Libraries Supported by Facelets section(Under what is facelets?) need to be corrected considering the below points

1. Passthrough by elements and passthrough by attributes tablibrary namespaces respective Prefix and Example column values need to be interchanged each other.

2. Composite tab library need to be added

http://xmlns.jcp.org/jsf/composite

Regards,
Sudheer



 Comments   
Comment by Kim Haase [ 16/Dec/13 03:34 PM ]

Thank you very much for pointing out these errors. We will correct them in the next version of the Tutorial.

Comment by Kim Haase [ 16/Dec/13 03:53 PM ]

Fixed in Facelets chapter source.





[JAVAEETUTORIAL-255] Invalid integer converter example in Java EE 7 tutorial chapter 11.1.1 Created: 20/Nov/13  Updated: 27/Nov/13  Resolved: 27/Nov/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Major
Reporter: balusc Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: balusc and Kim Haase

 Description   

http://docs.oracle.com/javaee/7/tutorial/doc/jsf-page-core001.htm#JEETT00931

It mentions:

<h:inputText converter="javax.faces.convert.IntegerConverter" />

However, this is wrong, it should have been:

<h:inputText converter="javax.faces.Integer" />

See also http://stackoverflow.com/q/20081207



 Comments   
Comment by Kim Haase [ 27/Nov/13 04:05 PM ]

Thank you for pointing this out. The error has been corrected, and some additional fixes have been made in that section for the next respin.





[JAVAEETUTORIAL-254] Wrong version of beans.xml file in example Created: 22/Oct/13  Updated: 22/Oct/13  Resolved: 22/Oct/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

For the encoder example in Section 26.1 of "Running the Advanced Contexts and Dependency Injection Examples," the instructions tell the user to run the example, then edit the beans.xml file and rerun the example. The version checked into the workspace is actually the edited version (I forgot to return it to the original state after testing), so the current instructions will confuse users.



 Comments   
Comment by Kim Haase [ 22/Oct/13 03:09 PM ]

Committed fixed version at revision 1675.

Am also correcting some instructions in the advanced CDI examples chapter to make them consistent with the ones in the simple CDI examples chapter.





[JAVAEETUTORIAL-253] Update EL chapter to reflect 3.0 changes Created: 27/Sep/13  Updated: 11/Feb/14  Resolved: 11/Feb/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

The Expression Language chapter includes some new features of EL 3.0, but still contains some obsolete language. I have committed some changes based on a first review, but there may be more to come.



 Comments   
Comment by Kim Haase [ 11/Feb/14 07:09 PM ]

Fixes completed.





[JAVAEETUTORIAL-252] Incorrect instructions for Section 29.3.1, Creating A Simple RESTful Web Service Created: 27/Sep/13  Updated: 27/Sep/13  Resolved: 27/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.3
Fix Version/s: 7.0.4

Type: Bug Priority: Minor
Reporter: jendrock Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and jendrock

 Description   

There are several issues that need to be address with regard to the documentation surrounding the simplest of the 3 JAX-RS examples.

The sentence that precedes 29.3.1.1 needs to be modified to say something to the effect that the prebuilt example is similar but not identical to the example that one can build from the archetype. There should also be links to new sections for running that prebuilt example with NetBeans IDE and Maven from the command line.

There needs to be a step 0 that says "Ensure that you have installed the tutorial archetypes as described in Section 2.7.1, Installing the Tutorial Archetypes.

Step 1d needs to be changed from "... and click Next." to "... and click Finish."

Step 1e needs to be deleted.

In step 2, delete "and the exception".

In step 2, move the Note so that it follows the code example.

In step 3, change "hello project" to "HelloWorldApplication project" and change "Build" to "Run".

In step 4, change the URL from "http://localhost:8080/hello" to "http://localhost:8080/HelloWorldApplication/HelloWorldApplication".

Add a new section - 29.3.1.2, To Run the hello Example with NetBeans IDE.

Add a new section - 29.3.1.3, To Run the hello Example with Maven.

Make sure the instructions match the prebuilt example. For example, the URL to open would be http://localhost:8080/hello/helloworld.



 Comments   
Comment by Ian Evans [ 27/Sep/13 08:34 PM ]

There is no need for separate "To Run the Example..." sub-sections because this step-by-step is only for NetBeans users. We don't document how to create new examples based on the archetypes on the command-line, although it is definitely possible to do so.

Comment by Ian Evans [ 27/Sep/13 08:36 PM ]

Fixed the instructions, except for the new sub-sections on running in NetBeans/with Maven.

Comment by jendrock [ 27/Sep/13 08:42 PM ]

So, the jaxrs/hello example that is is the workspace serves what purpose? Is it supposed to be run? If so, how? I just thought that if we provide an example, especially one that is different from the one that is built from the archetype, we would also have instructions for running it. In fact, that is how the whole issue came about. I was asked if we had a very simple JAX-RS example. I said we did. And then I was asked for directions for running it from the command line. That we did not have.

Comment by Ian Evans [ 27/Sep/13 08:57 PM ]

We've never had separate sections on running the pre-built example we documented in our step-by-step instructions before. The assumption has always been that the pre-built version is more of a reference for a working version of what you end up with rather than an example that is documented separately.

I'm fine putting in two new sections on running hello, but this is somewhat different than our previous practices.

Comment by jendrock [ 27/Sep/13 09:11 PM ]

I think this is the only example in the tutorial that users actually create. First Cup does the same thing but the example that is supplied matches (exactly) the example that users end up with after they follow the step-by-step instructions. The JAX-RS hello example is close, but definitely not identical to the resultant example users will build in this case. This is a different animal than we are used to.

I am surprised that no users have asked how to run hello, either by using Maven or NetBeans IDE. If hello matched the end result that the users built, no NB instructions would be needed. Would they ask how to run with Maven? Not to use Maven to build the example from the archetype but to run the prebuilt example.

Maybe I'm all wet. Maybe what is needed is to make the examples the same and simply say that the example is provided as a reference, as you said.





[JAVAEETUTORIAL-251] Parts after 3 are incorrectly numbered Created: 23/Sep/13  Updated: 23/Sep/13  Resolved: 23/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.4

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

After Part IV, Bean Validation, all the other parts have incorrect numbers in the text, though their titles are correct. Part IV doesn't actually say "Part IV" on it.



 Comments   
Comment by Kim Haase [ 23/Sep/13 07:29 PM ]

Renumbered parts.





[JAVAEETUTORIAL-250] 54.5 The jobs Concurrency Example missing info and won't run Created: 23/Sep/13  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: HankCa Assignee: Unassigned
Resolution: Works as designed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JavaEE 7.0.21, glassfish-4.0.1-b03


Tags:
Participants: HankCa and jendrock

 Description   

I followed the tutorial http://docs.oracle.com/javaee/7/tutorial/doc/concurrency-utilities005.htm#CIHCGGEG (54.5 The jobs Concurrency Example) and there is a configuration options missing.

  • I had to set glassfish.home.prefix property in docs/javaee-tutorial/examples/pom.xml and nowhere does the Tutorial or that documentation say to do this

And then once fixed I couldn't get to work in Netbeans or through Maven as discussed. The reasons are:

  • Firstly was due to an empty beans.xml file - /docs/javaee-tutorial/examples/concurrency/jobs/src/main/webapp/WEB-INF/beans.xml
  • Second was an error I could not work out without becoming more familiar with the code which I don't have time to do now (when all I want to do is see the examples working as described). The error is as below.

I'm looking forward to seeing this working!

Cheers,

Brooke

2013-09-23 10:47:01 .390+1000 [SEVERE] - WebModule[/jobs]StandardWrapper.Throwable
java.lang.IllegalStateException: Error when configuring to use the EJB interceptor binding API. JAX-RS EJB integration can not be supported.
at org.glassfish.jersey.gf.ejb.EjbComponentProvider.registerEjbInterceptor(EjbComponentProvider.java:167)
at org.glassfish.jersey.gf.ejb.EjbComponentProvider.bind(EjbComponentProvider.java:199)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.jersey.gf.ejb.EjbComponentProvider.registerEjbInterceptor(EjbComponentProvider.java:162)
... 92 more
Caused by: java.lang.NullPointerException
at com.sun.ejb.containers.InternalInterceptorBindingImpl.registerInterceptor(InternalInterceptorBindingImpl.java:97)
... 97 more
2013-09-23 10:47:01 .391+1000 [SEVERE] - WebModule[/jobs]Servlet /jobs threw load() exception
java.lang.NullPointerException
at com.sun.ejb.containers.InternalInterceptorBindingImpl.registerInterceptor(InternalInterceptorBindingImpl.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
2013-09-23 10:47:01 .391+1000 [SEVERE] - Startup of context /jobs failed due to previous errors]]
2013-09-23 10:47:01 .395+1000 [SEVERE] - ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5954)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
...
Caused by: org.apache.catalina.LifecycleException: java.lang.NullPointerException
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5712)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5946)
... 72 more
Caused by: java.lang.NullPointerException
at com.sun.ejb.containers.InternalInterceptorBindingImpl.registerInterceptor(InternalInterceptorBindingImpl.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.jersey.gf.ejb.EjbComponentProvider.registerEjbInterceptor(EjbComponentProvider.java:162)
at org.glassfish.jersey.gf.ejb.EjbComponentProvider.bind(EjbComponentProvider.java:199)
at org.glassfish.jersey.server.ApplicationHandler.bindWithComponentProvider(ApplicationHandler.java:845)
at org.glassfish.jersey.server.ApplicationHandler.bindProvidersAndResources(ApplicationHandler.java:775)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:396)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:161)
at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:286)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:283)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:298)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1382)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5704)
... 73 more
2013-09-23 10:47:01 .396+1000 [WARNING] - java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1044)
...
2013-09-23 10:47:01 .396+1000 [SEVERE] - Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
...
2013-09-23 10:47:01 .397+1000 [SEVERE] - Exception during lifecycle processing
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
...
2013-09-23 10:47:01 .397+1000 [SEVERE] - Exception while loading the app]]
2013-09-23 10:47:01 .403+1000 [SEVERE] - Undeployment failed for context /jobs]]
2013-09-23 10:47:01 .418+1000 [SEVERE] - Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NullPointerException]]



 Comments   
Comment by jendrock [ 27/Sep/13 07:11 PM ]

Several issues are raised here.

We explicitly tell users what environment is optimal for running the tutorial. This is explained here: http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAB.

If you download and install the Java EE 7 SDK, you get the correct environment and the tutorial example tree in one installation. Furthermore, you also get access to Update Tool, a mechanism for ensuring that you always have the most up-to-date tutorial sources installed. If you do not follow these directions, the tutorial will not work out-of-the-box, as you discovered.

The non-zero byte-length beans.xml file was an issue that we recognized as a problem the first day that we shipped the tutorial. I noted this as a problem in the Java EE 7 SDK Release Notes (http://www.oracle.com/technetwork/java/javaee/documentation/javaee7sdk-readme-1957703.html), which are available on the SDK download page. You have 2 options for this problem - delete the beans.xml file or update the tutorial package and get a "patched" tutorial where this shortcoming has been addressed. This is why we encourage folks to use the environment that we promote.

I believe that your final problem is due to the fact that you installed the Web Profile, not the Full Profile version of GlassFish Server. Again, we explicitly say that we support only the Full Profile version.

If you start the application server and then create and configure the 2 managed executor services that are described in http://docs.oracle.com/javaee/7/tutorial/doc/concurrency-utilities005.htm#sthref2912 before you try to run the jobs example, I am sure that you will find that it works as advertised. I just tried it again, after updating my tutorial installation to package 7.0.3-1, and it works as described.

Comment by jendrock [ 25/Mar/14 08:37 PM ]

I believe that the issues that were noted caused the example to not run. Once the issues that were identified were resolved, the app should run as expected, and it does!





[JAVAEETUTORIAL-249] Duke's Tutoring Administration Panel: editing student record has problems Created: 20/Sep/13  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jendrock Assignee: Ian Evans
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

File Attachments: Zip Archive validationTest-0.1.zip     Zip Archive validationTest-ee6.zip    
Tags:
Participants: Ian Evans, jendrock, Kim Haase and rcervera

 Description   

In the Administration Panel of the Duke's Tutoring case study example, strange things happen when you try to edit a student. Let's give Buster Bluth a shot.

Click Edit in Buster Bluth's row.
Move "Buster" from Nickname to Middle Name and click Submit.
You'll see three error messages that indicate you need to fill out the Email, Cell Phone, and Home Phone fields because they are required, but aren't filled in in the existing student record.
Click Submit again.
Click Administration main page and notice that "Buster Bluth" is now known as "Bluth". He has no first name, even though I left the First Name field alone; I just modified the Nickname and Middle Name fields.



 Comments   
Comment by rcervera [ 20/Sep/13 10:21 PM ]

It works when filling all the fields in the page; the record gets updated. Probably the fields below (phone, etc) are not validating properly because they are empty.

Comment by Kim Haase [ 20/Sep/13 11:40 PM ]

I think what Eric found was that even after he filled in those fields and clicked Submit, the data was not recorded correctly.

Comment by jendrock [ 21/Sep/13 01:29 PM ]

Yes, what Kim says is correct. There are 2 issues, the first being that the existing data about the students does not conform to the validation checks for the Email, Cell Phone, or Home Phone fields. There should be some indication that these fields are required. That said, the existing data should conform to those requirements as well. It does not.

The issue that pushed my buttons was the randomness of what happens when Name (First, Middle, Last) and Nicknames are filled out. I can look at the Name data for an existing student in the list, create a new student and fill out the same fields as are shown for the existing student and get an end result that is quite different than what is expected. Try to create a new student in the manner that I previously described and compare the results to George Bluth.

This is just one of the Admin issues. I will write up and add the others sequentially. For example, we can create a new guardian for a student but how can we display the guardians for that, or any, student?

All good case studies, like this one, exercise many different technologies and components, which lead to many interactions and combinations of interactions that need to be discovered, tested, and examined. It takes several different people looking at the same app to truly shake out the things that don't work. In the grand scheme of things, the things I found are relatively small and, while bothersome, do not render the app unusable by any stretch of the imagination. After the latest round of updates, I simply look at these blemishes as growing pains. I really like what the app shows under its skin. I know the user community does too.

Comment by Ian Evans [ 23/Sep/13 05:02 PM ]

The weird thing is that those fields are not required, despite the validation messages that show a violation.

@Email
protected String email;
@Pattern(regexp="\\(\\d{3}\\) \\d{3}-\\d{4}",
         message="{invalid.phonenumber}")
protected String homePhone;
@Pattern(regexp="\\(\\d{3}\\) \\d{3}-\\d{4}",
         message="{invalid.phonenumber}")
protected String mobilePhone;

Note that there is no @NotNull validation constraint on these fields. The empty fields in the Facelets form are apparently being set to something behind the scenes, causing the constraint violations. Which is bewildering.

Comment by Ian Evans [ 02/Oct/13 11:15 PM ]

JSF is interpreting the strings from the form as empty strings rather than null strings. This occurs even if you add the following to web.xml

<context-param>
  <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
  <param-value>true</param-value>
</context-param>

Adding the above parameter appears to trigger different behavior, though, as you won't see the Bean Validation error message put on the constraint, but rather "A Persistence Error Occurred". This is caused by a ContraintViolationException thrown downstream by Bean Validation during the transaction.

Comment by Ian Evans [ 02/Oct/13 11:21 PM ]

The ZIP file contains a test case that shows the errors. A simple JPA entity with a non-required field has a @Pattern constraint. Any attempt to leave the input box blank in the JSF form results in a ConstraintViolationException.

Comment by Kim Haase [ 07/Oct/13 06:19 PM ]

The zip file validationTest-ee6.zip modifies the previous example to run on a Java EE 6 platform (glassfish3). The reported problem does not occur on EE 6, suggesting that it was introduced in EL 3.0.

Comment by Kim Haase [ 22/Oct/13 07:14 PM ]

In the actual Duke's Tutoring example (not the stripped-down version):

If I don't provide the INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context parameter and I try to create a student with no email address or phone numbers, then when I click Submit I get an error message on the email field saying

must match "[a-z0-9!#$%&'*+/=?^_`{|}~-](?:\.[a-z0-9!#$%&'*/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"

and error messages on both phone fields saying

Phone numbers should be of the form (xxx) xxx-xxxx.

In Person.java, none of these fields has the @NotNull annotation, only the @Pattern annotation.

If I do provide the INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context parameter and I try to create a student with no email address or phone numbers, I immediately go to an Error 500 page that reports a ConstraintViolationException:

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.ejb.EJBException
root cause

javax.faces.el.EvaluationException: javax.ejb.EJBException
root cause

javax.ejb.EJBException
root cause

javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:'prePersist'. Please refer to embedded ConstraintViolations for details.
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.

Comment by Kim Haase [ 23/Oct/13 01:34 PM ]

Here's another interesting wrinkle (this is the version with the latest fixes):

I did not have the context parameter javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL set.

I created a student with a first name, last name, and nickname, clicked Submit, and got red validation errors because I left out the email and phone numbers. (This is an issue because those fields are not required; they just have pattern specifiers.)

Then I entered correct data in those fields and REMOVED THE FIRST NAME and then clicked Submit again. I did not get an error on the missing first name, though that is a required field. Instead, the student was created with the nickname as the first name.

The interaction between validation and persistence seems to be problematic here.

Comment by jendrock [ 25/Mar/14 08:40 PM ]

Since this isn't intended to be a real, fully operational application, these fixes will be left as an exercise for the reader to complete. Enjoy the example for what it is.





[JAVAEETUTORIAL-248] Insufficient spacing between paragraphs inside a list item in HTML Created: 20/Sep/13  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Trivial
Reporter: rcervera Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and rcervera

 Description   

See the paragraphs inside the list items in 53.1.1:
http://docs.oracle.com/javaee/7/tutorial/doc/batch-processing001.htm



 Comments   
Comment by Kim Haase [ 25/Mar/14 06:26 PM ]

Spacing inside lists is not great, but we can't easily modify the current templates.





[JAVAEETUTORIAL-247] Shrub is the only viewable/editable product in the admin interface Created: 19/Sep/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.4

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and rcervera

 Description   

After logging in as admin, click List of Products. Then try to view or edit any product other than the first one (Shrub).

Clicking on any other product (rosebush, green tea, etc.) always brings up the entry for Shrub.

Ian asks, "Is ProductManager not retrieving the correct row index?"



 Comments   
Comment by rcervera [ 19/Sep/13 08:32 PM ]

This issue is now fixed in the source.





[JAVAEETUTORIAL-246] Duke's Forest: order list not updated in admin interface after Approve Shipment process Created: 19/Sep/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: William Markito
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Both Firefox and Chrome on Windows 7; Firefox on Solaris


Tags:
Participants: Ian Evans, Kim Haase and William Markito

 Description   

If I return to Duke's Store as admin after approving the shipment of a couple of items, and then click on List of Orders, the list is exactly the same as when I left it. The orders that shipped are still marked "Ready to ship". When I click View on an individual item, the status on that page is the same.

When I log in as the user who placed the orders, they are indeed shown as "Order shipped". And when I log out again and log in again as the admin, the orders are also shown as "Order shipped". It's only immediately after the status change that the incorrect status appears.

One wrinkle: If as the admin I deny a shipment, and then return to the list as admin, the status seems to have changed from "Ready to ship" to "Validating payment". This was the second item the user purchased, not the first, so this isn't the previous problem with the first order being perpetually in a "Validating payment" state (though that did happen the first time I tried using Chrome for Duke's Forest).



 Comments   
Comment by Kim Haase [ 19/Sep/13 05:45 PM ]

This may have to do with cached data in the browser – but telling them to clean their browser before they return to Store from Shipment seems a bit much.

Comment by Ian Evans [ 19/Sep/13 10:34 PM ]

Assigning to William.

Comment by Ian Evans [ 19/Sep/13 10:34 PM ]

Ricardo has checked in a fix for this.





[JAVAEETUTORIAL-245] Validation error message for malformed password can't be found (Duke's Forest) Created: 18/Sep/13  Updated: 19/Sep/13  Resolved: 18/Sep/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

File Attachments: JPEG File password.jpg    
Tags:
Participants: Kim Haase and rcervera

 Description   

If I try to sign up as a new user and enter "1234" as the password, I get an error message that says just "{person.password}", indicating that the error message can't be found. I think this means that validation messages have to stay in dukes-store and can't be moved to dukes-resources after all?

Image attached.



 Comments   
Comment by rcervera [ 18/Sep/13 11:32 PM ]

This is now fixed in the source. The ValidationMessages had to be moved one level up in dukes-resources.

Comment by Kim Haase [ 19/Sep/13 12:59 PM ]

Thanks, Ricardo, for fixing this! I can confirm that the validation message now appears:

Password must be between 7 and 100 characters and not empty.





[JAVAEETUTORIAL-244] Update Duke's Tutoring pages to use new namespaces Created: 18/Sep/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Task Priority: Major
Reporter: Kim Haase Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Kim Haase

 Description   

The namespace in the Facelets files should be changed from java.sun.com to xmlns.jcp.org. For example,

xmlns:h="http://java.sun.com/jsf/html"

should be

xmlns:h="http://xmlns.jcp.org/jsf/html"



 Comments   
Comment by Kim Haase [ 18/Sep/13 07:34 PM ]

I should add: there are bugs in some areas. You can't use the new namespace for composite components (http://java.sun.com/jsf/composite) or for pages that use f:metadata with viewparams. See the web/jsf/bookmarks example and web/jsf/compositecomponentexample. You can use the namespace for other kinds of components. Sorry.

Comment by Ian Evans [ 19/Sep/13 10:26 PM ]

Fixed in source.





[JAVAEETUTORIAL-243] CDI Part needs to be moved forward in the book Created: 05/Sep/13  Updated: 06/Sep/13  Due: 13/Sep/13  Resolved: 06/Sep/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: jendrock Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

Need to reorganize the structure in the beginning of the tutorial. The CDI part needs to be moved to between Part III, Web Tier, and Part IV, Web Services.



 Comments   
Comment by Kim Haase [ 06/Sep/13 02:51 PM ]

Moved CDI part/chapters and updated book. This means all files changed, so if you were working on anything please move it to a safe place before doing an svn update.

Also took advantage of the opportunity to fix some capitalization inconsistencies in figure and table titles (and column titles in tables).

Comment by Kim Haase [ 06/Sep/13 03:11 PM ]

Reopen for edit





[JAVAEETUTORIAL-242] Section of Ajax chapter belongs elsewhere Created: 05/Sep/13  Updated: 05/Sep/13  Resolved: 05/Sep/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

The section "Partial Processing and Partial Rendering" in the Ajax chapter really belongs in the chapter that contains the lifecycle information. I am moving it to a level 1 section after "The Lifecycle of a JavaServer Faces Application." I fixed the chapter jumplists too. I cannot find any broken xrefs that I haven't fixed, but that doesn't mean there aren't any.



 Comments   
Comment by Kim Haase [ 05/Sep/13 09:16 PM ]

Committed fix.





[JAVAEETUTORIAL-241] Add section on URL mapping to JAX-RS chapter Created: 02/Sep/13  Updated: 16/Sep/13  Resolved: 16/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

The JAX-RS chapter needs a section on mapping URLs to javax.ws.rs.core.Application, and alternately how to extend Application and use @ApplicationPath to set the URL mapping programmatically.



 Comments   
Comment by Ian Evans [ 16/Sep/13 11:51 PM ]

Added section on configuring JAX-RS resources with information on setting the mapping via annotations as well as in the deployment descriptor.





[JAVAEETUTORIAL-240] dukes-forest: Payment web service does not work Created: 28/Aug/13  Updated: 29/Aug/13  Resolved: 29/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Bug Priority: Major
Reporter: rcervera Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

The payment web service does not work in the current state of the application. Follow these steps to reproduce the issue:

1. Start Glassfish Server

2. Build and deploy the application:
(this enables principal-to-role mapping and creates the required resources)
mvn install

3. Open a web browser:
http://localhost:8080/dukes-store/

4. Register as a new user

5. Log in as the new user
The log is successful on the page, but you get the following error message on the log:
SEVERE: SEC1111: Cannot load group for JDBC realm user [ricardo@gmail.com].

6. Add some products to the cart

7. Check out
You get the following errors on the log:


WARNING: Following exception was thrown:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[...]
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://RCERVERA-LAP:8080/dukes-store/PaymentService/__container$publishing$subctx/null?WSDL. It failed with:
Server returned HTTP response code: 502 for URL: http://RCERVERA-LAP:8080/dukes-store/PaymentService/__container$publishing$subctx/null?WSDL.
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:249)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:230)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:193)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:162)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:359)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:321)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:212)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:208)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:112)
at javax.xml.ws.Service.<init>(Service.java:92)
at services.payment.forest.com.PaymentService.<init>(PaymentService.java:58)
... 36 more
Caused by: java.io.IOException: Server returned HTTP response code: 502 for URL: http://RCERVERA-LAP:8080/dukes-store/PaymentService/__container$publishing$subctx/null?WSDL
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at java.net.URL.openStream(URL.java:1037)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:983)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:384)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:215)
... 46 more

SEVERE: EJB5070: Exception creating stateless session bean : [PaymentHandler]
WARNING: EJB5184:A system exception occurred ...


Possible cause: the JDBC realm is not working properly.
Possible line of investigation: New Password Encryption Algorithm field that we are not specifying. See the last comment on the following link:
http://stackoverflow.com/questions/12067410/glassfish-3-1-2-jdbcrealm-configuration

(digestrealm-password-enc-algorithm property if we want to add it in glassfish-resources.xml)



 Comments   
Comment by rcervera [ 29/Aug/13 05:09 PM ]

The payment web service works properly. The problem was the proxy configuration in GlassFish. Remove the http.proxyHost and http.proxyPort properties from your server, then the payment works fine.

We made changes to the installation process. Verify as follows:

1. Remove any previous authentication realms:
asadmin delete-auth-realm jdbcRealm

2. Configure resources and realms on dukes-forest/
mvn exec:exec

3. Build and deploy the application:
mvn install

4. Test normally and look at the server log. Payments less than $1000 are processed.





[JAVAEETUTORIAL-239] Refer to JAVA SE 7 security pages instead of SE 6 Created: 28/Aug/13  Updated: 28/Aug/13  Resolved: 28/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Trivial
Reporter: DLambers Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Tags:
Participants: DLambers and jendrock

 Description   

At the end of paragraph 44.2.1 the following sentence is found:
"For more information on Java SE security, visit http://docs.oracle.com/javase/6/docs/technotes/guides/security/."

The link should be updated to Java SE 7:

http://docs.oracle.com/javase/7/docs/technotes/guides/security/



 Comments   
Comment by jendrock [ 28/Aug/13 03:14 PM ]

Fixed in source. Fix will appear in the bundle when update 7.0.3 is pushed to the Update center and will appear online when the next update is pushed out.

Thank you, @DLambers, for noticing the error and for filing the issue.





[JAVAEETUTORIAL-238] NullPoint error in chapter 8.5 Composite Components example code. Created: 26/Aug/13  Updated: 26/Aug/13  Resolved: 26/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: evil850209 Assignee: Kim Haase
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java EE 7
GlasshFish 4.0


Issue Links:
Duplicate
duplicates JAVASERVERFACES_SPEC_PUBLIC-1213 f:viewParam doesn't work when using x... Open
Tags:
Participants: evil850209, Ian Evans and Kim Haase

 Description   

I am reading The Java EE 7 Tutorial from http://docs.oracle.com/javaee/7/tutorial/doc/jsf-facelets005.htm#GIQZR

After I typed the example code in the chapter 8.5 Composite Components in my IDE and run the example on GlassFish4.0, I got an error.

java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1078)
at com.sun.faces.util.Cache.get(Cache.java:116)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:237)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:951)
at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:648)

Then I check the older version of this tutorial, I found a difference in email.xhtml code. The namespace has been changed from Java EE 7. After I changed the namespace back to JavaEE 6 version, it works.

Java EE 7

xmlns:composite="http://xmlns.jcp.org/jsf/composite"

Java EE 6

xmlns:composite="http://java.sun.com/jsf/composite"



 Comments   
Comment by Ian Evans [ 26/Aug/13 04:59 PM ]

Duplicate of JAVASERVERFACES_SPEC_PUBLIC-1213.

Comment by Kim Haase [ 26/Aug/13 06:22 PM ]

I believe this is essentially a duplicate of https://java.net/jira/browse/JAVASERVERFACES-2868 (of which https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1213 is also a duplicate, I believe). Several components do not work correctly with the new xmlns.jcp.org namespace at the first release of JSF 2.2. The fix for this problem will be in the next released version of JSF 2.2.x.

We document the namespaces the way they are supposed to work, rather than document the incorrect behavior. The facelets pages for the tutorial examples that use composite components (and a few other components) use the java.sun.com namespace so that the examples will run.





[JAVAEETUTORIAL-237] Fix leftover Solbook conversion errors regarding line breaks Created: 21/Aug/13  Updated: 21/Aug/13  Resolved: 21/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

In four Frame files, the Solbook conversion process replaced line break directives with the word "linebreak" or "preflinebreak" (the name of the directive in Solbook). (There may originally have been more, but we must have caught them before.)

The files are jsf-facelets.fm, jaxrs.fm, persistence-basicexamples.fm, and security-javaee.fm. I just happened to notice one in the Facelets chapter and found the rest by searching for "linebreak" in the tutorial PDF.

I'm checking in fixed versions.



 Comments   
Comment by Kim Haase [ 21/Aug/13 01:42 PM ]

Checked in four Frame files.





[JAVAEETUTORIAL-236] roster-ejb compile errors Created: 15/Aug/13  Updated: 15/Aug/13  Resolved: 15/Aug/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: DLambers Assignee: Ian Evans
Resolution: Invalid Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: DLambers, Ian Evans and Kim Haase

 Description   

In the roster example (examples/persistence/roster), roster-ejb does not compile because of the absence of the classes javaeetutorial.roster.entity.League_ , javaeetutorial.roster.entity.Player_ and javaeetutorial.roster.entity.Team_ (note the underscores).



 Comments   
Comment by Ian Evans [ 15/Aug/13 08:23 PM ]

The files with trailing underscores are generated static metamodel classes, and they will be generated before the compile process when you build the application.

If you look in roster-ejb's pom.xml file, you'll see that it's set up to generate these files during the generate-sources phase by the maven-processor-plugin. This will occur in both NetBeans and when using mvn from the command-line.

Comment by DLambers [ 15/Aug/13 08:45 PM ]

I see it indeed in the pom.xml. But both building by Netbeans and Maven command line give errors related to the roster-ejb jar. There must be something else going wrong then. I'll continue the search. Thank you for your help.

Comment by Kim Haase [ 15/Aug/13 09:38 PM ]

One thing I've noticed is that the tutorial instructions for running the project – right-click the roster-ear project and select Run – result in a hang here:

NetBeans: Deploying on GlassFish Server
profile mode: false
debug mode: false
force redeploy: true
Distributing C:\tut-ws\trunk\examples\persistence\roster\roster-ear\target\roster-ear.ear to [GlassFish Server]
Initializing...

The way that works for running it is to right-click the parent project, roster, and select Build.





[JAVAEETUTORIAL-235] Title "Java EE 6 Tutorial" is baked into PDF Created: 14/Aug/13  Updated: 14/Aug/13  Resolved: 14/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

An alert reader has pointed out that the title of the Java EE Tutorial that appears in File->Properties in Adobe Reader, or in a browser title tab in some browsers (notably on the Mac), is "The Java EE 6 Tutorial".

This turns out to be something we have to fix in the FrameMaker .book file. The keywords there are also a bit sparse and could use improvement.



 Comments   
Comment by Kim Haase [ 14/Aug/13 03:28 PM ]

Checked in fix to book file. The fix will appear in the next update.





[JAVAEETUTORIAL-234] h:selectManyRadio doesn't seem right Created: 11/Aug/13  Updated: 13/Aug/13  Resolved: 13/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.2
Fix Version/s: 7.0.3

Type: Bug Priority: Minor
Reporter: AnnTea Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: AnnTea and Kim Haase

 Description   

In section 12.2.1.4 the element h:selectManyRadio is mentioned as an example. I do not think this element exists but it would be better to replace it with h:selectManyCheckbox.



 Comments   
Comment by AnnTea [ 11/Aug/13 05:44 PM ]

Sorry, this should not have priority Major. I don't see how (or if) I can change that.

Comment by Kim Haase [ 13/Aug/13 01:19 PM ]

Whew, thanks very much for catching that! That's embarrassing, since selectManyRadio is a contradiction in terms.

I'll change the priority to minor (I think Major is the default) and fix it for the next rev of the Tutorial.

Comment by Kim Haase [ 13/Aug/13 01:26 PM ]

Fixed in documentation source.

Comment by AnnTea [ 13/Aug/13 07:58 PM ]

You are very welcome. I find the tutorial to be a great asset.





[JAVAEETUTORIAL-233] Describe Configuration instances in the WebSocket chapter Created: 09/Aug/13  Updated: 19/Aug/13  Resolved: 19/Aug/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: websocket
Participants: rcervera

 Description   

Describe how to obtain a Configuration instance for WebSocket endpoints.

This is related to the question that Ian found here:
http://stackoverflow.com/questions/18097334/how-can-i-get-a-cookie-value-inside-websocket-end-point



 Comments   
Comment by rcervera [ 09/Aug/13 08:41 PM ]

Another relevant question that should be addressed:

http://stackoverflow.com/questions/17936440/accessing-httpsession-from-httpservletrequest-in-a-web-socket-socketendpoint

Thanks Ian for finding these.

Comment by rcervera [ 19/Aug/13 07:30 PM ]

Added a description and (tested) code snippets of endpoint configurator classes in websocket.fm.





[JAVAEETUTORIAL-232] Wrong URL given for guessnumber-jsf Created: 02/Aug/13  Updated: 09/Aug/13  Resolved: 09/Aug/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

Section 8.3.3.3, "To Run the guessnumber-jsf Example", gives the URL as

http://localhost:8080/guessnumber

This gives an error 404, however. The URL should be

http://localhost:8080/guessnumber-jsf



 Comments   
Comment by Kim Haase [ 09/Aug/13 08:28 PM ]

Fixed in jsf-facelets.fm chapter.





[JAVAEETUTORIAL-231] Replace the inboundconnector example as discussed with the JCA engineers Created: 01/Aug/13  Updated: 18/Sep/13  Resolved: 18/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and rcervera

 Description   

Siva suggested to replace the inboundconnector example for a future tutorial release to showcase an asynchronous communication use case between the EIS and the MDB/RA.



 Comments   
Comment by Kim Haase [ 02/Aug/13 01:38 PM ]

When you redo this example, you may want to use the naming conventions (with hyphens) described in http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples006.htm#GEXAP. It's not very important, so no one mentioned it for the August release – it's great just to have the examples.

Comment by rcervera [ 18/Sep/13 11:35 PM ]

The example is now updated in the source tree and in the book.





[JAVAEETUTORIAL-230] Use JSON messages in the Connector examples Created: 01/Aug/13  Updated: 11/Sep/13  Resolved: 11/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Improvement Priority: Minor
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

Use JSON messages in the inbound and outbound connector examples.



 Comments   
Comment by rcervera [ 11/Sep/13 06:14 PM ]

The connectors/traffic example uses JSON processing now.





[JAVAEETUTORIAL-229] Use EIS-specific API in the outboundconnector example Created: 01/Aug/13  Updated: 11/Sep/13  Resolved: 11/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and rcervera

 Description   

Replace the CCI implementation by a custom EIS-specific interface and implementation to access the resource adapter from the web application, as recommended by Siva and Jagadish from JCA. Update the Connector Examples chapter accordingly.



 Comments   
Comment by Kim Haase [ 02/Aug/13 01:37 PM ]

When you redo this example, you may want to use the naming conventions (with hyphens) described in http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples006.htm#GEXAP. It's not very important, so no one mentioned it for the August release – it's great just to have the examples.

Comment by rcervera [ 02/Aug/13 03:52 PM ]

Thanks Kim, I'll fix that for the next release.

Comment by rcervera [ 11/Sep/13 06:15 PM ]

Replaced the Common Client Interface (CCI) by a simpler, EIS-specific, custom client interface.





[JAVAEETUTORIAL-228] guessnumber-jsf example: implementation of range differs from descriptions Created: 31/Jul/13  Updated: 09/Aug/13  Resolved: 09/Aug/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Bug Priority: Trivial
Reporter: AnnTea Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: AnnTea and Kim Haase

 Description   

In the guessnumber-jsf example, as described by chapter 8.3, the described functionality is that Duke will pick a random number between 0 and 10, while the implementation will give a random number between 0 and 9.

Changing code line
randomInt = new Integer(randomGR.nextInt(10));
to
randomInt = new Integer(randomGR.nextInt(11));
would make the implementation match the description.

It is a minor issue that has no effect on what the example intends to demonstrate, but still might want to have it aligned.



 Comments   
Comment by Kim Haase [ 02/Aug/13 04:03 PM ]

Thanks for catching this. We'll make sure the language fits the implementation.

Comment by Kim Haase [ 09/Aug/13 08:25 PM ]

Updated guessnumber-jsf and guessnumber-cdi examples to generate a random number that includes the maximum value. Also updated the code in the jsf-facelets.fm and cdi-basicexamples.fm chapters.





[JAVAEETUTORIAL-227] Incorrect package name in "Using the Timer Service" Created: 30/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://docs.oracle.com/javaee/7/tutorial/doc/ejb-basicexamples004.htm#BNBOY


Tags:
Participants: Ian Evans

 Description   

From the feedback alias:

A quick one that freaked me out for a moment, under:

Part IV Enterprise Beans

24. Running the Enterprise Bean Examples

Using the Timer Service

In the second paragraph the package names for schedules and schedule are wrong, as I understand it is javax.ejb not java.ejb
I know it's pedantic, but it might throw a few new people, the error appears to be there for ee6 and ee7



 Comments   
Comment by Ian Evans [ 30/Jul/13 10:40 PM ]

Updated in source. Fix will appear in the next update to the Tutorial.





[JAVAEETUTORIAL-226] Error in code example in advanced security chapter Created: 30/Jul/13  Updated: 31/Jul/13  Due: 30/Jul/13  Resolved: 31/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: jendrock Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and jendrock

 Description   

A user reports that there is an error in the code example in the advanced security chapter in this section: http://docs.oracle.com/javaee/7/tutorial/doc/security-advanced003.htm#BABIFJGI.

The corrections are indicated by the comments at the end of the lines that contain the errors.

@Stateless
@ManagedBean // add annotation
public class LoginBean {
private String username;
private String password;

public String getUsername() { return this.username; }

public void setUserName(String username) { this.username = username; }

public String getPassword() { return this.password; }

public void setPassword(String password) { //add String password this.password = password; }



 Comments   
Comment by Ian Evans [ 30/Jul/13 10:52 PM ]

I don't agree that it should be @ManagedBean in the code sample. Currently it is @Named, the replacement for JSF obsolete @ManagedBean annotation.

If the user had problems that were solved by replacing @Named with @ManagedBean I suspect there might be an issue with CDI scanning. But that's a different issue.

Comment by jendrock [ 31/Jul/13 06:49 PM ]

Ian's comment is correct. @Named should be used instead of @ManagedBean. The general recommendation is to use @Named regardless. Therefore, I will leave the existing annotation (@Named) as is.

I did, however, make the second correction in the source. The correction should be visible when we publish the next update, very soon.

Comment by jendrock [ 31/Jul/13 07:00 PM ]

The change has been made in the source and the correction will be visible at the next update.





[JAVAEETUTORIAL-225] Typos and syntax errors in the security chapters Created: 30/Jul/13  Updated: 30/Jul/13  Due: 31/Jul/13  Resolved: 30/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: jendrock Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock

 Description   

A tutorial user points out 2 errors in http://docs.oracle.com/javaee/7/tutorial/doc/security-advanced003.htm#BABIFJGI.

1. Typo. The HttpServetRequest classes shown below should be HttpServletRequest.

public String login () {
FacesContext context = FacesContext.getCurrentInstance();
HttpServetRequest request = (HttpServletRequest)
context.getExternalContext().getRequest();
try { request.login(this.username, this.password); } catch (ServletException e) { ... context.addMessage(null, new FacesMessage("Login failed.")); return "error"; }
return "admin/index";
}

public void logout() {
FacesContext context = FacesContext.getCurrentInstance();
HttpServetRequest request = (HttpServletRequest)
context.getExternalContext().getRequest();
try { request.logout(); } catch (ServletException e) { ... context.addMessage(null, new FacesMessage("Logout failed.")); }
}

2. Syntax errors in XML due to missing single quotes (one occurrence) and curly closing braces (3 occurrences) are indicated with an asterisk per occurrence in the XML code below.

<h:form>
<h:outputLabel for="usernameInput">

  • #{bundle['login.username']}:
    </h:outputLabel>
    <h:inputText id="usernameInput" value="#{loginBean.username}"
    required="true" />
    <br />
    <h:outputLabel for="passwordInput">
  • #{bundle['login.password']}:
    </h:outputLabel>
    <h:inputSecret id="passwordInput" value="#{loginBean.password}"
    required="true" />
    <br />
  • <h:commandButton value="${bundle['login.submit']}"
    action="#{loginBean.login}" />
    </h:form>

Lines indicated with an asterisk include the corrections.



 Comments   
Comment by jendrock [ 30/Jul/13 05:52 PM ]

Both sets of errors have been fixed in source and will appear in the next tutorial update.





Add section on standardized schema generation to Persistence chapter (JAVAEETUTORIAL-223)

[JAVAEETUTORIAL-224] Add section on specifying schema generation scripts to advanced JPA chapter Created: 29/Jul/13  Updated: 16/Sep/13  Resolved: 16/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Sub-task Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

An advanced feature that is part of standardized schema generation in JPA 2.1 is the ability to either have the provider generated create/drop scripts, or to specify custom create/drop scripts within an archive.

Add a section on this feature to the advanced JPA chapter.



 Comments   
Comment by Ian Evans [ 16/Sep/13 11:49 PM ]

Added a section in the intro chapter, as it keeps the information together.





[JAVAEETUTORIAL-223] Add section on standardized schema generation to Persistence chapter Created: 29/Jul/13  Updated: 16/Sep/13  Resolved: 16/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVAEETUTORIAL-224 Add section on specifying schema gene... Sub-task Resolved Ian Evans  
Tags:
Participants: Ian Evans

 Description   

A new feature in JPA 2.1 is standardized schema generation on deployment. This replaces and standardizes the vendor-specific options used previously.

See section 9.4 of the JPA 2.1 spec for details.



 Comments   
Comment by Ian Evans [ 16/Sep/13 11:48 PM ]

Added new section on standardized database artifact creation/deletion and data-loading.





[JAVAEETUTORIAL-222] Section 'Declaring Welcome Files' would be better placed in 'Configuring' than in 'Example' Created: 29/Jul/13  Updated: 29/Jul/13  Resolved: 29/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Improvement Priority: Minor
Reporter: AnnTea Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: AnnTea and Kim Haase

 Description   

Section "6.4.4 Declaring Welcome Files" seems misplaced inside Chapter "6.4 The hello2 Example".
It would be better placed inside Chapter "6.5 Configuring Web Applications"



 Comments   
Comment by Kim Haase [ 29/Jul/13 01:49 PM ]

Thanks for noticing this. Not only is it misplaced, but it is outdated and could use some reworking.

Comment by Kim Haase [ 29/Jul/13 02:41 PM ]

Moved welcome files section from 6.4.4 to 6.5.2 and revised it slightly.





[JAVAEETUTORIAL-221] Character without meaning Created: 19/Jul/13  Updated: 19/Jul/13  Resolved: 19/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: enriquezrene Assignee: Unassigned
Resolution: Duplicate Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

pdf


Tags:
Participants: enriquezrene and Kim Haase

 Description   

I was reading the book and found in the 54/918 page of pdf in the last paragraph

The tool provider is the company or person who creates development, assembly, and packaging tools used by component providers, s, and deployers

I think that you should remove the letter "s" in last part:

providers, s, and deployers

Is not important but I think that you should remove the character



 Comments   
Comment by Kim Haase [ 19/Jul/13 08:41 PM ]

Thanks – this is a duplicate of JAVAEETUTORIAL-216, which is fixed for version 7.0.2.





Add section on method validation using Bean Validation (JAVAEETUTORIAL-218)

[JAVAEETUTORIAL-220] Add information on using method validation in a type hierarchy to Advanced Bean Validation chapter Created: 16/Jul/13  Updated: 16/Jul/13  Resolved: 16/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: None
Fix Version/s: 7.0.2

Type: Sub-task Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

Add documentation on how to correctly apply validation constraints to a type hierarchy. This is, in my opinion, an advanced feature, and should be in the Bean Validation: Advanced Topics chapter.



 Comments   
Comment by Ian Evans [ 16/Jul/13 10:52 PM ]

Added section to advanced chapter.





[JAVAEETUTORIAL-219] Formatting problem in Concurrency chapter Created: 16/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Ian Evans Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://docs.oracle.com/javaee/7/tutorial/doc/concurrency-utilities002.htm


Tags:
Participants: Ian Evans and jendrock

 Description   

In section 53.2 the description in the bullet point for ManagedThreadFactory is mostly in monospace font.



 Comments   
Comment by jendrock [ 30/Jul/13 07:34 PM ]

Fixed in source. Will appear in the next update.





[JAVAEETUTORIAL-218] Add section on method validation using Bean Validation Created: 16/Jul/13  Updated: 16/Sep/13  Resolved: 16/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVAEETUTORIAL-220 Add information on using method valid... Sub-task Resolved Ian Evans  
Tags:
Participants: Ian Evans and Kim Haase

 Description   

Section 12.4:

JavaBeans Validation (Bean Validation) is a new validation model available as part of Java EE 7 platform [sic]. The Bean Validation model is supported by constraints in the form of annotations placed on a field, method, or class of a JavaBeans component, such as a managed bean.

We need to fix the grammar of the first sentence, but this is the only mention of method validation in our chapters. We need to add a section here.

We can add it to chapter 12. But I think we might need to do some reorganization of the chapters so:

  • the Bean Validation material is more prominent
  • we clarify the relationship is between Bean Validation and JSF validators
  • we clarify that Bean Validation constraints can be applied to more than just JSF backing beans


 Comments   
Comment by Kim Haase [ 16/Jul/13 05:30 PM ]

You are quite right that Bean Validation needs to be more prominently showcased than it is. Right now the intro to the topic is buried in Chapter 12 (Developing with JSF Technology). Please move it to its own chapter or wherever seems appropriate.

Comment by Ian Evans [ 29/Jul/13 07:02 PM ]

Completely refactoring the Bean Validation information will take more work and review time than we can accomplish in the 7.0.2 time-frame. Deferring to 7.0.3.

Comment by Kim Haase [ 03/Sep/13 06:41 PM ]

I'm going to make a start on this by pulling Section 12.4 (Using Bean Validation) out of Chapter 12 and making it a separate chapter, probably right after Chapter 10. Bean Validation is mentioned in Chapter 11, so it'd be a good idea to introduce the topic ahead of time.

I'll mention that this is not just a JSF facility and put in a forward cross-reference to the Chapter 25 section. Then I will leave it to you (Ian) whether you want to put the advanced material into this chapter or leave it where it is.

Does this make sense?

Comment by Ian Evans [ 03/Sep/13 07:36 PM ]

Sounds good to me.

Comment by Kim Haase [ 03/Sep/13 07:48 PM ]

Thanks, Ian. I've been working on it.

Note to all: I'm going to have to check in all the files, since they are now renumbered. If you are working on a chapter you should probably copy it to a safe place before your next svn update.

Please holler if this is extremely inconvenient. I'll wait an hour or so before doing the commit. Then Ian, feel free to make any additional changes to the chapter.

Comment by Kim Haase [ 03/Sep/13 09:05 PM ]

I committed the book with the new chapter. All yours, Ian.

Comment by Ian Evans [ 16/Sep/13 09:42 PM ]

Added new section to bean-validation chapter.





[JAVAEETUTORIAL-217] Use clearly user-specific names for destinations Created: 12/Jul/13  Updated: 19/Jul/13  Resolved: 19/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Improvement Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

The JMS spec lead suggests that calling the example destinations "Queue" and "Topic" is "a bit confusing as the reader doesn't know whether this choice of name is significant. I prefer a name like "MyQueue".

I will make this change.



 Comments   
Comment by Kim Haase [ 19/Jul/13 01:43 PM ]

Fixed in documentation and examples.





[JAVAEETUTORIAL-216] Missing name of the role assembling Java EE components Created: 12/Jul/13  Updated: 12/Jul/13  Resolved: 12/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.0, 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: AnnTea Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: AnnTea and Kim Haase

 Description   

The name of the role assembling Java EE components is missing from the text (as if it was replaced with blank in a search&replace operation).

Seen in:
Chapter 1.7 introduction text
Chapter 1.7.4 header
Chapter 1.4.7 text
(possibly more)



 Comments   
Comment by Kim Haase [ 12/Jul/13 02:05 PM ]

Thank you very much for catching this error. I'm sure you are right about how it happened. We will fix it.

Comment by Kim Haase [ 12/Jul/13 03:06 PM ]

Found and fixed several occurrences in Chapter 1 and single occurrences in Chapters 26 (ejb-intro), 46 (security-javaee) and 49 (resources), by finding all occurrences of "assembler" in the EE 6 Tutorial and inserting the missing work in the EE 7 chapter. If anyone added any new text for EE 7 containing this word, though, I haven't found it.





[JAVAEETUTORIAL-215] Update Faces Flows example to use appropriate naming conventions Created: 10/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Improvement Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

Ed Burns (the JavaServer Faces spec lead) wrote an article for the German Oracle users website recommending some naming conventions for Faces Flows applications. The example in the tutorial should be modified to use these.



 Comments   
Comment by Kim Haase [ 30/Jul/13 01:33 PM ]

Created new example (simple-flow) to illustrate points made in Ed's article, and updated jsf-configure chapter.





[JAVAEETUTORIAL-214] Revise the Interceptors chapters with new features in Interceptors 1.2 Created: 10/Jul/13  Updated: 16/Jul/13  Resolved: 16/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

Interceptors 1.2 has several new features, including:

  • @AroundConstruct interceptors
  • @Priority annotation for determining interceptor order
  • Rules for specifying interceptor order

Add sections on these to the Interceptors chapters.



 Comments   
Comment by Ian Evans [ 16/Jul/13 10:22 PM ]

Added material to Interceptors chapter.





[JAVAEETUTORIAL-213] Create a simple inbound connector example Created: 10/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

The mailconnector example, while very complete, is very complex and mixes two use cases (inbound vs. outbound) that are better understood separately. JCA would be easier to explain and understand with a basic outbound example and a basic inbound example.

This issue represents creating a basic inbound example.



 Comments   
Comment by rcervera [ 30/Jul/13 06:02 PM ]

The example is now available under connectors/inboundconnector and is also described in the Connector Examples chapter.





[JAVAEETUTORIAL-212] Create a simple outbound connector example Created: 10/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

The mailconnector example, while very complete, is very complex and mixes two use cases (inbound vs. outbound) that are better understood separately. JCA would be easier to explain and understand with a basic outbound example and a basic inbound example.

This issue represents creating a basic outbound example.



 Comments   
Comment by rcervera [ 30/Jul/13 06:02 PM ]

The example is now available under connectors/outboundconnector and is also described in the Connector Examples chapter.





[JAVAEETUTORIAL-211] Servlet chapter references old Java SE book Created: 03/Jul/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

At the end of http://docs.oracle.com/javaee/7/tutorial/doc/servlets003.htm#BNAFS is a reference to "The Java Tutorial, Fourth Edition, by Sharon Zakhour et al. (Addison-Wesley, 2006)." Since there's a link to the online tutorial section anyway, I think this can just be cut.



 Comments   
Comment by jendrock [ 30/Jul/13 09:08 PM ]

Fixed in source. Will appear in update.





[JAVAEETUTORIAL-210] Debug options need correcting Created: 02/Jul/13  Updated: 03/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

In the section "Using a Debugger" (http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples009.htm#BNADN), two default debug options are shown, with a bad line break:

-Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009

I thought I'd better check on them before fixing the line break (JAVAEETUTORIAL-176).

Neither option actually appears in the Debug Options field currently. What does appear is

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009

Do others see this too? I will make the correction if someone confirms the change.



 Comments   
Comment by jendrock [ 02/Jul/13 08:53 PM ]

I also see this for the Debug Options field:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009

Please feel free to make the correction.

Comment by Kim Haase [ 02/Jul/13 08:59 PM ]

Thanks, Eric. I've made the fix.





[JAVAEETUTORIAL-209] Tables need to use HRuleFormal role Created: 02/Jul/13  Updated: 03/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

I seem to have used the default (I think) "Formal" role when creating some new tables in JSF and JMS chapters, instead of the correct "HRuleFormal" role. I am fixing any I find in my chapters and will note any I find in others. They all look the same in PDF, but in HTML the Formal ones have shaded contents while the HRuleFormal ones don't.



 Comments   
Comment by Kim Haase [ 02/Jul/13 07:55 PM ]

Nope, I'm the only idiot. Fixed table roles in JMS Examples and Facelets chapters.





[JAVAEETUTORIAL-208] Unused JMS example mistakenly included in bundle Created: 02/Jul/13  Updated: 02/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

I forgot to remove the webrequestreply example from the workspace, though it was not included in the tutorial examples in the end. I will remove it from the trunk and branch.



 Comments   
Comment by Kim Haase [ 02/Jul/13 06:47 PM ]

Removed jms/webrequestreply directories from trunk and 7.0.1 branch at revision 1463.





[JAVAEETUTORIAL-207] Fix application client terminology in JMS chapter(s) Created: 02/Jul/13  Updated: 02/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

A user reports the following issue, which should be addressed:

In chapter 31 of the Java EE 5 Tutorial, in the section "Writing Simple JMS Client Applications", first paragraph,

"This section shows how to create, package, and run simple JMS client programs packaged as stand-alone application clients."

The term "stand-alone application client" is confusing (especially the term "standalone" here), since they are actually Java EE Application Client, using Java EE annotations for resource injection, and are run in a Java EE Application Client container.

This is even more confusing since the rest of the section explains that there are some differences when a JMS client is run in an application server (meaning, as a normal Java Component like a Web component or EJB, I suppose).

Usually the term "standalone" is used for "standalone Java client", which are not run within a container but in a normal JVM.



 Comments   
Comment by Kim Haase [ 02/Jul/13 06:10 PM ]

I suddenly noticed that the user raised the issue against the Java EE 5 Tutorial, which is not being updated. We have not used the problematic terminology in the Java EE 6 or 7 tutorials.





[JAVAEETUTORIAL-206] Improve information about JSF API reference details Created: 01/Jul/13  Updated: 03/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

A user has pointed out that it is not clear in Section 10.2 where to find information about the tags and attributes described there. Links to this information should be added to this section.



 Comments   
Comment by Kim Haase [ 02/Jul/13 05:55 PM ]

Checked in fix to section 10.2.





[JAVAEETUTORIAL-205] Content of Java EE 7 Tutorial PDF file does not match contents of Java EE 7 Tutorial HTML files Created: 28/Jun/13  Updated: 10/Jul/13  Resolved: 10/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: jendrock Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

A user reports that http://docs.oracle.com/javaee/7/tutorial/doc/javaeetutorial7.pdf is not as up to date as its HTML counterpart.

The first difference can easily be seen on this page : http://docs.oracle.com/javaee/7/tutorial/doc/overview001.htm#GIQVH and its pdf counterpart.

To match the HTML docs that are in the latest IPS package in the Update Center, the online HTML files for the Java EE 7 Tutorial were updated and pushed out. The individual that pushed the HTML files out, however, did not have ownership of the PDF file, nor was he in the correct group, nor were the permissions set in such a manner that he was able to effect any changes, so this matter will have to rest as is until the original owner returns from vacation and either resets the file so it can be updated or updates the file from the doc directory in the branches/javaeetutorial-7.0.1 repository herself.



 Comments   
Comment by Kim Haase [ 10/Jul/13 01:04 PM ]

The correct PDF is now provided on the docs.oracle.com site.





[JAVAEETUTORIAL-204] Broken links in the Java EE 7 Tutorial Created: 28/Jun/13  Updated: 02/Jul/13  Resolved: 02/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: jendrock Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

A user reported that links, such as http://docs.oracle.com/javaee/7/javaserverfaces/2.2/docs/renderkitdocs/, in http://docs.oracle.com/javaee/7/tutorial/doc/jsf-page001.htm
are not working.

After rerunning LinkChecker 8.4, the following links have been found to be broken (HTTP 404 error):

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-ajax013.htm, https://javaserverfaces.java.net/nonav/docs/2.2/jsdocs/symbols/jsf.ajax.html.

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-configure005.htm#BNAXB, http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt.

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-facelets004.htm#GIQXP, http://docs.oracle.com/javaee/7/javaserverfaces/2.2/docs/vdldocs/facelets/.

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-page001.htm#BNARB, http://docs.oracle.com/javaee/7/javaserverfaces/2.2/docs/renderkitdocs/.

In http://docs.oracle.com/javaee/7/tutorial/doc/preface.htm#GEXAF, https://glassfish.java.net/nonav/docs/v4/api/.

There were two URLs that resulted in a HTTP 301 error (moved permanent) and should be updated:

In http://docs.oracle.com/javaee/7/tutorial/doc/jaxrs004.htm#GILIZ, http://oreilly.com/catalog/9780596529260/ is redirected to http://shop.oreilly.com/product/9780596529260.do

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-configure002.htm#BNAWP, http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd is redirected to http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-facesconfig_2_2.xsd

There are also several http URLs that are redirected to https URLs and should be updated:

In http://docs.oracle.com/javaee/7/tutorial/doc/jaxrs003.htm#GIPZZ, http://www.netbeans.org/kb/docs/websvc/rest.html is redirected to https://netbeans.org/kb/docs/websvc/rest.html

In http://docs.oracle.com/javaee/7/tutorial/doc/jaxrs003.htm#GIPZZ, http://netbeans.org/kb/docs/websvc/twitter-swing.html is redirected to https://netbeans.org/kb/docs/websvc/twitter-swing.html

In http://docs.oracle.com/javaee/7/tutorial/doc/jsf-facelets004.htm#GIQXP, http://netbeans.org/kb/docs/web/jsf20-intro.html is redirected to https://netbeans.org/kb/docs/web/jsf20-intro.html

In http://docs.oracle.com/javaee/7/tutorial/doc/preface.htm#GEXAF, http://www.netbeans.org/kb/ is redirected to https://netbeans.org/kb/

In http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAJ, http://www.netbeans.org/downloads/index.html is redirected to https://netbeans.org/downloads/index.html



 Comments   
Comment by Kim Haase [ 01/Jul/13 08:30 PM ]

Fixed in doc source (except the jcp.org one, which should be left as is).

Comment by Kim Haase [ 02/Jul/13 07:17 PM ]

Found a bad link that the linkchecker missed, from http://docs.oracle.com/javaee/7/tutorial/doc/jsf-custom008.htm.

Are there more?

Comment by Kim Haase [ 02/Jul/13 08:03 PM ]

Fixed bad link in jsf-custom chapter. Please reopen if more are found.





[JAVAEETUTORIAL-203] rsvp example's welcome-file and Faces servlet mapping not being respected Created: 26/Jun/13  Updated: 08/Jul/13  Resolved: 08/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

In jaxrs/rsvp, we have the following web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

However, if you go to the context root (say, http://localhost:8080/rsvp/) you get a 404 error. The welcome-file setting isn't being respected.

If you change the Faces servlet mapping and welcome-file to:

<servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
...
    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>

You get nothing but 404 errors at any URL.

After investigating, Ed Burns suspects a bug in the GlassFish 4 web container.



 Comments   
Comment by Ian Evans [ 08/Jul/13 06:06 PM ]

The problem was a conflict between the JAX-RS application path in RsvpApplication ("/") and the FacesServlet mapping in web.xml. The 404 was being sent by the JAX-RS runtime. Evidently, if there is a conflict between a JAX-RS annotation and servlet mapping, the annotation wins.

I changed the application path in RsvpApplication to "/webapi" and the target URIs in the client code. Now everything works.





Use JDK 7 language features whenever we can (JAVAEETUTORIAL-200)

[JAVAEETUTORIAL-202] Use type inference for generic instantiation Created: 24/Jun/13  Updated: 25/Jul/13  Resolved: 25/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.2

Type: Sub-task Priority: Major
Reporter: Ian Evans Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and rcervera

 Comments   
Comment by Ian Evans [ 24/Jun/13 07:44 PM ]

See the following tech note:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/type-inference-generic-instance-creation.html

Comment by Ian Evans [ 24/Jun/13 09:40 PM ]

According to the following grep regex:

grep -r "new\s[a-zA-Z0-9]*<[a-zA-Z0-9]." *

all the examples except for mailconnector are using the correct diamond operator per JDK 7. The above command will show matches in rsvp, but that is because the entity type for collections must be explicitly set.

Comment by rcervera [ 24/Jun/13 11:12 PM ]

I'm working on adapting the new mailconnector sample to our tree. I'll watch out for these instances and fix them.

Comment by rcervera [ 25/Jul/13 04:29 PM ]

I have removed the mailconnector example from the tree.





Use JDK 7 language features whenever we can (JAVAEETUTORIAL-200)

[JAVAEETUTORIAL-201] Use JDK 7 syntax for multiple exceptions Created: 24/Jun/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.3

Type: Sub-task Priority: Major
Reporter: Ian Evans Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Kim Haase

 Comments   
Comment by Ian Evans [ 24/Jun/13 07:43 PM ]

See the following tech note:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html

Comment by Kim Haase [ 13/Aug/13 06:42 PM ]

The JMS, JSF (including dukes-bookstore), and CDI examples all use the new syntax where applicable. A couple of examples specify different handling for different exceptions, so they couldn't be updated.

Comment by Ian Evans [ 19/Sep/13 10:29 PM ]

I think we've updated the example tree with these language features.





[JAVAEETUTORIAL-200] Use JDK 7 language features whenever we can Created: 24/Jun/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Unassigned
Resolution: Fixed Votes: 0
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVAEETUTORIAL-174 Use try-with-resources (possibly othe... Sub-task Resolved  
JAVAEETUTORIAL-201 Use JDK 7 syntax for multiple exceptions Sub-task Resolved  
JAVAEETUTORIAL-202 Use type inference for generic instan... Sub-task Resolved rcervera  
Tags:
Participants: Ian Evans

 Description   

This is a general request to use JDK 7 language features in our examples. I will create subtasks for each language feature.



 Comments   
Comment by Ian Evans [ 19/Sep/13 10:31 PM ]

I think we've updated the example tree with these language features.





Augment information on starting app server (JAVAEETUTORIAL-173)

[JAVAEETUTORIAL-199] Add links back to Starting and Stopping the GlassFish Server/Java DB Created: 24/Jun/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Sub-task Priority: Major
Reporter: Ian Evans Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Kim Haase

 Description   

Our instructions assume that the server has been started, so a cross-reference back to section 2.2, "Starting and Stopping the GlassFish Server" would be helpful. Something like:

To build and deploy the blahblah example, make sure GlassFish Server is started (see Section 2.2, 2.2, "Starting and Stopping the GlassFish Server") then do the following:
...



 Comments   
Comment by Kim Haase [ 21/Aug/13 03:56 PM ]

Fixed for JSF and JMS chapters.

Comment by Kim Haase [ 21/Aug/13 07:28 PM ]

Fixed for dukes-bookstore chapter; also, with Eric's okay, for servlet and security chapters.

Comment by Ian Evans [ 19/Sep/13 10:27 PM ]

Links have been added.





[JAVAEETUTORIAL-198] Wrong usage of type in @Resource Created: 23/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: jd3714att Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: annotations
Participants: Ian Evans and jd3714att

 Description   

Examples to the use of @Resource are wrong.
Example, 6.5.3.1:

@Resources ({
    @Resource(name="myDB" type=javax.sql.DataSource),
    @Resource(name="myMQ" type=javax.jms.ConnectionFactory)
})

Just to be syntactically correct, the type value either has to be between double quotes, or .class needs to be appended to return the actual Class object. As per the specification, type is defined as "public abstract Class<?> type". Correction of above would look like:

@Resources ({
    @Resource(name="myDB" type=javax.sql.DataSource.class),
    @Resource(name="myMQ" type=javax.jms.ConnectionFactory.class)
})

I would suggest to extend this case by means of a regex search through the documentation.



 Comments   
Comment by Ian Evans [ 24/Jun/13 07:37 PM ]

Fixed in source. I did a grep through the documentation, and this was the only instance of a class-level @Resource with a type attribute.





[JAVAEETUTORIAL-197] Archetypes should generate stand-alone pom.xml files Created: 21/Jun/13  Updated: 21/Jun/13  Resolved: 21/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

Currently the archetypes in First Cup and the Java EE 7 Tutorial have the parent set. This can cause errors if the parent pom hasn't been installed yet.

Since these archetypes are presumably going to be used by developers for their own applications, it's better to make the generated project's pom.xml standalone, with the necessary dependencies and configuration all in the pom.xml file, not inherited from our project's pom.xml file hierarchy.



 Comments   
Comment by Ian Evans [ 21/Jun/13 09:11 PM ]

Fixed in the source. Will appear in the 7.0.2 release.





[JAVAEETUTORIAL-196] Make the automatic timeout shorter for timersession Created: 21/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Improvement Priority: Minor
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

The automatic timeout in ejb/timersession is pretty long. It can be 20 seconds or so.



 Comments   
Comment by Ian Evans [ 24/Jun/13 07:58 PM ]

Fixed in source. The new automatic timeout will occur every minute.





[JAVAEETUTORIAL-195] Update Duke's Forest for Java EE 7 Created: 21/Jun/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: William Markito
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans, Kim Haase and William Markito

 Description   

Update the Duke's Forest case-study example to use the Java EE 7 APIs. Convert it to Maven format.



 Comments   
Comment by Kim Haase [ 18/Sep/13 05:52 PM ]

This should also involve changing the namespace in Facelets files from java.sun.com to xmlns.jcp.org. For example,

xmlns:h="http://java.sun.com/jsf/html"

should be

xmlns:h="http://xmlns.jcp.org/jsf/html"

Comment by Kim Haase [ 18/Sep/13 07:45 PM ]

I can try working on this if you like, William, since there are bugs involving composite components and bookmarks (viewparams in f:metadata).

Comment by William Markito [ 18/Sep/13 07:50 PM ]

Thanks Kim! I'd appreciate that since this I'll be traveling next week..

Comment by Kim Haase [ 19/Sep/13 06:55 PM ]

Committed namespace fixes at revision 1633. I think we're okay on this now, so I'm resolving.





[JAVAEETUTORIAL-194] Update Duke's Tutoring for Java EE 7 Created: 21/Jun/13  Updated: 12/Sep/13  Resolved: 12/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc, examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

Update the Duke's Tutoring case-study to use Java EE 7 APIs. Migrate the code-base to Maven format.



 Comments   
Comment by Ian Evans [ 12/Sep/13 11:18 PM ]

Updated chapter and example with Java EE 7 features.





[JAVAEETUTORIAL-193] Add section on entity graphs to Advanced JPA chapter Created: 21/Jun/13  Updated: 12/Sep/13  Resolved: 12/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

Entity graphs is a new feature in JPA 2.1. Add a section describing it to the advanced JPA chapter.



 Comments   
Comment by Ian Evans [ 30/Jul/13 10:42 PM ]

Entity graph chapter needs more material, and needs to be reviewed. Changing target to 7.0.3.

Comment by Ian Evans [ 12/Sep/13 11:17 PM ]

New chapter added to book.





[JAVAEETUTORIAL-192] Bug in Tutorial PDF Created: 12/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: arungupta Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: arungupta, Ian Evans and jendrock

 Description   

Section 1.1 of Java EE 7 Tutorial PDF says:

New technologies, including the following:

  • Whatever gets in

Online version at http://docs.oracle.com/javaee/7/tutorial/doc/overview001.htm#GIQVH is correct.

Got the following comment from a community member "I wonder if somebody has done the QA of the tutorial?".



 Comments   
Comment by Ian Evans [ 24/Jun/13 04:14 PM ]

Fixed in 7.0.1-3 update.





[JAVAEETUTORIAL-191] pom.xml generated by jaxrs-service-archetype use incorrect version Created: 14/Jun/13  Updated: 14/Jun/13  Resolved: 14/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

The parent <version> string in the archetype-generated pom.xml file uses 7.0.1-SNAPSHOT. This should be 7.0.1.



 Comments   
Comment by Ian Evans [ 14/Jun/13 06:18 PM ]

The workaround is to edit the generated pom.xml and replace the parent definition with:

<parent>
    <artifactId>firstcup</artifactId>
    <groupId>org.glassfish.javaeetutorial.firstcup</groupId>
    <version>7.0.1</version>
</parent>

That is, delete -SNAPSHOT from <version> in the generated pom.xml.

Comment by Ian Evans [ 14/Jun/13 06:19 PM ]

Fixed the source in trunk. The fix will appear in the next update to the Tutorial package in the Update Center.





[JAVAEETUTORIAL-189] Use rich formatting with multi colors fonts and styles Created: 13/Jun/13  Updated: 26/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.4

Type: New Feature Priority: Minor
Reporter: miss_duke Assignee: Ian Evans
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: format style readability
Participants: Ian Evans, Kim Haase and miss_duke

 Description   

Java tutorial now uses limited colors and fonts. For example Java code snippets in the tutorial remains in plain black.

Code snippets may be formatted as they are displayed in an IDE editor. Various colors fonts and styles may be used wherever possible in the tutorial text.

This needs some effort but this will tremendously increase the readability of the tutorial.

I can point Android tutorials as an example for good presentation:
http://developer.android.com/guide/components/activities.html



 Comments   
Comment by Ian Evans [ 24/Jun/13 04:40 PM ]

We're working on finding a solution that will work with our tools. We'll update this issue as we make progress.

Comment by Ian Evans [ 19/Sep/13 10:32 PM ]

Lowering the priority and deferring to the next release. Our tools team does not have a solution for us at this time.

Comment by Kim Haase [ 25/Mar/14 07:01 PM ]

There is no plan for our tools to implement this feature. Colors used for syntactic purposes impede the accessibility of the documentation.

Comment by miss_duke [ 26/Mar/14 08:17 AM ]

"...Colors used for syntactic purposes impede the accessibility of the documentation..."

Colors used in Git, Android, AngularJS websites are all impede accessibility?! (If you have no resource or skill set please admit it, do not say stupid reasons)

Comment by Kim Haase [ 26/Mar/14 05:48 PM ]

1) Oracle focuses very strongly on accessibility issues, more than most companies.

2) Our tools team will not devote resources to features that might impede accessibility.





[JAVAEETUTORIAL-188] Minor error in code example in "Ordering Results" section of Criteria chapter Created: 12/Jun/13  Updated: 12/Jun/13  Resolved: 12/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

There is a small error in the last code example at http://docs.oracle.com/javaee/6/tutorial/doc/gjivm.html#gjiwo

cq.orderBy(cb.asc(owner.get(Owner_.lastName), owner.get(Owner_.firstName)));

CriteriaBuilder.asc does not accept such arguments. It should probably be:

cq.orderBy(cb.asc(owner.get(Owner_.lastName)), cb.asc(owner.get(Owner_.firstName)));


 Comments   
Comment by Ian Evans [ 12/Jun/13 07:19 PM ]

Fixed in source, and it will appear in the next update of the Tutorial.





[JAVAEETUTORIAL-187] Adapt the mailconnector sample project from the GF samples Created: 10/Jun/13  Updated: 25/Jul/13  Resolved: 25/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc, examples
Affects Version/s: 7.0.0
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: mailconnector
Participants: rcervera

 Description   

The GF samples include a modified version of the mailconnector example used in the EE 6 tutorial. We need to change the following to incorporate it to the tutorial:

1. Replace JSP pages by Servlets.
2. Adapt the sample to our POM example tree.
3. Other changes we may want to make to this example.
4. Document the example.

1. is done and 2. is in progress.



 Comments   
Comment by rcervera [ 25/Jul/13 04:28 PM ]

We are replacing the mailconnector example by two separate new examples. See issues JAVAEETUTORIAL-212 and JAVAEETUTORIAL-213.





[JAVAEETUTORIAL-186] Make sure "jump lists" are correct Created: 10/Jun/13  Updated: 30/Jul/13  Resolved: 30/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

Now that we have to manually update the "jump list" at the beginning of each chapter when we add a section, there is at least one mismatch – section 2.7 is not in the jump list at the beginning of Chapter 2. There may be more. This is a placeholder for all such fixes.



 Comments   
Comment by jendrock [ 20/Jun/13 09:45 PM ]

Fixed in source. Will go into update for 7.0.1.

Comment by Kim Haase [ 30/Jul/13 08:44 PM ]

Fixed again for 7.0.2.





[JAVAEETUTORIAL-185] Webapp chapter begins with some xref problems Created: 10/Jun/13  Updated: 10/Jun/13  Resolved: 10/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

At the beginning of chapter 6, the range of chapters that cover presentation-oriented web apps is too small; it should go up to chapter 17. Also, some of the cress-reference formats need tweaking.



 Comments   
Comment by Kim Haase [ 10/Jun/13 06:44 PM ]

Fixed in source.





[JAVAEETUTORIAL-184] Packaging chapter should mention that ra.xml is optional Created: 10/Jun/13  Updated: 10/Jun/13  Resolved: 10/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and Kim Haase

 Description   

Section 5.4, Packaging Resource Adapter Archives, has the following bullet item:

  • A META-INF/ directory that stores the ra.xml file and optionally an additional deployment descriptor that can be used for configuration purposes.

The ra.xml file is also optional, so this needs to be rephrased.



 Comments   
Comment by jendrock [ 10/Jun/13 06:53 PM ]

Rewrote passage to say the following:

An optional META-INF/ directory that can store an ra.xml file and/or an application server-specific deployment descriptor used for configuration purposes.

That should do it.





[JAVAEETUTORIAL-183] Chapter 2 section "2.6 Tutorial Example Directory Structure" needs fixes Created: 10/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Kim Haase

 Description   

The first bullet list in this section needs to have the last two items corrected from "web" to "webapp".

The second bullet list should have "example-name-common" added to it, since several EAR examples have a common directory. How should this be described?



 Comments   
Comment by Ian Evans [ 24/Jun/13 04:23 PM ]

Fixed the web -> webapp issue, and added the following bullet:

example-name-common: library JAR containing components, classes, and files used by other modules

Comment by Ian Evans [ 24/Jun/13 04:23 PM ]

Fixed in source. Will appear in the next update of the Tutorial.





[JAVAEETUTORIAL-182] Material missing from overview chapter Created: 07/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Kim Haase

 Description   

The Platform Highlights section of the Overview is missing a list of new Java EE technologies, and the section on EJB technology that is cross-referenced from there has "TBA". New features for other technologies are missing (JMS should be mentioned).



 Comments   
Comment by Kim Haase [ 07/Jun/13 09:29 PM ]

Checked in some fixes to overview.fm. More may be needed. Please let me know.

Comment by Ian Evans [ 24/Jun/13 04:27 PM ]

Fixed in 7.0.1-3.





[JAVAEETUTORIAL-181] Multiple para elements inside a bullet point in an ItemizedList do not render properly in HTML (See 52.1.1) Created: 06/Jun/13  Updated: 10/Jun/13  Resolved: 10/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: rcervera Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

File Attachments: PNG File figureInListCssFix.png     PNG File ListPara.PNG     PNG File paragraphsInListsCssFix.png    
Tags: html template
Participants: Ian Evans, jendrock, Kim Haase and rcervera

 Description   

They look fine on the PDF. In the HTML, the paragraphs and an image are not separated by any space. I don't know whether to reorganize the content or try to fix the template.



 Comments   
Comment by Ian Evans [ 07/Jun/13 07:41 PM ]

See the attachment for what it looks like if I add the following CSS to javaee-darb-fonts.css:

ul .figure {
    padding-top: 10px;
}
Comment by rcervera [ 07/Jun/13 07:49 PM ]

Thanks Ian, that fixes the figure in this case. I am unsure if that change would have unintended consequences elsewhere.

Still the paragraphs inside the same bullet list item do not render properly, there is no space between them (see attachment). The easiest thing may be for me to rewrite this part without multiple paragraphs inside a bullet point if there's no other solution...

Comment by rcervera [ 07/Jun/13 07:51 PM ]

Paragraphs inside a list item not rendered properly.

Comment by Kim Haase [ 07/Jun/13 07:57 PM ]

I wouldn't change anything in the source, Ricardo – lots of chapters have lists (numbered as well as ordered) with multiple paragraphs, and we should really have a fix if possible.

Comment by Kim Haase [ 07/Jun/13 07:58 PM ]

The fix for figures looks good!

Comment by Ian Evans [ 07/Jun/13 08:14 PM ]

See the paragraphsInListsCssFix.png attachment for a fix for these by altering the following CSS style:

.javaee #mainContent li p {
    line-height:1.5em;
    padding: 0em 0em .5em 0em;
    margin:auto;
}
Comment by rcervera [ 07/Jun/13 08:24 PM ]

That's a great solution - thank you!

Comment by jendrock [ 10/Jun/13 07:21 PM ]

Since the fix looks good, could you please check it in, Ian? And then can you close the issue, since the problem is no longer there? Kim propagated the fix to the online docs on docs.oracle.com. Thanks.

Comment by Ian Evans [ 10/Jun/13 08:39 PM ]

Fixed online, and will be included in 7.0.2.

I'm tracking our local changes to the post-processor template files in the project wiki here:
https://java.net/projects/javaeetutorial/pages/JavaEEPostProcessorBugFixes





[JAVAEETUTORIAL-180] Fix/Redo tables 18-1 and 18-2 in the WebSocket chapter Created: 06/Jun/13  Updated: 11/Jun/13  Resolved: 11/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: html
Participants: rcervera

 Description   

The tables don't look good on the HTML output.



 Comments   
Comment by rcervera [ 11/Jun/13 03:52 PM ]

Table 18-1 was redesigned to render properly in the HTML view.
Table 18-2 was converted to an itemized list to render properly in the HTML view.

Comment by rcervera [ 11/Jun/13 03:53 PM ]

Fixes will appear in the next nightly build. Fix for Table 18-1 is already incorporated into the latest nightly build.





[JAVAEETUTORIAL-179] Add some .css to the following examples: jsonpmodel, jsonpstreaming, duketf, dukeetf2, webserverlog, phonebilling, websocketbot Created: 06/Jun/13  Updated: 25/Jul/13  Resolved: 25/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.2

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and rcervera

 Description   

Add some style to the examples above, since they look a little rough right now with no styling at all.



 Comments   
Comment by Ian Evans [ 06/Jun/13 11:42 PM ]

What about making a resource library example for JSF with common CSS files that these examples depend on? That way, we'd have one project to maintain for style and accessibility issues, etc.

Comment by rcervera [ 07/Jun/13 07:56 PM ]

That sounds like a good idea.

Some of these projects do not have JSF pages, just plain HTML and JavaScript. Maybe I should convert them to simple JSF pages for using such a common resource and still use the same JavaScript?

Comment by rcervera [ 25/Jul/13 05:42 PM ]

Ian, I added the default.css from other projects to these projects for the time being.

If we go with a JSF resource library for all projects, I'll modify these. They just did not look good without any style at all.





[JAVAEETUTORIAL-178] 17.6 The mood example application, should go before 17.5 The fileupload example application Created: 06/Jun/13  Updated: 11/Jun/13  Resolved: 11/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Improvement Priority: Minor
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

mood is a more basic example, so it should come before the fileupload example.



 Comments   
Comment by rcervera [ 11/Jun/13 06:53 PM ]

Fixed in the book sources.





[JAVAEETUTORIAL-177] Fix/Redo tables 17-4, 17-5, and 17-6 (Servlets) - Description column is too narrow and hard to read Created: 06/Jun/13  Updated: 11/Jun/13  Resolved: 11/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

These tables need to be redesigned or fixed. The description column is too narrow and hard to read on the HTML output.



 Comments   
Comment by rcervera [ 11/Jun/13 09:00 PM ]

These tables have been redesigned in the sources.





[JAVAEETUTORIAL-176] Sample code lines should be shorter whenever possible to avoid line-wrapping in the HTML output Created: 06/Jun/13  Updated: 21/Aug/13  Resolved: 21/Aug/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.3

Type: Improvement Priority: Minor
Reporter: rcervera Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: html examples
Participants: Kim Haase and rcervera

 Description   

The HTML output seems to fit around 70 characters in one line for code examples. Line wrapping with CSS has been a great improvement, but the code is still difficult to read when it has more than a few long lines.



 Comments   
Comment by Kim Haase [ 02/Jul/13 08:16 PM ]

Fixed bad breaks in jsf-advanced-cc.fm.

Comment by Kim Haase [ 03/Jul/13 01:02 PM ]

Bad break in usingexamples.fm (Section 2.9.2.1) fixed as a result of JAVAEETUTORIAL-210.

Comment by Kim Haase [ 03/Jul/13 01:56 PM ]

webapp.fm: Fixed bad break in web.xml servlet-class subelement; also fixed in hello1 example trunk and branch files. Fixed two bad breaks in GreetingServlet.java; also fixed in hello2 example trunk and branch files.

Comment by Kim Haase [ 03/Jul/13 05:08 PM ]

jsf-intro.fm: fixed bad line breaks.

jsf-facelets.fm: fixed bad line breaks in Frame file as well as in guessnumber-jsf and reservation example files (trunk and branch).

Comment by Kim Haase [ 03/Jul/13 05:45 PM ]

jsf-el.fm: Fixed duplicated item (and bad line break) in Table 9-2.

jsf-page.fm: Fixed bad line breaks, and some table formatting as well.

Comment by Kim Haase [ 03/Jul/13 07:11 PM ]

jsf-develop.fm: Fixed bad line break, table formatting.

jsf-custom.fm: Fixed bad line breaks. Experimented with specifying "wide" as role for informal example. Fixed jsf-config.xml to reduce line lengths.

Comment by Kim Haase [ 03/Jul/13 07:42 PM ]

jsf-configure.fm: Fixed bad line breaks.

Comment by Kim Haase [ 03/Jul/13 08:43 PM ]

jms-concepts.fm, jms-examples.fm: fixed bad line breaks (also in producer, shareddurablesubscribererexample, websimplemessage examples).

Comment by Kim Haase [ 09/Aug/13 08:35 PM ]

Now that the font for code examples is smaller, we can probably go back to having lines that are as long as the FrameMaker source will allow.

Comment by rcervera [ 09/Aug/13 08:46 PM ]

Kim, should we close this issue then?

Comment by Kim Haase [ 09/Aug/13 09:17 PM ]

Hm! Yes, maybe that's the best choice. We'd have to retitle it to something like "Code lines should fit on a FrameMaker line", which seems like a no-brainer.

It is unfortunate that our nightly RSB builds don't use the new stylesheets, so we can't test our fixes. I wonder if they could be changed to use them?

Comment by Kim Haase [ 21/Aug/13 07:47 PM ]

Now that the nightly builds use the new stylesheets, maybe you could close this issue as "Works as Designed", Ricardo? That seems to be closest to the actual situation. I have reverted my "fixes".

Comment by rcervera [ 21/Aug/13 07:51 PM ]

Works as designed with the new style sheets.





[JAVAEETUTORIAL-175] 17.12.2 Waiting for a Resource - Replace the 'Resource' type in this example as it may get confused with @Resource Created: 06/Jun/13  Updated: 11/Jun/13  Resolved: 11/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Improvement Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: rcervera

 Description   

This sections shows how to use asynchronous processing in Servlet using the access to some resource as an example. The type of the resource should be changed from 'Resource' to 'MyResource' or similar to avoid confusion with @Resource.



 Comments   
Comment by rcervera [ 11/Jun/13 11:16 PM ]

Replaced Resource with MyRemoteResource.





Use JDK 7 language features whenever we can (JAVAEETUTORIAL-200)

[JAVAEETUTORIAL-174] Use try-with-resources (possibly other JDK 7 features) where we can Created: 06/Jun/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.3

Type: Sub-task Priority: Minor
Reporter: Kim Haase Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans, jendrock, Kim Haase and rcervera

 Description   

NB provides a hint when it would be useful to wrap code in a try-with-resources block. GreetingServlet.java (in hello2) should implement this fix for the PrintWriter that it uses. Other older examples may need such fixes too.



 Comments   
Comment by jendrock [ 06/Jun/13 10:20 PM ]

Fixed GreetingServlet.java (in web/servlet/hello2), and MoodServlet.java (in web/servlet/mood).

Comment by Ian Evans [ 24/Jun/13 07:44 PM ]

See the following tech note:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html

Comment by rcervera [ 05/Sep/13 04:29 PM ]

Fixed in the connector examples.

Comment by Ian Evans [ 19/Sep/13 10:28 PM ]

I think we've updated the example tree with these language features.





[JAVAEETUTORIAL-173] Augment information on starting app server Created: 06/Jun/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.1

Type: Improvement Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVAEETUTORIAL-199 Add links back to Starting and Stoppi... Sub-task Resolved  
Tags:
Participants: Ian Evans and Kim Haase

 Description   

The section "Starting and Stopping the GlassFish Server" in Chapter 2 currently describes how to start the server from the command line first, then describes starting it from NB.

However, if a user starts the server from the command line but then goes on to use NB for most examples, there can be some awkwardness attaching NB to an already running server.

It would be better to reorganize this section to have a brief intro to the effect that you can start and stop the server using either NB or the command line, and then have two subsections the way we do for running the examples, with the first one on NB and the second on the command line.

Also, the instructions on running the first couple of web examples (at least) should mention as the first step that the server needs to have been started (with an xref to the section). Some writers are already very conscientious about doing that, but I have not been.



 Comments   
Comment by Kim Haase [ 06/Jun/13 08:45 PM ]

Checked in fixes to usingexamples.fm and webapp.fm. Leaving open for additional modifications as needed. Suggestions welcome.

Comment by Ian Evans [ 24/Jun/13 04:36 PM ]

Augmented starting/stopping instructions added in 7.0.1-3. Created subtask for cross-references to this section from example instructions.





[JAVAEETUTORIAL-172] 4 examples in Java EE 7 SDK fail because zero-byte length beans.xml files are not zero bytes long Created: 05/Jun/13  Updated: 24/Jul/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: jendrock Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any


File Attachments: Text File ErrorsInServerLog.txt    
Tags:
Participants: Ian Evans, jendrock and Kim Haase

 Description   

Four beans.xml files that should be zero bytes long were inadvertently modified to 1 KB (contain 2 empty lines) during the bundling process. This causes the examples that contain these files to fail. The four files are:

1. glassfish4/docs/javaee-tutorial/examples/concurrency/jobs/src/main/webapp/WEB-INF/beans.xml
2. glassfish4/docs/javaee-tutorial/examples/web/jsonp/jsonpmodel/src/main/webapp/WEB-INF/beans.xml
3. glassfish4/docs/javaee-tutorial/examples/web/jsonp/jsonpstreaming/src/main/webapp/WEB-INF/beans.xml
4. glassfish4/docs/javaee-tutorial/examples/web/jsf/checkout-module/src/main/webapp/WEB-INF/beans.xml

The beans.xml files in the concurrency/jobs, jsonp/jsonpmodel, and jsonp/jsonpstreaming projects can be deleted. The examples will then run as expected.

The beans.xml file in the jsf/checkout-module must be modified in a text editor. Open the file and add the following content, making sure to add an empty line at the end:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd">
</beans>

The jsf/checkout-module should now run as expected.



 Comments   
Comment by jendrock [ 05/Jun/13 11:14 PM ]

The workaround is to follow the instructions in the description, deleting the beans.xml files in the concurrency/jobs, jsonp/jsonpmodel, and jsonp/jsonpstreaming projects and editing the beans.xml file in the jsf/checkout-module project to add this content followed by a blank line:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd">
</beans>

Then, if you following the instructions in the documentation (bundled or online), all four examples should run with Maven/Cargo on the command line or with NetBeans IDE 7.3.1.

These issues will be fixed in the next tutorial update.

Comment by Ian Evans [ 05/Jun/13 11:56 PM ]

Eric, could you post the Weld error when you deploy with the 1 byte beans.xml descriptor? I'm sure some people will search for the error string.

It's also possible that we should file a bug against Weld. An empty file is an empty file, whether there is one carriage return or CF/LF.

Comment by jendrock [ 06/Jun/13 03:17 PM ]

The following message is displayed when you build the examples with the malformed beans.xml files. (This message is what was seen when the concurrency/jobs example was built.)

[INFO] — cargo-maven2-plugin:1.4.2:redeploy (deploy) @ jobs —
[INFO] [DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:car
go-core-container-glassfish:jar:1.4.2 for container glassfish4x
[INFO] [talledLocalContainer] Command deploy failed.
[INFO] [talledLocalContainer] remote failure: Error occurred during deployment:
Exception while loading the app : WELD-001202 Error parsing file:/C:/glassfish4/
glassfish/domains/domain1/applications/jobs/WEB-INF/beans.xml. Please see server
.log for more details.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

The ErrorsInServerLog.txt attachment provides the more detailed WELD error from the server.log file.

Comment by Ian Evans [ 24/Jun/13 04:35 PM ]

Fixed in 7.0.1-3 update.

Comment by Kim Haase [ 24/Jul/13 05:47 PM ]

The checkout-module example works if I use a CDI 1.0 beans.xml file (java.sun.com namespace) – it runs with no errors or warnings.





[JAVAEETUTORIAL-171] Add info on JMS resource-definition annotations and use in some examples Created: 05/Jun/13  Updated: 19/Jul/13  Resolved: 19/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

Nigel Deakin (JMS spec lead) pointed out that Java EE 7 supports two new annotations that need to be documented. These allow resources to be configured by the developer rather than the administrator. They should also be used in some of the JMS examples.

Examples:

@JMSDestinationDefinition(
name = "java:global/jms/tutorialQueue",
description = "Queue to use in tutorial",
interfaceName = "javax.jms.Queue"
destinationName = "MyQueueForTutorial"
)

@JMSConnectionFactoryDefinition(
name="java:global/jms/tutorialConnectionFactory",
description="ConnectionFactory to use in tutorial"
)



 Comments   
Comment by Kim Haase [ 12/Jul/13 07:01 PM ]

After some experimentation (the namespace seems to be java:app rather than java:global), I was able to use @JMSDestinationDefinition in two examples and to describe the annotation feature in the tutorial.

Comment by Kim Haase [ 12/Jul/13 07:06 PM ]

Committed doc and example fixes.

Comment by Kim Haase [ 17/Jul/13 04:14 PM ]

There's still more work to do, based on comments from Nigel on the fixed examples.

Comment by Kim Haase [ 19/Jul/13 01:37 PM ]

Committed fixes for both docs and examples.





[JAVAEETUTORIAL-170] Many links to Java EE 6 API and VDL docs within the Tutorial Created: 05/Jun/13  Updated: 01/Jul/13  Resolved: 01/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: jendrock
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans, jendrock and Kim Haase

 Description   

The following files have links to the EE 6 API/VDL docs:
ejb-basicexamples004.htm
jaxrs002.htm
jaxrs003.htm
jsf-page-core004.htm



 Comments   
Comment by Ian Evans [ 05/Jun/13 06:50 PM ]

Fixed in EJB and JAX-RS chapters.

Comment by Ian Evans [ 05/Jun/13 06:50 PM ]

Reassigning to Kim for JSF fix.

Comment by Kim Haase [ 05/Jun/13 08:33 PM ]

Fixed in JSF chapter.

Comment by Kim Haase [ 05/Jun/13 09:23 PM ]

Ian, did you commit the EJB and JAX-RS chapters? They don't come in when I update.

Comment by Ian Evans [ 05/Jun/13 09:41 PM ]

Source files checked in.

Comment by jendrock [ 01/Jul/13 09:16 PM ]

Update Java SE 6 API doc URLs in webi18n001.htm to Java SE 7 locations.

Comment by jendrock [ 01/Jul/13 09:33 PM ]

Updated Java SE 6 API doc links in webi18n001.htm to Java SE 7 URLs.





[JAVAEETUTORIAL-169] Code copied and pasted into Frame does not show line breaks in the HTML output Created: 05/Jun/13  Updated: 05/Jun/13  Resolved: 05/Jun/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: rcervera Assignee: rcervera
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans, Kim Haase and rcervera

 Description   

When you sometimes paste code from an editor into Frame, it looks good in the Frame view and the PDF, but the line breaks are not really new lines, and they do not show up correctly on the HTML output.

We have to ensure that each line in the example has its own ProgramListing structure element.

Examples of affected files:

servlets015.htm
websocket011.htm
batch-processing008.htm



 Comments   
Comment by rcervera [ 05/Jun/13 06:04 PM ]

Fixed in the doc sources.

Comment by Ian Evans [ 05/Jun/13 06:41 PM ]

Which code editor did you paste in from? I've pasted from NetBeans, TextPad, and emacs with no apparent problems.

Comment by rcervera [ 05/Jun/13 06:47 PM ]

I always pasted from NetBeans, and it worked fine 95% of the time. There were a few cases where it did not work properly. The line break characters appear on FrameMaker but several lines where grouped together in the same ProgramListing.

Comment by Kim Haase [ 05/Jun/13 07:21 PM ]

Ricardo's right. You have to be really, really careful how you paste from NB. I think pasting into a new, empty programlisting element works okay, but trying to overwrite existing code can produce strange results. You really have to look not only at the Frame page (where the newlines look fine) but also at the structure to make sure the new code isn't all in one programlisting element.





[JAVAEETUTORIAL-168] Revise 3 advanced JMS examples to use multiple app clients instead of a single multithreaded one Created: 05/Jun/13  Updated: 11/Jul/13  Resolved: 11/Jul/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Type: Task Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

The durable subscription, acknowledgement mode, and local transactions examples use a single multithreaded program to demonstrate the associated features. The JMS spec lead suggests in his review that these will be easier for users to understand if the various classes are broken into separate source files and run separately. The fix should go into the July or September update depending on how difficult it is to do.



 Comments   
Comment by Kim Haase [ 11/Jul/13 04:32 PM ]

Fixed in code and chapters.





[JAVAEETUTORIAL-167] Modify JPA examples to use java:comp/DefaultDataSource instead of jdbc/__default Created: 03/Jun/13  Updated: 03/Jun/13  Resolved: 03/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans

 Description   

From Java EE 7 Platform Spec section EE.5.19:

The Java EE Product Provider must make the default data source accessible to the application under the JNDI name java:comp/DefaultDataSource.

jdbc/__default is not portable.



 Comments   
Comment by Ian Evans [ 03/Jun/13 10:26 PM ]

Fixed in source. Will be available in 7.0.1.





[JAVAEETUTORIAL-166] Misaligned text in the Creating Facelets Views section Created: 27/May/13  Updated: 28/May/13  Resolved: 28/May/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Trivial
Reporter: Michael Dobrovolsky Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and Michael Dobrovolsky

 Description   

Misaligned text in the Creating Facelets Views section. After the words The next section uses various tags to insert components into the web page: the alignment of opening and closing <head> tags is different:

<h:head>
    ...       
    </h:head>


 Comments   
Comment by Kim Haase [ 28/May/13 02:07 PM ]

Will be fixed in the Java EE 7 tutorial.





[JAVAEETUTORIAL-165] Broken link to Mojarra Release Notes Created: 27/May/13  Updated: 28/May/13  Resolved: 28/May/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Minor
Reporter: Michael Dobrovolsky Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and Michael Dobrovolsky

 Description   

Broken link to Mojarra Release Notes in the section Further Information about JavaServer Faces Technology. Should be https://javaserverfaces.java.net/2.1/releasenotes.html instead of http://javaserverfaces.java.net/nonav/rlnotes/2.1.4/.



 Comments   
Comment by Kim Haase [ 28/May/13 02:03 PM ]

We are removing links to this volatile location from the Java EE 7 tutorial.





[JAVAEETUTORIAL-164] Broken link to the terms of the License for tutorial examples source files Created: 27/May/13  Updated: 28/May/13  Resolved: 28/May/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Minor
Reporter: Michael Dobrovolsky Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and Michael Dobrovolsky

 Description   

Comment sections of tutorial source files point to the terms of the License at: http://developers.sun.com/license/berkeley_license.html but this link redirects to http://www.oracle.com/technetwork/java/index.html.



 Comments   
Comment by Kim Haase [ 28/May/13 06:10 PM ]

The link in the Java EE 7 tutorial examples goes to http://java.net/projects/javaeetutorial/pages/BerkeleyLicense.





[JAVAEETUTORIAL-163] Different location of the Reload Enabled check box in GlassFish Server 3.1.2.2 Created: 27/May/13  Updated: 28/May/13  Resolved: 28/May/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Minor
Reporter: Michael Dobrovolsky Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish Server Open Source Edition 3.1.2.2 (build 5)


Tags:
Participants: Kim Haase and Michael Dobrovolsky

 Description   

In the recent version of GlassFish Server (3.1.2.2) the Reload Enabled check box is located not in the Advanced tab of the GlassFish Server node as described in the section To Disable or Modify Dynamic Reloading but in the Applications Configuration tab of the Domain node instead.



 Comments   
Comment by Kim Haase [ 28/May/13 02:05 PM ]

The Java EE 7 tutorial will not provide instructions on disabling dynamic reloading, since this is an advanced task.





[JAVAEETUTORIAL-162] Typo (Java SE instead of JAVA EE) Created: 23/May/13  Updated: 23/May/13  Resolved: 23/May/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Michael Dobrovolsky Assignee: Ian Evans
Resolution: Invalid Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and Michael Dobrovolsky

 Description   

Typo in Java Database Connectivity API section. Should be: The Java EE 6 platform requires JDBC 4.0. Instead of: The Java SE 6 platform requires JDBC 4.0.



 Comments   
Comment by Ian Evans [ 23/May/13 05:39 PM ]

"Java SE" is actually correct here. Starting with Java SE 1.4.2, JDBC is a required technology for Java Platform, Standard Edition. Java SE 6 requires JDBC 4.0, as described in Section 2 ("Component JSRs") of JSR 270, the specification for Java SE 6.
http://jcp.org/aboutJava/communityprocess/final/jsr270/index.html

Java EE 6 requires Java SE 6 or higher. JSR 316 is the specification for Java SE 6, and has this to say about JDBC in section EE.2.7.6:
"The JDBC API is included in Java SE, but this specification includes additional requirements on JDBC device drivers."

The JDBC API itself, though, is provided by Java SE. You could say that Java EE 6 indirectly requires JDBC 4.0 through its dependency on Java SE 6. I'll rewrite this sentence for the Java EE 7 Tutorial to make it more clear.





[JAVAEETUTORIAL-161] Fixes needed to section on CDI and resource adapters Created: 30/Apr/13  Updated: 30/Apr/13  Resolved: 30/Apr/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Major
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

We received the following request. In fact we had documented that you could not use a resource adapter as a managed bean, but the statement was not very clear. This will be fixed in the EE 7 tutorial.

-------- Original Message --------
Subject: Re: Injecting RA into a servlet?
Date: Thu, 25 Apr 2013 23:03:21 +0530
From: Sivakumar Thyagarajan <sivakumar.thyagarajan@oracle.com>
To: marina.vatkina@oracle.com
CC: RAMU,JAGADISH <jagadish.ramu@oracle.com>

Hi Marina

On Thursday 25 April 2013 06:25 AM, Marina Vatkina wrote:
> Siva, Jagadish,
>
> According to the Java EE Tutorial
> (http://docs.oracle.com/javaee/6/tutorial/doc/gmgjb.html) you can inject
> a RA. Are there a place to read more about it? Which API can be called
> on the injected ref? Are there any devtests that I can look at?

This appears to be an error. I will report this to the docs team to have
this fixed. Thanks for pointing this section to us.

In EE 6 the behaviour was undefined though the presence of a beans.xml
in rar would make the RAR a bean archive.

Section 21.5 in [1] now describes the new DI related requirements we
brought in the Connectors MR in EE 7. It is not recommended now to use
the ResourceAdapter class as a Bean as it is not portably supported.

Thanks
--Siva.
[1]
https://java.net/projects/connector-spec/downloads/download/connector-1_7-spec-with-change-bars-20130315-2.pdf.zip






[JAVAEETUTORIAL-160] resource adapter example issues Created: 05/Apr/13  Updated: 11/Apr/13  Resolved: 11/Apr/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Bug Priority: Major
Reporter: treaz Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 home edition x64


Tags:
Participants: Kim Haase and treaz

 Description   

Currently it doesn't say in the pdf tutorial what version it is (I didn't know what version to choose from the affected version dropdown... bug?). I'm usingthe January 2013 version.
I'm having a problem when building the connector:

Compiling 22 source files to C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\connectors\mailconnector\mailconnector-ra\build\classes
javac: invalid flag: -endorseddirs C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\bp-project/../../../../../glassfish/modules/endorsed
Usage: javac <options> <source files>
use -help for a list of possible options
C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\connectors\mailconnector\mailconnector-ra\nbproject\nbjdk.xml:8: The following error occurred while executing this line:
C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\bp-project\command-line-ant-tasks.xml:114: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)



 Comments   
Comment by Kim Haase [ 05/Apr/13 08:06 PM ]

January 2013 is sufficient information, thanks. The version is normally the version you installed from the Update Center; if you open that and check Installed Components, the version should be 6.0.8-1.

What is the output of the "java -version" command?

What was the output of "ant all" before the line you started with?

You have the Java EE 6 SDK installed in a nondefault location – normally the installation wizard installs it in C:\glassfish3, not in Program Files. The java command sometimes has problems with spaces in the path.

Comment by treaz [ 05/Apr/13 09:54 PM ]

Hello Kim,

I've checked and it is 6.0.8-1

java - v

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

I'm sorry I didn't upload a log file, but I can't see a way to do that.
https://gist.github.com/anonymous/5322945

I'm sure it's a problem with the space since removing the line with ${glassfish.endorsed.option} from command-line-ant-tasks.xml allowed the build to complete. However, after removing it the deploy did not create some resources in the glassfish server so I think that the line is important

Comment by treaz [ 11/Apr/13 06:33 PM ]

Any news on this? This is also a problem when trying to build the duke-forest example.

Comment by treaz [ 11/Apr/13 06:46 PM ]

Well, I worked around it... just close it.

Comment by Kim Haase [ 11/Apr/13 06:51 PM ]

I looked at the command output you posted on github.

I'm afraid I don't really understand why you issued the following command:

ant -f "C:
Program Files\\glassfish-3.1.2.2\\glassfish\\docs\\javaee-tutorial\\examples\\connectors\\mailconnector\\mailconnector-ra\\nbproject
nbjdk.xml" assemble_rar

We do not supply an nbjdk.xml file as part of the mailconnector-ra project. The instructions in the Tutorial simply say to go to mailconnector-ear and type "ant all" using the supplied build.xml file. If you do that and the commands fail, please let us know; feel free to copy the command output into a comment.





[JAVAEETUTORIAL-159] ajaxguessnumber: possible solutions without js-hack Created: 28/Feb/13  Updated: 24/Jun/13  Resolved: 24/Jun/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: 7.0.2

Type: Improvement Priority: Minor
Reporter: swiss-chris Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: 30 minutes
Time Spent: Not Specified
Original Estimate: 30 minutes

Tags: tutorial scope validation jsf2 render rendered
Participants: Ian Evans and swiss-chris

 Description   

When reading the chapter on the ajaxguessnumber example app and analysing the code, I was surprised at the choice of writing a custom js-function "msg" to get rid of the stale result. Certainly, this allows the demonstration of the h:commandButton's onevent attribute, but:

  • it doesn't seem like a clean solution to me (it doesn't seem very refactoring-friendly because of the 2 getElementById("hard-coded HTML element ID") calls),
  • it doesn't explain the inclusion of the commented-out code <f:ajax execute="userNo" render="result errors1" /> within the code AND the tutorial chapter.

It looks more like a quick fix by one person (developer) that was later commented on by another person (who wrote the tutorial chapter).

If one were to want to rewrite the code as it was perhaps originally intended (as is perhaps still visible in the commented-out code aforementioned), I could think of the following two possibilities:

  1. Only render the outputText if there was no validation error.
  2. Change the scope of the ManagedBean from @SessionScoped to @RequestScoped


The first solution would look something like the following. For it to work with Ajax, the outputText would need to be wrapped in a container such as h:panelGroup and the f:ajax render attribute would need to refer to the panel's ID ("outputGrid"):

ajaxgreeting.xhtml
<h:commandButton id="submit" value="Submit" >
    <f:ajax execute="userNo" render="outputGrid" />
</h:commandButton>
<h:panelGroup layout="block" id="outputGroup">
    <h:outputText id="result" style="color:blue"
                  value="#{userNumberBean.response}" rendered="#{!facesContext.validationFailed}"/>
    <h:message id="errors1" showSummary="true" showDetail="false"
               style="color: #d20005;
               font-family: 'New Century Schoolbook', serif;
               font-style: oblique;
               text-decoration: overline" 
               for="userNo"/>
</h:panelGroup>

The second solution changes the design altogether. I'm not sure why you would want @SessionScoped for this example in the first place. @RequestScoped seems more appropriate and solves the problem of hiding the "stale output" of the "result" outputText element.



 Comments   
Comment by swiss-chris [ 28/Feb/13 10:50 PM ]

After posting my original proposals, I realized that simply changing the scope from @SessionScoped @RequestScoped wouldn't suffice. While the userNumber could be @RequestScoped, the randomInt needs to be @SessionScoped for the guessing game to give the user a second chance.

Off hand all I can think of to make this work as I had intended is to create a second dukesNumberBean, also a managed bean that contains the randomInt as well as the minimum and maximum values. I used @ManagedProperty(value="#{dukesNumberBean}") to inject it into userNumberBean

by the way, the value 10 was hardcoded into the userNumberBean constructor. Alternatively, randomInt could be created the following way:

long range = maximum-minimum+1;
randomInt = (int)(minimum + randomGR.nextDouble()*range);
Comment by Ian Evans [ 24/Jun/13 07:24 PM ]

UserNumberBean was changed to request-scoped, and a new session-scoped backing bean, DukesNumberBean, was added. A new panel group was added to display the results or the validation error. These changes eliminate the need for the separate ui.js Javascript file, as stale data should not be a problem.

These changes probably better reflect how we want users to use the f:ajax tag, but we no longer have an example that uses onevent or shows how to add custom Javascript. Perhaps we need an advanced example?

Comment by Ian Evans [ 24/Jun/13 07:25 PM ]

Fixed in source and rewrote doc source. The fixes will appear in the next Tutorial update.





[JAVAEETUTORIAL-158] dukesbookstore: Error in Messages_de.properties CartItemCount value Created: 27/Feb/13  Updated: 27/Feb/13  Resolved: 27/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: 7.0.1

Type: Bug Priority: Minor
Reporter: swiss-chris Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Tags: properties
Participants: Kim Haase and swiss-chris

 Description   

Messages_de.properties contains the following line:

CartItemCount=Ihr Einkaufswagen enthält {0,choice,0#Ihr Einkaufswagen enthält keine Artikel|1#Ihr Einkaufswagen enthält einen Artikel|1< Ihr Einkaufswagen enthält {0} Artikel}.

Output for a cart with exactly one element: "Ihr Einkaufswagen enthält Ihr Einkaufswagen enthält einen Artikel."

Proposed correction:

CartItemCount=Ihr Einkaufswagen enthält {0,choice,0#keine Artikel|1#einen Artikel|1<{0} Artikel}.

Output for a cart with exactly one element: "Ihr Einkaufswagen enthält einen Artikel." (Correct also for 0 or 1< elements in cart).

p.s. I speak, read and write German perfectly (but I believe the correctness of my proposal can be deduced merely from understanding the Java MessageFormat syntax).



 Comments   
Comment by Kim Haase [ 27/Feb/13 06:37 PM ]

Thanks very much for catching this. If you find any more errors in those messages, please let us know.

Committed to EE 6 branch at revision 1182.

Committed to trunk at revision 1183.





[JAVAEETUTORIAL-157] DukesAgeResource Example Application HTTP Status 404 - The requested resource () is not available. Created: 23/Feb/13  Updated: 25/Feb/13  Resolved: 25/Feb/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Gekut Assignee: Ian Evans
Resolution: Duplicate Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

NetBeans IDE 7.2.1


Issue Links:
Duplicate
duplicates FIRSTCUP-9 JAX-RS runtime mapping in NetBeans 7.... Resolved
Tags:
Participants: Gekut and Ian Evans

 Description   

If to run the sample, it produces the error 'The requested resource () is not available' in a web browser. It happens because NetBeans generates ApplicationConfig.java file in which overrides the ApplicationPath and sets it to "webresources". Thus, to configure the example properly the Project Properties -> Run -> Relative URL must be set to /weresources/dukesAge.



 Comments   
Comment by Ian Evans [ 25/Feb/13 05:42 PM ]

Duplicate, and should be logged against First Cup.





[JAVAEETUTORIAL-156] guessnumber example: confusing URLs Created: 22/Feb/13  Updated: 28/Mar/13  Resolved: 28/Mar/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: swiss-chris Assignee: Unassigned
Resolution: Works as designed Votes: 0
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Tags: url
Participants: Kim Haase and swiss-chris

 Description   

The guessnumber example (http://docs.oracle.com/javaee/6/tutorial/doc/gipob.html) displays http://localhost:8080/guessnumber/faces/greeting.xhtml in the address bar of my browser when I'm on the response.xhtml page and http://localhost:8080/guessnumber/faces/response.xhtml when I go "Back" to the greeting.xhtml page.

I don't know all the possible ways of correcting this, but one that works for me is changing action="greeting" to action="greeting?faces-redirect=true" in the response.xhtml File.



 Comments   
Comment by swiss-chris [ 27/Feb/13 09:21 AM ]

The same happens in the bookmarks/ application.

Comment by Kim Haase [ 28/Mar/13 02:01 PM ]

The fact that a displayed URL always lags behind the displayed page is a result of the fact that Facelets uses POST rather than GET. If you force a redirect, this causes more server resources to be used and, in complex applications, may lead to erroneous results.





[JAVAEETUTORIAL-155] wrong link to taglib in tutorial example Created: 16/Feb/13  Updated: 18/Feb/13  Resolved: 18/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Bug Priority: Trivial
Reporter: treaz Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase and treaz

 Description   

In the Java EE6 tutorial, in the chapter about "Composite Components" this example is presented:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:em="http://java.sun.com/jsf/composite/emcomp/">

<h:head>
<title>Using a sample composite component</title>
</h:head>

<body>
<h:form>
<em:email value="Enter your email id" />
</h:form>
</body>
</html>

The trailing "/" needs to be remove from the line: xmlns:em="http://java.sun.com/jsf/composite/emcomp/



 Comments   
Comment by Kim Haase [ 18/Feb/13 03:25 PM ]

Thank you for bringing this error to our attention. It will be fixed in the next release.

Comment by Kim Haase [ 18/Feb/13 03:32 PM ]

Fixed in source.





[JAVAEETUTORIAL-154] unecessary "while(!mailStatus.isDone())" Created: 15/Feb/13  Updated: 19/Feb/13  Resolved: 19/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: 7.0.0

Type: Improvement Priority: Minor
Reporter: swiss-chris Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Tags:
Participants: Ian Evans and swiss-chris

 Description   

In the async EJB example (doc: http://docs.oracle.com/javaee/6/tutorial/doc/gkiez.html) the async.web.MailerManagedBean's send() method contains the following code:

while (!mailStatus.isDone()) {       // line x+1
    this.setStatus("Processing..."); // line x+2
}                                    // line x+3

This seems problematic to me on various levels.

  1. We are unnecessarily setting the status to "Processing..." numerous times.
  2. We are unnecessarily occupying the processor until mailStatus.isDone().
  3. Immediately after this code, we call mailStatus.get(), which has the same effect as the while-loop (here too we wait for mailStatus.isDone())


My proposal would be to delete the first and last line from the three lines of code pasted above, leaving only the middle line (which never produces any visible result, by the way):

this.setStatus("Processing..."); // line x+2

---------

Furthermore, in my local code I reworked the example a bit,

  • using @ManagedBean @SessionScoped instead of @Named @RequestScoped.
  • making Future<String> mailStatus a class member instead of a local variable.
  • removing the try-catch block containing this.setStatus(mailStatus.get() out of the send() method and into the getStatus() method, protected by an additional if (mailStatus.isDone()) check.
  • changing the response value of the send() method from "response" to "response?faces-redirect=true"

This allows me to actually see the "Processing..." status in the browser as well as to refresh the page manually until the status changes. Personally, I find this gives me more of a feeling for the asynchronous nature of the code underneath, rather than experiencing a simple long-running synchronous response in the browser.



 Comments   
Comment by swiss-chris [ 15/Feb/13 05:40 PM ]

I ran a quick test with the while-loop, counting the number of times it ran: 2,561,715,398 times !

Comment by Ian Evans [ 18/Feb/13 09:09 PM ]

If you email me a ZIP containing your code changes, I'll integrate them into the trunk for Java EE 7.0.
ian period evans at oracle period com

Comment by swiss-chris [ 18/Feb/13 09:32 PM ]

Great! I'll send you the ZIP tomorrow. Thanks.

Comment by Ian Evans [ 19/Feb/13 08:48 PM ]

I merged in Chris's changes. I kept MailerManagedBean as a CDI bean, but changed the scope to SessionScoped.





[JAVAEETUTORIAL-153] Incomplete/incorrect ANT example and explanation. Created: 14/Feb/13  Updated: 16/Jul/13  Resolved: 16/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: swiss-chris Assignee: Ian Evans
Resolution: Won't Fix Votes: 0
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Tags:
Participants: Ian Evans and swiss-chris

 Description   

In the EJB Tutorial "cart" project, we find the following passage:

------------------

3. Type the following command:
ant deploy
The cart.ear file is deployed to the GlassFish Server.

4. Type the following command:
ant run
This task retrieves the application client JAR, cartClient.jar, and runs the application client. The client JAR, cartClient.jar, contains the application client class, the helper class BookException, and the Cart business interface.

This task is equivalent to running the following command:

appclient -client cartClient.jar
When you run the client, the application client container injects any component references declared in the application client class, in this case the reference to the Cart enterprise bean.

------------------

There are two errors in the above text, afaik:
1. The text states that: "[the 'ant run'] task is equivalent to running [...] appclient -client cartClient.jar". This is not true. Running
'appclient -client cartClient.jar'
does not "retrieve the application client JAR, cartClient.jar,", hence the output will be "Error: Unable to access jarfile appClient.jar"
2. Even if the user knew to run 'ant client-jar' before the appclient task, the appclient task would need to be
'appclient -client client-jar\appClient.jar'
if the user doesn't cd into the client-jar directory beforehand.

My suggestion would be the following. Modify the text to read:
"This task is equivalent to running the following command:
ant client-jar
appclient -client client-jar\cartClient.jar"

This will help the user understand what's going on in the background, which was the main point missing for me in this tutorial in the first place. After following through on the cart exercise, my main question was: "How does the client-app know where to find the remote EJB on the glassfish server Unable to render embedded object: File (" Providing the 'ant client-jar' task and maybe explaining what's happening in the background (asadmin ...) would be a great help for anyone interested in how the remote EJB binding works in this example) not found. Hence my improvement suggestion to add this to the next revision of the tutorial.



 Comments   
Comment by Ian Evans [ 14/Feb/13 05:55 PM ]

The text could be clearer about exactly which steps ant run performs.

This issue affect the Java EE 6 Tutorial. At this point, we don't have any planned updates for the EE 6 Tutorial, and we have moved to Maven for Java EE 7.

If we have another EE 6 release, this issue should be fixed in the documentation source.

Comment by Ian Evans [ 16/Jul/13 10:24 PM ]

With no planned releases of the Java EE 6 Tutorial planned, and the Java EE 7 Tutorial released (which uses Maven), I'm closing this out.





[JAVAEETUTORIAL-152] 6000 milliseconds are 6 seconds, not 1 minute. Created: 14/Feb/13  Updated: 14/Feb/13  Resolved: 14/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: swiss-chris Assignee: Ian Evans
Resolution: Fixed Votes: 0
Remaining Estimate: 1 minute
Time Spent: Not Specified
Original Estimate: 1 minute

Tags:
Participants: Ian Evans and swiss-chris

 Description   

Hello

In the Java EE Tutorial EJB Chapter on Timers, we find the following text:

-----------

The following code sets a programmatic timer that will expire in 1 minute (6,000 milliseconds):

long duration = 6000;
Timer timer =
timerService.createSingleActionTimer(duration, new TimerConfig());

-----------

I believe 6000 milliseconds is 6 seconds, not 60 seconds.



 Comments   
Comment by Ian Evans [ 14/Feb/13 05:51 PM ]

Updated source file. Fix will appear in the EE 7 Tutorial.





[JAVAEETUTORIAL-151] Typo in "Declaring Resource References" in Chapter 3 Created: 13/Feb/13  Updated: 13/Feb/13  Resolved: 13/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: 7.0.0

Type: Bug Priority: Minor
Reporter: Kim Haase Assignee: Kim Haase
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Kim Haase

 Description   

Considering a Jira issue would be overkill, I hereby inform you that a typo exists in:

  • the Java EE 6 Tutorial at
    http://docs.oracle.com/javaee/6/tutorial/doc/bnaeo.html
  • under the heading "Declaring a Reference to a Resource"
  • in the listing:
    @Resources ({ @Resource (name="myDB" type=java.sql.DataSource), @Resource(name="myMQ" type=javax.jms.ConnectionFactory) })

line 2 says:
... type=java.sql.DataSource

should be
... type=javax.sql.DataSource



 Comments   
Comment by Kim Haase [ 13/Feb/13 08:41 PM ]

Fixed in source.





[JAVAEETUTORIAL-150] Validation messages must get moved from dukes-resources to the default package of the main project Created: 05/Feb/13  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: 7.0.2

Type: Bug Priority: Minor
Reporter: jendrock Assignee: William Markito
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: jendrock and William Markito

 Description   

The validation messages (Spanish and English-language bundles) need to be moved from dukes-resources/src/java to the default package of the main project. The validation messages cannot be found when they are in the dukes-resources project.



 Comments   
Comment by jendrock [ 05/Feb/13 08:18 PM ]

This issue needs to be fixed when we update the tutorial case studies to EE 7. That won't happen until 7.0.2.

Comment by jendrock [ 05/Feb/13 08:27 PM ]

This issue is present in 6.0.8. We are not planning to release the case studies with 7.0.0 or 7.0.1, so we will defer fixing the issue until 7.0.2. The docs are not impacted, the source is.

Comment by William Markito [ 21/Feb/13 02:23 PM ]

Fixed by revision http://java.net/projects/javaeetutorial/sources/svn/revision/1179





[JAVAEETUTORIAL-149] I deployed web service but ESI did not created Created: 31/Jan/13  Updated: 06/Feb/13  Resolved: 06/Feb/13

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: None