Check the following link
http://www.dba-oracle.com/sf_ora_00972_identifier_is_too_long.htm
Friday, 25 September 2009
Monday, 21 September 2009
How to email the file attachment from unix ?
/usr/bin/uuencode daily.zip daily.zip | /usr/bin/mailx -s "Daily Report" xyz@yahoo.com
Ref Link:
http://www.cyberciti.biz/faq/howto-unix-sending-files-as-mail-attachments/
Ref Link:
http://www.cyberciti.biz/faq/howto-unix-sending-files-as-mail-attachments/
How to change date format in oracle?
ALTER SESSION SET NLS_DATE_FORMAT = 'DD/MM/YYYY hh:mi:ss AM';
Ref links:
http://www.dba-oracle.com/sf_setting_parameters_tips.htm
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351017764854
Ref links:
http://www.dba-oracle.com/sf_setting_parameters_tips.htm
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351017764854
Tuesday, 15 September 2009
How to Execute SQL Scripts using sh file ?
sqlplus $DBUSERNAME/$DBPASSWORD@$DBNAME @/home/test/query/test.sql
Eclipse Warning : "The type MobTest collides with a package"
Reason : The package name is same as class name.
Friday, 11 September 2009
Eclipse Error : Access restriction:The method ..
Error message ..
Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar
Access restriction: The method getDefaultJPEGEncodeParam(BufferedImage) from the type JPEGImageEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar
Access restriction: The method setJPEGEncodeParam(JPEGEncodeParam) from the type JPEGImageEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar ImageUtil.java
Solution
Go to Project properties -->Java Compiler --> Errors Warnings, Then enable project specific settings,
Expand Deprecated and restrited APIs category
-Forbidden reference (acess rule) , Change to warning or ignore.
Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar
Access restriction: The method getDefaultJPEGEncodeParam(BufferedImage) from the type JPEGImageEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar
Access restriction: The method setJPEGEncodeParam(JPEGEncodeParam) from the type JPEGImageEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar ImageUtil.java
Solution
Go to Project properties -->Java Compiler --> Errors Warnings, Then enable project specific settings,
Expand Deprecated and restrited APIs category
-Forbidden reference (acess rule) , Change to warning or ignore.
Spell checker for Eclipse
Create the text file or Down load this file
Edit Eclipse Preferences:
- Window -> Preferences -> General-> Editors-> Text Editors-> Spelling
- Browse to the text file or downloaded file.
Click on the word and type CTRL+1, It will show context menu in eclipse editor.You can click your option.
Ref
Eclipse: Catch Those Spelling Errors
Edit Eclipse Preferences:
- Window -> Preferences -> General-> Editors-> Text Editors-> Spelling
- Browse to the text file or downloaded file.
Click on the word and type CTRL+1, It will show context menu in eclipse editor.You can click your option.
Ref
Eclipse: Catch Those Spelling Errors
Eclipse Error : "Java compiler level does not match the version of the installed Java project facet"
Go o Project ->Properties -> Project Facets panel and set java facet version to match the java compiler compliance level.
How to increase java heap size in Maven2?
Set an environment variable to increase the heap size
.
set MAVEN_OPTS=-Xmx1024m
How to increase java heap size in NetBeans?
Edit the file
netbeans_default_options="-J-Dorg.glassfish.v3.installRoot=\"C:\Program Files\sges-v3-prelude\" -J-Dcom.sun.aas.installRoot=\"C:\Sun\AppServer\" -J-client -J-Xss2m -J-Xms32m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true --fontsize 14 --laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"
Description
--fontsize 14 [to change the default font size in editor]
--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel [to change the Look And Feel]
Some other look an feel values,
javax.swing.plaf.metal.MetalLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
NETBEANS_HOME/etc/netbeans.conf
. Current conf file contents given belownetbeans_default_options="-J-Dorg.glassfish.v3.installRoot=\"C:\Program Files\sges-v3-prelude\" -J-Dcom.sun.aas.installRoot=\"C:\Sun\AppServer\" -J-client -J-Xss2m -J-Xms32m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true --fontsize 14 --laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"
Description
--fontsize 14 [to change the default font size in editor]
--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel [to change the Look And Feel]
Some other look an feel values,
javax.swing.plaf.metal.MetalLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
How to increase java heap size in Eclipse?
Add following entries to eclipse.ini file.Current eclipse.int contents given below
-vmargs
-Xms512m [minimum memory ]
-Xmx1024m [maximum memory]
-Duser.name=Thillakan Sabanayakam [Eclipse uses you OS user name in the
Contents
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-clean
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m
-Duser.name=Thillakan Sabanayakam
-vmargs
-Xms512m [minimum memory ]
-Xmx1024m [maximum memory]
-Duser.name=Thillakan Sabanayakam [Eclipse uses you OS user name in the
@author
java doc tag for default ]Contents
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-clean
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m
-Duser.name=Thillakan Sabanayakam
Explore process Information in unix
Each process has an entry in the
Commands :
ls -l /proc/pid/fd | wc -l
ls -l /proc/pid/lwp | wc -l
/proc
filesystem identified by its PID. The following are the important files in /proc
directory: pid/cmdline
contains the command that was used to start the process (using null characters to separate the arguments)./proc/pid/cwd
contains a link to the current working directory of the process./proc/pid/environ
contains a list of the environment variables that the process has available./proc/pid/exe
contains a link to the program that is running in the process./proc/pid/fd/
is a directory containing a link to each of the files that the process has open./proc/pid/mem
contains the memory contents of the process./proc/pid/stat
contains process status information./proc/pid/statm
contains process memory usage information./proc/pid/lwp
contains the threads running in the process with the process id
Commands :
ls -l /proc/pid/fd | wc -l
ls -l /proc/pid/lwp | wc -l
Thursday, 10 September 2009
How to insert single or double quote into Oracle DB?
Using q-quote string syntax, It can be done
Example :
Example :
INSERT INTO T(test) values (q'[single's quote and "double" quotes]');
Labels:
Double quotes,
Insert,
Oracle,
Quotes,
Single quote
Monday, 7 September 2009
How To Override Hibernate Configuration Settings?
The following code segment will override the some properties. [hibernate.connection.driver_class, hibernate.connection.url ,hibernate.connection.url, hibernate.connection.password]
public static void createSessionFactory(String driverclass,String url, String username, String password, String configFile) throws HibernateException {
if (sessionFactory != null) {
sessionFactory.close();
}
Configuration cfg = new AnnotationConfiguration().addResource(configFile);
cfg.configure(configFile);
cfg.setProperty("hibernate.connection.driver_class", driverclass);
cfg.setProperty("hibernate.connection.url", url);
cfg.setProperty("hibernate.connection.url", username);
cfg.setProperty("hibernate.connection.password", password);
sessionFactory = cfg.buildSessionFactory();
}
Hibernate configuration files properties used in following implementation.
public static void createSessionFactory(String driverclass,String url, String username, String password, String configFile) throws HibernateException {
if (sessionFactory != null) {
sessionFactory.close();
}
Configuration cfg = new AnnotationConfiguration().addResource(configFile);
cfg.setProperty("hibernate.connection.driver_class", driverclass);
cfg.setProperty("hibernate.connection.url", url);
cfg.setProperty("hibernate.connection.url", username);
cfg.setProperty("hibernate.connection.password", password);
cfg.configure(configFile);
sessionFactory = cfg.buildSessionFactory();
}
public static void createSessionFactory(String driverclass,String url, String username, String password, String configFile) throws HibernateException {
if (sessionFactory != null) {
sessionFactory.close();
}
Configuration cfg = new AnnotationConfiguration().addResource(configFile);
cfg.configure(configFile);
cfg.setProperty("hibernate.connection.driver_class", driverclass);
cfg.setProperty("hibernate.connection.url", url);
cfg.setProperty("hibernate.connection.url", username);
cfg.setProperty("hibernate.connection.password", password);
sessionFactory = cfg.buildSessionFactory();
}
Hibernate configuration files properties used in following implementation.
public static void createSessionFactory(String driverclass,String url, String username, String password, String configFile) throws HibernateException {
if (sessionFactory != null) {
sessionFactory.close();
}
Configuration cfg = new AnnotationConfiguration().addResource(configFile);
cfg.setProperty("hibernate.connection.driver_class", driverclass);
cfg.setProperty("hibernate.connection.url", url);
cfg.setProperty("hibernate.connection.url", username);
cfg.setProperty("hibernate.connection.password", password);
cfg.configure(configFile);
sessionFactory = cfg.buildSessionFactory();
}
Labels:
Configuration,
Hibernate,
Java
Thursday, 3 September 2009
How To Add Your Linkedin Profile Button To Your Blogger Blog
Subscribe to:
Posts (Atom)