Add 1 Second to the specified date
Hi ,
I have a date like "20061021 22:12:60".
I need to add one second to this date string. Can you please tell me how to do it. I used SimpleDateFormat , but don't know how to add .
If it is a Calender instance, i can add one sec.
any ideas or sample code is fine.
Thanks.
I have a date like "20061021 22:12:60".As you noted correctly, this is not a date, this is a String. Just a bunch of chars.
I need to add one second to this date string. Can
you please tell me how to do it. I used
SimpleDateFormat , but don't know how to add .Get the Date you parsed, get its time long, add 1000, be done.
If it is a Calender instance, i can add one sec. You can set a Calendar to a certain Date. Did you read the API?
Similar Messages
-
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
Query to find the difference between the last date and the second to the last date
Hi all,
Hope all is well.
I am working on the following problem because I am trying to improve my MS SQL skills. But I am stuck at the moment and I wonder if you could provide some assistance please. Here is the issue:
Table 1: Dividends
divId
ExDate
RecordDate
PayDate
Amount
Yield
symId
1
2013-02-19
2013-02-21
2013-03-14
0.23
0.00000
3930
2
2012-11-13
2012-11-15
2012-12-13
0.23
0.00849
3930
3
2012-08-14
2012-08-16
2012-09-13
0.20
0.00664
3930
4
2012-05-15
2012-05-17
2012-06-14
0.20
0.00662
3930
5
2012-02-14
2012-02-16
2012-03-08
0.20
0.00661
3930
6
2011-11-15
2011-11-17
2011-12-08
0.20
0.00748
3930
7
2011-08-16
2011-08-18
2011-09-08
0.16
0.00631
3930
8
2011-05-17
2011-05-19
2011-06-09
0.16
0.00653
3930
9
2011-02-15
2011-02-17
2011-03-10
0.16
0.00594
3930
10
2010-11-16
2010-11-18
2010-12-09
0.16
0.00620
3930
11
2010-08-17
2010-08-19
2010-09-09
0.13
0.00526
3930
12
2010-05-18
2010-05-20
2010-06-10
0.13
0.00455
3930
13
2010-02-16
2010-02-18
2010-03-11
0.13
0.00459
3930
Table 2: Tickers
symId
Symbol
Name
Sector
Industry
1
A
Agilent Technologies Inc.
Technology
Scientific & Technical Instruments
2
AA
Alcoa, Inc.
Basic Materials
Aluminum
3
AACC
Asset Acceptance Capital Corp.
Financial
Credit Services
4
AADR
WCM/BNY Mellon Focused Growth ADR ETF
Financial
Exchange Traded Fund
5
AAIT
iShares MSCI AC Asia Information Tech
Financial
Exchange Traded Fund
6
AAME
Atlantic American Corp.
Financial
Life Insurance
7
AAN
Aaron's, Inc.
Services
Rental & Leasing Services
8
AAON
AAON Inc.
Industrial Goods
General Building Materials
9
AAP
Advance Auto Parts Inc.
Services
Auto Parts Stores
10
AAPL
Apple Inc.
Technology
Personal Computers
11
AAT
American Assets Trust, Inc.
Financial
REIT - Office
12
AAU
Almaden Minerals Ltd.
Basic Materials
Industrial Metals & Minerals
I am trying to check the last date (i.e. max date) and also check the penultimate date (i.e. the second to the last date). And then find the difference between the two (i.e. last date minus penultimate
date).
I would like to do that for each of the companies listed in Table 2: Tickers. I am able to do it for just one company (MSFT) using the queries below:
SELECT
[First] = MIN(ExDate),
[Last] = MAX(ExDate),
[Diff] = DATEDIFF(DAY, MIN(ExDate), MAX(ExDate))
FROM (
SELECT TOP 2 Dividends.ExDate
FROM Dividends, Tickers
WHERE Dividends.symId=Tickers.symId
AND Tickers.Symbol='MSFT'
ORDER BY ExDate DESC
) AS X
Outputs the following result:
First
Last
Diff
2012-11-13
2013-02-19
98
But what I would like instead is to be able to output something like this:
Symbol
First
Last
Diff
MSFT
2012-11-13
2013-02-19
98
AAN
2012-11-13
2012-12-14
1
X
2012-11-13
2012-12-14
1
Can anyone please let me know what do I need to add on my query in order to achieve the desired output?
Any help would be greatly appreciated.
Thanks in advance.Could you try this?
create table Ticker (SymbolId int identity primary key, Symbol varchar(4))
insert into Ticker (Symbol) values ('MSFT'), ('ORCL'), ('GOOG')
create table Dividend (DividendId int identity, SymbolId int constraint FK_Dividend foreign key references Ticker(SymbolId), ExDate datetime, Amount decimal(18,4))
insert into Dividend (SymbolId, ExDate, Amount) values
(1, '2012-10-1', 10),
(1, '2012-10-3', 1),
(1, '2012-10-7', 7),
(1, '2012-10-12', 2),
(1, '2012-10-23', 8),
(1, '2012-10-30', 5),
(2, '2012-10-1', 10),
(2, '2012-10-6', 1),
(2, '2012-10-29', 7),
(3, '2012-10-1', 22),
(3, '2012-10-3', 21),
(3, '2012-10-7', 3),
(3, '2012-10-12', 9)
WITH cte
AS (SELECT t.Symbol,
d.ExDate,
d.Amount,
ROW_NUMBER()
OVER (
partition BY Symbol
ORDER BY ExDate DESC) AS rownum
FROM Ticker AS t
INNER JOIN Dividend AS d
ON t.SymbolId = d.SymbolId),
ctedate
AS (SELECT Symbol,
[1] AS maxdate,
[2] AS penultimatedate
FROM cte
PIVOT( MIN(ExDate)
FOR RowNum IN ([1],
[2]) ) AS pvtquery),
cteamount
AS (SELECT Symbol,
[1] AS maxdateamount,
[2] AS penultimatedateamount
FROM cte
PIVOT( MIN(Amount)
FOR RowNum IN ([1],
[2]) ) AS pvtquery)
SELECT d.Symbol,
MIN(MaxDate) AS maxdate,
MIN(penultimatedate) AS penultimatedate,
DATEDIFF(d, MIN(penultimatedate), MIN(MaxDate)) AS numberofdays,
MIN(MaxDateAmount) AS maxdateamount,
MIN(penultimatedateAmount) AS penultimatedateamount,
MIN(MaxDateAmount) - MIN(penultimatedateAmount) AS delta
FROM ctedate AS d
INNER JOIN cteamount AS a
ON d.Symbol = a.symbol
GROUP BY d.Symbol
ORDER BY d.Symbol
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers.
Thanks!
Aalam | Blog (http://aalamrangi.wordpress.com) -
GoTodate goes to point at or NEAR (??) the specified date and time
Hi,
From documentation:
" GoTodate goes to point at or NEAR (??) the specified date and time"
so i want to know, please, what does it mean Near the specified time and the reasons about that
Thank you in advanceHi Khaled,
The exact time point depends on the history option for tracking changes to data in version-enabled tables,
as set by the EnableVersioning procedure (or modified by the SetWoOverwriteOFF or SetWoOverwriteON procedure):
NONE: The read-only view reflects the first savepoint after in_date (or the latest data in the workspace if there is no such savepoint).
VIEW_WO_OVERWRITE: The read-only view reflects the data values in effect at in_date.
VIEW_W_OVERWRITE: The read-only view reflects the data values in effect at in_date, except if in_date is between two savepoints and data was changed between the
two savepoints. In this case, data that had been changed between the savepoints might be seen as empty. To ensure the most complete and accurate view of the data, specify the VIEW_WO_OVERWRITE history option when version-enabling a table.
The following example scenario shows the effect of history option on data seen after gotoDate. Consider the following table:
Employee( NAME varchar2(30) primary key, MANAGER_NAME varchar2(30));
Now assume the following sequence of events:
1. Time=t1: The row ( 'SCOTT', 'ADAMS' ) is inserted into the table Employee.
2. Time=t2: Savepoint SP1 is created.
3.Time=t3: The MANAGER_NAME value for SCOTT is changed to Baxter.
4.Time=t4: The time point that will be specified as in_date (in step 7) occurs.
5.Time=t5: The MANAGER_NAME value for SCOTT is changed to Chang. (Thus, the value has been changed both before and after in_date since the first savepoint and before the second savepoint.)
6.Time=t6: Savepoint SP2 is created.
7.Timw=t7: A DBMS_WM.GotoDate(t4) operation is xecuted, specifying the time point 't4' in step 4 as in_date.
The data seen after gotoDate for different history options is as follows:
NONE: The row ('SCOTT', 'Chang') is seen. This is because the first savepoint after the specified instant is SP2. Note that in this case, after step 5 the versioned table has two rows for the primary key 'SCOTT': ('SCOTT', 'ADAMS') and ('SCOTT', 'Chang').
VIEW_WO_OVERWRITE: The row ('SCOTT', 'Baxter') is seen.
After step 5 the versioned table has three rows for the
primary key 'SCOTT':
('SCOTT', 'ADAMS'),
('SCOTT', 'Baxter') and
('SCOTT', 'Chang').
This is because each change is done in a new copy of the row.
VIEW_W_OVERWRITE: No row is seen for 'SCOTT'.
The updates in steps 3 and 5 are done in the same copy of the row, and the update in step 5 overwrites the update in step 3. As a result, after step 5 the versioned table has two rows for the primary key 'SCOTT':
('SCOTT', 'ADAMS') and ('SCOTT', 'Chang').
Since the value in effect at the specified instant (i.e., 'Baxter') has been overwritten,no row is shown for 'SCOTT'.
Regards,
Ram
Workspace Manager Group -
Add one day to the current date
Hi all,
A stupid question...
How can I add one day to the current date in a select. I want something similar to add one month to current date, but with days:
something like:
select TO_CHAR (ADD_MONTHS (SYSDATE, -1), 'DD-MM-YYYY')
from dual
Thanksselect sysdate+1 "add one day" from dual;
-
How to Add 15 Days to the current Date in eCATT
Hello eCATT Guru's,
How to add 15 days to the current date in eCATT.
I have changed the Date format to mm/dd/yyyy.
now i want to add 15 days to the sy-datum.
How to do that.do any one know?
Thanks in Advance,
RajCheck out this link -
http://help.sap.com/saphelp_46c/helpdata/en/d7/e21a50408e11d1896b0000e8322d00/frameset.htm
It gives details about DATE variables in CATT. Hope this will help you out.
ashish
Reward points if you find this helpful.
Message was edited by: Ashish Gundawar -
J2ME: add a week to the current date
I want to add a week to the current date but the output has to be a valid date. I can't figure it out how to solve the problem :(.
Can anybody help me with my problem?
TIAa better approach...
Calendar today = Calendar.getInstance();
Date d = today.getTime();
System.out.println("todays Date="+d);
today.add(today.DATE, 7);
Date d1 = today.getTime();
System.out.println("nextDate="+d1); -
How to add a button to the grouped data in an AdvancedDataGrid?
Hi,
Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
For the leaf node the itemRenderer property works just fine.
Please help!HI ,
I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list but still I am unable to get any additional button on the output ALV popup.
Please help.
Regards,
Kavya. -
The specified data format is not available when I paste
When I try to copy a jpg image from Firefox21 and try to paste into a graphic software program,
I get a message:
"the specified date format is not available"
It works ok with text,
It also works fine in IE8, which I prefer not to use anymore.
I use WinXP Pro 3
any ideas???I assume you are using right-click > Copy Image ?
Does this problem occur with all images or is it limited to particular sites?
If you try Save Image As instead, and then open the image, is it a valid image file? -
Terminated with error: br REP-501: Unable to connect to the specified data
Dear All,
Oracle DB 10g installed on Windows 2003 Server machine and client is Windows 7 Pro. Forms are running fine. If I run report by puting everything in URL it is also giving result. But only when i am trying to call report via form I get an error REP-501: Unable to connect to the specified data. The report log file contains below result. Is this something to to AUTHID=ANONYMOUS??? I need your assistance in this regard as I have been facing this problem since quite a long time now.
[2011/10/22 3:55:55:34] Info 56013 (ConnectionManager:release): Connection 0 is released
[2011/10/22 3:55:55:34] Info 50132 (JobObject:reset): jobid = 72 Get command line: REPORT=E:\AuditSys\twoconsecutive_estimate.jsp USERID=AUDITSYS@customerdb P_USERID="MAJAN" P_REPORTNAME="Bills which have been estimated for 3 months consecutively" P_REGIONCODE="" P_TARIFF="" P_PRIGOV="" P_AREAFROM="2" P_AREATO="91" P_BILLMONTH="9" P_BILLYEAR="2011" P_MONTHS="3" BATCH=YES DESTYPE=cache DESFORMAT=HTML AUTHID=ANONYMOUS
[2011/10/22 3:55:55:34] Debug 50103 (ConnectionImpl:runJob): Job queue for jobid = 72 is 0
[2011/10/22 3:55:55:34] Debug 50103 (ConnectionImpl:runJob): jobid = 72 is in current queue
[2011/10/22 3:55:55:34] Debug 50103 (ConnectionImpl:runJob): Calling findDuplicatedJob for jobid = 72
[2011/10/22 3:55:55:34] Debug 50103 (JobManager:findDuplicatedJob): Found no duplicated job for job 72
[2011/10/22 3:55:55:34] Debug 50103 (ConnectionImpl:runJob): No Duplicate jobs for jobid = 72
[2011/10/22 3:55:55:34] Debug 50103 (ConnectionImpl:runJob): Job 72 is Enqueued
[2011/10/22 3:55:55:34] Debug 50103 (JobManager:firstToRun): job 72 is first to run
[2011/10/22 3:55:55:34] Debug 50103 (JobManager.runJobLocal): Trying to get engine for Job 72
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:getIdleEngine): Target max engines = 1
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:getIdleEngine): rwEng-0 is used = true
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:getIdleEngine): rwEng-0 state is 1
[2011/10/22 3:55:55:34] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Reserved
[2011/10/22 3:55:55:34] Debug 50103 (JobManager.runJobLocal): Job 72 got Engine rwEng-0
[2011/10/22 3:55:55:34] Debug 50103 (JobManager:runJobInEngine): Job 72 calling setCommand on engine rwEng-0
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 3
[2011/10/22 3:55:55:34] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Running
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 5
[2011/10/22 3:55:55:34] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Idle
[2011/10/22 3:55:55:34] Debug 50103 (JobManager:runJobInEngine): Send job 72 to engine rwEng-0
[2011/10/22 3:55:55:34] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 3
[2011/10/22 3:55:55:34] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Running
[2011/10/22 3:55:55:96] State 56016 (JobManager:updateJobStatus): Job 72 status is: Terminated with error:
REP-501: Unable to connect to the specified database.
[2011/10/22 3:55:55:96] Debug 50103 (JobManager:notifyWaitingJobs): Master job 72 notify its duplicated jobs.
[2011/10/22 3:55:55:96] Debug 50103 (JobManager:updateJobStatus): Finished updating job: 72
[2011/10/22 3:55:55:96] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 1
[2011/10/22 3:55:55:96] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Ready
[2011/10/22 3:55:55:96] Exception 501 (): Unable to connect to the specified database.
Thanks,
ZiaDear guys, it is quite an urgency here and I am not getting any clue from anywhere else .... please give me some tips to handle the issue if anybody has some...
Regards, -
REP-501: Unable to connect to the specified data
i found this error when i try to run reports in 11g-->>
REP-501: Unable to connect to the specified data
kindly provide solution regarding the same.Dear guys, it is quite an urgency here and I am not getting any clue from anywhere else .... please give me some tips to handle the issue if anybody has some...
Regards, -
To add new record into the table Data Service client
When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
Code:
DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
edoc.addNewEmployeeDetails();
//here I set the primary key value empid
edet.setEmpid("1212");
edet.setEmpname("manu");
ds.submit(edoc);
Error
EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
at com.bea.ld.ServerBean.submit(ServerBean.java:529)
at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Unknown Source)
Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
... 15 more
But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
The update method works fine for the same client.
The exception only happens when I am trying to insert a new record.
Please help me to figure out this problem.If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
Correction: put ld-server-app.jar in the client classpath
Edited by mreiche at 09/17/2007 3:28 PM -
I want to add 2 months to the current date
actally i want to add 2 montsh fro teh current date.but i have to consider the month of february for the calculation and even the leap year.
so can u guys help me out .
waiting for the reply
thanks in advance.Hi Rajeev ,
Welcome to SDN.
Check this and execute the code.
This will cover the leap year also.
data: date like sy-datum,
date1 like sy-datum.
date = sy-datum.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = date
days = 00
months = 02 "no of months
SIGNUM = '+' "months added
years = 00
IMPORTING
CALC_DATE = date1. " new date
write:/ 'new date', date1.
regards.
vijay -
How to add 15 days to the current date
Hi everyone,
I have the following doubt.
I stored the current system date in to a variable.Now I want to store the date which is 15 days after the current date in to a new variable.
ie current date:1-aug-09
later date:1-aug-09 + 15 days ie 16-aug-09.
Plz help me in solving this problem.
Thanks & Regards,
srinivasjaligamasrinivas wrote:
I used String variable to store the current Date.
Now in new string variable i want to store the date after 15 days from current dateSee reply #2. String is not the right type, to be doing date arithmetic, just like it wouldn't be the right type to do numeric arithmetic. You wouldn't store integer values as strings and ask how to add them up, would you? -
How do I add my name to the camera data file in meta data?
When reviewing the meta data on my photos I see the camera model number, serial number, focal length, etc. The camera owner field is blank. How do I add my name to the camera owner field?
I'm using Photoshop CC, on a windows 8.1 Pro platform. Any help would be greatly appreciated.
CaitlinI did add all the info on the menu section you mentioned above. Unfortunately it does not show up as "Owner" when you view the data file in Photoshop CC for some reason. Copyright info shows properly, but not camera owner. It's not a big problem anyway, just a pride of ownership thingy . I downloaded the GeoSetter program, and after reviewing the meta data contained there I don't see an option for "owner" there either. Perhaps its something that Adobe plans to implement someday, who knows. Thanks for your suggestions everyone.
This is my first DSLR, all I have shot in the past have been film cameras and we didn't have any of this fancy info available unless we wrote it down somewhere, smile. I was still using my old Nikomat that I purchased in 1972 when I was stationed in Japan. I was a bit stubborn when it came to switching to DSLR sorry I waited so long now.
Oh, Trevor, sorry to learn you may be using something other than Nikon, I didn't know there was another brand other than Nikon!
Caitlin
Maybe you are looking for
-
Mac OS X Tiger installation quiz!
All, I got a resetting message with my PowerBook G4 12" and rebooted sevearal times but the message kept coming again. I decided to do the following steps: a. run a hardware test and it passed complete one b. re-install the Mac OS X Panther with the
-
Imported AS3 swf animation not looping
I have tried all of the settings in Captivate 5.5 but can't keep my animation looping and not sure why. I've imported an AS3 swf animation (just a simple movieclip animation of a blinking line) into Captivate 5.5. I placed the animation at the end of
-
When I start up in Boot Camp it says that updates weren't properly installed and the system is reloading. It then automatically restarts in Mountain Lion. What is wrong? I am currently using Windows 8 and also have Microsoft office installed but tho
-
FkeyhandlerX keeps crashing on startup
I have NO IDEA what has caused this problem, but when I boot my G4, all I get is a background desktop picture with NO desktop icons and a message saying FkeyhandlerX has quit. Can someone please help?
-
I went to do software update on my Iphone 4s. When it restarted the phone the usb plug, arrow button pointing up and the Itunes app appeared on my screen. It seems my phone crapped out on me. Is there anyway to recover my information. I also plugged