<< Back to previous view

[UPDATECENTER2-2172] Update Tool changes empty files in package, breaks example code Created: 03/Jan/11  Updated: 03/Jan/11

Status: Open
Project: updatecenter2
Component/s: updatetool
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Ian Evans Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP
Update Tool 2.3.2 in Java EE SDK 6u2 b33


Tags:
Participants: Ian Evans

 Description   

The Java EE 6 Tutorial is installed as an IPS package as part of the Java EE 6 SDK using Update Tool 2.3.2. We've recently had reports of some of our examples breaking with the following exception:
Caused by: org.jboss.weld.xml.WeldXmlException: WELD-001202 Error parsing org.xml.sax.SAXParseException: Premature end of file.
at org.jboss.weld.xml.BeansXmlParser.getDocument(BeansXmlParser.java:103)
at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:85)
at org.jboss.weld.bootstrap.BeanDeployment.parseBeansXml(BeanDeployment.java:107)
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:85)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:204)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:181)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:302)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:162)
... 30 more

We traced the problem back to how Update Tool installs empty files in the Tutorial package.

These examples use CDI, which requires an empty file named beans.xml packaged as part of the example. In our Subversion workspace, this is a 0 byte file. When it is installed as part of the IPS package, however, it is a 1 byte file, and causes the "Premature end of file" error above when the example is deployed.






[SAILFIN-2079] NetBeans NBM fails to install - windows Created: 25/Jan/10  Updated: 26/Jan/10

Status: Open
Project: sailfin
Component/s: Tools
Affects Version/s: 2.0
Fix Version/s: milestone 1

Type: Bug Priority: Minor
Reporter: tomf Assignee: vince kraemer
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: PC


File Attachments: Text File messages.log    
Issuezilla Id: 2,079
Tags:
Participants: Ian Evans, tomf and vince kraemer

 Description   

brand new Windows 2008, 64bit (issue tracker does not provide this entry)

  • jdk 1.6.0_18 (32bit)
  • Netbeans 6.8 freshly downloaded
  • Sailfin 2.0 patch 2 pre-release (17-jan) for windows (32 bit) from milestone.india

took all the NBM files.... and ended up with a dialog box:

SIP Projects plugin failing to install
"org.netbeans.modules.editor.deprecated.pre61completion/0 was needed and not found



 Comments   
Comment by vince kraemer [ 25/Jan/10 08:24 AM ]

Windows 2008 is not listed as a supported NB 6.8 host platform.

I will keep digging into this, but since I do not have direct access to a Windows 2008 system, it will go
pretty slow.

Do you see this issue when you run NB on a supported platform? See
http://netbeans.org/community/releases/68/relnotes.html for details.

Comment by Ian Evans [ 25/Jan/10 12:16 PM ]

Created an attachment (id=1192)
Log file for my 6.8 install w/ SailFin 2.0 plugins

Comment by Ian Evans [ 25/Jan/10 12:17 PM ]

I have this problem with a supported platform:
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\ian\.netbeans\6.8

Comment by vince kraemer [ 26/Jan/10 09:14 AM ]

This is interesting...

In issue 2080, there are problems with the SIP app dev support modules AFTER they appear to install
successfully into NB 6.8 on Mac OS X.

You would think that the nbms would fail in a consistent way between the two platforms.

Hmm. It seems like the bits for Windows are getting built without the changes for issue 1723, while
the Mac OS bits are getting built with the fix included...

Need to investigate a bit more.

Comment by vince kraemer [ 26/Jan/10 10:35 AM ]

I think this is the bits that tomf had trouble with...

http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/VerifyItem-Start/sgcs-2_0-windows.exe?BundledLineItemUUID=kGhIBe.mZGoAAAEmL70B32vi&OrderID=d.JIBe.mbSgAAAEmDr0B32vi&ProductID=PIVIBe.pOpEAAAEkIHMuAn1n&FileName=/sgcs-2_0-windows.exe

http://services.netbeans.org/bouncer/index.php?product=netbeans-6.8-ml-java&os=windows

Comment by vince kraemer [ 26/Jan/10 10:55 AM ]

Hmm. The build available from sun.com seems to be fine with NB 6.8...

What is the URL that I can use to download 'Sailfin 2.0 patch 2 pre-release
(17-jan) for windows (32 bit) from milestone.india'





[ROME-74] Propono's AtomHandlerFactory.FALLBACK_IMPL_NAME is set to non-existent class Created: 28/Apr/07  Updated: 13/Aug/07  Resolved: 13/Aug/07

Status: Resolved
Project: rome
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

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

Operating System: All
Platform: All


Issuezilla Id: 74
Tags:
Participants: Ian Evans, rome-issues and snoopdave

 Description   

When trying to run an Atom server with rome-propono, you get the following
exception, thrown from AtomServlet:
javax.servlet.ServletException: PWC1244: Servlet execution threw an exception
root cause
com.sun.syndication.propono.atom.server.FactoryConfigurationError: Provider
com.sun.syndication.propono.atom.server.impl.GenericAtomHandlerFactory not found

It looks like this should FileBasedAtomHandlerFactory. GenericAtomHandlerFactory
was removed.



 Comments   
Comment by snoopdave [ 13/Aug/07 12:55 PM ]

Fixed for Propono 0.6 release





[JERSEY-1503] Update jersey-quickstart-webapp archetype to use preferred Java EE technologies Created: 15/Oct/12  Updated: 04/Nov/13

Status: Open
Project: jersey
Component/s: tools
Affects Version/s: 2.0-m08
Fix Version/s: backlog

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

Tags:
Participants: Ian Evans

 Description   

The 2.0-m8 jersey-quickstart-webapp archetype still includes an index.jsp file (J2EE 1.4) and a Servlet 2.5 web.xml (Java EE 5). JSP hasn't been the preferred display technology for Java EE web applications since J2EE 1.4. The archetype also doesn't include an Application class.

The archetype should:

  • create a Facelets welcome file (XHTML, or preferably HTML5 for Java EE 7)
  • create an Application class annotated with javax.ws.rs.ApplicationPath and extending javax.ws.rs.core.Application
  • shouldn't include a web.xml any longer





[JAX_RS_SPEC-414] Incorrect code sample in section 5.4 Created: 20/Jun/13  Updated: 12/Feb/14

Status: Open
Project: jax-rs-spec
Component/s: spec
Affects Version/s: 2.0
Fix Version/s: ice box

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

Tags:
Participants: Ian Evans

 Description   

In Section 5.4 of the spec, the following code example is shown:

Customer c = client.target("http://examples.org/customers/123")
  .request("application/xml").get(Customer.class);
String newId = client.target("http://examples.org/gold-customers/")
  .request().post(xml(c), String.class);

This won't compile. The xml method within the post method is missing Entity.

Customer c = client.target("http://examples.org/customers/123")
  .request("application/xml").get(Customer.class);
String newId = client.target("http://examples.org/gold-customers/")
  .request().post(Entity.xml(c), String.class);





[JAVASERVERFACES-2163] Converter registered on one component in a panelGrid runs on 3 components in the panelGrid Created: 10/Aug/11  Updated: 26/Jun/12  Resolved: 12/Aug/11

Status: Closed
Project: javaserverfaces
Component/s: None
Affects Version/s: 2.1.1
Fix Version/s: None

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

File Attachments: File bookcashier.xhtml     File bookcashier.xhtml     Java Source File CashierBean.java     Java Source File CreditCardConverter.java     Java Source File CreditCardConverter.java     Zip Archive dukes-bookstore_110811-115040.zip    
Tags:
Participants: Ian Evans, Kim Haase and rogerk

 Description   

The attached facelets file, bookcashier.html, registers a custom converter (CreditCardConverter.java, also attached) on a UIInputText component with the id "ccno". The f:converter tag is inside the f:inputText tag, and it also specifies the id in its for attribute.

<h:inputText id="ccno"
size="19"
converter="#{cashier.creditCardConverter}"
converterMessage="#{bundle.CreditMessage}"
required="true"
requiredMessage="#{bundle.ReqCreditCard}" >
<f:converter for="ccno"
binding="#{cashier.creditCardConverter}"/>
<f:validateRegex
pattern="\d{16}|\d{4} \d{4} \d{4} \d{4}|\d{4}-\d{4}-\d{4}-\d{4}" />
</h:inputText>

However, the converter is run not only on the ccno component, but also on the inputText component with the id "name" as well as on the selectOneMenu component with the id "shippingOption". The logger output from the converter confirms this:

INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is mynamejones
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is 1234123412341234
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is 2

The getAsObject method of the converter strips spaces from strings separated by spaces, or hyphens from strings separated by hyphens, and leaves other strings as is. This means that it strips spaces from names entered in the name field, which is an undesirable side effect (unless the name contains both a space and a hyphen, in which case the method leaves it alone).

This seems to be a bug in the Facelets implementation?

The full application is available in the Java EE Tutorial project at http://java.net/projects/javaeetutorial/sources/svn/show. It is in trunk/examples/web/dukes-bookstore. You can check out the examples.



 Comments   
Comment by rogerk [ 10/Aug/11 09:24 PM ]

In the example you show here you have two converters registered on the inputText component.

Comment by rogerk [ 10/Aug/11 09:24 PM ]

or, I should say you have the same converter registered twice on the inputText component..

Comment by Kim Haase [ 11/Aug/11 02:25 PM ]

