Eclipse中导入Web项目报错,求解救!

robin_jh 2012-03-30 09:42:50
我在Eclipse中导入Web项目,在JSP文件中调用SCA服务,它的 sca-contribution.xml文件是

<?xml version="1.0" encoding="GBK"?>
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:Calculator="http://Calculator">
<deployable composite="Calculator:Calculator"/>
</contribution>

第一行出现警告:
Referenced file contains errors (http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd).
The errors below were detected when validating the file "oasis-200401-wss-wssecurity-secext-1.0.xsd" via the file "sca-contribution.xml". In most cases these errors can be detected by validating "oasis-200401-wss-wssecurity-secext-1.0.xsd" directly. However it is possible that errors will only occur when oasis-200401-wss-wssecurity-secext-1.0.xsd is validated in the context of sca-contribution.xml.

第三行报错:
cvc-elt.1: Cannot find the declaration of element 'contribution'.


它的JSP文件,calc.jsp 代码是:

<%@ page contentType="text/html;charset=GBK" language="java" %>
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>

<sca:reference name="CalculatorServiceComponent" type="server.Calculator" />

<html>
<head><title>访问计算器服务</title></head>

<body>
<table border="1" width="300">
<tr>
<th>表达式</th><th>结果</th>
</tr>
<tr>
<td>2 + 3 =</td><td><%= CalculatorServiceComponent.add(2, 3) %></td> 这里报错了
</tr>
<tr>
<td>3 - 2 =</td><td><%= CalculatorServiceComponent.subtract(3, 2) %></td> 这里报错了
</tr>
<tr>
<td>3 * 2 =</td><td><%= CalculatorServiceComponent.multiply(3, 2) %></td> 这里报错了
</tr>
<tr>
<td>3 / 2 =</td><td><%= CalculatorServiceComponent.divide(3, 2) %></td> 这里报错了
</tr>
</table>
</body>
</html>

在第三行出现警告:
Classpath entry org.eclipse.jdt.USER_LIBRARY/TUSCANY will not be exported or published. Runtime ClassNotFoundExceptions may result.

第15 18 21 24 行出现错误:
CalculatorServiceComponent cannot be resolved。

请教如何解决!!



...全文
1026 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
梦途坚强 2012-07-11
  • 打赏
  • 举报
回复
如果你用的Tuscany2.x的版本,
xmlns="http://www.osoa.org/xmlns/sca/1.0"改成
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
就ok了....

详情请见:https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Converting+Tuscany+1.x+Extensions
香蕉猪 2012-04-01
  • 打赏
  • 举报
回复
少包了吧。。
wumingguoke 2012-03-31
  • 打赏
  • 举报
回复
应该是缺少jar包吧,把jar包放进去就好了
内容概要:本文围绕“能量-物流耦合+港口综合能源优化”展开研究,提出基于混合整数线性规划(MILP)的优化模型,并利用Matlab实现港口综合能源系统的协同调度与资源配置。研究充分考虑电、热、冷等多种能源形式与货物运输物流之间的耦合关系,通过构建数学模型优化能源的供给、转换、存储及物流调度全过程,旨在降低系统运行成本、提升能源利用效率并增强系统可靠性与韧性。文详细阐述了模型的构建过程、关键约束条件的设定、目标函数的设计以及求解流程,并通过具体算例进行仿真验证,展示了所提方法在实际应用的有效性与优越性。; 适合人群:具备一定电力系统、能源管理、运筹优化或交通运输背景,从事相关领域科研或工程应用的研究生、科研人员及技术人员。; 使用场景及目标:①应用于港口、临港工业区、物流园区等多能耦合与物流密集型场景的综合能源系统规划设计;②实现能源系统与物流作业的协同优化调度,提升整体运营的经济性、低碳性与抗干扰能力;③为相关领域的研究者提供完整的Matlab代码实现范例,支持模型复现、性能测试与进一步的功能拓展。; 阅读建议:建议结合文提供的Matlab代码与模型框架,配合实际案例数据进行仿真调试,深入理解能量流与物流的耦合机制及MILP优化求解过程,可进一步结合YALMIP工具箱或CPLEX求解器进行模型改进与算法创新。

58,440

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