new JAK with updated gx

847 views
Skip to first unread message

mh

unread,
Mar 14, 2011, 11:21:26 AM3/14/11
to Java API for KML
I've been trying to generate the new JAK without success. I've tried
to use xjc with the JAK binding and running the perl script removing
the JAXBElements and the files names are appended with "Type" and the
java files are different than the JAK files (missing all the create
functions for creating child tags).

If someone can share the latest jar file they have generated, I would
greatly appreciate it. What I need is the gx:Track


thanks a bunch!

Panam

unread,
Mar 28, 2011, 11:17:17 PM3/28/11
to Java API for KML
You got it working except fore the missing create methods and the
added -Type suffix?
So far, I did not try to compile a version with updated definitions,
but actually, just those missing create methods do not pose a big
problem in general for most people I guess....
Would you mind to share your generated code (to "repair" the -Type
suffix and then compile it)?

Thanks a lot
panam

Panam

unread,
Mar 30, 2011, 9:26:08 AM3/30/11
to Java API for KML
OK, tried to compile myself but am finally stuck (most probably
because I am no maven maven). This happen even with the original xsd
that ships with the project (lacking gx:track).
I got past this issue: http://stackoverflow.com/questions/2825764/jaxb-jak-java-lang-classcastexception
by putting all JAXB2.2 jars in $JRE_HOME/lib/endorsed (it did not
matter whether JDK5 or JDK6 was used).
Now, this error appears:
> mvn install -e
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for de.micromata.jak:JavaAPIforKml:jar:2.2.0-SNAPSHOT
[WARNING] 'repositories.repository.layout = legacy' is deprecated:
maven-repository.dev.java.net @ de.micromata.jak:JavaAPIforKml:2.2.0-
SNAPSHOT, D:\workspaces\JavaAPIforKML\pom.xml
[WARNING] 'pluginRepositories.pluginRepository.layout = legacy' is
deprecated: maven-repository.dev.java.net @
de.micromata.jak:JavaAPIforKml:2.2.0-SNAPSHOT, D:\workspaces
\JavaAPIforKML\pom.xml
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[WARNING]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building a Java API for Kml 2.2.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.3:run (xjc-invocation) @
JavaAPIforKml ---
[INFO] Executing tasks
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.398s
[INFO] Finished at: Wed Mar 30 15:11:25 CEST 2011
[INFO] Final Memory: 2M/120M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.3:run (xjc-invocation) on project JavaAPIforKml: An Ant
BuildException has occured: taskdef A class needed by class
com.sun.tools.xjc.XJCTask cannot be found: org/apache/tools/ant/
DynamicConfigurator -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Apparently, maven is not able to load part of ant (org/apache/tools/
ant/DynamicConfigurator is in ant.jar).
I added
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
to the POM according to http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html.
It grabs the ant jars from some repository, but still the error is the
same.
Is there a way to find out why maven is failing?

mh

unread,
Mar 30, 2011, 9:52:31 AM3/30/11
to Java API for KML
I've never used Maven until JAK and am not familiar with it. you
don't need Maven if you want to compile the file. From what I
understand, Maven is sort of like a project management tool. To
compile you can call xjc. I think that's how I ended up doing it.
Cannot remember exactly as I have tried so many different things
trying to make it work. Ended up writing my own code to generate
gx:track in the end.

On Mar 30, 10:26 am, Panam <pandem...@googlemail.com> wrote:
> OK, tried to compile myself but am finally stuck (most probably
> because I am no maven maven). This happen even with the original xsd
> that ships with the project (lacking gx:track).
> I got past this issue:http://stackoverflow.com/questions/2825764/jaxb-jak-java-lang-classca...
> to the POM according tohttp://maven.apache.org/plugins/maven-antrun-plugin/examples/customTa....

Panam

unread,
Apr 1, 2011, 10:34:41 PM4/1/11
to Java API for KML
Got maven to finally produce the new source classes, however, not
exactly as they ought to be.
The built process is interrupted because the created source model is
inconsistent.
So I simply grabbed the track and multitrack, altered them a bit, then
put them among the svn source classes and let the packager do its
work.
Now it's possible to create tracks and multitracks but marshalling
fails with an error:
javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.SAXException2: unable to marshal type
"de.micromata.opengis.kml.v_2_2_0.gx.MultiTrack" as an element because
it is not known to this context.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
323)
...

Googling this error does not help much.
Does somebody have an idea how to fix this?

Thanks

drykovanov

