[Gvsig_english] gvSig mobile

Juan Lucas Dominguez Rubio jldominguez at prodevelop.es
Tue Apr 13 10:40:43 CEST 2010


Hello, Marcel:
 
1) You can set the logger appendeers (output) using external .properties files (as you have done) or from the Java code. These lines in Launcher.java are the ones that set the appenders:
 
PatternLayout l = new PatternLayout("%5p [%t] - %m%n");
FileAppender fa = new FileAppender(l, outlogpath, false);
Logger.getRootLogger().setLevel(Level.ALL);
Logger.getRootLogger().addAppender(fa);

Perhaps there's some problem there? Anyway, The .properties file is a better way, I think. Change the Level.ALL to another value (Level.DEBUG, Level.ERROR) to get less logger lines (therefore the app will be a bit faster)
 
2) The message :
 
"Cannot find translation for Unknown"
 
is unimportant. It happens because we forgot to add that word to the appGvsigMobile_*.properties files. You can add a line like this:
 
Unknown=Unknown    (file resources\languages\appGvsigMobile_en.properties) 
Unknown=Inconnu    (file resources\languages\appGvsigMobile_fr.properties)
(etc.)
 
The other messages are OK. This will be the log file for that execution:
C:\Users\F4c0r\workspace\gvSIG\log\1271019132919.gvsig-mobile.log.txt
 
You can read it and maybe will help you find the problems if something does not work.
 
3) We don't care much about warnings. Most of them are caused by unused variables, but you have discovered two warnings that should be corrcted:
 
- You should write "this.ct = ct;" instead of "ct = ct;" in FLyrDefault.java
- And change the method writeElement(GPEElement element) in ExportGpeWriter.java. The right code is:
 
===============
 private void writeElement(GPEElement element) {
  getWriterHandler().startElement(element.getNameOrig(),
    element.getValue(), null);
  if (element.isComplex()) {
   for (int j = 0; j < element.getNumElements(); j++) {
    GPEElement subelem = element.getSubElement(j);
    writeElement(subelem);
   }
  }
  getWriterHandler().endElement();
 }
===============
 
But that method is rarely used (only when you export some special GML files)
 
So everything else is working? Have you opened any ECW files? What happens with the GPS?
 
 
 
Regards,
 
Juan Lucas Domínguez Rubio
---
Prodevelop SL, Valencia (España)
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es <http://www.prodevelop.es/> 
---

________________________________

De: Schoolmeesters [mailto:schoolmeesters at gmx.de]
Enviado el: dom 11/04/2010 23:34
Para: Juan Lucas Dominguez Rubio
Asunto: gvSig mobile


Hello again,

and thank you for the answers. Libraries found (I haven't used Win_X86, but WM5_ARM) and build.number changed, too.


But, I got some new questions after that...

1) I still got log4j warn messages:


	log4j:WARN No appenders could be found for logger (Messages).
	log4j:WARN Please initialize the log4j system properly.
	
	

To fix it, I've created a "log4j.properties" file as it is described here: http://snippets.dzone.com/posts/show/3248

Why do I have to do so or is there any other possibility to fix that initialization problem?


2) Now, the "Console" is telling me following lines:


	Forcing initialization of Utils...
	Forcing load of ECW DLL...
	Forcing load of SHP DLL...
	App params:
	Param: 0 : m=J9
	Param: 1 : s=480x600
	Param: 2 : l=de
	Param: 3 : p=C:\Users\F4c0r\workspace\gvSIG
	[2010-04-11 22:52:12,914] WARN     0[main] - org.gvsig.i18n.Messages.getText(Messages.java:130) - org.gvsig.i18n.Messages -- Cannot find translation for Unknown
	[2010-04-11 22:52:12,918] WARN     4[main] - org.gvsig.i18n.Messages.getText(Messages.java:130) - org.gvsig.i18n.Messages -- Cannot find translation for Unknown
	VM specified: J9
	Log file: C:\Users\F4c0r\workspace\gvSIG\log\1271019132919.gvsig-mobile.log.txt
	[2010-04-11 22:52:12,920] WARN     6[main] - es.prodevelop.gvsig.mobile.app.GvsigMobileApp.execute(GvsigMobileApp.java:172) - OS NAME: Windows Vista
	[2010-04-11 22:52:12,920] WARN     6[main] - es.prodevelop.gvsig.mobile.app.GvsigMobileApp.execute(GvsigMobileApp.java:173) - VM: J9
	[2010-04-11 22:52:12,924] WARN    10[main] - es.prodevelop.gvsig.mobile.app.GvsigMobileApp.execute(GvsigMobileApp.java:206) - Add pan tool: true
	

Does everybody have those warn messages? 


3) Now under "Problems" there are still 100 warnings, no errors.

e.g. 


	Description    Resource    Path    Location    Type
	20 times
	Dead code    AreaOp.java    /boot/src/sun/awt/geom    line 160    Java Problem
	...
	Null pointer access: The variable elements can only be null at this location    ExportGpeWriter.java    /libFmapGpeMobile/src/es/prodevelop/gvsig/mobile/gpe/writer    line 376    Java Problem
	...
	The assignment to variable ct has no effect    FLyrDefault.java    /libFMap/src/es/prodevelop/gvsig/mobile/fmap/layer    line 503    Java Problem
	...
	The constructor Date(String) is deprecated    GenericForm.java    /customForms/src/org/gvsig/forms/view    line 296    Java Problem
	...
	about 75 times
	The constructor DistanceAreaListener() is never used locally    DistanceAreaListener.java    /appGvsigMobile/src/es/prodevelop/gvsig/mobile/gui/tool/listener    line 114    Java Problem
	
	

