首页 \ 问答 \ OSWORKFLOW与spring集成(OSWORKFLOW integration with spring)

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
更新时间:2024-01-22 11:01

最满意答案

"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. Assuming DF 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"))

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)