unread,
Apr 4, 2011, 3:36:37 AM4/4/11
to Java API for KML
Here is my story with JAK and new xsds.
First I've tried to regenerate classes from original xsd files. I
faced multiple problems:
1. log4j dependency had <scope>test</scope> which lead to
NoClassDefFoundError. Removed <scope>...
2. ClassCastException due to JAXB is included in Java 6 and conflicts
with JAXB 2.2. See http://jaxb.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html
for details. So I have installed JDK 5 to compile JAK
Generated classes compiled successfully.

Then I've updated kml22gx.xsd and ogckml22.xsd to latest ones and
started process once again. Classes were generated, but they don't
compile.
Here is one example (draw attention to question instead of type name):
*/
@Obvious
@Override
public void setBasicLinkSimpleExtension(final List<Object>
basicLinkSimpleExtension) {
super.setBasicLinkSimpleExtension(basicLinkSimpleExtension);
}


@Obvious
@Override
public Icon addToBasicLinkSimpleExtension(final ?
basicLinkSimpleExtension) {

super.getBasicLinkSimpleExtension().add(basicLinkSimpleExtension);
return this;
}


Panam

unread,
Apr 4, 2011, 12:02:57 PM4/4/11
to Java API for KML
Hey drykovanov,

would you mind to publish your progress/project somewhere? It seems
like you've progressed furthest and I'd like to fiddle around a bit
with your setup...

Thanks
panam

On 4 Apr., 09:36, drykovanov <drykova...@gmail.com> wrote:
> Here is my story with JAK and new xsds.
> First I've tried to regenerate classes from original xsd files. I
> faced multiple problems:
> 1. log4j dependency had <scope>test</scope> which lead to
> NoClassDefFoundError. Removed <scope>...
> 2. ClassCastException due to JAXB is included in Java 6 and conflicts
> with JAXB 2.2. Seehttp://jaxb.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_...

Дмитрий Рыкованов

unread,
Apr 4, 2011, 1:06:15 PM4/4/11
to javaap...@googlegroups.com
I'm going to post my progress in this group. Today I've managed to fix '?' problem but faced next one. 

2011/4/4 Panam <pand...@googlemail.com>



--
--
Рыкованов Дмитрий

drykovanov

unread,
Apr 5, 2011, 7:40:17 AM4/5/11
to Java API for KML
Today I finally managed to compile JAK with new xsds. You can find
jars here:
http://topoaxis.com/blog/JavaAPIforKml.jar
http://topoaxis.com/blog/JavaAPIforKml-sources.jar

Later I'm going to roll out instruction how to do it by yourself.

On 4 апр, 21:06, Дмитрий Рыкованов <drykova...@gmail.com> wrote:
> I'm going to post my progress in this group. Today I've managed to fix '?'
> problem but faced next one.
>
> 2011/4/4 Panam <pandem...@googlemail.com>

Panam

unread,
Apr 5, 2011, 12:32:34 PM4/5/11
to Java API for KML
Pretty cool!
I tried to use your compilation but upon marshalling it fails with the
error attached.
Does it work for you and is my JAXB configuration still messed up?

Cheers
panam

