Error:
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
Solución:
http://janimede.blogspot.mx/2011/03/javalangillegalstateexception.html
Error:
org.apache.jasper.JasperException: La uri absoluta: http://java.sun.com/jsf/html no puede resolverse o en web.xml o el los archivos jar desplegados con esta aplicación
Solución:
Copiar los tld's en wl WEB-INF
Blog dedicados a trucos y buenas prácticas tanto de desarrollo de Sw como de papiroflexía.
lunes, junio 04, 2012
miércoles, julio 13, 2011
Exponiendo maquina virtual a través de apache (modulo proxy)
En días pasados tenía me pasaron una maquina virtual para correr en el vmware player con una instancia de openbravo configurada y lista para usar, tal instancia la debía ser accesible a través de internet (appserver.dominio.com/openbravo).
Lo pude hacer gracias al modulo proxy del Apache Server.
En el archivo de configuración (httpd.conf ó apache2.conf) se deben habilitar los siguientes módulos:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
También se debe agregar los siguientes comandos:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /openbravo/ http://IP_MAQUINA_VIRTUAL/openbravo/
ProxyPassReverse /openbravo http://IP_MAQUINA_VIRTUAL/openbravo/
Donde IP_MAQUINA_VIRTUAL es la IP que proporciona el VMWare Player a la máquina virtual
martes, marzo 15, 2011
Cambiando el encoding de archivos en tomcat
Tengo una aplicación que genera el CFD la cual corre en Tomcat.
El problema que tenía es que los acentos no me los respetaba, a pesar de aplicarle el encoding UTF-8 al formato del archivo para la generación del mismo.
Solución:
Agregar en el archivo catalina.bat (o .sh) la siguiente línea al inicio del archivo:
set JAVA_OPTS=-Dfile.encoding="UTF-8"
sábado, enero 15, 2011
Ubuntu 10.04 Server Subversion
Me estoy metiendo a linux, tuve que configurar el SVN.
Comparto una ruta muy buena:
La clave para mi fue la combinación de :
SVNParentPath /usr/local/svn
AuthzSVNAccessFile /path/to/access/file
jueves, septiembre 02, 2010
java.io.IOException: JDT compilation error! WebLogic 10.3
Al desplegar un ear con un modulo EJB (3.0) en Weblogic (10.3.1 y 10.3.2, en Windows 7 con el JDK de cada instalación) obtenía el siguiente error:
Unable to deploy EJB: negocio-3.1.0.jar from negocio-3.1.0.jar:
There are 1 nested errors:
java.io.IOException: JDT compilation error!
at weblogic.ejb.container.ejbc.CompilerForJDT.compile(CompilerForJDT.java:66)
at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:358)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:556)
El problema era por un método sobre cargado:
boolean solicitarXxxYyyyObjeto(List listYyyyTO,
List listZzzzInstanciaTO);
Boolean solicitarXxxYyyyObjeto(
List listaZzzzInstanciaTO,
List listaYyyyTO) throws SeguridadException;
Elimine uno de los dos método tanto en la interfaz como en la implementación.
Y con eso la aplicación jalo.
lunes, abril 12, 2010
Cambiar tiitulo del browser
Para cambiar el titulo del navegador que contenga alguna pelicula creada en Flex se puede usar el siguiente código:
bm = BrowserManager.getInstance();
bm.init("", "Titulo deseado");
bm = BrowserManager.getInstance();
bm.init("", "Titulo deseado");
lunes, mayo 25, 2009
No quiero licencia
Serial number for Poseidon for UML Community Edition - 30-days free testing - Annual Subscription (1 License(s))
Wjmlmg8PFeVnXK0v9IOyq3avfPaUPDVwvbCBtw3PRCo/hGzbJFtprZpD94zi
giW6ovXQwJIgasaLXuB7lHc6DPpUA0ZaPkjuZXA8JgnEYvHaS9oJyrbvaYlp
Lzr9R9OajlmyxFv/HwUVqrhW0IFpRIb8+LVWNgqjRguCTRsovll7l8G+cw/+
uqn4s6Yz77WKTUwbNX3Ntz8UT2tHDLyXPWWtmsLpKXxuirIGNU2WzsfMFtnM
LdDMWjXDhRdDfQKhzCgNI0N3/1jrwATw7DeCbd3cGhIFfhjdpFlyJq2wa2Xb
BZrtrqqdqmWJrXDrokF//xy9+tm2sLj69Ql+6Sdwlw
*Single User Serial Number Installation* Here is a step by step procedure to install a Poseidon serial number:
1. Download the software from
<http://www.gentleware.com?redirect=download>
(Please use JDK/JRE Version 1.5, or use the installers that include a JRE) 2. Copy the key (above) to your clipboard 3. Start Poseidon for UML 4. If the License Manager dialog does not appear automatically,
please select "help" from the menu bar and choose "License Manager"
5. Click on "Paste from Clipboard" and your key will appear 6. Click the "Add" button to finish the process 7. You will have to register to get a final license key (you can register
even if your serial number has expired).
Click on the serial number in the table to select it, then click "Register"
and enter your User Information.
Click "Next" to finish your registration and get the final license
online or via our Website.
If you need support or have any questions concerning our products, please contact us at http://www.gentleware.com?redirect=contact
Wjmlmg8PFeVnXK0v9IOyq3avfPaUPDVwvbCBtw3PRCo/hGzbJFtprZpD94zi
giW6ovXQwJIgasaLXuB7lHc6DPpUA0ZaPkjuZXA8JgnEYvHaS9oJyrbvaYlp
Lzr9R9OajlmyxFv/HwUVqrhW0IFpRIb8+LVWNgqjRguCTRsovll7l8G+cw/+
uqn4s6Yz77WKTUwbNX3Ntz8UT2tHDLyXPWWtmsLpKXxuirIGNU2WzsfMFtnM
LdDMWjXDhRdDfQKhzCgNI0N3/1jrwATw7DeCbd3cGhIFfhjdpFlyJq2wa2Xb
BZrtrqqdqmWJrXDrokF//xy9+tm2sLj69Ql+6Sdwlw
*Single User Serial Number Installation* Here is a step by step procedure to install a Poseidon serial number:
1. Download the software from
<http://www.gentleware.com?redirect=download>
(Please use JDK/JRE Version 1.5, or use the installers that include a JRE) 2. Copy the key (above) to your clipboard 3. Start Poseidon for UML 4. If the License Manager dialog does not appear automatically,
please select "help" from the menu bar and choose "License Manager"
5. Click on "Paste from Clipboard" and your key will appear 6. Click the "Add" button to finish the process 7. You will have to register to get a final license key (you can register
even if your serial number has expired).
Click on the serial number in the table to select it, then click "Register"
and enter your User Information.
Click "Next" to finish your registration and get the final license
online or via our Website.
If you need support or have any questions concerning our products, please contact us at http://www.gentleware.com?redirect=contact
jueves, junio 05, 2008
JVM bind error
Al levantar JBoss me encontre con que no podía conectar el puerto 1099.
Encontre como cambiarlo:
Mover la configuración de los puertos en los siguientes archivos
and you will find entries in lines
{JBOSS_HOME}\server\default\conf\jboss-minimal.xml
and you will find entries in lines
{JBOSS_HOME}\server\default\conf\jboss-minimal.xml
{JBOSS_HOME}\server\default\conf\jboss-service.xml
{JBOSS_HOME}\server\default\deploy\cache-invalidation-service.xml
{JBOSS_HOME}\server\default\deploy\cache-invalidation-service.xml
martes, mayo 06, 2008
Read windows registry variable in Java
jueves, octubre 04, 2007
viernes, septiembre 28, 2007
Dates in HSQLDB
Encontre un link para el manejo de fechas en HSQL (y muestra el ejemplo con Oracle).
Para obtener
Se hace:
El post original está aquí.
Para obtener
2007-09-28
Se hace:
year(current_date) '-' month(current_date) '-'
(dayOfMonth(current_date)-60
El post original está aquí.
jueves, febrero 08, 2007
Flavors to Printer
DocFlavor[] flavors = impSelected.getSupportedDocFlavors();
for (int i = 0; i < flavors.length; i++ ) {
try {
System.out.println(BeanUtils.describe(flavors[1]).toString());
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
} // for
for (int i = 0; i < flavors.length; i++ ) {
try {
System.out.println(BeanUtils.describe(flavors[1]).toString());
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
} // for
martes, enero 02, 2007
LongRaw Datatype Oracle
String query = "SELECT name,airline_logo FROM " +
"otn_airline_longraw WHERE code=?";
// Create a PreparedStatement object for executing the query
PreparedStatement pst = connection.prepareStatement(query);
// bind the parameter with code value
pst.setString(1,lcode);
// Obtain the result-set for the selected airline record
ResultSet result = pst.executeQuery();
// get user home folder name
userHome = System.getProperty("user.home");
if( result.next() ) {
// Fetch column values
name = result.getString(1); // Obtain the airline code
// append the file name with user home directory, file separator and
// file extension GIF
fullName = userHome+File.separator+name+".gif";
// LONGRAW data can be accessed in two ways:
// 1) By retrieving all the data at once (using getBytes method)
// 2) By using streams. The LONGRAW data is made available to the program
// as a stream, and the data can be retrieved chunk by chunk, which is
// more eficient in terms of memory usage
// In this sample we illustrate retrieval using streams method.
gifdata = result.getBinaryStream(2);
// create new file
File gifFile = new File(fullName);
// Write the byte array into a local file
FileOutputStream file= new
FileOutputStream(gifFile);
int chunk=0;
// write to the local file until image (LONGRAW) data is found
while( (chunk = gifdata.read()) != -1) {
file.write(chunk);
}
El ejemplo competo está acá [Cátalogo de ejemplos].
Creo que tiene las mejores practicas las clases:
Hace falta un finally para cerrar recursos.
Declarar como final algunos objetos.
sábado, diciembre 16, 2006
Error creating bean with name 'xfire.typeMappingRegistry'
IBM WebSphere Application Server - ND, 6.0.0.1
Número de build: o0445.08
Fecha de build: 11/10/04
Frameworks: Spring & XFire.
Error:
;)org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.typeMappingRegistry' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: org/codehaus/xfire/aegis/type/basic/ObjectType, method: writeSchema signature: (Lorg/jdom/Element V) Incompatible argument to method
La solución es:
WAS tiene po defecto una libreria de JDOM versión 0.7, XFire usa la versión 1.0, al levantar la aplicación el contenedor utiliza las clases de 0.7 de JDOM dado que están en el classLoader del servidor sin importarle la del classLoader de la aplicación (WEB-INF\lib).
Hay que copiar dentro de las librerias del server (C:\Archivos de programa\IBM\WebSphere\AppServer1\lib) la versión 1.0 de JDOM.
Referencia:
Error creating bean with name 'xfire.typeMappingRegistry'
Número de build: o0445.08
Fecha de build: 11/10/04
Frameworks: Spring & XFire.
Error:
;)org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.typeMappingRegistry' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: org/codehaus/xfire/aegis/type/basic/ObjectType, method: writeSchema signature: (Lorg/jdom/Element V) Incompatible argument to method
La solución es:
WAS tiene po defecto una libreria de JDOM versión 0.7, XFire usa la versión 1.0, al levantar la aplicación el contenedor utiliza las clases de 0.7 de JDOM dado que están en el classLoader del servidor sin importarle la del classLoader de la aplicación (WEB-INF\lib).
Hay que copiar dentro de las librerias del server (C:\Archivos de programa\IBM\WebSphere\AppServer1\lib) la versión 1.0 de JDOM.
Referencia:
Error creating bean with name 'xfire.typeMappingRegistry'
Suscribirse a:
Entradas (Atom)