abheeshek reddy wrote:hi all,
i am trying to insert date in Oracle DB using Spring MVC.
JSP Code
Shift Bean
Controller
In Console it is printing null ? how fix and how can i auto populate the date in UI.
Date | emp1 | emp2 | emp3 | emp4 | emp5 | emp6 |
---|---|---|---|---|---|---|
01/July/2016 | T2 | T1 | T3 | T1 | T3 | T2 |
02/July/2016 | T1 | T2 | T3 | T2 | T1 | T3 |
03/July/2016 | T3 | T1 | T2 | T3 | T2 | T1 |
04/July/2016 | T1 | T3 | T1 | T1 | T3 | T2 |
Dave Tolls wrote:
That's the bit you want to be checking if its null...not the getAsString() value.
If there isn't a "Release" value then there's nothing there to call getAsString on.
Dave Tolls wrote:The format is only for parsing a String to a Date.
Date objects do not have a format.
As for not having the seconds in the DB, how are you reading values out of the db?
What database is it?
--Oracle is the database.
What is the column type?
Dave Tolls wrote:Can you post the full exception and stack trace?
Why are you parsing, formatting, and then parsing again?
Dave Tolls wrote:Have you tried using SimpleDateFormat?
That's the class for turning a date string into a Date object.
String s = "2016-11-30T06:24:45:760z"
abheeshek reddy wrote:hi Guys,
I have a script to remove lower version jars files in a directory.
#!/bin/bash
#Script to remove lower version jar files.
for PREFIX in `ls *.jar|sed 's/-[0-9\.\0-9\.a-zA-Z]*\.jar//g'|uniq -d`; do
for FILE in `ls -r ${PREFIX}*|sed '1d'`; do
echo " $FILE"
rm $FILE
done
done
It has a bug and i need your help to figure and fix the bug.
I have below list of Duplicate jar files in a directory.
xyz-1.1.jar
xyz-1.1.1.jar
abc-1.6.jar
abc-1.3.jar
abc-xyz-pqr-1.9.6.jar
abc-xyz-pqr-1.9.2.jar
xyz-tom.jar
xyz-tom-20120423.jar
xyz-tom-20120410.jar
abc-toolkit-1.6-runtime-5.2.0.jar
abc-toolkit-1.6-runtime-5.0.0.jar
The bug is with xyz pattern jar files.
BUG: 1) Script is removing xyz-1.1.1.jar file instead of xyz-1.1.jar
2) Script is removing xyz-tom-20120423.jar and xyz-tom-20120410.jar files.
Thanks
Abhee
Jesper de Jong wrote:
abheeshek reddy wrote:The path has been set to my C:\Program Files\Java\jdk1.6.0_31\bin directory.
What the PATH is set to, is irrelevant for this question.
Ravi Vanamala wrote:Along with the PATH, try setting the JAVA_HOME=C:\Program Files\Java\jdk1.6.0_31 in environment "System Variables"
That's not going to solve anything either - the Java compiler and launcher do not use the JAVA_HOME environment variable at all.
NoClassDefFoundError means that your CLASSPATH is not correct, so that Java can't find a class it's looking for.
First, compile your source file with the command: javac SingletonDemo.java
If that succeeds without errors, check that you have a file named SingletonDemo.class in the current directory.
Then run it. Use the -cp option to specify the classpath; make sure the current directory "." is in the classpath:
java -cp . SingletonDemo
John Jai wrote:1. Please check if the .class file is present in the classpath
2. Hope you first compiled using javac before executing java command.