- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要在使用 jaxb 进行编码后维护标签顺序,其中 xml 标签是首字母大写。尝试编码时抛出以下错误。
“存在属性 applicationCountFromDate 但未在 @XmlType.propOrder 中指定”
请在下面找到完整的堆栈和代码。
Property applicationCountFromDate is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getApplicationCountFromDate()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property applicationCountToDate is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getApplicationCountToDate()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property approvedApplicationCount is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getApprovedApplicationCount()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property declineApplicationCount is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getDeclineApplicationCount()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property displayName is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getDisplayName()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property operationErrorCode is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getOperationErrorCode()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property operationErrorMessage is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getOperationErrorMessage()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property operationStatus is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getOperationStatus()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property submittedApplicationCount is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getSubmittedApplicationCount()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property totalAppliationCount is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getTotalAppliationCount()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property OperationStatus appears in @XmlType.propOrder, but no such property exists. Maybe you meant operationStatus?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property OperationErrorCode appears in @XmlType.propOrder, but no such property exists. Maybe you meant operationErrorCode?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property OperationErrorMessage appears in @XmlType.propOrder, but no such property exists. Maybe you meant operationErrorMessage?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property DisplayName appears in @XmlType.propOrder, but no such property exists. Maybe you meant displayName?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property ApplicationCountFromDate appears in @XmlType.propOrder, but no such property exists. Maybe you meant applicationCountFromDate?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property ApplicationCountToDate appears in @XmlType.propOrder, but no such property exists. Maybe you meant applicationCountToDate?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property TotalAppliationCount appears in @XmlType.propOrder, but no such property exists. Maybe you meant totalAppliationCount?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property ApprovedApplicationCount appears in @XmlType.propOrder, but no such property exists. Maybe you meant approvedApplicationCount?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property SubmittedApplicationCount appears in @XmlType.propOrder, but no such property exists. Maybe you meant submittedApplicationCount?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Property DeclineApplicationCount appears in @XmlType.propOrder, but no such property exists. Maybe you meant declineApplicationCount?
this problem is related to the following location:
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
Code :
<p></p>
<pre><code>import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlAccessType;
@XmlType (propOrder = { "operationStatus",
"operationErrorCode",
"operationErrorMessage",
"JSessionID",
"DSACode",
"displayName",
"applicationCountToDate",
"totalAppliationCount",
"approvedApplicationCount",
"submittedApplicationCount",
"declineApplicationCount"
})
public class LoginRESBean
{
private String ApplicationCountToDate;
private String TotalAppliationCount;
private String ApplicationCountFromDate;
private String DeclineApplicationCount;
private String DSACode;
private String SubmittedApplicationCount;
private String ApprovedApplicationCount;
private String DisplayName;
private String OperationErrorMessage;
private String OperationStatus;
private String OperationErrorCode;
private String JSessionID;
@XmlElement (name = "ApplicationCountToDate")
public String getApplicationCountToDate ()
{
return ApplicationCountToDate;
}
public void setApplicationCountToDate (String ApplicationCountToDate)
{
this.ApplicationCountToDate = ApplicationCountToDate;
}
@XmlElement (name = "TotalAppliationCount")
public String getTotalAppliationCount ()
{
return TotalAppliationCount;
}
public void setTotalAppliationCount (String TotalAppliationCount)
{
this.TotalAppliationCount = TotalAppliationCount;
}
@XmlElement (name = "ApplicationCountFromDate")
public String getApplicationCountFromDate ()
{
return ApplicationCountFromDate;
}
public void setApplicationCountFromDate (String ApplicationCountFromDate)
{
this.ApplicationCountFromDate = ApplicationCountFromDate;
}
@XmlElement (name = "DeclineApplicationCount")
public String getDeclineApplicationCount ()
{
return DeclineApplicationCount;
}
public void setDeclineApplicationCount (String DeclineApplicationCount)
{
this.DeclineApplicationCount = DeclineApplicationCount;
}
@XmlElement (name = "DSACode")
public String getDSACode ()
{
return DSACode;
}
public void setDSACode (String DSACode)
{
this.DSACode = DSACode;
}
@XmlElement (name = "SubmittedApplicationCount")
public String getSubmittedApplicationCount ()
{
return SubmittedApplicationCount;
}
public void setSubmittedApplicationCount (String SubmittedApplicationCount)
{
this.SubmittedApplicationCount = SubmittedApplicationCount;
}
@XmlElement (name = "ApprovedApplicationCount")
public String getApprovedApplicationCount ()
{
return ApprovedApplicationCount;
}
public void setApprovedApplicationCount (String ApprovedApplicationCount)
{
this.ApprovedApplicationCount = ApprovedApplicationCount;
}
@XmlElement (name = "DisplayName")
public String getDisplayName ()
{
return DisplayName;
}
public void setDisplayName (String DisplayName)
{
this.DisplayName = DisplayName;
}
@XmlElement (name = "OperationErrorMessage")
public String getOperationErrorMessage ()
{
return OperationErrorMessage;
}
public void setOperationErrorMessage (String OperationErrorMessage)
{
this.OperationErrorMessage = OperationErrorMessage;
}
@XmlElement (name = "OperationStatus")
public String getOperationStatus ()
{
return OperationStatus;
}
public void setOperationStatus (String OperationStatus)
{
this.OperationStatus = OperationStatus;
}
@XmlElement (name = "OperationErrorCode")
public String getOperationErrorCode ()
{
return OperationErrorCode;
}
public void setOperationErrorCode (String OperationErrorCode)
{
this.OperationErrorCode = OperationErrorCode;
}
@XmlElement (name = "JSessionID")
public String getJSessionID ()
{
return JSessionID;
}
public void setJSessionID (String JSessionID)
{
this.JSessionID = JSessionID;
}
}
</code></pre>
<p></p>
最佳答案
JAXB 认为方法 getApplicationCountToDate()
对应于属性 applicationCountToDate
(注意它以小写字母开头),因此它期望 applicationCountToDate
在 propOrder
而不是 ApplicationCountToDate
中。在这种情况下,您会得到一个很好的异常,为您指明正确的方向。
Property applicationCountToDate is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String com.snapwork.bean.login.LoginRESBean.getApplicationCountToDate()
at com.snapwork.bean.login.LoginRESBean
at public com.snapwork.bean.login.LoginRESBean com.snapwork.bean.login.LoginMBBean.getRS()
at com.snapwork.bean.login.LoginMBBean
我在我的博客上写了更多关于 propOrder
的内容:
使用更新后的模型,您应该会遇到以下异常:
Property applicationCountFromDate is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at public java.lang.String forum27147537.LoginRESBean.getApplicationCountFromDate()
at forum27147537.LoginRESBean
对于您问题中的更新代码,我唯一需要做的就是将 applicationCountFromDate
添加到 propOrder
以使一切正常:
@XmlType (propOrder = {"operationStatus",
"operationErrorCode",
"operationErrorMessage",
"JSessionID",
"DSACode",
"displayName",
"applicationCountToDate",
"applicationCountFromDate",
"totalAppliationCount",
"approvedApplicationCount",
"submittedApplicationCount",
"declineApplicationCount"
})
public class LoginRESBean
关于java - JAXB propOrder 标题大小写标签不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27147537/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求提供代码的问题必须表现出对所解决问题的最低限度理解。包括尝试过的解决方案、为什么它们不起作用,以及预
出于某种原因,右栏中的精选文章忽略了“#elementtext”和“#elementtext:hover”属性。仅显示“p.element”和“img.element”。 有什么想法吗? 谢谢 - 塔
我有两个值,每个值都来自不同的枚举。我想检查这两者的允许组合,如果没有找到则执行默认操作。我能以某种方式对这两个值进行切换/大小写吗?我想避免使用多个 if/else 语句或遵循位掩码模式的枚举,只是
我需要 where 但 not 大小写。例如,我想找到没有名字“莎士比亚”的戏剧: _.where(listOfPlays, {author: !"Shakespeare", year: 1611})
我想实现一个 parking 场应用所以有一个带5个或更多 parking 位的车库当司机 parking 时,车库中的下一个空闲位置应该分配给他。 所以我有一个带 5 个或更多插槽的 table 上
我想使用 Erlang 来确定传递给函数的变量是否可以被数字整除。我考虑过使用 case 来执行此操作,但是我找不到解决方案。 case 是适合这项工作的工具吗? 示例:将数字传递给函数 f()。如果
我在 phpmyadmin 中创建了一个表,其列名如 first_name、last_name。当我使用命令显示表中的列名时,它会将它们显示为 first_name。 我想显示我的列名称,如 Firs
使用 Swift 4,如何使用这些规则格式化字符串: 如果单词超过 3 个字母,则首字母大写,否则大写 包含像 St-Michel 这样的连字符的 Pascal 大小写单词 我这里有初稿,但我一直在思
这个问题在这里已经有了答案: Why can't the switch statement be applied to strings? (23 个回答) 关闭 8 年前。 大家好 所以我正在尝试对
在 MVC 操作中,我如何访问使用多个同名值提交的“表单数据”中的值? 我做了什么:int、decimal、string 类型的值工作完美。 问题:每个变体都有一个复选框,所以当我尝试获取它时,它只显
while(1) { char buff[1000]; printf("Enter the word: "); fgets(buff, 1000
我有一个 Dllmain,它在线程附加到此 DLL 时分配线程本地存储。代码如下: BOOL APIENTRY DllMain(HMODULE hModule,
我有一个变量名,比如“WARD_VS_VITAL_SIGNS”,我想将它转换为 Pascal 大小写格式:“WardVsVitalSigns” WARD_VS_VITAL_SIGNS -> WardV
我是 Swift 编码的新手,正在尝试弄清楚如何在触摸节点时制作具有开/关功能的循环音频。我认为实现它的最佳方式是通过 SKAudioNode,但我不确定我在以下代码中做错了什么。当在节点上按下时 -
这是我第一次使用这种枚举,具有关联值类型的枚举,我需要根据对象的类型制作一个 switch 语句,我无法做到,这是枚举: enum TypeEnum { case foo(FooClass)
我想从字符串中删除所有下划线,下划线后面的字符为大写。因此,例如:_my_string_ 变为:MyString 同样:my_string 变为 MyString 有没有更简单的方法呢?我目前有以下内
如何在 Java 中将蛇形大小写转换为 Camel 形大小写? 输入:“input_in_snake_case” 输出:“InputInSnakeCase” 最佳答案 Guava通过其CaseForm
我们有一个表auth_group_access,那么如何使用呢? 在使用M方法时,对于带下划线的表名,可以采用如下方法。 M('AuthGroupAccess'); 对应sql语句SQL: S
我正在制作一个 pygame 游戏,每当我运行我的代码时,我都会收到错误 expected ':'。我知道在 match/case block 中使用 [ 和 ] 用于其他用途,但我该如何解决这个问题
有人能告诉我是否可以使用正则表达式将 url 转换为小写? 这是在 html img 标签内,所以我们可以通过标签找到网址。 这是我所拥有的一个例子 我需要在最后小写图像名称。 该文档包含更多 H
我是一名优秀的程序员,十分优秀!