com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 5 counts of
IllegalAnnotationExceptions
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its
subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.BasicLink.basicLinkSimpleExtension
at de.micromata.opengis.kml.v_2_2_0.BasicLink
at de.micromata.opengis.kml.v_2_2_0.Icon
at protected de.micromata.opengis.kml.v_2_2_0.Icon
de.micromata.opengis.kml.v_2_2_0.IconStyle.icon
at de.micromata.opengis.kml.v_2_2_0.IconStyle
at protected de.micromata.opengis.kml.v_2_2_0.IconStyle
de.micromata.opengis.kml.v_2_2_0.Style.iconStyle
at de.micromata.opengis.kml.v_2_2_0.Style
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.Style, class
de.micromata.opengis.kml.v_2_2_0.StyleMap])
at protected de.micromata.opengis.kml.v_2_2_0.StyleSelector
de.micromata.opengis.kml.v_2_2_0.Pair.styleSelector
at de.micromata.opengis.kml.v_2_2_0.Pair
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.gx.Playlist, class
de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayData, class
de.micromata.opengis.kml.v_2_2_0.gx.ViewerOptions, class
de.micromata.opengis.kml.v_2_2_0.gx.TourPrimitive, class
de.micromata.opengis.kml.v_2_2_0.gx.LatLonQuad, class
de.micromata.opengis.kml.v_2_2_0.Region, class
de.micromata.opengis.kml.v_2_2_0.TimePrimitive, class
de.micromata.opengis.kml.v_2_2_0.ItemIcon, class
de.micromata.opengis.kml.v_2_2_0.Scale, class
de.micromata.opengis.kml.v_2_2_0.Pair, class
de.micromata.opengis.kml.v_2_2_0.ViewVolume, class
de.micromata.opengis.kml.v_2_2_0.Alias, class
de.micromata.opengis.kml.v_2_2_0.Location, class
de.micromata.opengis.kml.v_2_2_0.Lod, class
de.micromata.opengis.kml.v_2_2_0.ResourceMap, class
de.micromata.opengis.kml.v_2_2_0.ImagePyramid, class
de.micromata.opengis.kml.v_2_2_0.SchemaData, class
de.micromata.opengis.kml.v_2_2_0.Orientation, class
de.micromata.opengis.kml.v_2_2_0.Feature, class
de.micromata.opengis.kml.v_2_2_0.StyleSelector, class
de.micromata.opengis.kml.v_2_2_0.AbstractView, class
de.micromata.opengis.kml.v_2_2_0.SubStyle, class
de.micromata.opengis.kml.v_2_2_0.Data, class
de.micromata.opengis.kml.v_2_2_0.Geometry, class
de.micromata.opengis.kml.v_2_2_0.AbstractLatLonBox, class
de.micromata.opengis.kml.v_2_2_0.BasicLink])
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.AbstractView.abstractViewObjectExtension
at de.micromata.opengis.kml.v_2_2_0.AbstractView
at protected de.micromata.opengis.kml.v_2_2_0.AbstractView
de.micromata.opengis.kml.v_2_2_0.Feature.abstractView
at de.micromata.opengis.kml.v_2_2_0.Feature
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Delete.feature
at de.micromata.opengis.kml.v_2_2_0.Delete
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Update.createOrDeleteOrChange
at de.micromata.opengis.kml.v_2_2_0.Update
at protected de.micromata.opengis.kml.v_2_2_0.Update
de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl.update
at de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
at protected de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
de.micromata.opengis.kml.v_2_2_0.Kml.networkLinkControl
at de.micromata.opengis.kml.v_2_2_0.Kml
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its
subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.LineStyle.lineStyleSimpleExtension
at de.micromata.opengis.kml.v_2_2_0.LineStyle
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.LabelStyle, class
de.micromata.opengis.kml.v_2_2_0.LineStyle, class
de.micromata.opengis.kml.v_2_2_0.PolyStyle, class
de.micromata.opengis.kml.v_2_2_0.IconStyle])
at de.micromata.opengis.kml.v_2_2_0.IconStyle
at protected de.micromata.opengis.kml.v_2_2_0.IconStyle
de.micromata.opengis.kml.v_2_2_0.Style.iconStyle
at de.micromata.opengis.kml.v_2_2_0.Style
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.Style, class
de.micromata.opengis.kml.v_2_2_0.StyleMap])
at protected de.micromata.opengis.kml.v_2_2_0.StyleSelector
de.micromata.opengis.kml.v_2_2_0.Pair.styleSelector
at de.micromata.opengis.kml.v_2_2_0.Pair
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.gx.Playlist, class
de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayData, class
de.micromata.opengis.kml.v_2_2_0.gx.ViewerOptions, class
de.micromata.opengis.kml.v_2_2_0.gx.TourPrimitive, class
de.micromata.opengis.kml.v_2_2_0.gx.LatLonQuad, class
de.micromata.opengis.kml.v_2_2_0.Region, class
de.micromata.opengis.kml.v_2_2_0.TimePrimitive, class
de.micromata.opengis.kml.v_2_2_0.ItemIcon, class
de.micromata.opengis.kml.v_2_2_0.Scale, class
de.micromata.opengis.kml.v_2_2_0.Pair, class
de.micromata.opengis.kml.v_2_2_0.ViewVolume, class
de.micromata.opengis.kml.v_2_2_0.Alias, class
de.micromata.opengis.kml.v_2_2_0.Location, class
de.micromata.opengis.kml.v_2_2_0.Lod, class
de.micromata.opengis.kml.v_2_2_0.ResourceMap, class
de.micromata.opengis.kml.v_2_2_0.ImagePyramid, class
de.micromata.opengis.kml.v_2_2_0.SchemaData, class
de.micromata.opengis.kml.v_2_2_0.Orientation, class
de.micromata.opengis.kml.v_2_2_0.Feature, class
de.micromata.opengis.kml.v_2_2_0.StyleSelector, class
de.micromata.opengis.kml.v_2_2_0.AbstractView, class
de.micromata.opengis.kml.v_2_2_0.SubStyle, class
de.micromata.opengis.kml.v_2_2_0.Data, class
de.micromata.opengis.kml.v_2_2_0.Geometry, class
de.micromata.opengis.kml.v_2_2_0.AbstractLatLonBox, class
de.micromata.opengis.kml.v_2_2_0.BasicLink])
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.AbstractView.abstractViewObjectExtension
at de.micromata.opengis.kml.v_2_2_0.AbstractView
at protected de.micromata.opengis.kml.v_2_2_0.AbstractView
de.micromata.opengis.kml.v_2_2_0.Feature.abstractView
at de.micromata.opengis.kml.v_2_2_0.Feature
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Delete.feature
at de.micromata.opengis.kml.v_2_2_0.Delete
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Update.createOrDeleteOrChange
at de.micromata.opengis.kml.v_2_2_0.Update
at protected de.micromata.opengis.kml.v_2_2_0.Update
de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl.update
at de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
at protected de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
de.micromata.opengis.kml.v_2_2_0.Kml.networkLinkControl
at de.micromata.opengis.kml.v_2_2_0.Kml
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its
subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.SchemaData.schemaDataExtension
at de.micromata.opengis.kml.v_2_2_0.SchemaData
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.gx.Playlist, class
de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayData, class
de.micromata.opengis.kml.v_2_2_0.gx.ViewerOptions, class
de.micromata.opengis.kml.v_2_2_0.gx.TourPrimitive, class
de.micromata.opengis.kml.v_2_2_0.gx.LatLonQuad, class
de.micromata.opengis.kml.v_2_2_0.Region, class
de.micromata.opengis.kml.v_2_2_0.TimePrimitive, class
de.micromata.opengis.kml.v_2_2_0.ItemIcon, class
de.micromata.opengis.kml.v_2_2_0.Scale, class
de.micromata.opengis.kml.v_2_2_0.Pair, class
de.micromata.opengis.kml.v_2_2_0.ViewVolume, class
de.micromata.opengis.kml.v_2_2_0.Alias, class
de.micromata.opengis.kml.v_2_2_0.Location, class
de.micromata.opengis.kml.v_2_2_0.Lod, class
de.micromata.opengis.kml.v_2_2_0.ResourceMap, class
de.micromata.opengis.kml.v_2_2_0.ImagePyramid, class
de.micromata.opengis.kml.v_2_2_0.SchemaData, class
de.micromata.opengis.kml.v_2_2_0.Orientation, class
de.micromata.opengis.kml.v_2_2_0.Feature, class
de.micromata.opengis.kml.v_2_2_0.StyleSelector, class
de.micromata.opengis.kml.v_2_2_0.AbstractView, class
de.micromata.opengis.kml.v_2_2_0.SubStyle, class
de.micromata.opengis.kml.v_2_2_0.Data, class
de.micromata.opengis.kml.v_2_2_0.Geometry, class
de.micromata.opengis.kml.v_2_2_0.AbstractLatLonBox, class
de.micromata.opengis.kml.v_2_2_0.BasicLink])
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.AbstractView.abstractViewObjectExtension
at de.micromata.opengis.kml.v_2_2_0.AbstractView
at protected de.micromata.opengis.kml.v_2_2_0.AbstractView
de.micromata.opengis.kml.v_2_2_0.Feature.abstractView
at de.micromata.opengis.kml.v_2_2_0.Feature
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Delete.feature
at de.micromata.opengis.kml.v_2_2_0.Delete
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Update.createOrDeleteOrChange
at de.micromata.opengis.kml.v_2_2_0.Update
at protected de.micromata.opengis.kml.v_2_2_0.Update
de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl.update
at de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
at protected de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
de.micromata.opengis.kml.v_2_2_0.Kml.networkLinkControl
at de.micromata.opengis.kml.v_2_2_0.Kml
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its
subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Geometry.geometrySimpleExtension
at de.micromata.opengis.kml.v_2_2_0.Geometry
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.gx.Playlist, class
de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayData, class
de.micromata.opengis.kml.v_2_2_0.gx.ViewerOptions, class
de.micromata.opengis.kml.v_2_2_0.gx.TourPrimitive, class
de.micromata.opengis.kml.v_2_2_0.gx.LatLonQuad, class
de.micromata.opengis.kml.v_2_2_0.Region, class
de.micromata.opengis.kml.v_2_2_0.TimePrimitive, class
de.micromata.opengis.kml.v_2_2_0.ItemIcon, class
de.micromata.opengis.kml.v_2_2_0.Scale, class
de.micromata.opengis.kml.v_2_2_0.Pair, class
de.micromata.opengis.kml.v_2_2_0.ViewVolume, class
de.micromata.opengis.kml.v_2_2_0.Alias, class
de.micromata.opengis.kml.v_2_2_0.Location, class
de.micromata.opengis.kml.v_2_2_0.Lod, class
de.micromata.opengis.kml.v_2_2_0.ResourceMap, class
de.micromata.opengis.kml.v_2_2_0.ImagePyramid, class
de.micromata.opengis.kml.v_2_2_0.SchemaData, class
de.micromata.opengis.kml.v_2_2_0.Orientation, class
de.micromata.opengis.kml.v_2_2_0.Feature, class
de.micromata.opengis.kml.v_2_2_0.StyleSelector, class
de.micromata.opengis.kml.v_2_2_0.AbstractView, class
de.micromata.opengis.kml.v_2_2_0.SubStyle, class
de.micromata.opengis.kml.v_2_2_0.Data, class
de.micromata.opengis.kml.v_2_2_0.Geometry, class
de.micromata.opengis.kml.v_2_2_0.AbstractLatLonBox, class
de.micromata.opengis.kml.v_2_2_0.BasicLink])
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.AbstractView.abstractViewObjectExtension
at de.micromata.opengis.kml.v_2_2_0.AbstractView
at protected de.micromata.opengis.kml.v_2_2_0.AbstractView
de.micromata.opengis.kml.v_2_2_0.Feature.abstractView
at de.micromata.opengis.kml.v_2_2_0.Feature
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Delete.feature
at de.micromata.opengis.kml.v_2_2_0.Delete
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Update.createOrDeleteOrChange
at de.micromata.opengis.kml.v_2_2_0.Update
at protected de.micromata.opengis.kml.v_2_2_0.Update
de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl.update
at de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
at protected de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
de.micromata.opengis.kml.v_2_2_0.Kml.networkLinkControl
at de.micromata.opengis.kml.v_2_2_0.Kml
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its
subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Schema.schemaExtension
at de.micromata.opengis.kml.v_2_2_0.Schema
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Document.schema
at de.micromata.opengis.kml.v_2_2_0.Document
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.Folder, class
de.micromata.opengis.kml.v_2_2_0.Document])
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class
de.micromata.opengis.kml.v_2_2_0.gx.Tour, class
de.micromata.opengis.kml.v_2_2_0.Overlay, class
de.micromata.opengis.kml.v_2_2_0.NetworkLink, class
de.micromata.opengis.kml.v_2_2_0.Container, class
de.micromata.opengis.kml.v_2_2_0.Placemark])
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Delete.feature
at de.micromata.opengis.kml.v_2_2_0.Delete
at protected java.util.List
de.micromata.opengis.kml.v_2_2_0.Update.createOrDeleteOrChange
at de.micromata.opengis.kml.v_2_2_0.Update
at protected de.micromata.opengis.kml.v_2_2_0.Update
de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl.update
at de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
at protected de.micromata.opengis.kml.v_2_2_0.NetworkLinkControl
de.micromata.opengis.kml.v_2_2_0.Kml.networkLinkControl
at de.micromata.opengis.kml.v_2_2_0.Kml

