Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10325 closed defect (fixed)

WMS imagery not working if JOSM compiled with dist-optimized

Reported by: jcr83 Owned by: team
Priority: normal Milestone: 14.08
Component: Core imagery Version:
Keywords: build jar optimization proguard jaxb gentoo Cc:

Description

What steps will reproduce the problem?

  1. Download a zone in Hambourg
  2. Add "Hambourg 40 cm" imagery

What is the expected result?
The image is displayed

What happens instead?
Internal Error (see below)

Please provide any additional information below. Attach a screenshot if
possible.
The TMS imageries are working, but not the WMS imageries.

Build-Date: 2014-07-30 09:19:15
Revision: 7348
Is-Local-Build: true

Identification: JOSM/1.5 (7348 SVN fr) Linux Gentoo
Memory Usage: 152 MB / 643 MB (52 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Djava.library.path=/lib:/usr/lib]
Dataset consistency test: No problems found

Plugin: DirectDownload (30416)
Plugin: DirectUpload (30416)
Plugin: ElevationProfile (30416)
Plugin: InfoMode (30416)
Plugin: editgpx (30416)
Plugin: globalsat (30416)
Plugin: reverter (30521)
Plugin: undelete (30416)
Plugin: utilsplugin2 (30460)

java.lang.InternalError: 
Error occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: interface javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter 
Exception: null
	at com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassValue(RuntimeInlineAnnotationReader.java:128)
	at com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassValue(RuntimeInlineAnnotationReader.java:42)
	at com.sun.xml.internal.bind.v2.model.impl.PropertyInfoImpl.isApplicable(PropertyInfoImpl.java:201)
	at com.sun.xml.internal.bind.v2.model.impl.PropertyInfoImpl.getApplicableAdapter(PropertyInfoImpl.java:212)
	at com.sun.xml.internal.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:111)
	at com.sun.xml.internal.bind.v2.model.impl.ERPropertyInfoImpl.<init>(ERPropertyInfoImpl.java:42)
	at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl.<init>(ElementPropertyInfoImpl.java:85)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.<init>(RuntimeElementPropertyInfoImpl.java:48)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeClassInfoImpl.createElementProperty(RuntimeClassInfoImpl.java:160)
	at com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:867)
	at com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl.findFieldProperties(ClassInfoImpl.java:393)
	at com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:296)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:171)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:232)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:87)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:68)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:198)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:82)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:68)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:304)
	at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:81)
	at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:58)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:47)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:40)
	at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:63)
	at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:61)
	at java.util.AbstractList$Itr.next(AbstractList.java:358)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:244)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:87)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:68)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:198)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:82)
	at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:68)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:304)
	at com.sun.xml.internal.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:88)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:346)
	at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:316)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:444)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:282)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:125)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1147)
	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:130)
	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:221)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:172)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:347)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394)
	at org.openstreetmap.josm.data.imagery.WmsCache.loadIndex(WmsCache.java:179)
	at org.openstreetmap.josm.gui.layer.WMSLayer.hookUpMapView(WMSLayer.java:189)
	at org.openstreetmap.josm.Main.addLayer(Main.java:624)
...<snip>...

Attachments (0)

Change History (11)

in reply to:  description comment:1 by Don-vip, 10 years ago

Component: CoreCore imagery
Owner: changed from team to jcr83
Status: newneedinfo

Replying to jcr83:

Identification: JOSM/1.5 (7348 SVN fr) Linux Gentoo

Looks like you haven't compiled JOSM properly. Can you run ant clean && ant dist, and try again?

comment:2 by jcr83, 10 years ago

Thanks for your answer, but I have not compiled JOSM manually. I have used this Gentoo ebuild :
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-geosciences/josm/josm-9999.ebuild?view=markup

The java version is :

java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (Gentoo build 1.7.0_55-b14)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

Why do you say that JOSM has not been compiled properly ? Everything else is working.

comment:3 by Don-vip, 10 years ago

The SVN mention is meant to be displayed for local builds, not for package distributions. Can you try with josm-latest.jar ?

comment:4 by Don-vip, 10 years ago

OK I see they compile it with dist-optimized target and I haven't checked this target for a while, it's likely it removes required class files.

comment:5 by jcr83, 10 years ago

You are right : after removing the optimization, it works.
Can you check the optimized target and try to fix the bug ? If not, I'll ask Gentoo to remove the optimization.

Thanks !

comment:6 by Don-vip, 10 years ago

Keywords: build jar optimization proguard jaxb gentoo added; template_report removed
Milestone: 14.08
Owner: changed from jcr83 to team
Status: needinfonew
Summary: WMS imagery not working anymoreWMS imagery not working if JOSM compiled with dist-optimized

comment:7 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

In 7351/josm:

fix #10325 - WMS not working if JOSM compiled with dist-optimized:

  • fix build
  • update to Proguard 4.11
  • disable "Sun internal API" warnings introduced recently

comment:8 by Don-vip, 10 years ago

It should work now, can you please check, and also help me to check an unrelated point:
Does your status report now list the Java package installed? If not, can you tell me if these commands work as expected on Gentoo:

  • equery -q list -e --format=$fullversion icedtea-bin
  • equery -q list -e --format=$fullversion oracle-jdk-bin
  • equery -q list -e --format=$fullversion oracle-jre-bin

and what's the value of $JAVA_HOME? See r7349

comment:9 by jcr83, 10 years ago

Yes, it works now, thanks a lot !

Does your status report now list the Java package installed?

Sorry, I don't understand your question. What status report are you talking about ?

$ equery -q list --format=$fullversion icedtea-bin
dev-java/icedtea-bin-6.1.12.7
$ equery -q list --format=$fullversion oracle-jdk-bin
$ equery -q list --format=$fullversion oracle-jre-bin

$ echo $JAVA_HOME
/home/jcr/.gentoo/java-config-2/current-user-vm
$ ls -l /home/jcr/.gentoo/java-config-2/current-user-vm
lrwxrwxrwx 1 jcr users 23 12 juin  17:53 /home/jcr/.gentoo/java-config-2/current-user-vm -> /usr/lib/jvm//icedtea-7

comment:10 by jcr83, 10 years ago

I think I have found the status report, in the Help menu of JOSM :

Build-Date: 2014-07-31 11:04:59
Revision: 7351
Is-Local-Build: true

Identification: JOSM/1.5 (7351 SVN fr) Linux Gentoo
Memory Usage: 51 MB / 643 MB (25 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: icedtea-bin:6.1.12.7

VM arguments: [-Djava.library.path=/lib:/usr/lib]
.....

in reply to:  10 comment:11 by Don-vip, 10 years ago

Replying to jcr83:

I think I have found the status report, in the Help menu of JOSM :

Java package: icedtea-bin:6.1.12.7

Great! It works as expected, thank you for the feedback :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.