Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Error running on exported product, not within eclipse !
Error running on exported product, not within eclipse ! [message #758090] Mon, 21 November 2011 16:05 Go to next message
Nicolas  is currently offline Nicolas
Messages: 23
Registered: October 2011
Junior Member
Hi, I have an error in a exported product, and I can't replicate error whne running from eclipse "Run As.. / Debug as ..."

I have an procedure that read a database and write an XML, and the a ZIP file

My message is "String Index put of range: 34".

It occurs whithin an try catch block:
		try {
	       getContainer().run(true, true, op);
        
		} catch (InterruptedException e) {
	            return false;
	    
		} catch (InvocationTargetException e) {
				e.printStackTrace();
	            Throwable realException = e.getTargetException();
	            MessageDialog.openError(getShell(), "Error", "Error en Proceso de Exportacion de Ensayo:\n" + realException.getMessage());
	            realException = e.getCause();
	            MessageDialog.openError(getShell(), "Error", "Error en Proceso de Exportacion de Ensayo:\n" + realException.getMessage());
	            realException.printStackTrace();
	            return false;
	    }


Both message dialogs show me the same error.
What I need is a way to know what line is generating de error !!

I'm really deseperated because I'm just deploy for delivering the program and in my last test I realize that fails !!!

Best regards

Nicolas
PS: I don't know if importan but this eclipse RCP was plug-in based and then I convert to feature based, moving dependencies from this product to feature proyect..

[Updated on: Mon, 21 November 2011 16:14]

Report message to a moderator

Error running on exported product, not within eclipse ! [message #758110 is a reply to message #758090] Mon, 21 November 2011 16:49 Go to previous messageGo to next message
Nicolas  is currently offline Nicolas
Messages: 23
Registered: October 2011
Junior Member
Don't know why...
but this bunch of lines break my code in windows 7, running java 1.5:
but not from within eclipse.

	protected String sinAcentos(String str) {

		 // Cadena de caracteres original a sustituir.
	    String original = "áàäéèëíìïóòöúùuñÁÀÄÉÈËÍÌÏÓÒÖÚÙÜÑçÇ";
	    // Cadena de caracteres ASCII que reemplazarán los originales.
	    String ascii    = "aaaeeeiiiooouuunAAAEEEIIIOOOUUUNcC";

	    String tmp = str;
		for (int i=0; i<original.length(); i++) {
	        // Reemplazamos los caracteres especiales.
		tmp = tmp.replace(original.charAt(i), ascii.charAt(i));
	    }//for i
	return tmp;
	}


So, I added a try/catch
	protected String sinAcentos(String str) {

		 // Cadena de caracteres original a sustituir.
	    String original = "áàäéèëíìïóòöúùuñÁÀÄÉÈËÍÌÏÓÒÖÚÙÜÑçÇ";
	    // Cadena de caracteres ASCII que reemplazarán los originales.
	    String ascii    = "aaaeeeiiiooouuunAAAEEEIIIOOOUUUNcC";

	    String tmp = str;
		for (int i=0; i<original.length(); i++) {
	        // Reemplazamos los caracteres especiales.
			try {
				tmp = tmp.replace(original.charAt(i), ascii.charAt(i));
			} catch (Exception e )
			{ e.printStackTrace();}
	    }//for i
		return tmp;
	}

[Updated on: Tue, 22 November 2011 06:33]

Report message to a moderator

Re: Error running on exported product, not within eclipse ! [message #758222 is a reply to message #758110] Tue, 22 November 2011 06:34 Go to previous message
Nicolas  is currently offline Nicolas
Messages: 23
Registered: October 2011
Junior Member
So I still wondering why this happend.

Does anybody have an idea?
why
tmp = tmp.replace(original.charAt(i), ascii.charAt(i));
fails when running as RCP application ??
Regards
Previous Topic:Need Auto Complete (Content Assist) feature
Next Topic:Determine Nature of Closed Project
Goto Forum:
  


Current Time: Wed Jul 23 05:59:21 EDT 2014

Powered by FUDForum. Page generated in 0.01588 seconds