Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: treaz
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

resource adapter example issues

Created: 05/Apr/13 06:39 PM   Updated: 11/Apr/13 06:56 PM   Resolved: 11/Apr/13 06:56 PM
Component/s: examples
Affects Version/s: 6.0.8
Fix Version/s: None

Time Tracking:
Not Specified


Windows 7 home edition x64

Participants: Kim Haase and treaz

 Description  « Hide

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-\glassfish\docs\javaee-tutorial\examples\connectors\mailconnector\mailconnector-ra\build\classes
javac: invalid flag: -endorseddirs C:\Program Files\glassfish-\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-\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-\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)

Kim Haase added a comment - 05/Apr/13 08:06 PM

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

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

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

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

treaz added a comment - 05/Apr/13 09:54 PM

Hello Kim,

I've checked and it is 6.0.8-1

java - v

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

I'm sorry I didn't upload a log file, but I can't see a way to do that.

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

treaz added a comment - 11/Apr/13 06:33 PM

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

treaz added a comment - 11/Apr/13 06:46 PM

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

Kim Haase added a comment - 11/Apr/13 06:51 PM

I looked at the command output you posted on github.

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

ant -f "C:
Program Files\\glassfish-\\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.