at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException
$Builder.check(IllegalAnnotationsException.java:106)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:
489)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
319)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl
$JAXBContextBuilder.build(JAXBContextImpl.java:1170)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
145)
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 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:228)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:215)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:401)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565)
at de.micromata.opengis.kml.v_2_2_0.Kml.getJaxbContext(Kml.java:631)
at de.micromata.opengis.kml.v_2_2_0.Kml.createMarshaller(Kml.java:
640)
at de.micromata.opengis.kml.v_2_2_0.Kml.marshal(Kml.java:682)
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)

Дмитрий Рыкованов

unread,
Apr 6, 2011, 3:47:06 AM4/6/11
to javaap...@googlegroups.com
I confirm that unmarshaller creation fails. Going to fix it soon

2011/4/5 Panam <pand...@googlemail.com>



--
--
Рыкованов Дмитрий

Дмитрий Рыкованов

unread,
Apr 6, 2011, 7:51:18 AM4/6/11
to javaap...@googlegroups.com
Here is updated JAK. Now it doesn't fail with exceptions and parses KML files:
http://topoaxis.com/blog/JavaAPIforKml.jar 
http://topoaxis.com/blog/JavaAPIforKml-sources.jar 
It can parse for example gx:Track and gx:MultiTrack.
But it can't parse BasicLinkSimpleExtensionGroup which I need:
<Icon>
  <href>/home/mydir/myiconpalette.jpg</href>
  <gx:w>138</gx:w>
  <gx:h>138</gx:h>
    <!-- Since x and y values are omitted, these measurements are made starting at
    the lower-left corner of the icon palette image -->
