Skip to main content


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 21:05 Go to next message
Nicolas  is currently offline Nicolas Friend
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 21: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 21:49 Go to previous messageGo to next message
Nicolas  is currently offline Nicolas Friend
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 11: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 11:34 Go to previous message
Nicolas  is currently offline Nicolas Friend
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: Thu Apr 25 05:04:17 GMT 2024

Powered by FUDForum. Page generated in 0.02516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top