[JAVAEETUTORIAL-160] resource adapter example issues Created: 05/Apr/13  Updated: 11/Apr/13  Resolved: 11/Apr/13

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

Type: Bug Priority: Major
Reporter: treaz Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 home edition x64



 Description   

Currently it doesn't say in the pdf tutorial what version it is (I didn't know what version to choose from the affected version dropdown... bug?). I'm usingthe January 2013 version.
I'm having a problem when building the connector:

Compiling 22 source files to C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\connectors\mailconnector\mailconnector-ra\build\classes
javac: invalid flag: -endorseddirs C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\bp-project/../../../../../glassfish/modules/endorsed
Usage: javac <options> <source files>
use -help for a list of possible options
C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\connectors\mailconnector\mailconnector-ra\nbproject\nbjdk.xml:8: The following error occurred while executing this line:
C:\Program Files\glassfish-3.1.2.2\glassfish\docs\javaee-tutorial\examples\bp-project\command-line-ant-tasks.xml:114: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)



 Comments   
Comment by Kim Haase [ 05/Apr/13 ]

January 2013 is sufficient information, thanks. The version is normally the version you installed from the Update Center; if you open that and check Installed Components, the version should be 6.0.8-1.

What is the output of the "java -version" command?

What was the output of "ant all" before the line you started with?

You have the Java EE 6 SDK installed in a nondefault location – normally the installation wizard installs it in C:\glassfish3, not in Program Files. The java command sometimes has problems with spaces in the path.

Comment by treaz [ 05/Apr/13 ]

Hello Kim,

I've checked and it is 6.0.8-1

java - v

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

I'm sorry I didn't upload a log file, but I can't see a way to do that.
https://gist.github.com/anonymous/5322945

I'm sure it's a problem with the space since removing the line with $

{glassfish.endorsed.option}

from command-line-ant-tasks.xml allowed the build to complete. However, after removing it the deploy did not create some resources in the glassfish server so I think that the line is important

Comment by treaz [ 11/Apr/13 ]

Any news on this? This is also a problem when trying to build the duke-forest example.

Comment by treaz [ 11/Apr/13 ]

Well, I worked around it... just close it.

Comment by Kim Haase [ 11/Apr/13 ]

I looked at the command output you posted on github.

I'm afraid I don't really understand why you issued the following command:

ant -f "C:
Program Files\\glassfish-3.1.2.2\\glassfish\\docs\\javaee-tutorial\\examples\\connectors\\mailconnector\\mailconnector-ra\\nbproject
nbjdk.xml" assemble_rar

We do not supply an nbjdk.xml file as part of the mailconnector-ra project. The instructions in the Tutorial simply say to go to mailconnector-ear and type "ant all" using the supplied build.xml file. If you do that and the commands fail, please let us know; feel free to copy the command output into a comment.

Generated at Thu Aug 27 21:47:37 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.