Error running on exported product, not within eclipse ! [message #758090] |
Mon, 21 November 2011 21:05 |
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 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 |
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 11:33] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03156 seconds