我已将Mastering Xpages第二版中的富文本自定义控件添加到我的应用程序之一,但我继续获取以下内容:
2016-02-19T15:20:30.546-05:00 SEVERE CLFAD0095E: Format error reading the class mxpd2.component.InputRichText
2016-02-19T15:20:30.547-05:00 WARNING CLFAD0090W: The component-class (mxpd2.component.InputRichText) could not be resolved for the component with component-type com.ibm.xsp.InputRichText.
当我执行" clean"时,应用程序曾经能够编译。在项目上,但现在我总是得到错误。
这是我的mxpd2.xsp-config文件:
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/mxpd2</namespace-uri>
<default-prefix>mxpd2</default-prefix>
</faces-config-extension>
<component>
<description>A specialized Rich Text Editor control for Intact Financial Corp</description>
<display-name>Intact Rich Text</display-name>
<component-type>com.ibm.xsp.InputRichText</component-type>
<component-class>mxpd2.component.InputRichText</component-class>
<group-type-ref>com.ibm.xsp.group.core.prop.styleClass</group-type-ref>
<group-type-ref>com.ibm.xsp.group.core.prop.title</group-type-ref>
<group-type-ref>com.ibm.xsp.group.events.prop.onclick</group-type-ref>
<group-type-ref>com.ibm.xsp.group.events.onkey</group-type-ref>
<group-type-ref>com.ibm.xsp.group.focus</group-type-ref>
<group-type-ref>com.ibm.xsp.group.i18n</group-type-ref>
<group-type-ref>com.ibm.xsp.group.input.prop.disabled</group-type-ref>
<group-type-ref>com.ibm.xsp.group.input.prop.onchange</group-type-ref>
<group-type-ref>com.ibm.xsp.group.input.prop.readonly</group-type-ref>
<group-type-ref>com.ibm.xsp.group.outerStyleClass</group-type-ref>
<group-type-ref>com.ibm.xsp.group.filter</group-type-ref>
<group-type-ref>com.ibm.xsp.group.dojoUsage.deprecated</group-type-ref>
<group-type-ref>com.ibm.xsp.group.aria.role</group-type-ref>
<property>
<display-name>CSS Style</display-name>
<property-name>style</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<pass-through>true</pass-through>
<designer-extension>
<category>styling</category>
<editor>
com.ibm.workplace.designer.property.editors.StylesEditor
</editor>
<styles-excluded>background, font</styles-excluded>
</designer-extension>
</property-extension>
</property>
<component-extension>
<javadoc-description>
<p>Rich Text Control</p>providing rich text editing functionality
</javadoc-description>
<base-component-type>com.ibm.xsp.UIInputRichText</base-component-type>
<renderer-type>com.ibm.xsp.InputRichText</renderer-type>
<tag-name>inputRichText</tag-name>
<designer-extension>
<category>Intact FC</category>
</designer-extension>
</component-extension>
</component>
</faces-config>
这是本书示例文件(第11b章)中源代码的几乎精确副本。 java文件已经复制到我的应用程序(相同的包)中,faces-config.xml shas已被修改为以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<converter>
<converter-id>InputRichTextConverter</converter-id>
<converter-class>mxpd2.converter.InputRichTextConverter</converter-class>
</converter>
<managed-bean>
<managed-bean-name>rteBean</managed-bean-name>
<managed-bean-class>mxpd2.bean.InputRichTextBean</managed-bean-class>
<managed-bean-scope>view</managed-bean-scope>
<managed-property>
<property-name>debug</property-name>
<value>false</value>
</managed-property>
</managed-bean>
<managed-bean id="Appconfig">
<managed-bean-name>AppConfig</managed-bean-name>
<managed-bean-class>com.intact.xpages.utils.AppConfig</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean id="SessionConfig">
<managed-bean-name>SessionConfig</managed-bean-name>
<managed-bean-class>com.intact.xpages.utils.SessionConfig</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>EmailBeanV2</managed-bean-name>
<managed-bean-class>com.intact.xpages.utils.EmailBeanV2</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>debugMode</property-name>
<value>false</value>
</managed-property>
</managed-bean>
<!-- required for the lang switch
<lifecycle>
<phase-listener>ch.hasselba.xpages.jsf.core.LocalizationSetter</phase-listener>
</lifecycle>
-->
<!--AUTOGEN-START-BUILDER: Automatically generated by IBM Domino Designer. Do not modify.-->
<application>
<locale-config>
<default-locale>fr</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
</locale-config>
</application>
<!--AUTOGEN-END-BUILDER: End of automatically generated section-->
</faces-config>
我复制了两次以确保,但仍然得到错误。
在原始文件中,我在源模式下没有任何错误,但在查看设计模式时,我收到警告,标签mxpd2无法识别,控件为黄色而不是蓝色。< / p>
有人可以查明这个问题吗?
以下是我在跟踪日志中找到的内容:
09:32:37.429 7 SEVERE com.ibm.xsp.registry.parse.ParseUtil
getClassForName CLFAD0095E: Format error reading the class mxpd2.component.InputRichText
java.lang.ClassFormatError: JVMCFRE113 EOF inattendu; classe=mxpd2/component/InputRichText, décalage=0
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.ibm.designer.runtime.server.util.DynamicClassLoaderVFS.doDefineClass(Unknown Source)
at com.ibm.designer.runtime.server.util.DynamicClassLoaderVFS.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.designer.runtime.Application.loadClass(Unknown Source)
at com.ibm.xsp.library.ApplicationFacesClassLoader.loadClass(Unknown Source)
at com.ibm.xsp.registry.parse.ParseUtil.getClassForName(Unknown Source)
at com.ibm.xsp.registry.parse.ParseUtil.loadClass(Unknown Source)
at com.ibm.xsp.registry.parse.definition.ComponentParser.getJavaClass(Unknown Source)
at com.ibm.xsp.registry.parse.definition.ComponentParser.createDefinition(Unknown Source)
at com.ibm.xsp.registry.parse.definition.AbstractDefinitionParser.parse(Unknown Source)
at com.ibm.xsp.registry.parse.ConfigParserImpl.createDefinition(Unknown Source)
at com.ibm.xsp.registry.parse.FacesConfigParserImpl.processChildElements(Unknown Source)
at com.ibm.xsp.registry.parse.FacesConfigParserImpl.parse(Unknown Source)
at com.ibm.xsp.registry.parse.ConfigParserImpl.createFacesLibraryFragment(Unknown Source)
at com.ibm.xsp.registry.parse.ConfigParserImpl.createFacesLibraryFragment(Unknown Source)
at com.ibm.xsp.registry.config.ConfigRegisterer.register(Unknown Source)
at com.ibm.xsp.registry.config.ConfigRegisterer.registerProjectConfig(Unknown Source)
at com.ibm.xsp.registry.config.ConfigRegisterer.registerProjectConfig(Unknown Source)
at com.ibm.xsp.library.ConfigFileMaintainerImpl.reloadAllConfigFiles(Unknown Source)
at com.ibm.designer.domino.ide.resources.project.FacesRegistryMaintainer.changedClassFile(Unknown Source)
at com.ibm.designer.domino.ide.resources.project.DesignerProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.getAffectedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.notifyChangedOrAddedDesignerProject(Unknown Source)
at com.ibm.designer.prj.resources.commons.CommonProjectSynchronizer.resourceChanged(Unknown Source)
at org.eclipse.core.internal.events.NotificationManager$2.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.internal.events.NotificationManager.notify(Unknown Source)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(Unknown Source)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Unknown Source)
at org.eclipse.core.internal.resources.Workspace.endOperation(Unknown Source)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
09:32:37.430 7 WARNING com.ibm.xsp.registry.parse.definition.ComponentParser
getJavaClass CLFAD0090W: The component-class (mxpd2.component.InputRichText) could not be resolved for the component with component-type com.ibm.xsp.InputRichText.
答案 0 :(得分:1)
要检查的一些事情:
你能在帮助下看到任何相关的错误 - &gt;支持 - &gt;显示日志 帮助 - &gt;支持 - &gt;显示痕迹 (对不起,如果不确切,我不在我的电脑) 有时你会发现这里与无效的xsp配置相关的错误
我看不到组件的Java源代码,但可以 你仔细检查下面的类名是什么?如果你重命名了包或类名,那么就找不到它。
您的命名空间(mxpd)是否包含在xpages源代码的顶部?如果它没有在顶部引用,那么它将不知道在该命名空间下找到该组件。
我也发现,有时当在NSF中开发一个uicomponent时,我必须连续清洗2次。设计师有时会感到困惑。
修改强> 从痕迹,它看起来像你的。 java文件可能无法正确编译为.class文件。当注册表试图解析类文件时,它会获得意外的EOF。 尝试对Java文件进行小的更改以触发另一个构建(添加注释或空格) 确保没有编译错误