Cannot load component class className from project: ProjectName

Hi guys,
I've a strange issue.
I found some solutions on google and on this forum, but they doesn't work for me.
I've a javafx application in netbeans in which I also use swing controls.
I created a custom jlabel control
public class Label extends JLabel {
    public Label()
    private void setAspect(String csFontName, int nSizeFont, boolean bold,Color cColor)
        int style=bold ? Font.BOLD : Font.PLAIN;
        this.setFont(new Font(csFontName,style,nSizeFont));
        this.setForeground(cColor);
    public Label(String csText)
        super(csText);
        setAspect("Tahoma",10,false,Color.black);
    public Label(String csText, int nSize)
        super(csText);
        setAspect("Tahoma",nSize,false,Color.black);
    public Label(String csText, int nSize, boolean bold)
        super(csText);
        setAspect("Tahoma",10,bold,Color.black);
    public Label(String csText, int nSize, boolean bold, Color cColor)
        super(csText);
        setAspect("Tahoma",10,bold,Color.black);
}I selected Label.java file in the project and I click on Tools->add to palette and I selected Swing controls as family.
I restarted netbeans and I found it in the palette.
I try to drag it into my swing form and I've :
Cannot load component class <ProjectName>.Label from project: D:\Progetti\<ProjectName>.
The class must be compiled and must be on the classpath of the project to which this form belongs.Following forums I went on netbeans log
org.openide.ErrorManager$AnnException: msg
     at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:870)
     at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:653)
Caused by: java.lang.ClassNotFoundException: <ProjectName>.Label
     at org.netbeans.modules.form.project.ProjectClassLoader.findClass(ProjectClassLoader.java:178)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
     at org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:247)
     at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:98)
     at org.netbeans.modules.form.MetaComponentCreator.prepareClass0(MetaComponentCreator.java:1322)
     ... 34 more
msg
Cannot load component class ortholab2.Label from project: D:\Progetti\<ProjectName>.
The class must be compiled and must be on the classpath of the project to which this form belongs.I hope someone can help me ,
Thanks

That sounds more like a NetBeans-specific question, not a general java programming question.
Plus, your desciption is inconsistent:
Cannot load component class <ProjectName>.Label from project: D:\Progetti\<ProjectName>.
Cannot load component class ortholab2.Label from project: D:\Progetti\<ProjectName>What is the fully-qualified name of this class: ortholab2.Label ? ortholab2 being both the package name and the project name?
And where do you use it, in the same project or in yet another NetBeans project?

