Hello Experts,
I have one of 4 basic CRUD screens in ADF with a LAST_UPDATED_DATE column that is timestamp. I have built the BC's EO VO in these for these pages.
I created a simple groovy expression for the LAST_UPDATED_DATE to get date() and store this when users update records in this screen which gets turned into this bcs java methods for the model.
Doesn't seem to like this for some reason....I have changed the date formatting numerous ways...Any ideas what could be causing this?
//Groovy Scripts for model.JplfaSmartSubcntrctrAll
package model
import oracle.jbo.script.annotation.TransientValueExpression;
import oracle.jbo.script.annotation.RefreshExpression;
@TransientValueExpression(attributeName="SubRecId")
def SubRecId_ExpressionScript_Expression()
{
(new oracle.jbo.server.SequenceImpl("JPLFA_SMART_SUBCNTRCTR_S", adf.object.getDBTransaction())).getSequenceNumber()
}
@TransientValueExpression(attributeName="ProcessedBy")
def ProcessedBy_ExpressionScript_Expression()
{
System.getProperty("user.name")
}
@TransientValueExpression(attributeName="LastUpdateDate")
def LastUpdateDate_ExpressionScript_Expression()
{
new Date()
}
@RefreshExpression(attributeName="LastUpdateDate")
def LastUpdateDate_RecalcExpressionScript_RecalcExpression()
{
new Date()
}
I get the following:
Caused by: java.lang.NumberFormatException: For input string: "2017-10-10 16:35:39.0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.<init>(Long.java:965)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at oracle.jbo.domain.TypeConvMapEntry.convert(TypeConvMapEntry.java:101)
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:892)
... 75 more
## Detail 0 ##
- java.lang.NumberFormatException: For input string: "2017-10-10 16:35:39.0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.<init>(Long.java:965)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl
And warning box in runtime of the ADF application:
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
<oracle.adf.view> <PartialResponseUtils> <handleError> <ADF_FACES-60096:Server Exception during PPR, #2>
oracle.jbo.domain.DataCreationException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25009. Error message parameters are {0=java.lang.Long, 1=2017-10-10 15:06:09.0, 2=java.sql.Timestamp}
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:962)