</Icon>



Panam

unread,
Apr 6, 2011, 9:49:19 AM4/6/11
to Java API for KML
Hi,

I was unable to use your jar (error: error reading D:\workspaces\...
\lib\JavaAPIforKml.jar; invalid CEN header (bad signature)), so it
appears to have been corrupted during the upload.
However, I was able to extract your source files and package it up
using the maven process et voilá - it seems to work perfectly so far,
kudos!
There seems to be a difference in the sizes of the generated class
files between you versions. This might be due to different java
versions used but I don't know exactly. Mine is:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
I don't know whether you use the maven building process but maybe this
is somehow modifying the sources again prior to the actual build
building process.
Haven't checked for the problem you described but maybe, you might
want to check whether this works for you: http://www.zumodrive.com/share/bAObOTg4MG

Hope it helps and many thanks
panam

On 6 Apr., 13:51, Дмитрий Рыкованов <drykova...@gmail.com> wrote:
> Here is updated JAK. Now it doesn't fail with exceptions and parses KML
> files:http://topoaxis.com/blog/JavaAPIforKml.jar<http://www.google.com/url?sa=D&q=http://topoaxis.com/blog/JavaAPIforK...>
>
> http://topoaxis.com/blog/JavaAPIforKml-sources.jar<http://www.google.com/url?sa=D&q=http://topoaxis.com/blog/JavaAPIforK...>