Similar Messages

  • Cannot load component from JAR file.

    I got the message : cannot load component ... from JAR file. The class must be compiled and must be on the classpath of the project...
    I just add a javabean from a JAR file from Palette manager, then drag and drop it, then got this message.
    Can anyone tell me what i was wrong ? Thank you.

    Hi,
    You should paste your error log here to easy for other to help you.
    For your scenario, it is a big chance you didn't include the jar file into your classpath, please check.
    Thanks.

  • My ipod can't sync with itunes.Keeps saying that itunes was unable to load data class information from sync services

    my ipod can't sync with itunes.Itunes keeps saying that it cannot load data class information from sync services.It won't even allow me to do any updates

    See TS2690: iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert.
    tt2

  • New Ipad and cannot sync contacts; error message unable to load data class info from sync services; reconnect or try again later

    new Ipad and cannot sync contacts; error message on Itunes - unable to load data class info from sync servies; reconnect or try again later

    For Windows - look at this.
    http://support.apple.com/kb/TS1567?viewlocale=en_US
    For Mac - maybe this applies
    http://support.apple.com/kb/TS3744
    I just picked these out by going to the box to the right called - More like This.

  • Cannot sync devices. Get the following message, "iTunes was unable to load data class information from Sync Services..." Any help?

    Can anyone help me with syncing my devices?
    I'm on a PC that I had to recover, but forgot to save my iTunes data for post recovery.
    Now I get the following message, "iTunes was unable to load data class information from Sync Services..."
    Thanks!

    Sync Your iOS Device with a New Computer Without Losing Data
    http://www.howtogeek.com/104298/sync-your-ios-device-with-a-new-computer-without -losing-data/
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive
    https://discussions.apple.com/docs/DOC-3141
     Cheers, Tom

  • Javax.servlet.UnavailableException: Cannot load a validator resource from '

    sorry to interrupt.
    i m using Struts1.1/jsp.
    When i comment out the codes for validation plugin the projects works fine
    but when its on its gives the following Exceptions
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_13\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_15\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;C:\Program Files\ant\bin;C:\Program Files\hibernate-3.2\lib;C:\Program Files\hibernate-3.2;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Apache Group\Tomcat 4.1\bin
    Sep 18, 2008 4:17:07 PM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Sep 18, 2008 4:17:07 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2219 ms
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
    log4j:WARN Please initialize the log4j system properly.
    Sep 18, 2008 4:17:12 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    Sep 18, 2008 4:17:12 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    Sep 18, 2008 4:17:12 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    Sep 18, 2008 4:17:33 PM org.apache.struts.validator.ValidatorPlugIn init
    SEVERE: Connection timed out: connect
    java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:186)
    at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233)
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Sep 18, 2008 4:17:33 PM org.apache.catalina.core.ApplicationContext log
    INFO: Marking servlet strutsController as unavailable
    Sep 18, 2008 4:17:33 PM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /valid threw load() exception
    javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Sep 18, 2008 4:17:34 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    Sep 18, 2008 4:17:34 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    Sep 18, 2008 4:17:34 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
    log4j:WARN Please initialize the log4j system properly.
    Sep 18, 2008 4:17:38 PM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Sep 18, 2008 4:17:38 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Sep 18, 2008 4:17:38 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/109 config=null
    Sep 18, 2008 4:17:38 PM org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    Sep 18, 2008 4:17:38 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 31312 ms
    Sep 18, 2008 4:17:42 PM org.apache.struts.tiles.TilesRequestProcessor initDefinitionsMapping
    INFO: Tiles definition factory found for request processor ''.
    [Length is less than1]
    Sep 18, 2008 4:17:42 PM org.apache.struts.validator.ValidatorForm validate
    SEVERE: No such validation method: org.apache.struts.validator.FieldChecks.validateMinLength(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
    org.apache.commons.validator.ValidatorException: No such validation method: org.apache.struts.validator.FieldChecks.validateMinLength(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
    at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:603)
    at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:533)
    at org.apache.commons.validator.Field.validateForRule(Field.java:766)
    at org.apache.commons.validator.Field.validate(Field.java:846)
    at org.apache.commons.validator.Form.validate(Form.java:290)
    at org.apache.commons.validator.Validator.validate(Validator.java:354)
    at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112)
    at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Unknown Source)
    /*********************************************Codes******************************************************/
    my codes are as follows:
    struts-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <!--
    This is a blank Struts configuration file with an example
    welcome action/page and other commented sample elements.
    Tiles and the Struts Validator are configured using the factory defaults
    and are ready-to-use.
    NOTE: If you have a generator tool to create the corresponding Java classes
    for you, you could include the details in the "form-bean" declarations.
    Otherwise, you would only define the "form-bean" element itself, with the
    corresponding "name" and "type" attributes, as shown here.
    -->
    <struts-config>
    <form-beans>
    <form-bean name="myform" type="src.Myform">
    <form-property
    name="name"
    type="java.lang.String"/>
    </form-bean>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
    <forward name="welcome" path="/Welcome.do"/>
    </global-forwards>
    <action-mappings>
    <action path="/myAction" type="src.MyAction" name="myform" scope="request" validate="true" input="/index.jsp">
    <forward name="wel" path="/wel.jsp"/>
    </action>
    <!--<action
    path="/AddressJavascriptValidation"
    type="roseindia.net.AddressAction"
    name="AddressForm"
    scope="request"
    validate="true"
    input="/pages/AddressJavascriptValidation.jsp">
    <forward name="success" path="/pages/success.jsp"/>
    </action>-->
    </action-mappings>
    <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
    <message-resources parameter="resources/application"/>
    <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
    <set-property property="moduleAware" value="true"/>
    </plug-in>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    <set-property property="stopOnFirstError" value="false"/>
    </plug-in>
    </struts-config>
    validation.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <form-validation>
    <formset>
    <!-- <form name="form" >
    <field property="name" depends="required">
    <arg0 key="myform.name"/></field>
    </form>
    -->
    <form name="myform">
    <field property="name" depends="minlength">
    <arg0 key="myform.name"/>
    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>2</var-value>
    </var>
    </field>
    </form>
    <!--<form name="AddressForm">
    <field property="name"
    depends="required">
    <arg key="AddressForm.name"/>
    </field>
    <field property="address"
    depends="required">
    <arg key="AddressForm.address"/>
    </field>
    <field property="emailAddress"
    depends="required">
    <arg key="AddressForm.emailAddress"/>
    </field>
    </form>-->
    </formset>
    </form-validation>
    validator-rules.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
    var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (trim(value).length == 0) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oRequired[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
    var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
    var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
    var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oInteger[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oInteger[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
    var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
    var iValue = parseFloat(value);
    if (isNaN(iValue)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");

    Hello,
    thanks for your contribution. But how I already said we have seen that the first error message:
    The error is: javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
    But behind that message is an additional message that describes the real root cause of the problem:
    SEVERE: Cannot find resource "org/apache/commons/digester/xmlrules/digester-rules.dtd"
    org.apache.commons.digester.xmlrules.XmlLoadException: Cannot find resource
    "org/apache/commons/digester/xmlrules/digester-rules.dtd"
    Unfortunately we have no idea why the dtd file can not be loaded. The appropriate line of code is:
    getClass().getResourceAsStream("<link_to_resource")
    And this returns a NULL object. The NULL object causes the general exception and finishes the instantiation of Struts.
    Any additonal hints?
    Regards, Maik

  • Cannot load required classes for service SLD Data supplier

    Hello Experts,
             I am trying to use the SLD Data supplier service from visual administartor for registering my DEV EP 7.0 engine in central SLD.When am trying to access that particular service from visual admin,it is throwing an error saying that:"Cannot load required classes for SLD Data Supplier service and please refer the not for resolution Note No:1017526.
    My NW EP 7.0 is at SP17 level and as per the above note all settings are fine and the relevant application is also started well.
    Please suggest us for any possible solution.
    Thanks&Regards,
    Apparao S.

    > You can also try the following: Move sldserv.jar from
    > /usr/sap/<SID>/<InstID>/j2ee/cluster/server0/bin/services/sld/
    > to
    > /usr/sap/<SID>/<InstID>/j2ee/admin/lib/
    Hi Desiree,
    Thanks, worked for me too.
    Only in my case, when I moved the file, the sld data provider service did not start at all after reboot of the instance.
    Also, the sap.com/tcsldwd~main application refused to start.
    I then copied the file back, this time maintaining an entry in both locations and reboot the instance. Everything started working after I reboot the instance. The error also disappeared and I was able to change the SLDuser password.
    Thanks
    Prasad

  • TS3694 iTunes unable to load data class information from Syc services. Reconnect or try again

    Cannot sync wit iTunes due to issue with below mentioned message:-
    iTunes was unable to load data class information from Sync Services. Reconnect or try again later

    Read This:
    iTunes for Windows: "Unable to load data class" or ... - Support - Apple

  • Error on Desktop: iTunes unable to load data class information from sync services.

    Error on Desktop; iTunes unable to load data class information from sync services.

    Hi there Randall112,
    You may find the troubleshooting steps in the article below helpful.
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert
    http://support.apple.com/kb/ts2690
    -Griff W. 

  • TS2529 iTunes was unable to load data class information from Sync Services. Reconnect or try again later is the error message I am getting when i connect my iphone 4 to my windows based computer. Any help out there?

    iTunes was unable to load data class information from Sync Services. Reconnect or try again later. This is the message when I try to connect my iphone 4 to my computer. If anyone could help me with this, I would appreciate it.

    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/ts1591

  • I keep getting this error message: ITunes was unable to load data class information from Synch Services. Reconnect or try again later. What does that mean? Can I fix it? or do I have to wait for the next update?

    I keep getting this error message: ITunes was unable to load data class information from Synch Services. Reconnect or try again later. What does that mean? Can I fix it? or do I have to wait for the next update?

    See TS2690: iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert.
    tt2

  • Was unable to load data class info from sync services.  try again later.

    Since installing the latest version of itunes (11.1.5.5) whenever I have either mine or my wife's iphones (4 and 5c, both with the latest 7.1.1) turned on and I start iTunes, I receive the error message saying that itunes was unable to load data class info from sync services.  try again later.
    If I leave the phones turned off and open iTunes, I am able to sync my old ipod so it appears to be an issue with the software on the phones? 
    I'm just not sure where to start.  I've made sure that itunes has the latest version and no more updates are available.
    Thanks in advance,
    jamey8420

    this is on a windows 7 machine, btw.

  • ITunes was unable to load data class information from Sync Services. Reconnect or try again later.

    Ever since I upgraded to iTunes 10.4 I've been getting this dreaded message on many occasions when I try to sync my iPhone 4 or iPad 2 with my Win 7 64 bit machine. "iTunes was unable to load data class information from Sync Services. Reconnect or try again later." What happens is that local content (music, videos etc) will sync properly to my iPhone, but other content (such as Outlook information, MobileMe stuff, etc) will not.
    I have uninstalled and completely purged all Apple data from my PC (including hidden files and folders under Common Files and in the Registry) and reinstalled iTunes. Yet after one or two syncs, the same problem resurfaces. The other weird part is that the Sync Services crap-out message will happen after I do a successful sync, leave the iPhone connected to the PC, and don't even touch the computer for several hours.
    I've actually developed a very tedious work around that seems to restore syncing if for a short time.
    - Undock/unconnect all Apple devices from the PC.
    - Close iTunes, MobileMe control panel, and Safari (if you have it).
    - Start Task Manager (Ctrl + Alt + Del) and shut down iTunesHelper.exe and SyncServer.exe
    - Open up a Windows Explorer window (like My Computer) and under Tools, Folder Options, View, toggle on Show Hidden Files and toggle off Hide Protected Operating System FIles
    - In WIndows Explorer, navigate to "C:\Users\<your name>\App Data\Roaming\Apple Computer". Rename the folder Sync Services to something else, like Sync Services_Old.
    - In WIndows Explorere, navigate to "C:\Program Files (x86)\Common Files\Apple\Mobile Device Support" and double-click on AppleSyncNotifier.exe.
    - Go back to your Folder Options and turn off SHow Hidden Files and toggle on Hide Protected Operationg System Files
    Now you can start up iTunes again and connect your device. It should sync properly again (at least, until it doesn't once more).
    Does anyone at Apple have any idea about this error or a solution?

    I actually spent a fair amount of time on the phone with a senior Apple tech last week. He directed me to this topic:
    http://support.apple.com/kb/HT1923?viewlocale=en_US
    It's important that you go through the steps EXACTLY as described here and in the proper order. Also make sure MobileMe control panel is uninstalled (if you have it).
    Interestingly, when I went through this procedure and then reinstalled iTunes 10.4 64-bit  (didn't do MobileMe or Safari at this stage, but QT is automatically installed) everything worked perfectly. The aforementioned error messages disappeared and all is working flawlessly, as it should.
    I hope my expereince will help! Give it a try.

  • ITunes was unable to load data class information from sync services.

    I get the error message "iTunes was unable to load data class information from sync services. Reconnect or try again later" after reinstalling iTunes. I cancel the message and iTunes proceeds to sync with my iPhone 4. The phone and iTunes software are the latest releases. My PC is running Windows 8.1, which had to be reinstalled after the system crashed, requiring a total reinstall of all software.

    Doublechecking. You've tried the following document?
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert

  • Itunes was unable to load data class information from sync services.Reconnect and try again later.

    when I open itunes I get message " itunes was unable to load data class information from sync services. reconnect or try again later "
    I am unable to sync my ipad 2 or iphone 4 through itunes. I have tried all suggested options, removing itunes and related components from control panel + verified completely uninstalled from C program files + then reinstalling latest version of itunes (version 11.3.1.2). Also tried running itunes as administrator. Also tried reset sync history in itunes  Also tried system restore on windows 7 from earlier period.Still get the same above message.
    I run 64bit windows 7. Have recently renewed my Norton Intenet Security. Everything was OK up till then. Could this have anything to do with it.

    A quick cursory browse seems to point that the problem is on Apples end since the last update of iTunes, theres loads of forum posts about it but Apple themselves arent responding as yet other then the usual "unplug, delete sync data, reconnect or completely uninstall iTunes" spiel which doesnt work so hopefully they will fix it sooner or later

Maybe you are looking for