You know those warnings? Can I fix them or do I have to cope with them. The program will work however?


I just would like to get the mobile version started without any errors or warnings ;-) 


Regards,

Marcel Schoolmeesters




Juan Lucas Dominguez Rubio schrieb: 

	Hello:
	 
	- The compliance level must be 1.4 because the Java Virtual Machines available for PDA and smartphones only accept JAR files that were compiled with level 1.4 or less. If you add a JAR file compiled with level > 1.4 to the folder resources/jars, it will not work on a PDA or smartphone. In that case, you should find the source code for that JAR file and inlcude it in your workspace and compile it after removing or rerplacing the Java code that is not 1.4-compatible.
	 
	- The problem with CrossingsForPath happens when you use JRE/JDK 1.6 in Eclipse (even if you use level 1.4). This is our fault, because that method is public but is not part of the API, so it should not be used in the code. You have two options: use the method called pointCrossingsForPath instead of crossingsForPath (which does the same) or install JRE/JDK 1.5 in your computer and let Eclipse use it.
	 
	- You still have a problem with DLLs. Make sure that the folder resources\lib\Win_X86 exists in your workspace (I can't see it in your screenshot) and contains several DLL files and that the VM arguments (in 'Run configurations') look like this:
	 
	       -Xmx256M -Djava.library.path="${workspace_loc}/resources/lib/Win_X86
	 
	To see if DLLs were loaded correctly, try to load a ECW file. You have a small one here:
	 
	http://www.prodevelop.es/files/fm/public/downloads/images/oxford_1675_ecw.zip
	 
	(unzip it first)
	 
	- We forgot to update the file appGvsigMobile\build.number, that's where the application reads the current version and build number. SImply change it to "version.id=0.3" or "version.id=- Marcel's version", etc.
	 
	Regards,
	 
	Juan Lucas Domínguez Rubio
	---
	Prodevelop SL, Valencia (España)
	Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
	http://www.prodevelop.es <http://www.prodevelop.es/> 
	---

________________________________

	De: Marcel Schoolmeesters [mailto:schoolmeesters at gmx.de]
	Enviado el: dom 21/03/2010 13:02
	Para: Juan Lucas Dominguez Rubio
	Asunto: Re: gvSig src
	
	Hello,
	
	it was my fault. Don't know why I did not see that I did not checkout the "resources" folder...although the error said "resources missing" - thank you for the screenshots.
	
	The build.xml works now...
	
	Btw, why the compliance level must be set to 1.4?
	
	If the run of the app work, too, I'll let you know...will test it later.
	
	---
	
	Project can be started now...
	
	Just one error left in libFMap:
	
	

	*	The method CrossingsForPath(PathIterator, double, double) is undefined for the type Curve 


	you don't get that error?
	
	However, I can proceed....
	
	The console tells me after running the app:
	

		Forcing initialization of Utils...
		Forcing load of ECW DLL...
		Forcing load of SHP DLL...
		Unable to load Ermapper libraries!
		Unable to load SHP libraries!
		App params:
		Param: 0 : m=J9
		Param: 1 : s=480x600
		Param: 2 : l=en
		Param: 3 : p=C:\Users\f4c0r\workspace\gvSIG
		log4j:WARN No appenders could be found for logger (Messages).
		log4j:WARN Please initialize the log4j system properly.
		VM specified: J9
		Log file: C:\Users\f4c0r\workspace\gvSIG\log\1269172005415.gvsig-mobile.log.txt
		

	The title of the app still is gvSIG Mobile 0.2.0....
	
	
	Well, however, then I can start trying to understand the code better and try to adjust what I have to adjust :)
	
	thank you again
	
	Marcel
	
	
	Marcel Schoolmeesters schrieb: 

		Hello,
		
		it was my fault. Don't know why I did not see that I did not checkout the "resources" folder...although the error said "resources missing" - thank you for the screenshots.
		
		The build.xml works now...
		
		Btw, why the compliance level must be set to 1.4?
		
		If the run of the app work, too, I'll let you know...will test it later.
		
		
		Regards,
		
		Marcel Schoolmeesters
		
		
		Juan Lucas Dominguez Rubio schrieb: 

			Hello,
			 
			I have just build the workspace again from scratch, and it worked:
			 
			SVN URL:
			http://subversion.gvsig.org/gvSIG-mobile
			 
			Folder:
			/pilots/branches/pilot2
			 
			See attached screenshot ( gvsig_mobile_0_3_workspace.jpg ).
			 
			Your workspace does not look like that?
			Can you send me some screenshots of your workspace?
			 
			Regards,
			Juan Lucas Domínguez Rubio
			---
			Prodevelop SL, Valencia (España)
			Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
			http://www.prodevelop.es <http://www.prodevelop.es/> 
			---
			 
			 

________________________________






________________________________





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20100413/d8c334f6/attachment.htm 


More information about the Gvsig_internacional mailing list