Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why 'gen-src\primer.po is not found'?  RSS feed

erik aimen
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running JAXB unmarshal_read sample with JWSDP 2.0. And I've got 'gen-src\primer.po is not found' when I execute 'asant build', please see the cmd line below.
-----cmd line start-----
C:\javaeetutorial5\examples\jaxb\unmarshal-read>asant build
Buildfile: build.xml
Overriding previous definition of reference to classpath

[echo] Compiling the schema...
[xjc] C:\javaeetutorial5\examples\jaxb\unmarshal-read\gen-src\primer.po is not found
and thus excluded from the dependency check
[xjc] Compiling file:/C:/javaeetutorial5/examples/jaxb/unmarshal-read/po.xsd
[xjc] Writing output to C:\javaeetutorial5\examples\jaxb\unmarshal-read\gen-src
[echo] Compiling the java source files...
[javac] Compiling 4 source files to C:\javaeetutorial5\examples\jaxb\unmarshal-read\cl

Total time: 3 seconds
C:\javaeetutorial5\examples\jaxb\unmarshal-read>xjc po.xsd
parsing a schema...
compiling a schema...
-----cmd line end-----

The directory 'gen-src\primer.po' is already created.

build.xml as below:

<?xml version="1.0" standalone="yes"?>

<project name="unmarshal-read" default="run" basedir=".">

<property file=""/>

<import file="../../common/targets.xml" />
<import file="../common/targets.xml" />

This sample application demonstrates how to unmarshal an instance document
into a Java content tree and access data contained within it.

<path id="classpath">
<pathelement path="src" />
<pathelement path="classes" />
<pathelement path="schemas" />
<fileset dir="${javaee.home}" includes="lib/javaee.jar" />
<fileset dir="${javaee.home}" includes="lib/appserv-rt.jar" />
<fileset dir="${javaee.home}" includes="lib/appserv-ws.jar" />

<taskdef name="xjc" classname="">
<classpath refid="classpath" />

<!--compile Java source files-->
<target name="build" description="Compile all Java source files">
<echo message="Compiling the schema..." />
<mkdir dir="gen-src" />
<xjc schema="po.xsd" package="primer.po" target="gen-src">
<produces dir="gen-src/primer.po" includes="**/*.java" />
<echo message="Compiling the java source files..." />
<mkdir dir="classes" />
<javac destdir="classes" debug="on">
<src path="src" />
<src path="gen-src" />
<classpath refid="classpath" />

<target name="run" depends="build" description="Run the sample app">
<echo message="Running the sample application..." />
<java classname="Main" fork="true">
<classpath refid="classpath" />

<target name="javadoc" description="Generates javadoc" depends="build">
<echo message="Generating javadoc..." />
<mkdir dir="docs/api" />
<javadoc sourcepath="gen-src" destdir="docs/api" windowtitle="Using unmarshaller (formerly SampleApp1)" useexternalfile="yes">
<fileset dir="." includes="gen-src/**/*.java" excludes="**/impl/**/*.java" />

<target name="clean" description="Deletes all the generated artifacts.">
<delete dir="docs/api" />
<delete dir="gen-src" />
<delete dir="schemas" />
<delete dir="classes" />

I have Sun Java System Application Server Platform Edition 9 installed.

Why 'gen-src\primer.po is not found'? I appreciate very much if any body could help me out.

Thanks lot.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!