setCreatedBy (int) cannot call setCreatedBy (oracle.jbo.domain.Number) EOImpl, setCreationDate (Calendar) cannot call setCreationDate (oracle.jbo.domain.Date) in EOImpl
Hello world
I get the following errors when you try to initialize a record:
- setCreatedBy (int) cannot be called setCreatedBy (oracle.jbo.domain.Number) in EOImpl
- setCreationDate (Calendar) cannot call setCreationDate (oracle.jbo.domain.Date) in EOImpl
setCreatedBy (value) must be a FND_USER. USER_ID. He wanders ins the following statement: setCreatedBy(-1);
setCreatedDate (value) must be today's date.
setWeekDate (value) must be the Sunday after today's date.
protected void doDML (int operation, TransactionEvent e) {}
Begin
Calendar date = Calendar.GetInstance ();
If (operation == DML_INSERT) {}
setLineId ((new_SequenceImpl_("tke_tp_cus_cd_14_lines_s",___getDBTransaction()).getSequenceNumber (()));
setBillable ("T");
setCreatedBy(-1);
setCreationDate (date);
setWeekDate (date);
}
End
super.doDML (operation, e);
}
Please be patient... I'm a noob! Thanks in advance!
James
James,
What version of Jdev do you use?
Can you post the code that you use after all the changes?
For the setLineId try new oracle.domain.Number(-1)
Timo
Tags: Java
Similar Questions
-
Hello world
During playback of Oracle ADF Real World Developer's Guide, I noticed the dates match occurring in JDeveloper is different from what is the list in the book. JDeveloper is failing to oracle.jbo.domain.Date, but according to the book:
DATE java.sql.Date DATE type is mapped to java.sql.Date if the column in the table is a no time didn't need information zone. DATE java.sql.Timestamp DATE type is mapped to java.sql.Timestamp if the column in the table has a component "time" and that the client needs to zone information. TIMESTAMP java.sql.Timestamp The TIMESTAMP type is mapped to java.sql.Timestamp if nanosecond precision is used in the database. In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date? Using java.sql.Date and java.sql.Timestamp could save me some headaches conversion date. And, is there a place in JDeveloper to display these maps? I looked around and didn't see anything.
Thank you.
James
User, what version of jdev we are talking about?
In GR 11, 1 material versions db types date and timestamp are mapped to types of domain data that represents a wrapper for the native data types. The reason was that the framework can work with the domain types regardless of the underlying data type.
Since Oracle 11 GR 2 maps the types DB to java types (default selection, you can change it when you create a model project, you can set the Data Type Mapping). Once the pilot has business components define you cannot change this setting it would break existing components such as eo or vo.
So if you are working wit 11 GR 1 subject, you must use the domain types, if you work with GR 11, 2 or 12 c, you can use the domain types, but it is recommended to use the java type mapping.
Timo
-
Hello world
Work with dates has been harder than I thought! Please take a look at the code; everything compiles, but it fails because I'm not cast properly. Any help would be appreciated.
Imports are:
import java.sql.SQLException;
to import java.text.ParseException;
import impossible;
import java.util.Calendar;
Import oracle.jbo.domain.Date;
Import oracle.jbo.domain.Timestamp;
Here is the method:
public static Date (String sDate, int day, nextDay
SimpleDateFormat String) {}
Date result = null;
java.util.Date date;
If (sDate! = null) {}
try {}
System.out.println ("Try...");
Calendar calendar = Calendar.GetInstance ();
SimpleDateFormat dateFormat =
new SimpleDateFormat (simpleDateFormat);
calendar.setTime (dateFormat.parse (sDate));
Calendar.Set (Calendar.DAY_OF_WEEK, date); day = Calendar.SUNDAY
Calendar.Set (Calendar.HOUR_OF_DAY, 0);
Calendar.Set (Calendar.MINUTE, 0);
Calendar.Set (Calendar.SECOND, 0);
Calendar.Add (Calendar.DATE, 7);
dateFormat.format (calendar.getTime ());
try {}
System.out.println ("try (inside)... ») ;
"System.out.println (" new Timestamp (calendar.getTime () .getTime ()) "):" +.
new Timestamp (calendar.getTime () .getTime ()));
result = new Date (Timestamp (calendar.getTime () .getTime ())) new; Code does not work here.
return the result;
} catch (SQLException e) {}
System.out.println ("catch (SQLException e)... ») ;
e.printStackTrace ();
}
Returns a null value.
} catch (ParseException exception) e {}
System.out.println ("catch exception e ParseException... ») ;
e.printStackTrace ();
}
Returns a null value.
}
Returns a null value.
}
Here is the result:
try...
Try (inside)...
new Timestamp (calendar.getTime () .getTime ())): 2013-12-29 00:00:00.0
catch (SQLException e)...
java.sql.SQLException: failed initialization
to oracle.sql.DATE. < init > (DATE.java:237)
to oracle.jbo.domain.Date. < init > (Date.java:378)
James
try to convert timestamp to jbo.date as
java.sql.Timestamp datetime =
new
java.sql.Timestamp(System.currentTimeMillis());
oracle.jbo.domain.Date daTime =
new
oracle.jbo.domain.Date(datetime);
-
Could not create the domain object type oracle.jbo.domain.Date
Hello
I'm getting the following exception in the user interface when I click on submit button (/ commit or any other button) for date fields. I created the default objects entity and notices for the database table. I'm poplating the data after executing the "Execute" operation on the iterator for the view.
Cannot be created with the value ' 22/09/2009' field object type oracle.jbo.domain.Date. +
Even if I had not made any changes to the date also fields, it's give the exception message in the user interface and do not return the form.
Could you please help me to solve the issue.
Thank you and best regards,
S R Prasad
Published by: oumar s Prasad on November 18, 2009 15:01Prasad,
What is your version of JDev? And what technology do you use to model? BC4J? Can you try to change the format of the attribute in the object view? Say with the type of Simple date format and format "mm/dd/yyyy".
Arun-
-
formatting oracle.jbo.domain.date
Hello
I use JDev 11.1.2.4.
I'm trying to update VO with the current date and time by using the code below.
DateFormat df = new SimpleDateFormat ("YYYY/MM/dd HH: mm :"); ")
java.util.Date currentDate = new java.util.Date ();
row.setAttribute ("Date sent", df.format (currentDate));
However, I run error
Houston-27023: Impossible to validate all the lines in a transaction.
any ideas?
Thank you
Hello
When you define the attribute that you do not need to set the format of datetime.
If you want to set the attribute to current date time use this
If the attribute is of type Timestamp, you can set date current time like that
row.setAttribute("ShippedDate",new oracle.jbo.domain.Date(new java.sql.Timestamp(System.currentTimeMillis())));
If the data type of the attribute is oracle.jbo.domain.Date you can set the date current time like that
row.setAttribute("ShippedDate",new oracle.jbo.domain.Date(oracle.jbo.domain.Date.getCurrentDate()));
and to display that date in the page with the format DD/MM/YYYY HH: mm: follow these steps:
1 - Open the viewobject and select Date sending attribute.
2 - starting from the indications of the UI, tab set Type-> Simple Date Format
3. as text the value of-> MM/DD/YYYY HH: mm:
-
conversion string in oracle.jbo.domain.Date
Hello
I work in jdev 11.1.1.6
I receive as string date of UCM as string. I need to convert to oracle.jbo.domain.Date.How to achieve
u cn do this
DateFormat trainer;
java.util.Date date;
{if(aDate!=null)}
try {}
Formatter = new SimpleDateFormat("dd/MMM/yyyy");
Date = formatter.parse (date);
java.sql.Date sqlDate = new java.sql.Date (date.getTime ());
oracle.jbo.domain.Date jboDate = new oracle.jbo.domain.Date (sqlDate);
Return jboDate;
}
catch (ParseException exception) e
{
e.printStackTrace ();
}
}
-
Number of days between two objects Oracle.jbo.domain.Date
I have two objects Oracle.job.domain.Date:
Date = StartDate (Date) CurrentRow.getAttribute ("StartDt");
Date = CurrentDate (Date) this.getOADBTransaction () .getCurrentDBDate ();
I want to find the number of days between StartDate and CurrentDate.
I tried the CompareTo () function, but its does not not the desired results.
Can someone let me know how I can find the number of days between StartDate and CurrentDate above?
Concerning
HawkerHawker,
Use the code below
Date StartDate= (Date)CurrentRow.getAttribute("StartDate"); Date CurrentDate = (Date)am.getOADBTransaction().getCurrentDBDate(); java.sql.Date sdate = (java.sql.Date) StartDate.dateValue(); java.sql.Date cdate = (java.sql.Date) CurrentDate.dateValue(); int days = daysBetween(sdate,cdate ); public int daysBetween(java.sql.Date d1, java.sql.Date d2){ return (int)( (d2.getTime() - d1.getTime()) / (1000 * 60 * 60 * 24)); }
Kind regards
GYANPublished by: Gyan on 27 March 2011 19:56
-
How to page to the controller oracle.jbo.domain.date
Hi all
I want to get the date of my grain of table advanced to the controller. I'm date as a java.sql.Date I want to convert it to oracle.jbo.domain.Date. Pointers in it will be useful.
Thanks in advance.
With respect,
Anjani.spend your date ViewObject, you will get it in the format jbo.domain.date
VO. Next(). GetAttribute ("DateAttributeXXXX");
Prasanna-
-
How to truncate oracle.jbo.domain.date
Hello
I have problem to convert oracle.jbo.domain.date. Now, I got the current date of pagecontext, but this is the format yyyy-mm-dd hh. I want only aaaa-mm-jj, so I want to truncate the time of oracle.jbo.domain.date. And I want to got to this Date no chain. I found Date.truncate () there, but I don't know how to use it.
Could someone help to give me an example?
Best regards
EileenHello
use,
currentDate = am.getOADBTransaction () .getCurrentUserDate () oracle.jbo.domain.Date;
Date testdate = (Date) currentDate.dateValue ();Thank you
Gerard -
I have a date component. MinValue named Id2 and the following code is to run a class cast exception indicating that the string value cannot be cast to a date sql
java.sql.Date dateNeeded = (java.sql.Date) this.getId2 () .getValue ();
can someone help me to overcome this problem.
Thanks and greetings
Janak
Published by: new_to_ORACLE on February 18, 2011 16:56
Published by: new_to_ORACLE on February 18, 2011 16:58the Date attribute is of type object oracle.jbo.domain.Date
so, first try to cast to oracle.jbo.domain.Date. then to java.sql.Date objectIf you need to cast to another Date object, see this site:
http://www.ecotronics.ch/webdesign/javadate.htmPublished by: M.Jabr on February 19, 2011 11:53
-
After some testing today with a new installation and plugin subversion in the latest edition of data Modeler this error happens with every start of the tool.
Have removed and unzipped the installation once again without changing the error.
After that, I started with another user on my computer, it the error does not occur.
Is there a system folder to remove the configuration of my personal like jdeveloper and sql developer?
I lose the most important features, for example. have no browser and cannot open a design.
Here is the full error stack:
29 may 2015 22:17:40 oracle.ideimpl.extension.AddinManagerImpl
SEVERE: Exception initialization 'oracle.dbtools.crest.fcp.DataModelerAddin' extension ' Oracle SQL Developer Data Modeling
java.lang.NullPointerException
at oracle.dbtools.crest.swingui.editor.UDPLibrariesPersistence.load(UDPLibrariesPersistence.java:220)
at oracle.dbtools.crest.model.design.DesignSet.createElement(DesignSet.java:56)
at oracle.dbtools.crest.swingui.ApplicationView.addDesign(ApplicationView.java:2497)
to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:435)
to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:389)
at oracle.dbtools.crest.swingui.ApplicationView.getInstance(ApplicationView.java:2258)
at oracle.dbtools.crest.fcp.DataModelerAddin.initialize(DataModelerAddin.java:553)
at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:496)
at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:483)
at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManagerImpl.java:299)
at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:160)
at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:143)
at oracle.ide.IdeCore.initProductAndUserAddinsAndActionRegistry(IdeCore.java:2294)
at oracle.ide.IdeCore.startupImpl(IdeCore.java:1817)
at oracle.ide.Ide.startup(Ide.java:772)
at oracle.ide.osgi.Activator.start(Activator.java:209)
to org.eclipse.osgi.framework.internal.core.BundleContextImpl$ 1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged (Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)
at org.netbeans.core.netigso.Netigso.start(Netigso.java:191)
at org.netbeans.NetigsoHandle.startFramework(NetigsoHandle.java:209)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1352)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1156)
at org.netbeans.core.startup.ModuleList.installNew (ModuleList.java:340)
at org.netbeans.core.startup.ModuleList.trigger (ModuleList.java:276)
at org.netbeans.core.startup.ModuleSystem.restore (ModuleSystem.java:301)
at org.netbeans.core.startup.Main.getModuleSystem (Main.java:181)
at org.netbeans.core.startup.Main.getModuleSystem (Main.java:150)
at org.netbeans.core.startup.Main.start (Main.java:307)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:745)
Hi Torsten,
Thanks for reporting the problem. I logged a bug.
You can view together as "list of system types" directory to "preference > Data Modeler"-probably no longer exists. I guess that the setting for this directory is empty when you start SQL Dev as a different user.
Philippe
-
can we use 32-bit components (ODAC) Oracle with oracle 64-bit data access
Hi all
Let me know for oracle 11G 64 bit the latest patches are available?
Yet more can we use 32-bit components of Oracle (ODAC) with oracle 64-bit data access.
Thank you
FadiLet me know for oracle 11G 64 bit the latest patches are available?
Check on http://metalink.oracle.com
Yet more can we use 32-bit components of Oracle (ODAC) with oracle 64-bit data access.
I guess you mean to use 32-bit components ODAC on the client side. I've not seen this in practice, but it should be possible as long as we do not / cannot upgrade all clients to 64-bit.
-
Using Oracle 11 g Data Guard disaster recovery
Hi, can anyone answer if Oracle 11 g Data Guard by itself provides an option for making/switch between the main bases and emergency (back and forth) disaster and as a restoration solution, seamlessly? Here's the scenario:
1. two databases (active and reserve)
2 put it to sleep (make primary with read/write)
3. restore to the original database
Data Guard has two transitions of role... Failover and the digital switchover.
Passage to the fact exactly what you describe. You can switch to standby and vice versa. However, this will not work unless the primary and the standby are available. If you will not be able to perform an operation of swichover when you have a failure in the main data center that makes the primary db not available.
Failover will be the day before in a primary for the moments where the primary origin is not available. Unlike the digital switchover, failover is one-way. There is no 'restoration' of failover. If you do not failover, then once the old Center of main data is operational again and you can get the former primary database up, you must restore from the first news and make a watch for the first new. At this point, you can then make a pass to come back and run in the original data center.
HTH,
Brian
-
Hi all
I'm looking for full installation GUIDE for Oracle Business Intelligence Data Warehouse Console Administration 11 g and Informatica PowerCenter and PowerConnect 9.6.1 for Linux x 86 (64 bit) adapters. I just wonder is there any url that you can recommend for installation. Please advise.
Looks like these are ask you.
http://docs.Oracle.com/CD/E25054_01/fusionapps.1111/e16814/postinstsetup.htm
http://ashrutp.blogspot.com.by/2014/01/Informatica-PowerCenter-and.html
-
ORA-19846: cannot read the header of the data file of the remote site 21
Hello
I have a situation or I can say a scenario. It is purely for testing base. Database is on 12.1.0.1 on a Linux box using ASM (OMF).
Standby is created on another machine with the same platform and who also uses ASM (OMF) and is in phase with the primary. Now, suppose I have create a PDB file on the primary of the SEED and it is created successfully.
After that is a couple of log, do it again passes to the waiting, but MRP fails because of naming conventions. Agree with that! Now, on the primary, I remove the newly created PDB (coward the PDB newly created). Once again a couple of switches of newspapers which is passed on to the wait. Of course, the wait is always out of sync.
Now, how to get back my watch in sync with the primary? I can't roll method until the required data (new PDB) file does not exist on the main site as well. I get the following error:
RMAN > recover database service prim noredo using backupset compressed;
To go back to November 8, 15
using the control file of the target instead of recovery catalog database
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 70 = device = DISK stby type instance
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of the command recover at the 18:55:32 08/11/2015
ORA-19846: cannot read the header of the data file of the remote site 21
The clues on how to I go ahead? Of course, recreating the eve is an option as its only based on test, but I don't want recreation.
Thank you.
I tried like below:
1 a incremental backup of the primary of the CNS where off the eve also taken primary backup controlfile as Eve format.
2 copy the backup of the watch parts, catalogged them on the day before.
3 recovered Eve with noredo option - it fails here with the same error pointing to the 21 data file.
OK, understood. Try not to get back the day before first, rather than restore the controlfile and then perform the restoration.
Make it like:
1. take incremental backup of primary SNA, also ensures the backup controlfile format.
2. copy pending, get the location of the data file (names) by querying v$ datafile on the eve. Restore the controlfile ensures from the backup controlfile you took on primary and mount.
3. Since you are using OMF, the path of primary and standby data file will be different. (
/ ). If you require catalog data from the database files pending. (Reason: you restore controlfile from elementary to step 2, which takes place from the main access road). Use the details that you obtained in step 2 and catalog them.
4. turn the database copy by RMAN. (RMAN > switch database to copy ;))
5 Catalog backup items that you copied in step 2.
6. recover the standby database using 'noredo' option.
7. finally start the MRP. This should solve your problem.
The reason I say this works is because here, you restore the controlfile to primary first, which will not have details 21, datafile, and then you are recovering. So it must succeed.
In the previous method, you tried to first collect all the day before, and then restore the controlfile. While remedial classes, always watch seeks datafile 21 as he controlfile is not yet updated.
HTH
-Jonathan Rolland
Maybe you are looking for
-
Compatibility problem of printer cartridge for HP 1000 J110A
After the installation of HP cartridge 61XL get incompatble printer cartridges but in the box, it was claearly showing the J110A printer model.
-
HP compaq mini problem how to reset the password for vios
Hi all please help me for my problem in my hp compaq mini my problem is vios of password... password check failed Fatal error... system interrupted. CNU8514GN2 Thanks in advance...
-
My LaserJet M1536 suddenly no longer print from my Mac laptop. And Yes, I downloaded the HP printer from the Mac App Store software was last updated. Under the LCD of the printer are three lights that stay on, even after that I power on and off the p
-
Dust under screen blackBerry Smartphones torch!
I don't know if it of a common problem or not. But I got my flashlight for 2 weeks now, and I have a lot of dust in the Middle at the top of the screen... And I tried hoevering and pressure air dusters... And it builds up again! If it gets worse I'll
-
HelloI bought a case number 97740932 and was supposed to be a vector. When I opened it turns out that it's a JPG file embedded in artificial intelligence.Have you met someone with this?Have you reported to use Adobe?