Thanks for pointing out the duplicate registrations. Removing either one of them does not change the behavior, however: the conversion still "bleeds" to the name field (and the other one that's only one character).

Is there any reason to use the converter attribute versus f:converter? The behavior seems to be exactly the same for each. They've both been around since 1.2.

Comment by Kim Haase [ 11/Aug/11 04:57 PM ]

I realized that the converter was called through the CashierBean, the managed bean for the page, which instantiated it. It occurred to me that instantiating the converter for the backing bean itself might activate the converter on all the CashierBean properties. So I changed the code to call the converter directly:

<h:inputText id="ccno"
size="19"
converter="#{dukesbookstore.converters.creditCardConverter}"
converterMessage="#{bundle.CreditMessage}"
required="true"
requiredMessage="#{bundle.ReqCreditCard}" >
<f:validateRegex
pattern="\d{16}|\d{4} \d{4} \d{4} \d{4}|\d{4}-\d{4}-\d{4}-\d{4}" />
</h:inputText>

And I removed the setter and getter for the CreditCardConverter from CashierBean.

This has an even stranger effect – the converter is run on the name and shippingOption fields, but NOT on the credit card field where it is registered!

INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is MyName
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is 7

When I tried using f:converter instead –

<h:inputText id="ccno"
size="19"
converterMessage="#{bundle.CreditMessage}"
required="true"
requiredMessage="#{bundle.ReqCreditCard}" >
<f:converter
binding="#{dukesbookstore.converters.creditCardConverter}"/>
<f:validateRegex
pattern="\d{16}|\d{4} \d{4} \d{4} \d{4}|\d{4}-\d{4}-\d{4}-\d{4}" />
</h:inputText>

I got a runtime error:

javax.faces.view.facelets.TagException: /bookcashier.xhtml @64,94 <f:converter> Default behavior invoked of requiring a converter-id passed in the constructor, must override ConvertHandler(ConverterConfig)

Apparently either converterId or binding is a required attribute; but what is a converterId, which I have to pass in the CreditCardConverter constructor supposedly? (P.S. I think the error message means "ConverterHandler", not "ConvertHandler", but that doesn't help.) What is it that must override ConverterHandler(ConverterConfig)?

The javadoc for javax.faces.convert.Converter says "Converter implementations must have a zero-arguments public constructor" and says only that "if a converter has a single argument constructor that takes a Class instance and the Class of the data to be converted is known at converter instantiation time, this constructor must be used to instantiate the converter instead of the zero-argument version."

I did not previously have a constructor in the CreditCardConverter at all. I put in a no-argument constructor that performs no actions. Should it do something?

Comment by Ian Evans [ 11/Aug/11 06:59 PM ]

If you remove ALL references to CreditCardConverter from the Facelets XHTML files and deployment descriptor, the converter still is applied to the name and shippingOption <inputText> fields. Curiously, it doesn't apply it to ccno.

Does JSF by default apply a custom converter annotated with @FacesConverter to fields despite not specifying a converter in an attribute or nested tag? It shouldn't, right?

I'll attach a NetBeans project that demonstrates this.

Comment by Ian Evans [ 11/Aug/11 07:26 PM ]

Attached a NetBeans project with all references to converters removed from the XHTML files and faces-config.xml. The converter is still being applied, despite not being explicitly called.

Comment by Ian Evans [ 11/Aug/11 07:36 PM ]

Steps to reproduce using the attached project.

1. Open in NetBeans (configured with GlassFish) and select Run.
2. Select the United States on the map to set the locale.
3. Click Add to Cart.
4. Click Buy Your Books.
5. Enter "Firstname Lastname" in the Name field, "1111 1111 1111 1111" in the Credit Card Number field, and click Submit Information.
6. Note that the name is now "FirstnameLastname".

The server.log file also shows that the converter was called:
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is FirstnameLastname
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is 2
INFO: Clearing cart.

Comment by Kim Haase [ 12/Aug/11 02:32 PM ]

Back in EE 5, when our example actually worked, the JSP file had the following:

<h:inputText id="ccno"
size="19"
converterMessage="#{customMessages.CreditMessage}"
required="true"
requiredMessage="#{customMessages.ReqMessage}" >
<f:converter binding="#{cashier.creditCard}"/>
<bookstore:formatValidator
formatPatterns="9999999999999999|9999 9999 9999 9999|9999-9999-9999-9999"/>
</h:inputText>

The converter was bound to the cashier backing bean, which instantiated it. It seems that the binding attribute applies only to managed beans. I tried supplying the converterId attribute that the TagException complained about –

<f:converter converterId="ccno"
binding="#{dukesbookstore.converters.creditCardConverter}"/>

(I also specified "ccno" as the value for the @FacesConverter annotation on the converter class: @FacesConverter("ccno").)

But when I do this, I get a different runtime error:

javax.el.PropertyNotFoundException: /bookcashier.xhtml @64,94 binding="#{dukesbookstore.converters.creditCardConverter}": Target Unreachable, identifier 'dukesbookstore' resolved to null

I see that when we specify classes other than managed beans in our Facelets pages, we always seem to do so with the type attribute – for example,

<f:actionListener type="dukesbookstore.listeners.LinkLocaleChangeListener" />

But the f:converter tag does not have a type attribute, only a binding attribute.

Comment by Kim Haase [ 12/Aug/11 02:57 PM ]

So then I thought, maybe you need either the converterId or the binding attribute, but not both? So I did

<f:converter converterId="ccno"/>

This seems to work! It ties the converter to the component to which it is attached, and does not operate on any of the others on the page.

INFO: Entering CreditCardConverter.getAsString
INFO: Entering CreditCardConverter.getAsObject
INFO: Converted value is 1234123412341234
INFO: Clearing cart.

I will close the issue as User Confusion or whatever. And we'll document this ...

Comment by Kim Haase [ 12/Aug/11 02:58 PM ]

Actually, I can't close it. You can close it, Roger.

Comment by rogerk [ 12/Aug/11 03:00 PM ]

Per latest comments from reporter.





[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-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-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-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-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-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-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-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.





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.





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-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-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-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-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.





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-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-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-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-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-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-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-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

Type: Bug Priority: Major
Reporter: karthikannadurai Assignee: Ian Evans
Resolution: Cannot Reproduce Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Platform: Linux


Tags:
Participants: Ian Evans and karthikannadurai

 Description   

I used javaee-tutorial6 for creating web service. I run the deploy command and i got deployed successfully message.
Then i put ESI(Endpoint Service Interface)url in browser, but it shows "The requested resource () is not available."
Pl help to solve this issue.



 Comments   
Comment by Ian Evans [ 31/Jan/13 05:37 PM ]

Which example is causing this error? Please give us the specific example, the steps you took, and error message so we can investigate.

Comment by karthikannadurai [ 01/Feb/13 12:50 PM ]

I am using j2eetutorial6. In that i am using the helloservice examples of jaxws.
Compile: ant
Deploy: ant deploy
I got below mentioned ESI(Endpoint Service Interface)
http://localhost:8080/helloservice
While i put into browser, i got "The requested resource () is not available" error meaasge.

Comment by Ian Evans [ 01/Feb/13 07:24 PM ]

Can you test the service at this URL?
http://localhost:8080/helloservice/HelloService?Tester

Comment by karthikannadurai [ 02/Feb/13 05:13 AM ]

Yes. I already test it and it also give same error.

Comment by Ian Evans [ 03/Feb/13 09:37 PM ]

I'm unable to reproduce this error. Testing at
http://localhost:8080/helloservice/HelloService?Tester
and with the clients works with no errors.

Take a look at your server.log ($glassfish_home/domains/domain1/logs/serverlog) to look for deployment or runtime errors.

Comment by karthikannadurai [ 04/Feb/13 11:02 AM ]

I test it. I got below message in the server.log file.
helloservice was successfully deployed

Comment by Ian Evans [ 04/Feb/13 07:12 PM ]

So the service is definitely deployed. You should be able to see information about the service, then, by going to the endpoint address:
http://localhost:8080/helloservice/HelloService

There is basically no way that the service was deployed correctly AND you get a "The requested resource () is not available" error message at the above URL. There is a lot more information in server.log. You can attach the server.log file and I'll take a look at it.

Comment by karthikannadurai [ 05/Feb/13 05:33 AM ]

This is server log file.
server.log:

Feb 5, 2013 10:59:49 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/home/applir12/glassfish3/jdk/bin/java
-cp
/home/applir12/glassfish3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-javaagent:/home/applir12/glassfish3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-client
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/home/applir12/glassfish3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/home/applir12/glassfish3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/home/applir12/glassfish3/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/home/applir12/glassfish3/glassfish/domains/domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=/home/applir12/glassfish3/glassfish/modules/endorsed:/home/applir12/glassfish3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/home/applir12/glassfish3/glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=/home/applir12/glassfish3/jdk/lib/ext:/home/applir12/glassfish3/jdk/jre/lib/ext:/home/applir12/glassfish3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/home/applir12/glassfish3/glassfish/domains/domain1/config/cacerts.jks
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/home/applir12/glassfish3/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
-Djava.library.path=/home/applir12/glassfish3/glassfish/lib:/home/applir12/glassfish3/jdk/jre/lib/i386/server:
/home/applir12/glassfish3/jdk/jre/lib/i386:
/home/applir12/glassfish3/jdk/lib/i386:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386/server:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386/native_threads:
/ir12/d01/oracle/ir12/apps/apps_st/appl/cz/12.0.0/bin:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/lib32:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/lib:
/usr/X11R6/lib:/usr/openwin/lib:/ir12/d01/oracle/ir12/apps/apps_st/appl/sht/12.0.0/lib:
/usr/java/packages/lib/i386:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,/home/applir12/glassfish3/glassfish/domains,,,domain1
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/home/applir12/glassfish3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-type
DAS
-domaindir
/home/applir12/glassfish3/glassfish/domains/domain1
-read-stdin
true
Feb 5, 2013 10:59:50 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 15 msec.
[#|2013-02-05T11:00:01.505+0530|INFO|glassfish3.1|null|_ThreadID=1;_ThreadName=Thread-1;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1 (build 43)|#]

[#|2013-02-05T11:00:01.719+0530|INFO|glassfish3.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=Thread-1;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2013-02-05T11:00:02.940+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 396ms - bound to [0.0.0.0:8181]|#]

[#|2013-02-05T11:00:02.941+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=30;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 315ms - bound to [0.0.0.0:3700]|#]

[#|2013-02-05T11:00:02.956+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=31;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 307ms - bound to [0.0.0.0:7676]|#]

[#|2013-02-05T11:00:02.957+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=28;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 476ms - bound to [0.0.0.0:8080]|#]

[#|2013-02-05T11:00:02.958+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=29;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 395ms - bound to [0.0.0.0:4848]|#]

[#|2013-02-05T11:00:03.331+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=Thread-1;|The Admin Console is already installed, but not yet loaded.|#]

[#|2013-02-05T11:00:05.785+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1002: Security Manager is OFF.|#]

[#|2013-02-05T11:00:06.194+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1010: Entering Security Startup Service|#]

[#|2013-02-05T11:00:06.212+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2013-02-05T11:00:06.370+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-02-05T11:00:06.373+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-02-05T11:00:06.386+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]

[#|2013-02-05T11:00:06.412+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1011: Security Service(s) Started Successfully|#]

[#|2013-02-05T11:00:07.800+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

[#|2013-02-05T11:00:07.814+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

[#|2013-02-05T11:00:07.826+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]|#]

[#|2013-02-05T11:00:07.925+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0171: Created virtual server [server]|#]

[#|2013-02-05T11:00:07.931+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0171: Created virtual server [__asadmin]|#]

[#|2013-02-05T11:00:10.231+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0172: Virtual server [server] loaded default web module []|#]

[#|2013-02-05T11:00:14.164+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0671: Loading application [helloservice] at [/helloservice]|#]

[#|2013-02-05T11:00:14.167+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|CORE10010: Loading application helloservice done in 10,572 ms|#]

[#|2013-02-05T11:00:14.171+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|GlassFish Server Open Source Edition 3.1 (43) startup time : Felix (9,467ms), startup services(13,799ms), total(23,266ms)|#]

[#|2013-02-05T11:00:14.969+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=45;_ThreadName=Thread-1;|JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://server2.yantro.com:8686/jndi/rmi://server2.yantro.com:8686/jmxrmi|#]

[#|2013-02-05T11:00:57.371+0530|INFO|glassfish3.1|org.hibernate.validator.util.Version|_ThreadID=17;_ThreadName=Thread-1;|Hibernate Validator 4.1.0.Final|#]

[#|2013-02-05T11:00:57.402+0530|INFO|glassfish3.1|org.hibernate.validator.engine.resolver.DefaultTraversableResolver|_ThreadID=17;_ThreadName=Thread-1;|Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.|#]

[#|2013-02-05T11:00:58.720+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=Thread-1;|WEB0671: Loading application [helloservice] at [/helloservice]|#]

[#|2013-02-05T11:00:58.778+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=62;_ThreadName=Thread-1;|helloservice was successfully deployed in 1,622 milliseconds.|#]
Comment by Ian Evans [ 05/Feb/13 05:50 PM ]

Something is not right with your WAR. This is the relevant lines from my server.log:

[#|2013-02-03T13:31:53.361-0800|INFO|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices|_ThreadID=34;_ThreadName=Thread-2;|WS00018: Webservice Endpoint deployed
 Hello  listening at address at http://ievans-pc:8080/helloservice/HelloService|#]
[#|2013-02-03T13:31:54.267-0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=34;_ThreadName=Thread-2;|WEB0671: Loading application [helloservice] at [/helloservice]|#]
[#|2013-02-03T13:31:54.423-0800|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=34;_ThreadName=Thread-2;|helloservice was successfully deployed in 2,515 milliseconds.|#]
[#|2013-02-03T13:33:46.032-0800|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|parsing WSDL...
|#]
[#|2013-02-03T13:33:46.298-0800|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|
Generating code...
|#]
[#|2013-02-03T13:33:46.360-0800|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|
Compiling code...
|#]
[#|2013-02-03T13:33:46.891-0800|INFO|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices.monitoring|_ThreadID=119;_ThreadName=Thread-2;|Invoking wsimport with http://localhost:8080/helloservice/HelloService?WSDL|#]
[#|2013-02-03T13:33:46.891-0800|INFO|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices.monitoring|_ThreadID=119;_ThreadName=Thread-2;|wsimport successful|#]

I want you to do a first clean up your environment, then rebuild and deploy the WAR, and see if the same behavior occurs again. If it does, I want you to add the WAR as an attachment to this issue. So please follow these steps:

  1. Undeploy the current helloservice.
    ant undeploy
  2. Restart GlassFish.
    ${glassfish_home}/bin/asadmin stop-domain domain1
    ${glassfish_home}/bin/asadmin start-domain domain1
  3. Clean your workspace.
    ant clean
  4. Build and deploy helloservice.
    ant all
  5. Open the server.log file and look for "Webservice Endpoint deployed Hello listening at http://localhost:8080/helloservice/HelloService". If it's there, test it at http://localhost:8080/helloservice/HelloService?Tester.
  6. If it's not there, and you get the same error at the test URL, attach the helloservice.war in the dist directory to this issue.
Comment by karthikannadurai [ 05/Feb/13 06:33 PM ]

I do not know how to attach a file with this place. Please give any idea.

Comment by karthikannadurai [ 05/Feb/13 07:19 PM ]

I extract my helloservice.war. I got below mentioned files.

META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/META-INF/
WEB-INF/sun-web.xml
WEB-INF/web.xml

It did not contains wsdl and class files. What mistake i did?

Comment by Ian Evans [ 05/Feb/13 08:00 PM ]

I've never seen this before. Please send the entire output of the build step:

ant
Comment by karthikannadurai [ 05/Feb/13 09:12 PM ]

While i run ant i got below mentioned messages.

[applir12@server2 helloservice]$ ant
Buildfile: build.xml

-pre-init:

init:

default-ear:

-pre-compile:

bpp-actual-compilation:
     [echo] Compiling helloservice
     [echo] javaee.classpath.prefix is: /home/applir12/glassfish3/glassfish/lib
     [echo] is.glassfish.v3 is: ${is.glassfish.v3}


-post-compile:

compile:

package:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bp-copy-classes:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war/WEB-INF/classes
     [copy] Copying 1 file to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war/WEB-INF/classes
     [copy] Copying 3 files to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bpp-package-persistence-unit-war:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war/WEB-INF/classes/META-INF
     [copy] Warning: Could not find file /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/src/conf/persistence.xml to copy.
     [copy] Warning: Could not find file /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/src/conf/persistence.xml to copy.

bpp-package-persistence-unit-ejb-jar:

package-persistence-unit:
   [delete] Deleting: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/helloservice.war
      [jar] Building jar: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/helloservice.war
   [delete] Deleting directory /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bpp-copy-dist:
     [copy] Copying 1 file to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/dist

default-not-ear:

default:

BUILD SUCCESSFUL
Total time: 0 seconds
[applir12@server2 helloservice]$
Comment by Ian Evans [ 05/Feb/13 09:40 PM ]

This line indicates that something is wrong with your configuration:

[echo] javaee.classpath.prefix is: /home/applir12/glassfish3/glassfish/lib
[echo] is.glassfish.v3 is: ${is.glassfish.v3}

The is.glassfish.v3 property should resolve to true. The build files set is.glassfish.v3 based on the javaee.home property, which is likely not correct. How did you install the Tutorial? From the GlassFish Update Center?

What is contents of ${tutorial_home}/examples/bp-project/build.properties?

Comment by karthikannadurai [ 06/Feb/13 06:47 AM ]

This is my build.property file:

# Sets the property javaee.home, using the path to your 
# GlassFish installation.
# 
# If you installed the Tutorial using the Update Tool,
# don't modify this property.
#
javaee.home=/home/applir12/glassfish3/glassfish

# Sets the property javaee.tutorial.home to the location where you 
# installed the Java EE Tutorial bundle.
#
# If you installed the Tutorial using the Update Tool,
# don't modify this property
#
javaee.tutorial.home=/ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial

# machine name (or the IP address) where the applications will be deployed.
javaee.server.name=server2.yantro.com

# port number where GlassFish applications are accessed by users
javaee.server.port=8080

# port number where the Admin Console of GlassFish is available
javaee.adminserver.port=4848


# If you specified an admin username when you installed GlassFish v3
# uncomment the property javaee.server.username, 
# and replace the administrator username of the app-server 
#javaee.server.username=admin

# If specified a password when you installed GlassFish v3
# uncomment the property javaee.server.passwordfile, 
# and replace the following line to point to a file that 
# contains the admin password for your app-server. 
# The file should contain the password in the following line: 
#
#AS_ADMIN_PASSWORD=adminadmin
#
# Notice that the password is adminadmin since this is 
# the default password used by GlassFish.
#
#javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-password.txt

appserver.instance=server

# Uncomment and set this property to the location of the browser you 
# choose to launch when an application is deployed.
# On Windows and Mac OS X the OS default browser is used.
default.browser=/usr/bin/firefox

# Database vendor property for db tasks
# JavaDB is the default database vendor. See the settings in javadb.properties
db.vendor=javadb
Comment by Ian Evans [ 06/Feb/13 05:14 PM ]

Ok, your javaee.home property isn't set correctly. It should be:

javaee.home=/home/applir12/glassfish3
Comment by karthikannadurai [ 06/Feb/13 06:06 PM ]

I modified it.
javaee.home=/home/applir12/glassfish3
Then i got below message while i run the ant.Till now service did not created.

[applir12@server2 helloservice]$ ant
Buildfile: build.xml

-pre-init:

init:

default-ear:

-pre-compile:

bpp-actual-compilation:
     [echo] Compiling helloservice
     [echo] javaee.classpath.prefix is: /home/applir12/glassfish3/glassfish/modules
     [echo] is.glassfish.v3 is: true


-post-compile:

compile:

package:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bp-copy-classes:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war/WEB-INF/classes
     [copy] Copying 2 files to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/web
     [copy] Copying 2 files to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bpp-package-persistence-unit-war:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war/WEB-INF/classes/META-INF
     [copy] Warning: Could not find file /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/src/conf/persistence.xml to copy.
     [copy] Warning: Could not find file /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/src/conf/persistence.xml to copy.

bpp-package-persistence-unit-ejb-jar:

package-persistence-unit:
      [jar] Building jar: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/helloservice.war
   [delete] Deleting directory /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/build/war

bpp-copy-dist:
    [mkdir] Created dir: /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/dist
     [copy] Copying 1 file to /ir12/d01/oracle/ir12/apps/apps_st/comn/java/classes/oracle/apps/xxpyx/webservices/javaee-tutorial/examples/jaxws/helloservice/dist

default-not-ear:

default:

BUILD SUCCESSFUL
Total time: 0 seconds
[applir12@server2 helloservice]$
Comment by Ian Evans [ 06/Feb/13 06:11 PM ]

Have you tried deploying it? The output looks correct. The warnings about persistence.xml not being found can be ignored.

Comment by karthikannadurai [ 06/Feb/13 06:34 PM ]

I run the deploy command and i got below message but service did not created.

[applir12@server2 helloservice]$ ant deploy
Buildfile: build.xml

check:

tools:

-pre-deploy:

deploy:
     [echo] Admin: /home/applir12/glassfish3/bin/asadmin
     [exec] Application deployed with name helloservice.
     [exec] Command deploy executed successfully.

deploy-url-message:
     [echo] Application Deployed at: http://server2.yantro.com:8080/helloservice

BUILD SUCCESSFUL
Total time: 6 seconds
[applir12@server2 helloservice]$
Comment by Ian Evans [ 06/Feb/13 07:01 PM ]

I can't help you if you're not going to provide any additional information.

The application deployed, and presumably compiled and built a WAR with the HelloService class. If that is not the case, post the complete server.log entries (wrapped with {code} tags please).

Comment by karthikannadurai [ 06/Feb/13 07:15 PM ]

This is my server log file.

Feb 7, 2013 12:41:49 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/home/applir12/glassfish3/jdk/bin/java
-cp
/home/applir12/glassfish3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-javaagent:/home/applir12/glassfish3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-client
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/home/applir12/glassfish3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/home/applir12/glassfish3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/home/applir12/glassfish3/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/home/applir12/glassfish3/glassfish/domains/domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=/home/applir12/glassfish3/glassfish/modules/endorsed:/home/applir12/glassfish3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/home/applir12/glassfish3/glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=/home/applir12/glassfish3/jdk/lib/ext:/home/applir12/glassfish3/jdk/jre/lib/ext:/home/applir12/glassfish3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/home/applir12/glassfish3/glassfish/domains/domain1/config/cacerts.jks
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/home/applir12/glassfish3/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
-Djava.library.path=/home/applir12/glassfish3/glassfish/lib:/home/applir12/glassfish3/jdk/jre/lib/i386/server:
/home/applir12/glassfish3/jdk/jre/lib/i386:/home/applir12/glassfish3/jdk/lib/i386:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386/server:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/jdk/jre/lib/i386/native_threads:
/ir12/d01/oracle/ir12/apps/apps_st/appl/cz/12.0.0/bin:/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/lib32:
/ir12/d01/oracle/ir12/apps/tech_st/10.1.2/lib:/usr/X11R6/lib:
/usr/openwin/lib:/ir12/d01/oracle/ir12/apps/apps_st/appl/sht/12.0.0/lib:
/usr/java/packages/lib/i386:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,/home/applir12/glassfish3/glassfish/domains,,,domain1
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/home/applir12/glassfish3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-type
DAS
-domaindir
/home/applir12/glassfish3/glassfish/domains/domain1
-read-stdin
true
Feb 7, 2013 12:41:49 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 5 msec.
[#|2013-02-07T00:41:57.030+0530|INFO|glassfish3.1|null|_ThreadID=1;_ThreadName=Thread-1;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1 (build 43)|#]

[#|2013-02-07T00:41:57.159+0530|INFO|glassfish3.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=Thread-1;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2013-02-07T00:41:57.944+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=29;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 383ms - bound to [0.0.0.0:8080]|#]

[#|2013-02-07T00:41:57.945+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=Thread-1;|The Admin Console is already installed, but not yet loaded.|#]

[#|2013-02-07T00:41:57.946+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=30;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 332ms - bound to [0.0.0.0:3700]|#]

[#|2013-02-07T00:41:57.947+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 328ms - bound to [0.0.0.0:7676]|#]

[#|2013-02-07T00:41:57.944+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=31;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 353ms - bound to [0.0.0.0:8181]|#]

[#|2013-02-07T00:41:57.949+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=28;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 349ms - bound to [0.0.0.0:4848]|#]

[#|2013-02-07T00:42:01.493+0530|INFO|glassfish3.1|javax.enterprise.webservices.org.glassfish.webservices.metroglue|_ThreadID=1;_ThreadName=Thread-1;|WS10010: Web service endpoint deployment events listener registered successfully.|#]

[#|2013-02-07T00:42:01.935+0530|WARNING|glassfish3.1|global|_ThreadID=10;_ThreadName=Thread-1;|Cannot load appclient.HelloAppClient reason : appclient.HelloAppClient
java.lang.ClassNotFoundException: appclient.HelloAppClient
	at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808)
	at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:361)
	at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:565)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:432)
	at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:408)
	at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:383)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:246)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:255)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:216)
	at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:180)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:768)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:364)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:208)
	at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
	at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
	at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
	at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
	at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
	at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:243)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:135)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
|#]

[#|2013-02-07T00:42:02.840+0530|INFO|glassfish3.1|javax.enterprise.system.container.appclient.org.glassfish.appclient.server.core|_ThreadID=1;_ThreadName=Thread-1;|ACDEPL103: Java Web Start services started for the app client appclient (contextRoot: /appclient)|#]

[#|2013-02-07T00:42:02.845+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|CORE10010: Loading application appclient done in 4,750 ms|#]

[#|2013-02-07T00:42:02.967+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1002: Security Manager is OFF.|#]

[#|2013-02-07T00:42:03.181+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1010: Entering Security Startup Service|#]

[#|2013-02-07T00:42:03.197+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2013-02-07T00:42:03.256+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-02-07T00:42:03.261+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-02-07T00:42:03.265+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=1;_ThreadName=Thread-1;|SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]

[#|2013-02-07T00:42:03.278+0530|INFO|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=1;_ThreadName=Thread-1;|SEC1011: Security Service(s) Started Successfully|#]

[#|2013-02-07T00:42:03.660+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

[#|2013-02-07T00:42:03.665+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

[#|2013-02-07T00:42:03.669+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]|#]

[#|2013-02-07T00:42:03.710+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0171: Created virtual server [server]|#]

[#|2013-02-07T00:42:03.713+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0171: Created virtual server [__asadmin]|#]

[#|2013-02-07T00:42:04.059+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0172: Virtual server [server] loaded default web module []|#]

[#|2013-02-07T00:42:05.720+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1;_ThreadName=Thread-1;|WEB0671: Loading application [helloservice] at [/helloservice]|#]

[#|2013-02-07T00:42:05.721+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|CORE10010: Loading application helloservice done in 2,874 ms|#]

[#|2013-02-07T00:42:05.722+0530|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|GlassFish Server Open Source Edition 3.1 (43) startup time : Felix (6,438ms), startup services(9,340ms), total(15,778ms)|#]

[#|2013-02-07T00:42:06.711+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=49;_ThreadName=Thread-1;|JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://server2.yantro.com:8686/jndi/rmi://server2.yantro.com:8686/jmxrmi|#]

[#|2013-02-07T00:43:35.367+0530|INFO|glassfish3.1|org.hibernate.validator.util.Version|_ThreadID=17;_ThreadName=Thread-1;|Hibernate Validator 4.1.0.Final|#]

[#|2013-02-07T00:43:35.376+0530|INFO|glassfish3.1|org.hibernate.validator.engine.resolver.DefaultTraversableResolver|_ThreadID=17;_ThreadName=Thread-1;|Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.|#]

[#|2013-02-07T00:43:35.678+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=65;_ThreadName=Thread-1;|WEB0671: Loading application [helloservice] at [/helloservice]|#]

[#|2013-02-07T00:43:35.705+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=65;_ThreadName=Thread-1;|helloservice was successfully deployed in 411 milliseconds.|#]
Comment by Ian Evans [ 06/Feb/13 07:19 PM ]

What are the contents of the WAR?

Comment by Ian Evans [ 06/Feb/13 07:30 PM ]

Also, make sure you follow the steps I posted above to clean your environment.

If you can't get a WAR file with the HelloService.class file in it after cleaning and rebuilding with the correct javaee.home property set, you're going to have to start with the latest version of the Tutorial examples and SDK.

That means:

  1. Install Java EE 6 SDK update 4 (with GlassFish 3.1.2).
  2. Update to version 6.0.8 of the Java EE 6 Tutorial from the Update Center. This will install the Tutorial in ${glassfish_home}/glassfish/docs/javaee-tutorial.

When you install the Tutorial from the Update Center, you don't have to worry about setting javaee.home or any other configuration. The examples in version 6.0.8 of the Tutorial have been thoroughly tested, including helloservice.

Comment by karthikannadurai [ 06/Feb/13 07:46 PM ]

In the helloservice.war contain below files
META-INF: MANIFEST.MF
WEB-INF: classes/META-INF
sun-web.xml
web.xml

It does not contain wsdl file and class file. I created one war file with one HelloService.wsdl file and Hello.class. I run the deploy command and its worked fine(service created successfully). What i have to do?

Comment by Ian Evans [ 06/Feb/13 07:59 PM ]

I don't know where you got your Tutorial install, as it is in a nonstandard location. I can't verify that it is a version that we've tested based on the information you've given. Therefore I'm closing this as Cannot Reproduce.

You can install Java EE 6 SDK update 4 and version 6.0.8 of the Tutorial, as I've said above. If you get the same error in version 6.0.8 of helloservice, and verify that the output WAR doesn't contain a class file or WSDL, you can reopen this issue.





[JAVAEETUTORIAL-147] Incorrect element for @AccessTimeout code snippet in singleton bean chapter Created: 18/Jan/13  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 7.0.0

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   

http://docs.oracle.com/javaee/6/tutorial/doc/gipvi.html

The code snippet shows:

@AccessTimeout(value=60, timeUnit=SECONDS)

instead of:

@AccessTimeout(value=60, unit = TimeUnit.SECONDS)


 Comments   
Comment by Ian Evans [ 05/Feb/13 05:58 PM ]

Fixed in source. If we do another update of the EE 6 branch, it will appear there. Otherwise, it will be fixed for the EE 7 tutorial.





[JAVAEETUTORIAL-146] Incorrect code snippet showing application-managed entity manager Created: 09/Jan/13  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 7.0.0

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   

From the email feedback alias:
On the page: http://docs.oracle.com/javaee/6/tutorial/doc/bnbqw.html
This fragment appears under the section "Application-Managed Entity Managers" :

----------------------------------------------------

The following example shows how to manage transactions in an application that uses an application-managed entity manager:

@PersistenceContext
EntityManagerFactory emf;
EntityManager em;
@Resource
UserTransaction utx;

---------------------------------

It seems to me from the other text that @PersistenceContext should actually be @PersistenceUnit,
but as I am just learning JPA, I may very well be wrong. Either I am correct, or the explanation is not clear.

The user is correct. It should be:

@PersistenceUnit
EntityManagerFactory emf;
EntityManager em;
@Resource
UserTransaction utx;


 Comments   
Comment by Ian Evans [ 05/Feb/13 06:17 PM ]

Fixed in source. If we update the EE 6 tutorial, the fix will appear there. Otherwise, the fix will appear in the EE 7 tutorial.





[JAVAEETUTORIAL-142] Missing intro para in Duke's Tutoring Created: 01/Nov/12  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 6.0.7-4
Fix Version/s: 6.0.8

Type: Bug Priority: Minor
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   

I'm looking at the subsection "Properties Files" in the Duke's Tutoring chapter. It looks as if an introductory paragraph is missing before the second variable list, saying where in the dukes-tutoring-war project the messages are located – something equivalent to the intro para on the dukes-tutoring-common properties file.



 Comments   
Comment by Kim Haase [ 09/Nov/12 07:06 PM ]

We really need this now, so I have put in the following:

"The dukes-tutoring-war project has the following resource bundles:"

Is that all right? Please let me know if not.

Comment by Ian Evans [ 09/Nov/12 07:18 PM ]

Yes, that's fine.

Comment by Kim Haase [ 09/Nov/12 07:29 PM ]

Thanks, Ian. After I put back the V2 files, you can look over yours and check the fix (and all the other edits). I am using change bars.

Comment by Ian Evans [ 05/Feb/13 06:20 PM ]

Fixed in 6.0.8.





[JAVAEETUTORIAL-139] Criteria query code snippets use untype-safe metamodel classes Created: 11/Oct/12  Updated: 11/Oct/12  Resolved: 11/Oct/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

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   

From the feedback alias:
I've got a question about an example on creating criteria queries in Part VI Chapter 35 of the Java EE 6 tutorial. Link: http://docs.oracle.com/javaee/6/tutorial/doc/gjivm.html
In the "Querying Relationships Using Joins" section of the chapter, there is an example code that doesn't work for me.

CriteriaQuery<Pet> cq = cb.createQuery(Pet.class);
Metamodel m = em.getMetamodel();
EntityType<Pet> Pet_ = m.entity(Pet.class);

Root<Pet> pet = cq.from(Pet.class);
Join<Pet, Owner> owner = pet.join(Pet_.owners);

Since Pet_ is an instance of class EntityType, it doesn't define any attributes named "owners", which is why Pet_.owners gives an error. Is that a mistake?
Searching through forums I found a thread discussing this problem here http://stackoverflow.com/questions/3879743/jpa-metamodel-strange-inconsistent-example-in-sun-docs
If this is indeed a mistake, could you please correct the code.

The code snippets used dynamic metamodel classes for clarity on where, e.g., Pet_ comes from. But in practice, it gives the impression that this is a good practice for creating queries, which is not the case. The metamodel classes should be statically generated by an annotation processor at development time to make the code compilable and type-safe.



 Comments   
Comment by Ian Evans [ 11/Oct/12 12:12 AM ]

Fixed the code snippets to implicitly use static metamodel classes. The documentation will be updated in the next release of the Tutorial bundle.

Comment by Ian Evans [ 11/Oct/12 12:15 AM ]

And just for clarity, if you're using an annotation processor to statically generate your metamodel classes, the following type-safe query should compile:

CriteriaQuery<Pet> cq = cb.createQuery(Pet.class);
Root<Pet> pet = cq.from(Pet.class);
Join<Pet, Owner> owner = pet.join(Pet_.owners);




[JAVAEETUTORIAL-138] HelloWorldApplication has unresolved dependencies in NB 7.2 w/ GF 3.1.2 Created: 10/Oct/12  Updated: 11/Oct/12  Resolved: 11/Oct/12

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

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

NetBeans 7.2, Glassfish 3.1.2


Tags:
Participants: Ian Evans and rcervera

 Description   

When you open the project on NetBeans, it shows unresolved dependencies (web service APIs). The project deploys fine if you go to the Properties page, then to the Libraries section, and you remove this library dependency.



 Comments   
Comment by Ian Evans [ 11/Oct/12 12:31 AM ]

Revision: 1022
Author: ievans
Date: 2012-10-10 17:31
Message: Removed outdated library reference.
Issue #JAVAEETUTORIAL-138 - HelloWorldApplication has unresolved dependencies in NB 7.2 w/ GF 3.1.2





[JAVAEETUTORIAL-137] Broken Links on Page "Further Information about the Connector Architecture" Created: 03/Oct/12  Updated: 04/Jan/13  Resolved: 04/Jan/13

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

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

Tags: link JCA
Participants: Ian Evans, jendrock and RobertHecht

 Description   

The links on the page "Further Information about the Connector Architecture" are broken.



 Comments   
Comment by Ian Evans [ 11/Oct/12 12:43 AM ]

This is from the Java EE 5 Tutorial.
http://docs.oracle.com/javaee/5/tutorial/doc/bnckk.html

There are no scheduled updates to the Java EE 5 Tutorial. Lowering the priority, but keeping the issue open in case we do update the EE 5 Tutorial in the future.

Comment by jendrock [ 04/Jan/13 09:59 PM ]

We will not be updating the Java EE 5 Tutorial. Even if we wanted to update the links, I believe that the links for downloading the Connector Architecture 1.5 specification from the JCP web site are broken too. See http://jcp.org/aboutJava/communityprocess/final/jsr112/index.html.

The current version of the Connector Architecture is 1.6. The Java EE 6 Tutorial describes version 1.6 of the specification. The "Further Information about Resources" page at http://docs.oracle.com/javaee/6/tutorial/doc/bncjw.html in the Java EE 6 Tutorial provides the links for which you are looking.





[JAVAEETUTORIAL-135] Circular definition of a persistent field Created: 29/Aug/12  Updated: 11/Oct/12  Resolved: 11/Oct/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

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

http://docs.oracle.com/javaee/6/tutorial/doc/bnbth.html


Tags:
Participants: Ian Evans

 Description   

The definition of a persistent field in the JPQL chapter is as follows:
Relationship field: A persistent relationship field of an entity whose type is the abstract schema type of the related entity.

It should read:
Relationship field: A persistent field of an entity whose type is the abstract schema type of the related entity.



 Comments   
Comment by Ian Evans [ 11/Oct/12 12:36 AM ]

Fixed in documentation source. Will appear in the next update to the EE 6 Tutorial.





[JAVAEETUTORIAL-134] information directory not included in IPS package Created: 24/Aug/12  Updated: 24/Aug/12  Due: 04/Oct/12  Resolved: 24/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

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

Tags:
Participants: Ian Evans

 Description   

The information directory isn't copied to the package root, so the FAQ and Download links don't work in the IPS package.



 Comments   
Comment by Ian Evans [ 24/Aug/12 06:38 PM ]

Revision: 993
Author: ievans
Date: 2012-08-24 11:38
Message: Updated targets to add information to the package root.
Issue #JAVAEETUTORIAL-134 - information directory not included in IPS package





[JAVAEETUTORIAL-132] Confusing concept in EJB introduction: 32-bit methods Created: 15/Aug/12  Updated: 16/Aug/12  Resolved: 15/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 6.0.4
Fix Version/s: 6.0.7-6

Type: Bug Priority: Minor
Reporter: kombatkuehn 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/6/tutorial/doc/gipmb.html


Tags:
Participants: Ian Evans and kombatkuehn

 Description   

In [Part IV Enterprise Beans > 22. Enterprise Beans > What Is an Enterprise Bean?], I do not get the meaning of "32-bit methods" in the sentence "By invoking these 32-bit methods, clients can access the inventory services provided by the application."
There are methods returning 32-bit integers but this is probably not meant here and also irrelevant to a very basic introductory paragraph. I am sure the sentence would be more correct and easier to understand if "32-bit" was omitted.



 Comments   
Comment by Ian Evans [ 15/Aug/12 05:41 PM ]

I agree. There's no reason to include "32-bit" as a qualifier here, and 64-bit JVMs make this potentially inaccurate now, whatever the original motivation.

Comment by Ian Evans [ 15/Aug/12 05:48 PM ]

Fixed in source. Will appear in the next published update.





[JAVAEETUTORIAL-131] Web Services | JAX-RS: Advanced Topics and Example | Runtime Content Negotiation is misleading and contains errors Created: 14/Aug/12  Updated: 14/Aug/12  Resolved: 14/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

Type: Bug Priority: Major
Reporter: kombatkuehn 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/6/tutorial/doc/gkqbq.html


Tags:
Participants: Ian Evans and kombatkuehn

 Description   

The section on "Runtime Content Negotiation" contains an example where the resource class level @Produces annotation sets a default MIME type of text/plain. The method getEmployeeAddressXml has a @Produces annotation which makes the method listen to requests asking for a text/xml MIME type.
From my understanding, the subsequent sections make false statements:

The getEmployeeAddressText method is called for an HTTP request that looks as follows:

GET /employee
content-type: text/plain
500 Oracle Parkway, Redwood Shores, CA
The getEmployeeAddressXml method is called for an HTTP request that looks as follows:

GET /employee
content-type: text/xml
<address street="500 Oracle Parkway, Redwood Shores, CA" country="USA"/>

First, it is at least misleading to have a GET request containing a message body. Worse though, from my understanding, it should be the "Accept" header content that will be matched against the @Produces annotation value. The "Content-type" header should be matched against the @Consumes annotation.

If I should be wrong, the explanation of @Produces and @Consumes earlier in the chapter is very misleading.



 Comments   
Comment by Ian Evans [ 14/Aug/12 05:14 PM ]

You are right, the example HTTP request should use an Accept header, not Content-type.

The examples aren't intended to show a message body, although I agree that's what it looks like. It would be more clear to separate out the HTTP request fragment from the body of the response. E.g.
Request:

GET /employee
Accept: text/plain

Response:

500 Oracle Parkway, Redwood Shores, CA

Request:

GET /employee
Accept: text/xml

Response:

<address street="500 Oracle Parkway, Redwood Shores, CA" country="USA"/>
Comment by Ian Evans [ 14/Aug/12 05:47 PM ]

Fixed in source. Will be available in next published update.





[JAVAEETUTORIAL-130] Incorrect description in example of orphanRemoval in entity relationships Created: 13/Aug/12  Updated: 13/Aug/12  Resolved: 13/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

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   

at the url below (Orphan Removal in Relationships):
http://docs.oracle.com/javaee/6/tutorial/doc/bnbqa.html#giqxy

i believe there may be a mistake in the tutorial text below. In the
below tutorial text, I believe the remove operation would be cascaded
to the orphaned order entity, not the customer entity.



 Comments   
Comment by Ian Evans [ 13/Aug/12 08:20 PM ]

Fixed in source. Will appear in the next published update.





[JAVAEETUTORIAL-129] mood example has incorrect URL Created: 10/Aug/12  Updated: 10/Aug/12  Resolved: 10/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7-5
Fix Version/s: None

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

Tags:
Participants: Ian Evans and jendrock

 Description   

The web/mood example is documented to use the following URL:
http://localhost:8080/mood/report
according to:
http://docs.oracle.com/javaee/6/tutorial/doc/gkcpg.html

However, the NetBeans project is configured to open:
http://localhost:8080/mood/greeting

This results in a 404 error when running the project in NetBeans.



 Comments   
Comment by Ian Evans [ 10/Aug/12 08:06 PM ]

Revision: 979
Author: ievans
Date: 2012-08-10 13:06
Message: Updated Run properties.
Issue #JAVAEETUTORIAL-129 - mood example has incorrect URL





[JAVAEETUTORIAL-128] File paths wrong in Java EE 6 Tutorial from the UpdaterTool Created: 03/Aug/12  Updated: 16/Aug/12  Resolved: 03/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-5

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

Mac OS 10.8, JVM 1.7_5, Java EE 6 SDK Update 4


Tags:
Participants: Ian Evans and shazlett

 Description   

"To Obtain the Tutorial Component Using the Update Tool" on page 73 does not work properly on a Mac, at least not with the OS version I am running. The reason being is the update tool has the paths all wrong. If I look at the Files view of the Java EE 6 Tutorial version 6.0.7-4 they look like the example I have pasted below:

glassfish/docs/javaee-tutorial\doc\bnaac.html
glassfish/docs/javaee-tutorial\doc\bnaan.html
glassfish/docs/javaee-tutorial\doc\bnaaw.html
glassfish/docs/javaee-tutorial\doc\bnaax.html
glassfish/docs/javaee-tutorial\doc\bnaay.html
glassfish/docs/javaee-tutorial\doc\bnabo.html
glassfish/docs/javaee-tutorial\doc\bnabs.html

Everywhere there is a backslash () the folder structure is not created, you just get a file with the name "javaee-tutorial\doc\bnaay.html". As a result the file structure is completely missing on Mac OS and it is necessary to copy the tutorial from a Windows computer where either slash appears to work.



 Comments   
Comment by Ian Evans [ 03/Aug/12 04:55 PM ]

Looking into this right now. I don't know why the Update Center toolkit wouldn't handle Windows paths correctly when creating packages, but that's what this appears to be.

Comment by Ian Evans [ 03/Aug/12 05:09 PM ]

Changing priority to P1, as this package is broken on non-Windows platforms.

Comment by Ian Evans [ 03/Aug/12 06:07 PM ]

Created package 6.0.7-5 with correct file layout for Unix platforms. Release engineering will push it to the external repository soon.





[JAVAEETUTORIAL-118] note that since the IDs are generated the IDs may not match Created: 07/Jul/12  Updated: 24/Apr/13  Resolved: 24/Apr/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 7.0.1

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

Tags:
Participants: Brant Gurganus, Ian Evans and Kim Haase

 Description   

There is an example at the end of the "Rendering a Hyperlink with the h:commandLink Tag" section of the page at http://docs.oracle.com/javaee/6/tutorial/doc/bnarf.html titled "Adding Components to a Page Using HTML Tags". It may be worth noting that the IDs are generated so they may not match. I believe there are also two JSF implementations. I'm sure MyFaces wouldn't generate calls to functions in a mojarra object.



 Comments   
Comment by Kim Haase [ 09/Jul/12 06:00 PM ]

We definitely need to point out that the generated IDs are implementation-specific and that the prefixes will probably not be the same as the ones shown.

I think there are even more than two JSF implementations around, but we assume that tutorial users are using only GlassFish.

Comment by Ian Evans [ 09/Jul/12 06:12 PM ]

I'm trying to understand why the generated IDs would matter to web developers, and I'm coming up empty.

It's true that the generated IDs in the HTML will vary by implementation, since the spec doesn't require them to match the IDs in the Facelets tags. But I can't think of a use-case where output HTML from one implementation would mix with output HTML from another implementation.

The only scenario I can think of where the IDs matter is for a custom Javascript library. However, if you're writing your own Javascript that uses the HTML tag IDs, you're going beyond the platform, and are relying on non-portable features.

Comment by Brant Gurganus [ 09/Jul/12 07:12 PM ]

I agree with Ian's statements. However, in the context of a tutorial, there can be an expectation that what is shown in output in the tutorial would match your own output. The issue is more about that expectation and managing that than about interoperating with the IDs.

Comment by Kim Haase [ 24/Apr/13 07:06 PM ]

I think that for anyone running GlassFish the output will be exactly that or something very similar, but I changed it to "HTML that looks something like the following".

Fixed for 7.0.1.





[JAVAEETUTORIAL-107] serializable class does not define serialVersionUID Created: 24/Jun/12  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Closed
Project: javaeetutorial
Component/s: doc, examples
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6, 6.0.8

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

Tags:
Participants: Brant Gurganus, Ian Evans, jendrock and Kim Haase

 Description   

The managed bean described at http://docs.oracle.com/javaee/6/tutorial/doc/gipob.html is marked as Serializable but does not define a serialVersionUID. While not technically necessary, I believe it is best practice to define it since different JVMs will generate different default serialVersionUIDs so retroactively setting a compatible serialVersionUID may not be easy.



 Comments   
Comment by Ian Evans [ 14/Aug/12 07:00 PM ]

There also is the issue that NetBeans adds serialVersionUID as an editor hint, but defaults the value to 1L for every class. So, we need to sweep through our sources to make sure that we have unique IDs for our serializable classes.

Comment by Kim Haase [ 14/Aug/12 09:05 PM ]

Yes.

A few other chapters in the book contain code with the 1L assignment. I am fixing the CDI one. It occurs in a couple of persistence chapters also.

Comment by Kim Haase [ 15/Aug/12 03:33 PM ]

Checked in code and book fixes for web/guessnumber and cdi/guessnumber examples.

Comment by Ian Evans [ 15/Aug/12 04:47 PM ]

Revision: 984
Author: ievans
Date: 2012-08-15 09:47
Message: Replaced all serialVersionUID fields with unique values; general code cleanup (added @Override annotation, StringBuilder, improved logging syntax, etc.)
Issue #JAVAEETUTORIAL-107 - serializable class does not define serialVersionUID

Comment by Kim Haase [ 16/Aug/12 04:19 PM ]

Checked in code fixes for mailconnector example (revisions 988 and 989).

Comment by Kim Haase [ 17/Aug/12 09:27 PM ]

Committed more bookstore example classes that needed a serialVersionUID, at revision 992.

Comment by Kim Haase [ 20/Sep/12 01:40 PM ]

Committed cleaned-up code in cdi/decorators, including serialVersionUID, at revision 996.

Comment by Kim Haase [ 20/Sep/12 02:01 PM ]

Committed cleaned-up code in cdi/billpayment, including serialVersionUID, at revision 997.

Comment by Kim Haase [ 20/Sep/12 02:16 PM ]

Committed cleaned-up code in cdi/producerfields, including serialVersionUID, at revisions 998 and 1001.

Comment by Kim Haase [ 20/Sep/12 03:05 PM ]

Committed cleaned-up code in jms/clientmdbentity, including serialVersionUID, at revision 1000.

Comment by Kim Haase [ 20/Sep/12 09:17 PM ]

Committed cleaned-up code in Duke's Forest projects, including serialVersionUID, at revision 1002.

Comment by jendrock [ 05/Feb/13 09:21 PM ]

This issue has been fixed. Depending to whom you talk, this issue is either trivial or irrelevant. The 1L value, generated and inserted by the IDE is sufficient for the examples. In a real world production environment, a unique, generated UID would be a necessity, but not here. The change has been made to all or almost all of the examples already. Enough has been done to close the issue.





[JAVAEETUTORIAL-100] Async example doesn't always fail as described Created: 13/Jun/12  Updated: 19/Jun/12  Resolved: 19/Jun/12

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-3
Fix Version/s: 6.0.7-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

File Attachments: Text File issue100.log    
Tags:
Participants: Ian Evans and Kim Haase

 Description   

At the end of the two sections on running the async example are the following sentences:

"If an error occurs, the status will read Encountered an error. Check the server.log file for your domain to find the cause of the error."

If a user happens to have run the mailconnector example before they run this example, and they still have the mock-javamail JAR file in their glassfish/lib directory, the status message they see will be "javax.ejb.EJBException", and the server log stack trace will contain

SEVERE: Error in sending message.
WARNING: EJB5184:A system exception occurred during an invocation on EJB MailerBean, method: public java.util.concurrent.Future async.ejb.MailerBean.sendMessage(java.lang.String)
WARNING: javax.ejb.EJBException
...
Caused by: java.lang.NullPointerException
at async.ejb.MailerBean.sendMessage(MailerBean.java:63)

I don't know if this belongs in the tutorial itself or in the FAQ – probably the latter?



 Comments   
Comment by Ian Evans [ 19/Jun/12 12:01 AM ]

Could you attach your server.log? I want to know why the EJBException was thrown.

Does the mailconnector example also use mail/myExampleSession?

Comment by Kim Haase [ 19/Jun/12 02:26 PM ]

Here is the server log from today, when I just started GF, edited the glassfish-resources file in async/setup, deployed async, and tried to send a message, then undeployed and shut down GF.

The javamail resource in mailconnector has a different name, mail/MySession.

I guess you are trying to figure out how to detect this particular problem and generate a useful error message? That would be good, though it is an error that won't occur if people run the tutorial examples in book order. At a minimum we should document the need to move the mock-javamail jar out of glassfish/lib if it happens to be there.

Comment by Ian Evans [ 19/Jun/12 05:27 PM ]

I don't see a reason why the presence of mock-javamail.jar should cause an EJBException, I guess. I'd like to find out why. Documenting the workaround in the FAQ is probably the easy step, but if we can allow the different examples to co-exist that's preferable.

Comment by Ian Evans [ 19/Jun/12 05:50 PM ]

Ok, so mock-javamail.jar doesn't implement an SMPTS provider.
SEVERE: Error in sending message.
SEVERE: No provider for smtps

The NPE was caused by how I was trying to log the exception. Just changing the catch to:
} catch (MessagingException ex) { logger.severe("Error in sending message."); status = "Encountered an error: " + ex.getMessage(); logger.severe(ex.getMessage()); }

Logs the error message properly and doesn't cause a system exception. I'll check in the changes, but we should add a FAQ entry documenting that you must remove mock-javamail.jar before running async.

Comment by Ian Evans [ 19/Jun/12 06:36 PM ]

Fixed the NPE when the message couldn't be sent. The FAQ needs to be updated to include information on removing mock-javamail.jar from glassfish/lib.

Does the mailconnector example section need instructions on this as well?

Comment by Kim Haase [ 19/Jun/12 06:51 PM ]

> Does the mailconnector example section need instructions on this as well?

Yes, we should add something at the end about removing it and restarting GlassFish just in case. Shall I do it as part of this issue?

Comment by Ian Evans [ 19/Jun/12 06:56 PM ]

Sure. Go ahead and reopen it and reassign.

Comment by Kim Haase [ 19/Jun/12 07:04 PM ]

I went ahead and made the documentation fix for the connector example as part of this issue.

Comment by Kim Haase [ 19/Jun/12 08:09 PM ]

Assigning to myself for doc fix.

Comment by Kim Haase [ 19/Jun/12 08:23 PM ]

Made fix in Epic and Frame versions of connector example chapter.





[JAVAEETUTORIAL-94] Problems with Duke's Tutoring admin interface Created: 05/Jun/12  Updated: 16/Aug/12  Resolved: 16/Aug/12

Status: Closed
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7-3
Fix Version/s: 6.0.7-6

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

Tags:
Participants: Ian Evans, jendrock and Kim Haase

 Description   

Problem 1:

When I try to add a student (createStudent.xhtml) and I enter the phone number

111-222-3333

I get an error message:

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

It appears that in Person.java the only allowed format is (xxx) xxx-xxxx. Either Person.java or the error message needs to be fixed.

Problem 2:

When I try to create a new guardian, it doesn't "take" – I click Submit, but the new person is not added to the selection list, or to the database. What is supposed to happen here? Creating a new student works all right (except for the phone glitch).

Interestingly, I don't get the phone validation error on the createGuardian page, only on the createStudent page. It's as if it doesn't even get as far as validating it against the Person entity.



 Comments   
Comment by Kim Haase [ 11/Jun/12 03:53 PM ]

Problem 3:

On the Create Student form, there is a field for "Country". However, if I try to create a student whose address is in a foreign country, I find that the fields "State" and "Zip" may not be null.

Why even have a Country field if only addresses in the US are permitted?

Comment by Kim Haase [ 11/Jun/12 06:28 PM ]

Problem 4:

On the main administration page, if I click the Remove button for a student, I get an error 500 with a stack trace that begins as follows:

WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.view.facelets.FaceletException: Error Parsing /admin/student/deleteStudent.xhtml: Error Traced[line: 39] XML document structures must start and end within the same entity.
at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:425)
at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:399)
at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)

This one is easy: the deleteStudent.xhtml page doesn't have a closing </ui:composition> tag. I'll check in a fix for this.

Comment by Kim Haase [ 11/Jun/12 07:04 PM ]

Problem 5:

If I create a new student and then click Add Guardian for that student on the main administration page, I arrive on the createGuardian page. If I select an existing guardian in the list box (the addExistingGuardian component) and click the "Add guardian" button, I get a validation error: Value is not valid.

This will take a while to figure out.

Comment by Kim Haase [ 11/Jun/12 07:51 PM ]

Another note on Problem 1: You can submit the Create Guardian form (to create a guardian for a student) without filling in any of the fields. (The guardian is not stored in the database anyway, no matter what fields you fill in.)

Supposedly, when you click Submit on the form, the following method call happens:

<h:commandButton id="submit"
action="#{adminBean.createGuardian(guardianManager.newGuardian, adminManager.currentStudent)}"
value="#{bundle['action.submit']}" />

The createGuardian method is never called (the log message for it is never displayed).

I put logging code for the GuardianManager constructor and for the newGuardian and currentStudent setters and getters. The constructor and getCurrentStudent seem to be called by Submit, but the newGuardian setter/getter are not; getNewGuardian is called for the display of each form field, but not on Submit.

Comment by jendrock [ 13/Jun/12 06:08 PM ]

For Ian when he returns.

Comment by Ian Evans [ 15/Aug/12 05:57 PM ]

Guardian creation works now.

Figuring out the phone number issue is complicated, due to the interaction between validators and converters. The easiest thing to do is to just update the validation message to only allow (xxx) xxx-xxxx phone numbers.

Comment by Ian Evans [ 15/Aug/12 05:59 PM ]

Revision: 986
Author: ievans
Date: 2012-08-15 10:59
Message: Modified validation messages to remove xxx-xxx-xxxx phone numbers as valid patterns. Still need to update the Chinese localized string.
Issue #JAVAEETUTORIAL-94 - Problems with Duke's Tutoring admin interface

Comment by Ian Evans [ 15/Aug/12 11:37 PM ]

Reassigning to Eric for checking in the Chinese locale validation messages.

Comment by jendrock [ 16/Aug/12 07:19 PM ]

Checked in the updated Simplified Chinese validation messages properties file (Revision 991) 2012-08-16 18:58:42 UTC.

Comment by jendrock [ 16/Aug/12 07:22 PM ]

All the fixes for this issue are now checked in. The fixed case study will be included in the 6.0.7-6 release.





[JAVAEETUTORIAL-91] Reviewer remarks in chapters should be resolved and/or removed Created: 25/May/12  Updated: 16/Aug/12  Resolved: 15/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

Type: Task Priority: Minor
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   

Several chapters still have substantive reviewer remarks – can these be resolved in some way?

ejb-intro.sgm
ejb-basicexamples.sgm
persistence-intro.sgm

ejb-async.sgm
interceptors.sgm
persistence-string-queries.sgm

I have some in a couple of JSF chapters that I need to fix, too.



 Comments   
Comment by Ian Evans [ 15/Aug/12 11:36 PM ]

Checked into source. This issue is not user-visible, but it's still fixed. 8^)





[JAVAEETUTORIAL-86] Explanation of contexts is confusing and unclear in JEE6 Tutorial Created: 25/Apr/12  Updated: 25/Jul/13  Resolved: 25/Jul/13

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 7.0.2

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

Tags:
Participants: billick, Ian Evans, jendrock and rcervera

 Description   

Here is the definition of 'context' given in the CDI section of the JEE6 Tutorial:

Overview of CDI

"Contexts: The ability to bind the lifecycle and interactions of stateful components to well-defined but extensible lifecycle contexts"

This is a circular definition. What is a context. How is it different from a 'lifecycle context'? If it isn't different then it really is a circular definition which isn't really a definition. If they are different things, why do they have the same name?

This is probably a good definition for someone who who knows the subject; but not for someone who really needs the tutorial.



 Comments   
Comment by jendrock [ 25/Apr/12 06:47 PM ]

This passage was not meant to be a definition of the term "contexts" but was intended to describe the services provided by the technology (CDI) in this area. This is indicated by the text that introduces the bullet list. In fact, the term isn't defined in the CDI specification or anywhere else that we could find! If you can find a valid definition, we would be glad to include it in the tutorial.

Comment by jendrock [ 30/May/12 03:55 PM ]

I suggest that you look at this issue and then use the definition provided by Paul Davies in the first section of Chapter 9, "Using Contexts and Dependency Injection for the Java EE Platform", in the Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server 12c Release 1 book. The meaning is essentially the same, but the grammar is slightly improved.

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

Ricardo: reassigning Chinmayee's CDI issues to you. This may have been fixed in the Java EE 7 Tutorial.

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

Fixed this issue in the source using Eric's suggestion.





[JAVAEETUTORIAL-79] Remove unneeded files in examples\common\sql\javadb Created: 21/Mar/12  Updated: 22/Mar/12  Resolved: 22/Mar/12

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7-2
Fix Version/s: 6.0.7-3

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

Tags:
Participants: Ian Evans and rcervera

 Description   

There are two unneeded files in the examples\common\sql\javadb directory: delete.sql and tutorial.sql. These files contain information about examples that no longer exist. Should they be deleted or at least removed from the bundle?



 Comments   
Comment by Ian Evans [ 22/Mar/12 12:36 AM ]

They should be removed, as we no longer use a tutorial-wide create/delete SQL file.

Comment by Ian Evans [ 22/Mar/12 12:39 AM ]

Removed files and folders.





[JAVAEETUTORIAL-77] Add illustrations to Chapter 46, Running the Resource Adapter Example Created: 21/Mar/12  Updated: 16/Aug/12  Due: 06/Apr/12  Resolved: 16/Aug/12

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

Type: Improvement Priority: Major
Reporter: jendrock Assignee: jendrock
Resolution: Won't Fix Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and jendrock

 Description   

Add some illustrations to Chapter 46, Running the Resource Adapter Example. There are four illustrations from which to choose in the whitepaper "Creating Resource Adapters with J2EE Connector Architecture 1.5". An adaptation of Figures 1, 3, and/or 4 would be worthwhile additions to the chapter. The flow of the application is complex, so an illustration would go a long way in clarifying application flow and component interactions.



 Comments   
Comment by jendrock [ 23/Mar/12 02:09 AM ]

I submitted a graphics request for all four illustrations on 3/22/2012. To check on the progress, go to http://fusiongraphics.us.oracle.com/projects/ and look for the submission under DOC Id: JEETT that requests 4 illustrations. I requested a first draft by 3/29 and a final set of graphics by 4/5.

Comment by Ian Evans [ 16/Aug/12 01:25 AM ]

Are these graphics done, Eric? If so, can we include them in the next update?

Comment by jendrock [ 16/Aug/12 07:30 PM ]

After examining the mailconnector example, there is no way to implement the MDB in a similar way in the example since we updated the example to use JSF (and managed beans). Therefore, it makes no sense to add new illustrations as they are not needed.

We will not fix this issue.





[JAVAEETUTORIAL-67] Provide an ePub, single-page html or other easily convertable format Created: 14/Mar/12  Updated: 05/Mar/14  Resolved: 05/Mar/14

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 7.0.4

Type: Improvement Priority: Minor
Reporter: 8086 Assignee: jendrock
Resolution: Won't Fix Votes: 1
Remaining Estimate: 3 hours
Time Spent: Not Specified
Original Estimate: 3 hours

Tags:
Participants: 8086, Ian Evans and jendrock

 Description   

In this day and age, an increasing amount of people are reading technical literature on their ebookreaders (like Kindle or Nook), smartphones (iPhone, Android) or tablets. PDF, although great for printing, is not really suited for these formats (fixed layout, pagination, A4/US-letter, etc). These devices support a wide variety of formats like RTF, ePub, HTML or pure text, and often the easy way is to convert the pdf into one of these format.

This route has varying degrees of success (OCR, page breaks, ... lots of obstacles), and in this case, most software that I have tried (including Calibre) fails to convert this pdf into any format (parsing failures). Therefore it would make sense to provide another format in addition to pdf that is more easily read on electronic reading devices without a fixed format.

A simple solution could be just a single-page, downloadable html file (zipped with images and stylesheets). This would be the least amount of work and easily convertable to other forms. An ePub would also be nice (read on most ebookreaders, all Android devices, and easy to convert to Mobi format for Kindle).



 Comments   
Comment by Ian Evans [ 15/Aug/12 11:40 PM ]

We're at the mercy of our internal authoring and publication tools here. But my understanding is that we might have this capability for the Java EE 7 release.

Comment by jendrock [ 04/Jan/13 10:10 PM ]

We will not be fixing this issue for the Java EE 6 Tutorial. We plan on providing both ePub and Mobi format files for the Java EE 7 Tutorial.

In the meantime, the first volume of the tutorial (The Java EE 6 Tutorial: Basic Concepts) is available in Kindle format. See http://www.amazon.com/The-Java-EE-Tutorial-ebook/dp/B004323DTG/ref=sr_1_4?ie=UTF8&qid=1357337093&sr=8-4&keywords=java+ee+6+tutorial.

The second volume (The Java EE 6 Tutorial: Advanced Topics) is due to be released on January 20, 2013. A Kindle version will likely be released in that timeframe as well. See http://www.amazon.com/The-Java-EE-Tutorial-Advanced/dp/0137081863/ref=sr_1_2?ie=UTF8&qid=1357337093&sr=8-2&keywords=java+ee+6+tutorial.

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

Reopening for Java EE 7.

We are still at the mercy of our publishing tools, but our tools will support ePub formats in a future release of the Java EE 7 Tutorial.

Comment by jendrock [ 05/Mar/14 07:28 PM ]

Earlier, we 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, we have been assured, 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 Java EE 7 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 (even though we have been assured that that will be the case).

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





[JAVAEETUTORIAL-66] "Configuring JavaServer Faces Applications" missing support for @ViewScoped annotation Created: 12/Mar/12  Updated: 05/Jun/12  Resolved: 05/Jun/12

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-2
Fix Version/s: 6.0.7-4

Type: Bug Priority: Major
Reporter: Ian Evans 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   

In Chapter 14 Configuring JavaServer Faces Applications; in the Using Annotations to Configure Managed Beans section, it states:

"You can also define the scope of the managed bean within the class file, as shown in the above example. You can annotate beans with request, session, or application scope, but not view scope."

Maybe that was true at some time in the past, but currently you can annotate a bean with view scope (@ViewScoped)



 Comments   
Comment by Kim Haase [ 04/Jun/12 05:55 PM ]

Thanks for catching this, Ian. Fix made, not yet checked in.

Comment by Kim Haase [ 05/Jun/12 07:32 PM ]

Checked in fix in JSF configuration chapter.





[JAVAEETUTORIAL-65] Consider create examples also using Maven Created: 07/Mar/12  Updated: 12/Jun/13  Resolved: 15/Aug/12

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

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

Issue Links:
Dependency
blocks JAVAEETUTORIAL-45 Move resource creation/deletion Ant t... Closed
Tags:
Participants: Brant Gurganus, Ian Evans and Manfred Riem

 Description   

Rationale a lot of large organizations use Maven instead of Ant.



 Comments   
Comment by Ian Evans [ 02/Apr/12 06:42 PM ]

We're looking into moving to Maven for Java EE 7. It would certainly be easier to support other IDEs and not have to maintain Ant build files.

I'll update this issue as we discuss the impact of changing our infrastructure to Maven.

Comment by Brant Gurganus [ 28/Jun/12 02:23 AM ]

I think the build system would be outside the scope of the information a tutorial on Java2 Enterprise Edition should cover. As is, the tutorial seems cluttered with: "Here's how to do it in Netbeans. Here's how to do it in Ant." I see merit in "Here's how to get up and running with Netbeans, Ant, Maven, Eclipse, etc." but having instructions for everything everywhere distracts from learning J2EE. This isn't a Maven tutorial, it's a J2EE tutorial.

An alternative approach that I think works is J2EE tutorial for Ant, J2EE tutorial for Netbeans, J2EE tutorial for Maven. Gentoo Linux used to do something along those lines generating architecture-specific installation guides so that the instructions for one architecture didn't distract from instructions for a different architecture. I don't know how the source for the tutorial is processed though to know how feasible such an idea might be.

Comment by Ian Evans [ 28/Jun/12 07:21 PM ]

Producing parallel tutorials is basically too much of a strain on our resources. We're looking at reducing the number of alternate build/deploy/run instructions by moving to a single build system in Maven that could be run within NetBeans (or any other Maven-aware IDE) and the mvn command line tool.

While technically the development and build environment is outside the scope of the Java EE platform, for the sake of our novice users we need explicit instructions on how to build and run our example applications. We get a lot of user feedback supporting this. We also get feedback from expert users like you that feel the build instructions get in the way. So we try to strike a balance between these two groups. We attempt to make our example applications runnable out of the box to the extent that it is possible, with as few steps as possible, and to do that we need to provide instructions for a common build environment.

We don't provide step-by-step instructions for creating Java EE applications using NetBeans, as that is (or should be) covered by the NetBeans documentation and our First Cup tutorial. We wouldn't provide instructions on, e.g. generating Java EE projects using Maven archetypes. Rather, the instructions would be similar to what we currently do with Ant: a set of steps to get the raw project deployed and running on the Java EE RI server.

Comment by Brant Gurganus [ 29/Jun/12 02:55 AM ]

I think you're on the right track then. It was sounding like Maven in addition to the existing Ant and Netbeans, and that'd definitely be a bit much. Glad you regard me as an expert user, haha. I'm actually pretty much a novice with J2EE, hence why I'm reading through the tutorial.

Comment by Ian Evans [ 15/Aug/12 05:51 PM ]

We will migrate our examples to use Maven for Java EE 7. Following the 6.0.7-6 release, we will branch the workspace for continuing Java EE 6 work, and migrate the examples in the trunk to Maven.

Comment by Ian Evans [ 15/Aug/12 05:52 PM ]

This improvement will be implemented in the Java EE 7 Tutorial and the Java EE 7 version of First Cup.

Comment by Ian Evans [ 12/Jun/13 06:55 PM ]

Java EE 7 was released today, as was the first Mavenized releases of the Java EE 7 Tutorial and First Cup tutorial examples:
https://blogs.oracle.com/thejavatutorials/entry/java_ee_7_tutorial_released





[JAVAEETUTORIAL-64] Consider adding instructions on how to package a custom component in its own JAR file for re-use Created: 07/Mar/12  Updated: 01/Aug/13  Resolved: 01/Aug/13

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

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

Tags:
Participants: Ian Evans, Kim Haase and Manfred Riem

 Comments   
Comment by Kim Haase [ 08/Mar/12 03:45 PM ]

Thanks for this suggestion. Would a custom component be packaged as a set of utility classes as in dukes-tutoring/dukes-tutoring-common? We could consider breaking out the custom component of dukes-bookstore this way, in the future.

Comment by Kim Haase [ 08/Mar/12 03:47 PM ]

Assigning to doc component, but may also involve an examples change.

Comment by Ian Evans [ 08/Mar/12 07:01 PM ]

The packaging would be similar to dukes-forest/dukes-resources and dukes-tutoring-common.

dukes-resources shows how to package composite components/images/CSS in a separate JAR file. Do we document how dukes-resources is packaged?

If Forest used custom components (i.e. components implemented as Java classes) they'd be packaged like this:
src/java/com/forest/web/CustomComponentName.java

Comment by Kim Haase [ 08/Mar/12 07:22 PM ]

dukes-resources uses the structure described (briefly) in http://docs.oracle.com/javaee/6/tutorial/doc/girgm.html and http://docs.oracle.com/javaee/6/tutorial/doc/glnrj.html#glwkw.

dukes-tutoring-common contains the entities as well as some utility classes and messages (one of which, DigestUtil, does not seem to be mentioned in the chapter).

Separating out the dukes-bookstore custom components would I think involve moving the components, model, renderers, and taglib into a separate jar (probably not the listeners, though). These are in several different packages.

Comment by Ian Evans [ 08/Mar/12 07:56 PM ]

DigestUtil is something of an orphan right now. Storing passwords clear in the database isn't a good idea, but getting digest auth to work isn't trivial. So I punted, for now, and DigestUtil should probably be removed until I figure it out.

The concept of a utility JAR isn't that complicated, so I don't know if we need to refactor dukes-bookstore for this.

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

If Manfred can point to some information on packaging custom components, I will attempt to provide this information for 7.0. Otherwise, I will close this as Won't Fix.

Comment by Manfred Riem [ 13/Feb/13 07:15 PM ]

See http://weblogs.java.net/blog/mriem/archive/2012/10/05/packaging-your-jsf-converter

Comment by Kim Haase [ 13/Feb/13 07:55 PM ]

Your example of a converter does not show the use of annotations. Do they change anything? We annotate the source code with @FacesComponent instead of declaring it in faces-config. Is faces-config necessary if you use annotations?

Also, for a component, what else would you need to package? The components, model, renderers, and taglib?

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

Closing, since I haven't received sufficient information on how to do this.





[JAVAEETUTORIAL-63] Entity and metamodel example classes in Criteria chapter don't match example queries Created: 06/Mar/12  Updated: 06/Mar/12  Resolved: 06/Mar/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-2
Fix Version/s: 6.0.7-3

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   

Entity & metamodel class shown here:
http://docs.oracle.com/javaee/6/tutorial/doc/gjiup.html
should use Owner, not Person, for relationships to match the criteria queries examples that follow in the chapter.



 Comments   
Comment by Ian Evans [ 06/Mar/12 09:45 PM ]

Fixed in source, and it will appear in the next release.





[JAVAEETUTORIAL-62] There is no "Servers" menu under "Tools"... Created: 26/Feb/12  Updated: 16/Aug/12  Resolved: 27/Feb/12

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: None

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

File Attachments: PNG File netBeans7.1ToolsMenu.png    
Tags:
Participants: fredstluka and Ian Evans

 Description   

On page: http://docs.oracle.com/javaee/6/tutorial/doc/gexaj.html
it says:

From the Tools menu, choose Servers.

The Servers wizard opens.
Click Add Server.

but there is no "Servers" menu under "Tools", so it should say:

From the Window menu, choose Services.

The Services wizard opens.
Right-click Servers.
Click Add Server.

--Fred Stluka



 Comments   
Comment by Ian Evans [ 27/Feb/12 08:10 PM ]

Which version of NetBeans are you using? In 7.1, I do have Tools > Servers.

Comment by fredstluka [ 27/Feb/12 08:56 PM ]

I'm using 7.1 on a Mac.

Under Tools, I see Plugins, but no Servers.

--Fred

Comment by Ian Evans [ 27/Feb/12 09:15 PM ]

Here's a screen shot of the NetBeans 7.1 Tools menu on OS X. Note that your NetBeans distribution either must be Java EE, or you must enable Java EE support through the NetBeans Plugins menu in order for Servers to show up.

Comment by Ian Evans [ 27/Feb/12 09:33 PM ]

Marking as Invalid, as I suspect the problem lies with the NetBeans distribution the reporter is using.

Comment by fredstluka [ 27/Feb/12 10:12 PM ]

Interesting....

I've been using Eclipse for years, but wanted to try NetBeans. I followed
your instructions to download and install it. Therefore, I did not yet have
any projects defined in NetBeans.

There was no Servers under the Tools menu, nor any of the other menu
items you show. Only Plugins all by itself.

Today, I finally used NetBeans to open a project. Now my Tools menu looks
more like the one in your PNG file. Looks like Servers and some other menu
items are only there if there are projects defined.

You should update the instructions to deal with the case of a user who
has just used your instructions to install NetBeans, and has not yet opened
or created a project.

Good instructions, anyhow. Thanks!
--Fred

Comment by Ian Evans [ 27/Feb/12 10:36 PM ]

This might be a good FAQ item, or a possible note in the instructions.

I don't know why NetBeans would depend on a project to be defined to fully populate the UI. That is very confusing. You might want to file a NetBeans bug on this.

Comment by fredstluka [ 03/Mar/12 04:38 AM ]

I agree. Please update the instructions, and perhaps add it to the FAQ.

I also agree that it seems like a NetBeans bug, so I reported it to them:

--Fred





[JAVAEETUTORIAL-60] Can't log in to Administration Interface for Dukes Tutoring Created: 24/Feb/12  Updated: 24/Feb/12  Resolved: 24/Feb/12

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

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

JDK 7 Update 3, NB 7.1.1 RC1, GF 3.1.2 b23, Win XP SP3


Tags:
Participants: Ian Evans and jendrock

 Description   

Created multiple users in file realm, all in "admins" group. None can log in with Admin interface for Duke's Tutoring. Server log divulges the following clues after logging in as tutu, a member of the admins group:

WARNING: JSF1090: Navigation case not resolved for component j_idt17.
WARNING: Unable to find component with ID usernameInput in view.
WARNING: Unable to find component with ID passwordInput in view.
WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception
WARNING: JSF1090: Navigation case not resolved for component j_idt17.

The loginError.xhtml page is displayed, saying the following, including the unresolved tags:

Invalid name or password.

Please enter a user name or password that is authorized to access this application. For this application, this means a user that has been created in the <code>file</code> realm and has been assigned to the <em>group</em> of <code>admins</code>.

A dump of the page source reveals this:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Duke's Tutoring</title><link type="text/css" rel="stylesheet" href="/dukes-tutoring/javax.faces.resource/default.css.xhtml?ln=css" /><link type="text/css" rel="stylesheet" href="/dukes-tutoring/javax.faces.resource/cssLayout.css.xhtml?ln=css" /></head><body>
<form id="j_idt7" name="j_idt7" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_idt7" value="j_idt7" />
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
</form>

<div id="top" class="top"><html xmlns="http://www.w3.org/1999/xhtml">

<h1>Duke's Tutoring: Administration Panel</h1>

</html>
</div>
<div>
<div id="left"><html xmlns="http://www.w3.org/1999/xhtml">
<form id="j_idt14" name="j_idt14" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_idt14" value="j_idt14" />
<a href="/dukes-tutoring/admin/index.xhtml">Administration main page</a>
<br /><span>Create new student</span>
<br /><a href="/dukes-tutoring/admin/student/activateStudent.xhtml">Activate student</a>

<br /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
</form>
</html>
</div>
<div id="content" class="left_content">
<p>Invalid name or password.</p>

<p>Please enter a user name or password that is authorized to access this application. For this application, this means a user that has been created in the <code>file</code> realm and has been assigned to the <em>group</em> of <code>admins</code>.</p>

<form id="j_idt25" name="j_idt25" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_idt25" value="j_idt25" />

<script type="text/javascript" src="/dukes-tutoring/javax.faces.resource/jsf.js.xhtml?ln=javax.faces"></script>
<a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt25'),{'j_idt25:j_idt26':'j_idt25:j_idt26'},'');return false">Login page</a><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
</form>
</div>
</div></body>

</html>



 Comments   
Comment by jendrock [ 24/Feb/12 10:29 PM ]

By the way, we always get these warning messages with all of the JSF + HTML hybrid login forms:

WARNING: Unable to find component with ID usernameInput in view.
WARNING: Unable to find component with ID passwordInput in view.

The ID may vary from form to form, but we always see the same warning.

The warnings we were more concerned about were the other ones.

Comment by Ian Evans [ 24/Feb/12 11:05 PM ]

The current version of the app doesn't use file realm users, it uses a JDBC realm. The admin@example.com user is created in ConfigBean (password "javaee").





[JAVAEETUTORIAL-59] Can't build dukes-tutoring in NetBeans Created: 24/Feb/12  Updated: 07/Mar/12  Resolved: 07/Mar/12

Status: Resolved
Project: javaeetutorial
Component/s: examples
Affects Version/s: 6.0.7
Fix Version/s: 6.0.7-3

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

Tags:
Participants: Ian Evans and Kim Haase

 Description   

I just did an svn update on Windows, ran "ant create-tutoring-realm" with no problems, opened dukes-tutoring-war and dukes-tutoring-common in NB 7.1.1 RC1 with b23 of the SDK, and right-clicked and chose "Run", following the instructions in the chapter.

I got the following error:

In-place deployment at C:\tut-ws\trunk\examples\case-studies\dukes-tutoring\dukes-tutoring-war\build\web
deploy?DEFAULT=C:\tut-ws\trunk\examples\case-studies\dukes-tutoring\dukes-tutoring-war\build\web&name=dukes-tutoring-war&contextroot=/dukes-tutoring&force=true failed on GlassFish Server 3+
Error occurred during deployment: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [dukestutoring.ejb.AdminBean/em] in the scope of the module called [dukes-tutoring-war]. Please verify your application.. Please see server.log for more details.
C:\tut-ws\trunk\examples\case-studies\dukes-tutoring\dukes-tutoring-war\nbproject\build-impl.xml:733: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 8 seconds)

There seem to be identical persistence.xml files in both dukes-tutoring-war and dukes-tutoring-common. So I'm stumped.



 Comments   
Comment by Kim Haase [ 24/Feb/12 09:22 PM ]

(I would try on Solaris, not that it matters, but I can't download junit on Solaris, because there isn't a plugin available. I might be able to for a released version of NB – not sure. Is junit essential to this project?)

Comment by Kim Haase [ 24/Feb/12 09:56 PM ]

The instructions to create a user in the group "admins" are no longer in the chapter, but following them makes no difference.

Strangely, Eric can build and deploy on Windows, but he gets errors trying to log in. The only difference we can find is that I am using JDK 6 and he is using JDK 7. That shouldn't make any difference.

Comment by Ian Evans [ 24/Feb/12 11:08 PM ]

The instructions for creating an admin user in the file realm are no longer necessary, because I'm using a JDBC realm now, with a default admin user: admin@example.com, password: javaee.

Could you attach your server.log file? I've removed the persistence.xml file from dukes-tutoring-war, so there's only one. I'm guessing there was some deployment error that is reported in server.log that is causing that ultimate error message.

Comment by Kim Haase [ 24/Feb/12 11:17 PM ]

This is the relevant output from the server log. I didn't include it before because it seemed singularly unhelpful, but maybe you can find some illumination:

SEVERE: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [dukestutoring.ejb.RequestBean/em] in the scope of the module called [dukes-tutoring-war]. Please verify your application.
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
SEVERE: Exception while preparing the app
SEVERE: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [dukestutoring.ejb.RequestBean/em] in the scope of the module called [dukes-tutoring-war]. Please verify your application.
java.lang.RuntimeException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [dukestutoring.ejb.RequestBean/em] in the scope of the module called [dukes-tutoring-war]. Please verify your application.
at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:694)
at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:682)
at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1056)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:186)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

SEVERE: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [dukestutoring.ejb.RequestBean/em] in the scope of the module called [dukes-tutoring-war]. Please verify your application.

Comment by Ian Evans [ 25/Feb/12 12:12 AM ]

Other users have gotten this error when there are multiple persistence.xml files in the archive. But this shouldn't be the case, as I removed persistence.xml from dukes-tutoring-war. It should only be in dukes-tutoring-common/META-INF.

Make sure there are no stray persistence.xml files in dukes-tutoring-war.

Comment by Kim Haase [ 25/Feb/12 01:36 AM ]

Actually, I think there were two persistence.xml files in spite of numerous svn updates. I will try again Monday.

Comment by Ian Evans [ 07/Mar/12 07:11 PM ]

You can see here:
http://java.net/projects/javaeetutorial/sources/svn/show/trunk/examples/case-studies/dukes-tutoring/dukes-tutoring-war/web/WEB-INF?rev=883
that persistence.xml is not part of the latest commit.

Could you double-check that the app deploys in a clean workspace?

Comment by Kim Haase [ 07/Mar/12 08:41 PM ]

There is only one persistence.xml file. However, the app fails to deploy if I use the command line only, and not NetBeans. It appears that a JDBC resource is not created? I did the following:

asadmin start-database
asadmin start-domain --verbose

cd dukes-tutoring/dukes-tutoring-war

ant create-tutoring-realm

ant all

deploy:
[exec] Command deploy failed.
[exec] remote failure: Error occurred during deployment: Exception while preparing the app : Invalid resource : jdbc/tutoring__pm. Please see server.log for more details.

BUILD FAILED
/export/home/chaase/tut-ws/javaeetutorial/trunk/examples/bp-project/command-line-ant-tasks.xml:211: The following error occurred while executing this line:
/export/home/chaase/tut-ws/javaeetutorial/trunk/examples/bp-project/app-server-ant.xml:434: exec returned: 1

In my experience, if you want Ant to run the setup/glassfish-resources.xml file to create the resources, you need the following target in build.xml:

<target name="-pre-deploy" unless="netbeans.home" depends="init">
<antcall target="add-resources"/>
</target>

I'll try with NetBeans. I seem to remember it worked that way last week.

Comment by Ian Evans [ 07/Mar/12 10:15 PM ]

Revision: 884
Author: ievans
Date: 2012-03-07 14:14
Message: Added -pre-deploy target to create resources and realm for ant users.
Issue #JAVAEETUTORIAL-59 - Can't build dukes-tutoring in NetBeans

Comment by Kim Haase [ 07/Mar/12 10:25 PM ]

I confirmed that it works fine in Netbeans, since NB creates the resources. (Even on Solaris, now that NB 7.1.1 is released and the plugins are downloadable.)





[JAVAEETUTORIAL-57] Note on changing timeout element needs fixing Created: 10/Jan/12  Updated: 16/Aug/12  Resolved: 24/Feb/12

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

Type: Bug Priority: Minor
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   

There's a Note just above the instructions for running timersession:

http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html#bnbpf

It tells people to edit domain.xml, which is not something we normally advise – they ought to use the admin console.

It also tells them to change an element that doesn't seem to be in domain.xml any more, even. By default, all you see is

<ejb-timer-service></ejb-timer-service>

After I changed the default with the admin console, the following appears:

<ejb-timer-service minimum-delivery-interval-in-millis="500"></ejb-timer-service>

This indicates that minimum-delivery-interval-in-millis is an attribute of ejb-timer-service, not an element. I don't know how long this has been the case.

The note should be corrected.



 Comments   
Comment by Ian Evans [ 30/Jan/12 09:17 PM ]

There is some contradiction in the settings for minimum-delivery-interval-in-millis. According to glassfish/dtds/sun-domain_1_3.dtd the default value is 7,000 milliseconds:
<!ATTLIST ejb-timer-service
minimum-delivery-interval-in-millis CDATA "7000"
max-redeliveries CDATA "1"
timer-datasource CDATA #IMPLIED
redelivery-interval-internal-in-millis CDATA "5000">

But if you go to the Admin Console, in Configurations -> default-config -> EJB Container in the EJB Timer Service tab, the default Minimum Delivery Interval is 1,000 milliseconds.

I'm going to check with Marina to find out what the actual default is.

Comment by Ian Evans [ 30/Jan/12 09:20 PM ]

BTW, I think this Note was added before the Admin Console exposed the Timer Service's settings. I'll update the Note to tell users to use the Admin Console.

Comment by Ian Evans [ 31/Jan/12 12:58 AM ]

Marina confirmed that the value is now 1000. It's possible the DTD has the old value, and that's a bug against GlassFish.

Comment by Ian Evans [ 24/Feb/12 11:13 PM ]

Fixed in source, will appear in the next update, with GlassFish 3.1.2.





[JAVAEETUTORIAL-55] Explanation of JavaFX needs to be updated Created: 11/Oct/11  Updated: 11/Oct/11  Resolved: 11/Oct/11

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

Type: Bug Priority: Major
Reporter: michael.heinrichs Assignee: Unassigned
Resolution: Invalid Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: Ian Evans and michael.heinrichs

 Description   

The explanation of JavaFX on the page "Differences between JavaEE and JavaSE" needs to be updated to reflect the new approach of JavaFX 2.0.



 Comments   
Comment by Ian Evans [ 11/Oct/11 07:04 PM ]

Issue is in First Cup, not the Java EE Tutorial. Created bug FIRSTCUP-5 to track issue.





[JAVAEETUTORIAL-54] Wrong bit of Java code in Advanced JAX-RS Features - Annotations for Field and Bean Properties of Resource Classes Created: 05/Oct/11  Updated: 16/Aug/12  Resolved: 05/Oct/11

Status: Resolved
Project: javaeetutorial
Component/s: www
Affects Version/s: 6.0.4
Fix Version/s: 6.0.7

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

Tags:
Participants: Ian Evans and jirusok

 Description   

On this page http://download.oracle.com/javaee/6/tutorial/doc/gkkrb.html this bit of code is incorrect:

@Path(/employees/{"firstname}.{lastname[a-zA-Z]*}@{domain}.com")

I guess it should be:
@Path("/employees/{firstname}.{lastname[a-zA-Z]*}@{domain}.com")



 Comments   
Comment by Ian Evans [ 05/Oct/11 07:43 PM ]

Looks like a lot of the @Path annotations in the code snippets have incorrect opening quote locations.

Fixed all @Path annotations in source. This fix will appear in the next update to the Tutorial.





[JAVAEETUTORIAL-53] Need to document that you can use EL resource references in JSF stylesheets and scripts Created: 22/Sep/11  Updated: 16/Aug/12  Resolved: 18/Oct/11

Status: Resolved
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7
Fix Version/s: 6.0.7-5

Type: Improvement Priority: Major
Reporter: Ian Evans Assignee: Kim Haase
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   

If you are using <h:outputStylesheet> or <h:outputScript>, the referenced stylesheets/scripts can use the EL resource syntax. Developers may need to do this to make references to other resources in their stylesheets or scripts.

For example, if your resource library has a stylesheet that defines a background image, you can't refer to it by URL, since it's part of a resource library, and the image is also a resource. So you use a resource reference in the CSS:
background: #fff url(#{resource['img:background.jpg']}

The JSF runtime will substitute the resource reference with the actual location in the application. E.g.:
background: #fff url(/dukes-shipment/javax.faces.resource/background.jpg.xhtml?ln=img)

Why background.jpg.xhtml? It's the extension specified by the JSF servlet in web.xml.

This section should be updated:
http://download.oracle.com/javaee/6/tutorial/doc/bnarf.html#gjgep

See section 2.6.1 of the JSF 2 spec for the resource reference syntax.



 Comments   
Comment by William Markito [ 22/Sep/11 07:48 PM ]

As an example, dukes-forest case study will use this feature.

When using the tags above, the whole stylesheet/javascript will be imported and processed by Faces Servlet through /javax.faces.resource/. Accessing the page source will show the complete url generated by JSF runtime.

The default pattern for resources usage is #{resource['library:location']} and JSF will replace with the right path.

Comment by Kim Haase [ 18/Oct/11 03:41 PM ]

Duke's Store uses this syntax in its default.css file. However, the actual location doesn't show up in the page source, only the reference to the CSS file. The images, of course, do appear.

Comment by Kim Haase [ 18/Oct/11 05:49 PM ]

I have added this information to the recommended section. Further suggestions welcome.





[JAVAEETUTORIAL-52] Security chapter still refers to sun-web.xml Created: 22/Sep/11  Updated: 25/May/12  Resolved: 25/May/12

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7
Fix Version/s: 6.0.7-3

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   

http://java.sun.com/javaee/6/docs/tutorial/doc/bncbe.html#bncbk

There are references to sun-*.xml for GlassFish-specific deployment descriptors in "Using Deployment Descriptors to Secure Web Applications."

These should be changed to glassfish-*.xml.



 Comments   
Comment by Kim Haase [ 22/Sep/11 01:23 PM ]

I've actually fixed this in source though I may not have checked it in yet. Will plan on doing a checkin by the end of the week.

Comment by jendrock [ 25/May/12 09:21 PM ]

Fixed in 6.0.7-3. Also note that the content was moved from a chapter in the basic section to a section in the chapter that addresses advanced security topics.





[JAVAEETUTORIAL-51] bp-project clean task should delete subdirectories of an ear Created: 24/Aug/11  Updated: 25/Aug/11  Resolved: 24/Aug/11

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

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

Tags:
Participants: Ian Evans and Kim Haase

 Description   

The examples/bp-project clean task used to delete all the component build/dist directories in an ear. It doesn't any more. If you have an ear, the clean-and-build process is no longer clean.

The glassfish/samples version works, but the javaeetutorial one doesn't. The targets in ear-ant.xml seem to be identical:

<target name="-pre-clean">
<iterate target="clean"/>
</target>

The difference, so far as I can see, is that the javaeetutorial version of command-line-ant-tasks.xml contains the following targets:

<target name="-pre-clean"/>
<target name="-post-clean"/>
<target name="clean" depends="-pre-clean,bpp-actual-clean,-post-clean"/>
<target name="bpp-actual-clean" depends="-pre-clean"
description="removes the generated directories like build and dist">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${client.jar.dir}" />
</target>

Whereas the one in glassfish/samples contains only

<target name="clean" depends="-pre-clean"
description="removes the generated directories like build and dist">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${client.jar.dir}" />
</target>

Why that makes a difference I don't know, but I tried replacing our target with the old one and the subdirectories are again cleaned.

Is there a reason why we changed it to stop being iterative? Was that the intention? If not, it would be good to change it back if possible.



 Comments   
Comment by Ian Evans [ 24/Aug/11 10:57 PM ]

I traced the issue to the -pre-clean target in command-line-ant-tasks.xml. If -pre-clean is defined in command-line-ant-tasks.xml, the -pre-clean target defined in ear-ant.xml that iterates through the subprojects won't get called.

Removing -pre-clean from command-line-ant-tasks.xml fixes this.

Comment by Ian Evans [ 24/Aug/11 10:59 PM ]

Revision: 642
Author: ievans
Date: 2011-08-24 15:59
Message: Removed dummy -pre-clean target from command-line-ant-tasks.xml to fix issue with EAR sub-projects not cleaning.
Issue #JAVAEETUTORIAL-51 - bp-project clean task should delete subdirectories of an ear

Comment by Kim Haase [ 25/Aug/11 12:00 AM ]

Thanks very much, Ian, for figuring out the underlying reason for the problem.





[JAVAEETUTORIAL-50] Refactor Duke's Forest to use JSF relocatable resource libraries for CSS, graphics, localized strings, JavaScript Created: 24/Aug/11  Updated: 15/Feb/12  Resolved: 15/Feb/12

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

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

Issue Links:
Related
is related to JAVAEETUTORIAL-49 Relocatable resources aren't document... Resolved
Tags:
Participants: Ian Evans and William Markito

 Description   

Create a common JAR for Duke's Forest that contains events, localized strings, and resources. The resources should be packaged according to the rules in the JSF 2.0 spec, section 2.6.1. See issue JAVAEETUTORIAL-49 for details.



 Comments   
Comment by Ian Evans [ 24/Aug/11 04:22 PM ]

Linking issues about JSF relocatable resources.

Comment by William Markito [ 15/Feb/12 04:36 PM ]

All resources were moved to an external project and it's being referenced through JSF resource APIs.





[JAVAEETUTORIAL-49] Relocatable resources aren't documented in the JSF chapters Created: 24/Aug/11  Updated: 27/Feb/12  Resolved: 27/Feb/12

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

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

Issue Links:
Related
is related to JAVAEETUTORIAL-50 Refactor Duke's Forest to use JSF rel... Resolved
Tags:
Participants: Ian Evans and Kim Haase

 Description   

JSF 2.0 has the ability to package resources into reusable libraries, and refer to resources in these libraries using a resource identifier syntax. This feature isn't documented in the JSF chapters of the Tutorial.

See section 2.6.1, "Packaging Resources," of the JSF 2.0 spec.

In addition to resources in the web app root's resources directory, e.g.:
web/resources/css/local.css

You can package a JAR file within the WAR that contains the following structure:
META-INF/resources/css/external.css

You can then refer to the CSS files as follows:
<h:head>
<h:outputStylesheet name="#{resource['css/local.css']}" />
<h:outputStylesheet name="#{resource['css/external.css']}" />
</h:head>



 Comments   
Comment by Kim Haase [ 17/Oct/11 08:26 PM ]

My understanding is that strictly speaking, the term "relocatable resource" refers to the fact that you can include a resource reference in one place on the page (say, the body) and specify another location for it, like the head, using the target attribute. This is described in Section 2.6.2.1 of the JSF 2.1 spec.

The section http://download.oracle.com/javaee/6/tutorial/doc/bnarf.html#gjgep discusses this subject, including specifying the target as "#{param.location}" to make the resource dynamically relocatable.

Packaging resources into libraries does need further documentation beyond what is in http://download.oracle.com/javaee/6/tutorial/doc/girgm.html, but that's not the same thing as relocatable resources. Should the issue be retitled, say to "Packaging resource libraries isn't documented ...."?

Another issue: I have trouble getting this syntax to work:

<h:outputStylesheet name="#{resource['css/local.css']}" />

According to the spec, you have to say

<h:outputStylesheet name="#{resource['css:local.css']}" />

However, neither seems to work, at least for stylesheets. With both, the generated HTML has

<link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />

The server has the following warning for both:

WARNING: JSF1091: No mime type could be found for file /guessnumber/faces/javax.faces.resource/default.css?ln=css. To resolve this, add a mime-type mapping to the applications web.xml.

The library/name attributes work fine, though:

<h:outputStylesheet library="css" name="local.css" />

Comment by Kim Haase [ 18/Oct/11 05:40 PM ]

It may be that the reason you can use the square-bracket resource identifier syntax with a graphicImage tag but not with outputStylesheet or outputScript may be that the square-bracket syntax is a ValueExpression that evaluates to an Object, the required argument for the graphicImage tag's value attribute. The required name attribute of outputStylesheet and outputScript takes a ValueExpression that evaluates to a String.

Comment by Kim Haase [ 18/Oct/11 05:53 PM ]

I have added much of this information to the "Facelets" and "Using JavaServer Faces Technology in Web Pages" chapters but am planning to save the information about packaging resources in JAR files for the chapter on the Duke's Forest example. There is no logical place to put it in the existing advanced JSF chapters, I think.

Comment by Kim Haase [ 16/Feb/12 03:55 PM ]

In the Facelets chapter, added an additional sentence and a forward reference (combined tutorial only) to the Duke's Forest chapter.

Comment by Kim Haase [ 27/Feb/12 08:41 PM ]

Documented feature in Facelets chapter, checked in to workspace. If more is needed, please let me know.





[JAVAEETUTORIAL-47] Add a paragraph to the intro chapter of JPA on the different entity states Created: 19/Aug/11  Updated: 05/Oct/11  Resolved: 05/Oct/11

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

Type: 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   

A lot of developers new to JPA don't understand the various entity states (detached, managed, etc.). Add a paragraph to the JPA intro chapter defining these states with examples of when an entity is in each state.



 Comments   
Comment by Ian Evans [ 05/Oct/11 08:34 PM ]

Changed the title of the following section:
http://download.oracle.com/javaee/6/tutorial/doc/bnbqw.html#bnbrc
from "Managing an Entity Instance's Lifecycle" to "Managing Entity State".

Expanded the description of the different states of an entity, including examples, and added a new section on detached entities.

Added a link from the main "Entities" section to "Managing Entities."

Comment by Ian Evans [ 05/Oct/11 08:35 PM ]

Updated content will be in the next release of the Tutorial.





[JAVAEETUTORIAL-46] Add database schema graphic to JPA example apps Created: 19/Aug/11  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7
Fix Version/s: 6.0.7-6

Type: Task 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 and jendrock

 Description   

We used to have graphics that showed the database schema of the JPA examples.

I'll send some sketches to Jordan so the graphics team can clean them up.



 Comments   
Comment by jendrock [ 05/Feb/13 06:07 PM ]

Jordan created two illustrations, one for roster and the other for order. Both figures have been included in the 6.0.7 IPS package and are available online. See the fix for order here: http://docs.oracle.com/javaee/6/tutorial/doc/giqst.html and the fix for roster here: http://docs.oracle.com/javaee/6/tutorial/doc/giqsq.html.





[JAVAEETUTORIAL-45] Move resource creation/deletion Ant tasks from bp-project/app-server-ant.xml to a separate bp-project/resources-ant.xml file Created: 18/Aug/11  Updated: 20/Aug/12  Due: 15/May/12  Resolved: 20/Aug/12

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

Type: Task 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

Issue Links:
Dependency
depends on JAVAEETUTORIAL-65 Consider create examples also using M... Resolved
Tags:
Participants: Ian Evans and jendrock

 Description   

For Java EE 7, we need to move all Ant tasks that relate to resource creation/deletion (that is all JavaMail, JMS, JDBC, Connector, etc. resource creation and deletion tasks) from bp-project/app-server-ant.xml into a new standalone bp-project/resources-ant.xml file.

After that has been done, all build.xml files in all examples that call any of these tasks will need to be updated by adding a a new property, uses.resources, to trigger using the new file.



 Comments   
Comment by Ian Evans [ 17/Apr/12 05:23 PM ]

Bumping down priority, as this task may not be necessary if we move to Maven for EE 7.

Comment by Ian Evans [ 20/Aug/12 05:25 PM ]

Resource creation won't be handled in Ant, as we are migrating to Maven-based projects.

Comment by Ian Evans [ 20/Aug/12 05:27 PM ]

We are moving our projects to Maven, so we do not need an Ant-based set of targets for resource creation/deletion.

Additionally, Java EE 7 may include standardized resource creation via deployment descriptors.





[JAVAEETUTORIAL-44] Portable JNDI Syntax is wrong in case of java:app module name optionality Created: 27/Jul/11  Updated: 05/Oct/11  Resolved: 05/Oct/11

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

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

Tags:
Participants: Ian Evans and manovotny

 Description   

http://download.oracle.com/javaee/6/tutorial/doc/gipjf.html#girgn section Portable JNDI Syntax mentions:

<snip>
java:app[/module name]/enterprise bean name[/interface name]

The module name is optional. The interface name is required only if the enterprise bean implements more than one business interface.
</snip>

In reality The module name is required. See EJB 3.1 specification at http://download.oracle.com/auth/otn-pub/jcp/ejb-3.1-fr-eval-oth-JSpec/ejb-3_1-fr-spec.pdf?e=1311772950&h=a0872b78b5b94d887090450959a0547b

<blockquote>
4.4.1.1java:app
The java:app prefix allows a component executing within a Java EE application to access an application-specific namespace. The resulting syntax is :
java:app/<module-name>/<bean-name>[!<fully-qualified-interface-name>]

Note that <module-name> is a required part of the syntax, even for names based on session bean components packaged within a stand-alone module.

</blockquote>



 Comments   
Comment by Ian Evans [ 05/Oct/11 07:47 PM ]

Fixed in source. This fix will appear in the next update to the Tutorial.





[JAVAEETUTORIAL-39] New chapters must be indexed Created: 14/Jul/11  Updated: 16/Aug/12  Due: 15/Aug/11  Resolved: 16/Aug/12

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.7-5
Fix Version/s: 6.0.7-6

Type: Task Priority: Major
Reporter: jendrock 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   

All new chapters need to be indexed, following the indexing format, terminology, conventions, and consistency that are present in the original chapters. Chapters that need to be indexed include the following: ajax.sgm, bean-validation-advanced.sgm, cdi-adv.sgm, cdi-adv-examples.sgm, dukes-tutoring.sgm, ejb-async.sgm, ejb-embedded, interceptors.sgm, jaxrs-advanced.sgm, jaxrs-advanced-examples.sgm, jsfconfigure.sgm, jsfcustom.sgm, jsflifecycle.sgm, jsfmodels.sgm, persistence-cache.sgm, persistence-locking.sgm, persistence-string-queries.sgm, and webi18n.sgm. Additional chapters will be added to this list as they are completed.



 Comments   
Comment by Kim Haase [ 25/May/12 02:33 PM ]

Most of these have been indexed already; added index entries to persistence-cache.sgm, persistence-locking.sgm, and persistence-string-queries.sgm.

Comment by Kim Haase [ 06/Jun/12 08:17 PM ]

I believe all the indexing is done except for the content we are still waiting for (servlet, CDI).

Comment by Ian Evans [ 16/Aug/12 01:21 AM ]

Kim: is this issue still open?

Comment by Kim Haase [ 16/Aug/12 12:53 PM ]

Thanks for checking, Ian – we did finish the indexing, possibly even before the respin, but I'm leaving the release as 6.0.7-6 just in case.





[JAVAEETUTORIAL-37] Remove screenshots from instructions Created: 08/Jun/11  Updated: 17/Aug/11  Resolved: 17/Aug/11

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

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: Kim Haase
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   

In preparation for DARB post-processor, remove all screenshots from the tutorial chapters. They're usually unnecessary, and they're difficult to display within the frame of our new doc output.



 Comments   
Comment by Kim Haase [ 08/Jun/11 11:32 AM ]

Eric and I are working on this. Hope we aren't tromping on anyone else.

Comment by jendrock [ 13/Jul/11 04:23 PM ]

There are four small partial screen shots, some annotated and some not, that we can replace with illustrations after they have been redone by the graphic illustrator. I have submitted a work request for this task, specifically for Figures 7-1, 7-2, 7-3, and 7-4.

Comment by Kim Haase [ 17/Aug/11 01:45 PM ]

All screenshots were removed from the book.





[JAVAEETUTORIAL-36] Issues with Ant instructions for persistence examples Created: 08/Jun/11  Updated: 27/Jul/11  Resolved: 27/Jul/11

Status: Resolved
Project: javaeetutorial
Component/s: doc, examples
Affects Version/s: 6.0.6
Fix Version/s: 6.0.7

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   

There are some problems running the persistence examples with Ant.

order:

The instructions say that an "all" target exists for this example, although there is none. Either the mention of the all target should be removed from the chapter, or the target should be added to build.xml.

Using "ant" and "ant deploy" works fine.

roster:

The javaee.home property is hardcoded in project.properties, so the deployment fails:

BUILD FAILED
/export/home/chaase/tut-ws/javaeetutorial/trunk/examples/persistence/roster/build.xml:28: The following error occurred while executing this line:
/export/home/chaase/tut-ws/javaeetutorial/trunk/examples/bp-project/app-server-ant.xml:145: The directory /export/home/chaase/tut-ws/javaeetutorial/trunk/examples/persistence/roster/c:/Sun/AppServerPE does not exist

Total time: 19 seconds
jdench 690 =>grep Sun /
nbproject/project.properties:javaee.home=c:/Sun/AppServerPE

address-book:

The chapter has instructions for using Ant, but the build.xml file still works only with NetBeans. The file needs to be modified.



 Comments   
Comment by Ian Evans [ 08/Jun/11 11:55 AM ]

roster actually does have an all task. order and address-book do not.

Comment by Kim Haase [ 08/Jun/11 01:18 PM ]

Oops, I'm sorry that I got mixed up.

There's an EJB example with a similar problem to address-book: ejb/interceptor, which has Ant instructions in the chapter but whose build.xml file is still NetBeans-only.

Comment by Ian Evans [ 27/Jul/11 07:56 PM ]

All tasks added to order and address-book.





[JAVAEETUTORIAL-32] html tags in examples must have lang attribute Created: 03/Jun/11  Updated: 21/Feb/13  Resolved: 21/Feb/13

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

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

Issue Links:
Related
is related to JAVAEETUTORIAL-40 Internationalize the dukes-forest cas... Closed
Tags:
Participants: Ian Evans, Kim Haase and William Markito

 Description   

All HTML tags in our examples must have the LANG attribute set.

It appears that for the simple case where the example is English-only, hardcoding the LANG attribute in the HTML tag may be the way to go:

<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
...

However, it appears that for the case studies, where the locale can change dynamically, we need to do some coding so that the current locale can be retrieved. I don't know how well something like this would actually work, but maybe one of you can try it out:

http://stackoverflow.com/questions/4830588/jsf-locale-is-set-per-request-not-for-session

Our apps are different in that they get the locale from the browser setting instead of having the user set it in the app; that might simplify things.

I can check in fixes for the simple cases and then un-assign myself so the case study authors can work on those.



 Comments   
Comment by Kim Haase [ 09/Jun/11 09:55 AM ]

I've completed this work for all but the case studies.

Comment by Kim Haase [ 09/Jun/11 09:56 AM ]

Unassigning so case study authors can do this work – though I can do it, if you prefer.

Comment by Kim Haase [ 08/Jul/11 01:36 PM ]

Ian, thanks for picking this up. While you are fixing this for dukes-tutoring you might also add a summary attribute to the h:dataTable element in any files that use one. Or would you rather I filed a separate issue for table summary problems?

Comment by Ian Evans [ 27/Jul/11 06:54 PM ]

Re-assigning to William for Duke's Forest.

Comment by Kim Haase [ 17/Aug/11 01:38 PM ]

This task is really part of the task of internationalizing dukes-forest. It will probably involve creating a locale bean like the one used by dukes-tutoring, and setting the lang attribute to the value of the locale bean's language property.

Comment by Kim Haase [ 05/Jun/12 09:02 PM ]