OSWORKFLOW与spring集成(OSWORKFLOW integration with spring)
我试图用spring初始化工作流程。 为此,我添加了workflow_2.8.2.jar和我的工作流描述符,我只是使用我的localhost来存储它的dtd。 现在,当我尝试初始化工作流程时,它给了我一个错误,现在让我感到困惑。
"com.opensymphony.workflow.FactoryException: Error in workflow descriptor: file:/home/fhl04/development/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestingPersistenceUsingSpring/WEB-INF/classes/descriptor.xml: root cause: java.io.IOException: Server returned HTTP response code: 403 for URL: http://opensymphony.com/osworkflow/workflow_2_8.dtd"
甚至我没有使用“ http://opensymphony.com/osworkflow/workflow_2_8.dtd ”,因为它现在可以在我的localhost中使用。
只是为了添加更多信息,如果Spring没有初始化(使用osworkflow_2.7.0.jar),代码运行完美。
我不知道我哪里出错了,我错过了什么..? 非常感谢任何帮助,在此先感谢。
I am trying to initialize workflow with spring. For that i have added workflow_2.8.2.jar and as for my workflow descriptor i am simply using my localhost to store its dtd. Now, when i am trying to initialize workflow it gives me an error which seen confusing to me right now.
"com.opensymphony.workflow.FactoryException: Error in workflow descriptor: file:/home/fhl04/development/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestingPersistenceUsingSpring/WEB-INF/classes/descriptor.xml: root cause: java.io.IOException: Server returned HTTP response code: 403 for URL: http://opensymphony.com/osworkflow/workflow_2_8.dtd"
and even i am not using "http://opensymphony.com/osworkflow/workflow_2_8.dtd" as it is now available in my localhost.
And just to add more information the code runs perfect if it is not been initialized by spring(osworkflow_2.7.0.jar used).
I dont know where i am going wrong and what am i missing..? Any help is much appreciated, Thanks in advance.
原文:https://stackoverflow.com/questions/17161723
最满意答案
"ts"
类通常不适合该类型的数据。 假设DF
是在本答案末尾的Note中可重复显示的数据帧,我们将其转换为"zoo"
类对象,然后执行一些操作。 也可以使用相关的xts包。library(zoo) z <- read.zoo(DF, index = 1:2, tz = "") window(z, start = "2014-05-22 15:25:00") head(z, 3) # first 3 head(z, -3) # all but last 3 tail(z, 3) # last 3 tail(z, -3) # all but first 3 z[2:4] # 2nd, 3rd and 4th element of z coredata(z) # numeric vector of data values time(z) # vector of datetimes fortify.zoo(z) # data frame whose 2 cols are (1) datetimes and (2) data values aggregate(z, as.Date, mean) # convert to daily averaging values ym <- aggregate(z, as.yearmon, mean) # convert to monthly averaging values frequency(ym) <- 12 # only needed since ym only has length 1 as.ts(ym) # year/month series can be reasonably converted to ts plot(z) library(ggplot2) autoplot(z)
read.zoo
也可用于从文件中读取数据。注意:以上以可重复的形式使用的
DF
:DF <- structure(list(Date = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = "2014-05-22", class = "factor"), Time = structure(1:6, .Label = c("15:15:00", "15:20:00", "15:25:00", "15:30:00", "15:35:00", "15:40:00"), class = "factor"), T1 = c(21.6, 21.2, 21.3, 21.5, 21.1, 21.5)), .Names = c("Date", "Time", "T1"), class = "data.frame", row.names = c("1", "2", "3", "4", "5", "6"))
"ts"
class is typically not a good fit for that type of data. AssumingDF
is the data frame shown reproducibly in the Note at the end of this answer we convert it to a"zoo"
class object and then perform some manipulations. The related xts package could also be used.library(zoo) z <- read.zoo(DF, index = 1:2, tz = "") window(z, start = "2014-05-22 15:25:00") head(z, 3) # first 3 head(z, -3) # all but last 3 tail(z, 3) # last 3 tail(z, -3) # all but first 3 z[2:4] # 2nd, 3rd and 4th element of z coredata(z) # numeric vector of data values time(z) # vector of datetimes fortify.zoo(z) # data frame whose 2 cols are (1) datetimes and (2) data values aggregate(z, as.Date, mean) # convert to daily averaging values ym <- aggregate(z, as.yearmon, mean) # convert to monthly averaging values frequency(ym) <- 12 # only needed since ym only has length 1 as.ts(ym) # year/month series can be reasonably converted to ts plot(z) library(ggplot2) autoplot(z)
read.zoo
could also have been used to read the data in from a file.Note:
DF
used above in reproducible form:DF <- structure(list(Date = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = "2014-05-22", class = "factor"), Time = structure(1:6, .Label = c("15:15:00", "15:20:00", "15:25:00", "15:30:00", "15:35:00", "15:40:00"), class = "factor"), T1 = c(21.6, 21.2, 21.3, 21.5, 21.1, 21.5)), .Names = c("Date", "Time", "T1"), class = "data.frame", row.names = c("1", "2", "3", "4", "5", "6"))
相关问答
更多-
R - 时间序列每小时(R - time series hourly)[2022-05-01]
1)假设系列在下午3点开始,那天是连续的,并且从下午3点到晚上10点的所有时间都存在: tser <- ts(DF[-1], freq = 8) 赠送: > tser Time Series: Start = c(1, 1) End = c(1, 8) Frequency = 8 hour Count Year Month Day 1.000 15 69 2001 1 1 1.125 16 12 2001 1 1 1.250 17 5 ... -
您的代码不适用于xlsx包,因此我无法使用您的实际数据。 这是一个可重复的假数据检查。 d <- data.frame(time=paste0("2017_07_",rep(10:15, each=24),"_", formatC(0:23, flag="0", width=2)), value=cumsum(rnorm(24*6)) ) d$time <- strptime(d$time, "%Y_%m_%d_% ...
-
我们可以在distinct步骤后ungroup ,然后complete df.have %>% as_tbl_time(index = v1) %>% collapse_by("hourly", side="start", clean=TRUE) %>% group_by(v1) %>% mutate(sumv2_byhour = sum(v2, na.rm=TRUE), countv1_byhour = n()) %>% distinct(v1, .keep_all ...
-
"ts"类通常不适合该类型的数据。 假设DF是在本答案末尾的Note中可重复显示的数据帧,我们将其转换为"zoo"类对象,然后执行一些操作。 也可以使用相关的xts包。 library(zoo) z <- read.zoo(DF, index = 1:2, tz = "") window(z, start = "2014-05-22 15:25:00") head(z, 3) # first 3 head(z, -3) # all but last 3 tail(z, 3) # last 3 tail ...
-
以下代码可能是解决您的问题的有用示例。 require(tidyverse) ts_data<-as.data.frame(ts_data) ts_data$datetime<-rownames(ts_data) ts_data<-ts_data %>% separate(datetime,into=c("date","time"),sep=" ") ts_data<-ts_data %>% separate(time,into=c("HH","MM","SS")) ts_data<-ts_data % ...
-
R中的时间序列数据(Time Series Data in R)[2023-09-27]
library(reshape2) d = read.csv("data.csv") d.molten = melt(d, id.vars=c("Facility.ID", "Facility.Name", "State", "Utility.Type", "Supplier", "Account.No.", "Unit.Name"), variable.name = "Date" ) melt函数将“宽”格式(具有未定义的列数)分解为“长”格式,其中每行是观察。 这实际上是你在R中做的大多数 ... -
R的每小时时间序列(Hourly time series in R)[2021-09-24]
也许是这样的: z = ts(dat, start =1, end =8, frequency = 1) class(z) <- c("POSIXct", "POSIXt") #[1] "2017-09-25 13:34:53 GMT" "2017-09-25 13:56:43 GMT" "2017-09-25 14:33:40 GMT" "2017-09-25 14:34:24 GMT" "2017-09-25 14:43:33 GMT" "2017-09-25 15:34:53 GMT" "2017-0 ... -
R按组汇总不规则时间序列数据(使用元数据)(R aggregating irregular time series data by groups (with meta data))[2022-09-16]
鉴于你有关于聚合的功能: aggregate(zooData, time(zooData) - as.numeric(time(zooData))%%3600, FUN = sum, reg = T) 你想按照时间组合值并且不会丢失其他列。 你可以简单地用dplyr包来做到这一点: library(dplyr) newdata <- Data1 %>% group_by(DateTimes) %>% summarise(sum(Value)) finaldata <- inner_join(Data1 ... -
使用Matplotlib和Pandas在同一绘图中按小时绘制时间序列(Plot time series by hour in the same plot with Matplotlib and Pandas)[2023-11-20]
我建议你循环你的df,每天构成阵列并在飞行中绘制它们。 previous_day = dataframe[0]['date'].day daily_data = [] daily_times = [] for row in dataframe: if row['date'].day == previous_day: daily_data.append(row['data_to_plot']) daily_times.append(row['date']) ... -
首先转换为POSIXct: my$Time <- as.POSIXct(my$Time, format="%H:%M:%S") ggplot(data=my, aes(x=my$Time,y=TD_Wait/1000)) + geom_point() ggplot负责其余的工作。 Convert to POSIXct first: my$Time <- as.POSIXct(my$Time, format="%H:%M:%S") ggplot(data=my, aes(x=my$Time,y=TD_Wa ...