繁体   English   中英

HTTP状态500

[英]HTTP Status 500

我想使用Netbean 6.5,glassfish V 2来创建Restful-Web Service,并且我已经创建了表以及表之间的关系。 但是当我想测试宁静的Webservice时,它显示了一些表

HTTP Status 500 -

type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'E' in 'field list'
Error Code: 1054
Call: SELECT Id, MobileNumber, Country, First_Name, E-mail, Address, Identity, Zip, Last_name, City, State, Position FROM employee_table WHERE (Id = ?)
    bind => [1]
Query: ReadObjectQuery(ws.EmployeeTable)

note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_02 logs.

但有些桌子正在工作。 有人知道造成此问题的原因以及如何处理此问题吗? 谢谢。

感谢Andrew Medico和Jim Ferrans

我将所有电子邮件都更改为电子邮件。 而且我不会忘记不再在数据库中添加“-”。 谢谢

您在SQL查询(“电子邮件”)中有一个非法标识符。 如果那是实际的列名,则Andrew建议引用它是正确的解决方案。 不过,您可能在查询中将其拼写错误。

您需要引用“电子邮件”列名,以便SQL解析器将接受它。 SQL中的减号运算符是不带引号/转义的破折号,因此“ E-mail”不带引号意味着您要向SQL Server索要减去名为“ E”和“ mail”的列的结果。

正确的SQL将是:

SELECT Id, MobileNumber, Country, First_Name, `E-mail`, Address, Identity, Zip, Last_name, City, State, Position FROM employee_table WHERE (Id = ?)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM