If you get error like:
javax.faces.FacesException: No file was uploaded
when you try to deploy the jar or war file.
Disk is full it won't be able to do it.
Try to clean /var/tmp folder on Solaris.
Showing posts with label JAVA. Show all posts
Showing posts with label JAVA. Show all posts
Friday, January 22, 2010
Tuesday, September 02, 2008
Oracle: ORA-12519, TNS:no appropriate service handler found on application processing
When running application on SUN application server, it suddenly gets "ORA-12519, TNS:no appropriate service handler found" error message when view a page. Sometime page will show up but sometime it gets error.
SOLUTION: under command window. RUN:
lsnrctl services
SOLUTION: under command window. RUN:
lsnrctl services
Labels:
JAVA,
Oracle,
Sun Application Server
Friday, July 18, 2008
JAVA: list system properties
Properties p = System.getProperties();
Enumeration keys = p.keys();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
String value = (String)p.get(key);
System.out.println(key + " ***: " + value);
}
or if we want specific property
String classPath = System.getProperty("java.class.path",".");
System.out.println("classPath = " + classPath);
Enumeration keys = p.keys();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
String value = (String)p.get(key);
System.out.println(key + " ***: " + value);
}
or if we want specific property
String classPath = System.getProperty("java.class.path",".");
System.out.println("classPath = " + classPath);
Thursday, June 05, 2008
Erorr for Spring configuration file
if getting error
Error creating bean with name 'businessBeanFactory' defined in URL [file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-modules/contracts-ejb/beanRefContext.xml]: Instantiation of bean failed; ...
...to convert value of type [java.lang.String] to required type [org.springframework.context.ApplicationContext]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type
** Check Database conntection.
Error creating bean with name 'businessBeanFactory' defined in URL [file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-modules/contracts-ejb/beanRefContext.xml]: Instantiation of bean failed; ...
...to convert value of type [java.lang.String] to required type [org.springframework.context.ApplicationContext]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type
** Check Database conntection.
Thursday, February 14, 2008
Java Mail
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
Properties property = new Properties();
property.put("smtp server", "test.com");
Session s = Session.getInstance(property,null);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress("from@test.com");
message.setFrom(from);
InternetAddress to = new InternetAddress("to@test.com");
message.addRecipient(Message.RecipientType.TO, to);
message.setSubject("Test from JavaMail.");
message.setText("Hello from JavaMail!");
Transport.send(message);
import javax.mail.*;
import javax.mail.internet.*;
Properties property = new Properties();
property.put("smtp server", "test.com");
Session s = Session.getInstance(property,null);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress("from@test.com");
message.setFrom(from);
InternetAddress to = new InternetAddress("to@test.com");
message.addRecipient(Message.RecipientType.TO, to);
message.setSubject("Test from JavaMail.");
message.setText("Hello from JavaMail!");
Transport.send(message);
Subscribe to:
Posts (Atom)