mcahornsirup

unread,
Jun 4, 2011, 3:06:04 PM6/4/11
to Java API for KML
Can you provide your POM file or describe your build process?

Regards,
Steffen

Pandemir Anam

unread,
Jul 2, 2011, 8:04:48 AM7/2/11
to javaap...@googlegroups.com
Steffen,

don't know whether you was asking me but here is the POM I used to pack (but not generate) everything:

2011/6/4 mcahornsirup <steffen...@googlemail.com>

macamat

unread,
Jul 13, 2011, 10:48:03 AM7/13/11
to javaap...@googlegroups.com
@drykovanov,

Do you have any update on not being able to parse the BasicLinkSimpleExtension group? 
I used your latest posted jars which contain Track and MultiTrack but got the same error you were seeing - 
5 counts of IllegalAnnotationExceptions
Invalid @XmlElementRef : Type "class java.lang.Object" or any of its subclasses are not known to this context.
this problem is related to the following location:
at protected java.util.List de.micromata.opengis.kml.v_2_2_0.BasicLink.basicLinkSimpleExtension
It seems strange that the old jars can parse BasicLink but not Track, and the newest jars can parse Track but not BasicLink!

Any updates appreciated
Mat

p.s. I also had an issue with your posted jars but I just extracted and repacked them and they were fine.

Benjamin Cramet

unread,
Nov 27, 2012, 7:32:11 AM11/27/12
to javaap...@googlegroups.com
Hello,

I can't download :( Do you still have the jar available ?

Thanks in advance 

Benjamin

Benjamin Cramet

unread,
Dec 8, 2012, 9:31:46 AM12/8/12
to javaap...@googlegroups.com
Got it somewhere on the web... Works fine.. Thanks

Victor Pillac

unread,
Jan 16, 2013, 5:39:09 PM1/16/13
to javaap...@googlegroups.com
Hey Benjamin, would you mind sharing the download link with the readers of this thread?
Thanks

justin slowik

unread,
Mar 5, 2014, 2:30:25 PM3/5/14
to javaap...@googlegroups.com
can you please attach the updated version you found?  I'm looking for it as well.

Emanuele Ziglioli

unread,
Mar 5, 2014, 7:42:57 PM3/5/14
to javaap...@googlegroups.com

justin slowik

unread,
Mar 6, 2014, 1:04:50 PM3/6/14
to javaap...@googlegroups.com
Do you still have this updated APIs on a public forum?  That link appears to no longer be valid.
Reply all
Reply to author
Forward
0 new messages