Unable to compile mof files.

When i am trying to run mofcomp -check file, it gives me error:
Mofcomp fails with error 0X8004400c .
Not sure about this error, plz help?
Configuration.mof
#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("Radmin", NOFAIL)
[DYNPROPS]
Class Radmin
[key] string KeyName;
Boolean 1[];
[DYNPROPS]
Instance of Radmin
KeyName="Radmin";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Radmin\\v3.0\\Shared\\Parameters\\XferParam\\1|1"),Dynamic,Provider("RegPropProv")] 1;
#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("Radmin_64", NOFAIL)
[DYNPROPS]
Class Radmin_64
[key] string KeyName;
Boolean 1[];
[DYNPROPS]
Instance of Radmin_64
KeyName="Radmin";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Radmin\\v3.0\\Shared\\Parameters\\XferParam\\1|1"),Dynamic,Provider("RegPropProv")] 1;
Sms_def.mof:
#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
#pragma deleteclass("Radmin", NOFAIL)
[SMS_Report(TRUE),SMS_Group_Name("Radmin"),SMS_Class_ID("Custom|Radmin|1.0"),
SMS_Context_1("__ProviderArchitecture=32|uint32"),
SMS_Context_2("__RequiredArchitecture=true|boolean")]
Class Radmin: SMS_Class_Template
[SMS_Report(TRUE),key] string KeyName;
[SMS_Report(TRUE)] Boolean 1[];

Hello Jason,
 MOFCOMP -check on both files did not turn up any errors.  Also did not see any errors in the dataldr.log file when I put them in. but now
Hardware Inventory not available in Actions.
Also i'm getting error in policyagent.log:
Failed to trigger policy evaluation for CCM_Policy_Policy4.PolicyID="{e254f489-177f-4526-8342-7a51c2d90561}",PolicySource="SMS:RTP",PolicyVersion="12.00"
Failed to apply policy rule {1212f5e9-0507-4706-ba68-d8bd5529c526}. PolicyAgent_PolicyEvaluator 12/16/2014 5:11:57 PM 3436 (0x0D6C)
The policy CCM_Policy_Policy4.PolicyID="{e254f489-177f-4526-8342-7a51c2d90561}",PolicySource="SMS:RTP",PolicyVersion="12.00" failed to compile. State has been set to 'Error' and policy will be rolled back. PolicyAgent_PolicyEvaluator
7/30/2008 5:11:56 PM 3436 (0x0D6C)
Failed to update policy CCM_Policy_Policy4.PolicyID="{e254f489-177f-4526-8342-7a51c2d90561}",PolicySource="SMS:RTP",PolicyVersion="12.00" PolicyAgent_PolicyEvaluator 12/16/2014 5:11:57 PM 3436 (0x0D6C)
I reverted back to the default MOFs and that fixed the issue.
Any ideas, this inventory is turning out to be a pain?

Similar Messages

  • Setup was unable to compile the file ccmclasses.mof

    First i have a access denied problem with push installation ;
    MSI: Setup was unable to create the WMI namespace CCM
    The error code is 80070005
    MSI: Warning 25101. Setup was unable to delete WMI namespace ccm\dcm
    The error code is 80070005
    Installation failed with error code 1603
    I've tried many actions include deleting repository directory and rebuilding dll and mof files ...
    Finally i've added LOCAL SERVICE, NETWORK SERVICE, and SYSTEM accounts to Local administrators group and now there is no 80070005 error.
    But i ve got a new error :)
    MSI: Setup was unable to compile the file ccmclasses.mof
    The error code is 8004402F
    MSI: Warning 25002. Failed to delete CCM_Service_ErrorHandlerRegistration.Clsid="{0F95BCE5-2209-488a-B4BC-4396AD233C8D}" from CCM
    The error code is 80041010
    Installation failed with error code 1603
    i ve almost 2000 clients with this situation and i think i lost my mind very soon.
    Any help is appreciated.

    Hi Bulent,
    Very glad to hear the issue resolved and thanks for sharing your experience, which can help other community members facing similar problems. Also, if you have any further concerns, please do not hesitate to let us know and we are happy to be of further
    assistance.
    Thanks,
    Yog Li -- Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Sccm 2012 r2 error setup cannot compile mof file tasksequenceprovider.mof

    Am getting this error during SCCM 2012 R2 installation on the same server which has SQL 2012 with SP1. "setup cannot compile mof file tasksequenceprovider.mof". Any help?

    Hi,
    The following blog introduced a tool scans winodws module which may help find out the missing file.
    http://blogs.technet.com/b/configurationmgr/archive/2010/01/05/the-configuration-manager-service-pack-install-guide.aspx

  • Unable to compile servlet files in javac

    i am unable to compile servlet *.java files in javac.as far as i can see my path is correct.
    Kindly provide a solution as soon as possible.
    My jdk1.3 is in my c drive and my tomcat in my d drive.
    if you are able to compile kindly let me know your path.
    it says symbol not resolved.i think that it is unable to import from javax

    Assuming that your jdk is in c drive as c:\jdk1.3 set the path and the classpath like as shown below. Remember that you have to set the classpath for the classes in the javax.servlet and javax.servlet.http packages. I know how to do it for JavaWebServer. JavaWebServer has a jar called servlet.jar that contains all these classes. What you need to do is to put this jar file in your classpath. There will be a similar jar file for Tomcat server also. You need to refer the Tomcat server documentation for that.
    The path and the classpath have to be set like this...
    d:\>path=%path%;.;c:\jdk1.3\bin;
    d:\>set classpath=%classpath%;.;c:\jdk1.3\lib;c:\JavaWebServer2.0\lib\servlet.jar;
    assuming tht JWS is installed in c:\JavaWebServer2.0
    Also note that there should be no spaces in between while setting the classpath. In your case you have to change the last part of the classpath to customize your requirement.
    Hope that will help.
    Regards
    Jaydeep

  • Unable to Compile .pll files in EBS R12 on PROD instance

    Hi All,
    We are facing Problem in our Prod instance. When we tried to compile pll files of any module we are not able to get compile in production, but these files easily compiled in our Test/DEV instance. We are not getting any solution from product support.
    OS version: Solaris 10
    EBS version 12.0.4 with 10.2.0.2.
    Any body please help us.

    No error message is coming up, adadmin session got hung. frmcmp_batch process are not getting killed through kill -9 command. All the times we rebooted the server to release these processes.Can you find any errors in the database log file?
    What if you move the file to any of the working instance, can you compile it then?
    Please compile it manually as per these docs and check then.
    How to Generate Form, Library and Menu for Oracle Applications (Doc ID 130686.1)
    Unable To Compile Custom Form Using Frmcmp Utility Receive FRM-91500 (Doc ID 563655.1)
    Thanks,
    Hussein

  • Unable to compile .jsp files with Jakarta Tomcat 5.5.3

    Hello,
    I am unable to reflect the changes that I am making in my .jsp files on my server. I am using Fedora core 4. It's like the .jsp files are not being compiled anymore. Please help! I would greatly appreciate any feedback. Thanks for your time.

    Thanks for your reply. My .jsp files where working just fine before I changed the layout of the output. Even making changes to a simple file that contains: <% out.println("Welcome to the jsp page!"); %> to the following: <% out.println("Welcome to the jsp page! Today is the day!"); %> does not work. I have cleared the browser by deleting all cookies, temp files, history, etc. The changes to my file are not being compiled. I thought that in JSP 2.0 changes to your files where compiled automatically. Am I missing something? Please help!

  • Unable to compile .ear file with an operation that returns an array

    Hi
    God, hopefully someone can help me.....
    I have a web service that has various operations, one of which is attempting to return an array of strings. I am declaring a complextype in the WSDL that should functions as the array like this:
    <schema.....
    <element name="result" type="string"/>
    <complexType name="searchResponseElement">
    <sequence>
    <element ref="tns:result" maxOccurs="unbounded"
    minOccurs="0"/>
    </sequence>
    The error I receive is utterly vague, just saying ' compilation error occurred' when I go to deploy the ear file. I did have this working with another methos of declaring an array i.e.
    <schema...
    <complexType name="searchResponseElement">
    <complexContent>
    <restriction base="soap11-enc:Array">
    <attribute ref="soap11-enc:arrayType" wsdl:arrayType="xsd:string[]"/>
    </restriction>
    </complexContent>
    </complexType>
    But, I was trying to consume the webservice in an APEX application and that method did not return a tree structure that APEX was able to handle.
    I really am losing my mind over this as I've had the same type of definition working before. Please, anyone - any clues???

    I answered this question that you also posted on stackoverflow.com.

  • Unable to compile .c file which includes jni.h

    I have implemented the native method in c program and saved it as JNIDemo.c.The problem is that when I compile the c file I get lots of error regarding jni.h file which I have placed inside the include dir of torbo c.Please tell me- is there any specific path setting of jni.h header file?? How to create the dll file of the JNIDemo.c?

    Suggestions:
    1) post the error messages
    2) post the file (if small enough)
    3) consider asking this in the JNI forum where you have a better chance of bumping into a JNI expert. If you do this, please have each thread refer to the other so as not to get flamed for cross-posting.

  • Unable to compile ( not creating class file ) java file

    Hi
    I am unable to compile java file in eclipse. I am using Tomcat 5.0 and eclipse 3.0. I am able to compile the file from command prompt. I installed eclipse and did all settings including Build path ( WEB-INF\classes). But I donot see any class file getting created.

    Are you seeing errors when eclipse compiles you classes? Have you tried to build your project using; Project -> Build All? If you have and it looks like no errors are generated you may need to change your perspective. Try changing to the resource perspective to see the built class files; Window -> Open Perspective -> Other -> Resource. By default built class files end up in the bin directory of the project. i usually change my built classes directory to classes, just makes more sense to me.

  • MOF file error during manual client installation

    Trying to install SCCM 2012 client manually on a DP  and getting the below error.
    MSI: Setup was unable to compile the file UpdatesAgent.mof
    The error code is 80041002
    Believing that this is related to WMI, I have tried to rename the repository and did a lot of hit and trials but didn't gain.
    Please assist
    Thanks

    Yes, the files have been copied locally on this DP. I manually tried running ccmsetup.exe but this came up with error as mentioned above.
    There was never a ConfigMgr client installed on this DP.
    I tried Client Push and below are the logs for that :
    ---> Attempting to connect to administrative share '\\<DP NAME>\admin$' using account 'Administrative UserID'                SMS_CLIENT_CONFIG_MANAGER          
    ---> Connected to administrative share on machine <DP NAME> using account 'Administrative UserID'                SMS_CLIENT_CONFIG_MANAGER          
    ---> Attempting to make IPC connection to share <\\<DP NAME>\IPC$>               SMS_CLIENT_CONFIG_MANAGER          
    ---> Searching for SMSClientInstall.* under '\\<DP NAME>\admin$\'       SMS_CLIENT_CONFIG_MANAGER          
    ---> System OS version string "6.1.7601" converted to 6.10           SMS_CLIENT_CONFIG_MANAGER          
    ---> Unable to get SMS_Client object from WMI on remote machine "<DP NAME>", error = 0x80041010.                SMS_CLIENT_CONFIG_MANAGER          
    ---> Creating \ VerifyingCopying exsistance of destination directory \\<DP NAME>\admin$\ccmsetup.                SMS_CLIENT_CONFIG_MANAGER          
    ---> Copying client files to \\<DP NAME>\admin$\ccmsetup.      SMS_CLIENT_CONFIG_MANAGER          
    ---> Copying file "C:\Program Files\Microsoft Configuration Manager\bin\I386\MobileClient.tcf" to "MobileClient.tcf"                SMS_CLIENT_CONFIG_MANAGER          
    ---> Copying file "C:\Program Files\Microsoft Configuration Manager\bin\I386\ccmsetup.exe" to "ccmsetup.exe"                SMS_CLIENT_CONFIG_MANAGER          
    ---> Updated service "ccmsetup" on machine "<DP NAME>".     SMS_CLIENT_CONFIG_MANAGER          
    ---> Started service "ccmsetup" on machine "<DP NAME>".        SMS_CLIENT_CONFIG_MANAGER          
    ---> Deleting SMS Client Install Lock File '\\<DP NAME>\admin$\SMSClientInstall.S01'     SMS_CLIENT_CONFIG_MANAGER               
    Execute query exec [sp_CP_SetLastErrorCode] 2097156258, 0    SMS_CLIENT_CONFIG_MANAGER          
    ---> Completed request "2097156258", machine name "<DP NAME>".    SMS_CLIENT_CONFIG_MANAGER          
    Deleted request "2097156258", machine name "<DP NAME>"    SMS_CLIENT_CONFIG_MANAGER          
    Execute query exec [sp_CP_SetPushRequestMachineStatus] 2097156258, 4       SMS_CLIENT_CONFIG_MANAGER          
    Execute query exec [sp_CP_SetLatest] 2097156258, N'06/25/2014 04:50:51', 6    SMS_CLIENT_CONFIG_MANAGER          
    <======End request: "2097156258", machine name: "<DP NAME>".      SMS_CLIENT_CONFIG_MANAGER           
    The error is with the WMI as is found during the manual run of the ccmsetup.exe
    Unable to get SMS_Client object from WMI on remote machine "<DP NAME>", error = 0x80041010.                SMS_CLIENT_CONFIG_MANAGER 

  • Unable to compile Pro C file in windows

    Hi
    I have installed oracle 11g rel1 in windows XP. But the problem is i am unable to compile Pro C file to produce executable. It is able to convert pro c file to .c file. But not able to produce any executable. My installation did not installed pro c GUI either. nor any demo file of pro c is available under precomp/ folder. Has this installation gone wrong or how can i produce executable?
    Thanks
    Sas

    y dont u try this...i m not sure if its a right way to do things, but seems like it can work
    $ORACLE_HOME/bin/proc test.pc
    cc -I${ORACLE_HOME}/precomp/public -c test.c
    do : find /cisa -name "*clntsh*" -print
    say u get sumthing lyk this
    $ORACLE_HOME/lib32/libclntsh.so.10.1
    // instead of this:
    cc -o test test.c -L $ORACLE_HOME/lib -lclntsh
    write:
    cc -o test test.c -L $ORACLE_HOME/lib $ORACLE_HOME/lib32/libclntsh.so.10.1
    so u r directly refering to the library while linking

  • Unable to compile the Java Files generated by JAXB

    Hi,
    I have generated the Java Files for a DTD and .xjs file using JAXB. But when i tyr to compile the .java files generated i am getting errors.
    My DTD file is addctq.dtd
    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT AddCtq (Ctq*)>
    <!ELEMENT Ctq (PartNumber ,PartDescription,CtqDescription,CtqType,ProductLine,Supplier,Ppctq,Ctp,Ctc,CtqCode1,CtqCode2,CtqCode3,Commodity,SubCommodity,UnitOfMeasure,Client,SamplingFrequency,Remarks,VariableData)>
    <!ELEMENT VariableData (SubGroupSize, Specification,Nominal,Usl,Ual,Lal,Lsl,Zal,RangeVal?,RangeAlarmVal?)>
    <!ELEMENT PartNumber (#PCDATA)>
    <!ATTLIST PartNumber new CDATA #REQUIRED >
    <!ELEMENT PartDescription (#PCDATA)>
    <!ELEMENT CtqDescription (#PCDATA)>
    <!ELEMENT CtqType (#PCDATA)>
    <!ELEMENT ProductLine (#PCDATA)>
    <!ELEMENT Supplier (#PCDATA)>
    <!ELEMENT Ppctq (#PCDATA)>
    <!ELEMENT Ctp (#PCDATA)>
    <!ELEMENT Ctc (#PCDATA)>
    <!ELEMENT CtqCode1 (#PCDATA)>
    <!ELEMENT CtqCode2 (#PCDATA)>
    <!ELEMENT CtqCode3 (#PCDATA)>
    <!ELEMENT Commodity (#PCDATA)>
    <!ELEMENT SubCommodity (#PCDATA)>
    <!ELEMENT UnitOfMeasure (#PCDATA)>
    <!ELEMENT Client (#PCDATA)>
    <!ELEMENT SamplingFrequency (#PCDATA)>
    <!ELEMENT Remarks (#PCDATA)>
    <!ELEMENT SubGroupSize (#PCDATA)>
    <!ELEMENT Specification (#PCDATA)>
    <!ELEMENT Nominal (#PCDATA)>
    <!ELEMENT Usl (#PCDATA)>
    <!ELEMENT Ual (#PCDATA)>
    <!ELEMENT Lal (#PCDATA)>
    <!ELEMENT Lsl (#PCDATA)>
    <!ELEMENT Zal (#PCDATA)>
    <!ELEMENT RangeVal (#PCDATA)>
    <!ELEMENT RangeAlarmVal (#PCDATA)>
    and the .xjs file i created is addctq.xjs
    <?xml version="1.0" encoding="UTF-8" ?>
    <xml-java-binding-schema version="1.0-ea">
    <options package="com.geindustrial.sqms"/>
    <element name="AddCtq" type="class" root="true">
    <content>
    <element-ref name="Ctq"/>
    </content>
    </element>
    <element name="Ctq" type="class">
    <content>
         <element-ref name="PartNumber"/>
         <element-ref name="PartDescription"/>
         <element-ref name="CtqDescription"/>
         <element-ref name="CtqType"/>
         <element-ref name="ProductLine"/>
         <element-ref name="Supplier"/>
         <element-ref name="Ppctq"/>
         <element-ref name="Ctp"/>
         <element-ref name="Ctc"/>
         <element-ref name="CtqCode1"/>
         <element-ref name="CtqCode2"/>
         <element-ref name="CtqCode3"/>
         <element-ref name="Commodity"/>
         <element-ref name="SubCommodity"/>
         <element-ref name="UnitOfMeasure"/>
         <element-ref name="Client"/>
         <element-ref name="SamplingFrequency"/>
         <element-ref name="Remarks"/>
         <element-ref name="VariableData"/>
    </content>      
    </element>
    <element name="VariableData" type="class">
    <content>
    <element-ref name="SubGroupSize"/>
    <element-ref name="Specification"/>
    <element-ref name="Nominal"/>
    <element-ref name="Usl"/>
    <element-ref name="Ual"/>
    <element-ref name="Lal"/>
    <element-ref name="Lsl"/>
    <element-ref name="Zal"/>
    </content>
    </element>
    <element name="PartNumber" type="value">
    <attribute name="new"/>
    </element>
    <element name="PartDescription" type="value">
    </element>
    <element name="CtqDescription" type="value">
    </element>
    <element name="CtqType" type="value">
    </element>
    <element name="ProductLine" type="value">
    </element>
    <element name="Supplier" type="value">
    </element>
    <element name="Ppctq" type="value">
    </element>
    <element name="Ctp" type="value">
    </element>
    <element name="Ctc" type="value">
    </element>
    <element name="CtqCode1" type="value">
    </element>
    <element name="CtqCode2" type="value">
    </element>
    <element name="CtqCode3" type="value">
    </element>
    <element name="Commodity" type="value">
    </element>
    <element name="SubCommodity" type="value">
    </element>
    <element name="UnitOfMeasure" type="value">
    </element>
    <element name="Client" type="value">
    </element>
    <element name="SamplingFrequency" type="value">
    </element>
    <element name="Remarks" type="value">
    </element>
    <element name="SubGroupSize" type="value" convert="int">
    </element>
    <element name="Specification" type="value">
    </element>
    <element name="Nominal" type="value" convert="float">
    </element>
    <element name="Usl" type="value" convert="float">
    </element>
    <element name="Ual" type="value" convert="float">
    </element>
    <element name="Lal" type="value" convert="float">
    </element>
    <element name="Lsl" type="value" convert="float">
    </element>
    <element name="Zal" type="value" convert="float">
    </element>
    <element name="RangeVal" type="value" convert="float">
    </element>
    <element name="RangeAlarmVal" type="value" convert="float">
    </element>
    </xml-java-binding-schema>
    When i ran the xjc , it generated 3 .java files
    AddCtq.java , Ctq.java and VariableData.java
    But i am unable to compile any of the above files...
    The Error i am getting is
    VariableData.java:710: Undefined variable or class name: AddCtq
    return AddCtq.newDispatcher();
    ^
    1 error
    If i try to compile AddCtq.java , the Error i am getting is
    AddCtq.java:4: Class com.geindustrial.sqms.Ctq not found in import.
    import com.geindustrial.sqms.Ctq;
    ^
    AddCtq.java:169: Class com.geindustrial.sqms.Ctq not found.
    if (!(ob instanceof Ctq)) {
    ^
    AddCtq.java:170: Class com.geindustrial.sqms.Ctq not found.
    throw new InvalidContentObjectException(ob, (Ctq.class));
    ^
    3 errors
    And when i try to compile Ctq.java , i am getting the following Error:
    Ctq.java:4: Class com.geindustrial.sqms.VariableData not found in import.
    import com.geindustrial.sqms.VariableData;
    ^
    1 error
    How to solve this problem..Pls advise...
    Thanks
    Sateesh

    I suspect you are trying to compile the files one by one. You may also be trying to compile them disregarding the package structure.
    From your post, I gather these files are in the package: com.geindustrial.sqms
    Therefore, if they are not so already, put them under a directory structure:
    com/geindustrial/sqms
    and then compile with:
    javac com/geindustrial/sqms/AddCtq.java com/geindustrial/sqms/Ctq.java com/geindustrial/sqms/VariableData.java
    (The above is all on one line.)
    HTH,
    Manuel Amago.

  • Unable to compile the JAXB generated java files

    Hi
    I am using JAXB 2.0 API for binding process.
    I have products.xml file as
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE PRODUCTDATA SYSTEM "products.dtd">
    <PRODUCTDATA>
    <PRODUCT PRODID="P001" CATEGORY="Books">
    <PRODUCTNAME>Gone with the wind</PRODUCTNAME>
    <DESCRIPTION>This is abt American Civil War</DESCRIPTION>
    <PRICE>25.00</PRICE>
    <QUANTITY>3</QUANTITY>
    </PRODUCT>
    </PRODUCTDATA>
    and products.xsd(Schema file) as
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="PRODUCTDATA" type="prdt"/>
    <xsd:complexType name="prdt">
    <xsd:sequence>
    <xsd:element name="PRODUCT" type="prd" maxOccurs="unbounded" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="prd">
    <xsd:sequence>
    <xsd:element name="PRODUCTNAME" type="xsd:string"/>
    <xsd:element name="DESCRIPTION" type="xsd:string"/>
    <xsd:element name="PRICE" type="xsd:positiveInteger"/>
    <xsd:element name="QUANTITY" type="xsd:nonNegativeInteger"/>
    </xsd:sequence>
    <xsd:attribute name="PRODID" type="pid" use="required"/>
    <xsd:attribute name="CATEGORY" type="xsd:string" use="optional"/>
    </xsd:complexType>
    <xsd:simpleType name="pid">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[p]{1}/d{3}"/>
    <xsd:length value="4"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    I am converting these schema file to java files by using binding compiler xjc.
    So that three java files are genearated automatically.
    1) ObjectFactory.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import javax.xml.bind.JAXBElement;
    import javax.xml.bind.annotation.XmlElementDecl;
    import javax.xml.bind.annotation.XmlRegistry;
    import javax.xml.namespace.QName;
    * This object contains factory methods for each
    * Java content interface and Java element interface
    * generated in the testing.jaxb package.
    * <p>An ObjectFactory allows you to programatically
    * construct new instances of the Java representation
    * for XML content. The Java representation of XML
    * content can consist of schema derived interfaces
    * and classes representing the binding of schema
    * type definitions, element declarations and model
    * groups. Factory methods for each of these are
    * provided in this class.
    @XmlRegistry
    public class ObjectFactory {
    private final static QName PRODUCTDATAQNAME = new QName("", "PRODUCTDATA");
    * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: testing.jaxb
    public ObjectFactory() {
    * Create an instance of {@link Prd }
    public Prd createPrd() {
    return new Prd();
    * Create an instance of {@link Prdt }
    public Prdt createPrdt() {
    return new Prdt();
    * Create an instance of {@link JAXBElement }{@code <}{@link Prdt }{@code >}}
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    public JAXBElement<Prdt> createPRODUCTDATA(Prdt value) {
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value);
    2)Prdt.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prdt complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prdt">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCT" type="{}prd" maxOccurs="unbounded"/>
    * </sequence>
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prdt", propOrder = {
    "product"
    public class Prdt {
    @XmlElement(name = "PRODUCT", required = true)
    protected List<Prd> product;
    * Gets the value of the product property.
    * <p>
    * This accessor method returns a reference to the live list,
    * not a snapshot. Therefore any modification you make to the
    * returned list will be present inside the JAXB object.
    * This is why there is not a <CODE>set</CODE> method for the product property.
    * <p>
    * For example, to add a new item, do as follows:
    * <pre>
    * getPRODUCT().add(newItem);
    * </pre>
    * <p>
    * Objects of the following type(s) are allowed in the list
    * {@link Prd }
    public List<Prd> getPRODUCT() {
    if (product == null) {
    product = new ArrayList<Prd>();
    return this.product;
    3) Prd.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.math.BigInteger;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlAttribute;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prd complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prd">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCTNAME" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="DESCRIPTION" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="PRICE" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
    * <element name="QUANTITY" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
    * </sequence>
    * <attribute name="CATEGORY" type="{http://www.w3.org/2001/XMLSchema}string" />
    * <attribute name="PRODID" use="required" type="{}pid" />
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prd", propOrder = {
    "productname",
    "description",
    "price",
    "quantity"
    public class Prd {
    @XmlElement(name = "PRODUCTNAME", required = true)
    protected String productname;
    @XmlElement(name = "DESCRIPTION", required = true)
    protected String description;
    @XmlElement(name = "PRICE", required = true)
    protected BigInteger price;
    @XmlElement(name = "QUANTITY", required = true)
    protected BigInteger quantity;
    @XmlAttribute(name = "CATEGORY")
    protected String category;
    @XmlAttribute(name = "PRODID", required = true)
    protected String prodid;
    * Gets the value of the productname property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODUCTNAME() {
    return productname;
    * Sets the value of the productname property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODUCTNAME(String value) {
    this.productname = value;
    * Gets the value of the description property.
    * @return
    * possible object is
    * {@link String }
    public String getDESCRIPTION() {
    return description;
    * Sets the value of the description property.
    * @param value
    * allowed object is
    * {@link String }
    public void setDESCRIPTION(String value) {
    this.description = value;
    * Gets the value of the price property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getPRICE() {
    return price;
    * Sets the value of the price property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setPRICE(BigInteger value) {
    this.price = value;
    * Gets the value of the quantity property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getQUANTITY() {
    return quantity;
    * Sets the value of the quantity property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setQUANTITY(BigInteger value) {
    this.quantity = value;
    * Gets the value of the category property.
    * @return
    * possible object is
    * {@link String }
    public String getCATEGORY() {
    return category;
    * Sets the value of the category property.
    * @param value
    * allowed object is
    * {@link String }
    public void setCATEGORY(String value) {
    this.category = value;
    * Gets the value of the prodid property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODID() {
    return prodid;
    * Sets the value of the prodid property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODID(String value) {
    this.prodid = value;
    Next step is to compile these three files
    So I am compiling these three files it gives me compiler error as:
    testing/jaxb/ObjectFactory.java:31: illegal character: \64
    @XmlRegistry
    ^
    testing/jaxb/ObjectFactory.java:63: illegal character: \64
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: '{' expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/Prdt.java:38: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prdt.java:39: illegal character: \64
    @XmlType(name = "prdt", propOrder = {
    ^
    testing/jaxb/Prdt.java:44: illegal character: \64
    @XmlElement(name = "PRODUCT", required = true)
    ^
    testing/jaxb/Prdt.java:45: <identifier> expected
    protected List<Prd> product;
    ^
    testing/jaxb/Prdt.java:69: <identifier> expected
    public List<Prd> getPRODUCT() {
    ^
    testing/jaxb/Prdt.java:75: ';' expected
    ^
    testing/jaxb/Prd.java:43: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prd.java:44: illegal character: \64
    @XmlType(name = "prd", propOrder = {
    ^
    testing/jaxb/Prd.java:52: illegal character: \64
    @XmlElement(name = "PRODUCTNAME", required = true)
    ^
    testing/jaxb/Prd.java:53: <identifier> expected
    protected String productname;
    ^
    testing/jaxb/Prd.java:54: illegal character: \64
    @XmlElement(name = "DESCRIPTION", required = true)
    ^
    testing/jaxb/Prd.java:55: <identifier> expected
    protected String description;
    ^
    testing/jaxb/Prd.java:56: illegal character: \64
    @XmlElement(name = "PRICE", required = true)
    ^
    testing/jaxb/Prd.java:57: <identifier> expected
    protected BigInteger price;
    ^
    testing/jaxb/Prd.java:58: illegal character: \64
    @XmlElement(name = "QUANTITY", required = true)
    ^
    testing/jaxb/Prd.java:59: <identifier> expected
    protected BigInteger quantity;
    ^
    testing/jaxb/Prd.java:60: illegal character: \64
    @XmlAttribute(name = "CATEGORY")
    ^
    testing/jaxb/Prd.java:61: <identifier> expected
    protected String category;
    ^
    testing/jaxb/Prd.java:62: illegal character: \64
    @XmlAttribute(name = "PRODID", required = true)
    ^
    testing/jaxb/Prd.java:63: <identifier> expected
    protected String prodid;
    ^
    25 errors
    I want all three files to compiled successfully.If it is compiled only then I will continue on Unmarshalling process

    I suspect you are trying to compile the files one by one. You may also be trying to compile them disregarding the package structure.
    From your post, I gather these files are in the package: com.geindustrial.sqms
    Therefore, if they are not so already, put them under a directory structure:
    com/geindustrial/sqms
    and then compile with:
    javac com/geindustrial/sqms/AddCtq.java com/geindustrial/sqms/Ctq.java com/geindustrial/sqms/VariableData.java
    (The above is all on one line.)
    HTH,
    Manuel Amago.

  • Unable to compile the java file

    Hi,
    I am following the step by step process of DOC id : 184339.1 on How to Send an Email With Attachment Via Forms 6i Using ORA_JAVA Package. I downloaded the activation framework and sendmail 1.1.3..When i am compiling the file given the DOC id namely sendmail.java, I get the following error
    Exception in thread "main" java.lang.NoclassDefFoundError: sendmail/java
    Could anyone help me out ..
    Below is the cut and paste of the code which is used to compile..
    Thanks
    Kal
    import java.util.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; public class SendMail {       // Sender, Recipient, CCRecipient, and BccRecipient are comma-       // separated lists of addresses;       // Body can span multiple CR/LF-separated lines;       // Attachments is a ///-separated list of file names;       public static int Send(String SMTPServer,                              String Sender,                              String Recipient,                              String CcRecipient,                              String BccRecipient,                              String Subject,                              String Body,                              String ErrorMessage[], String Attachments) {           // Error status;          int ErrorStatus = 0;              // create some properties and get the default Session;             Properties props = System.getProperties();             props.put("mail.smtp.host", SMTPServer);           Session session = Session.getDefaultInstance(props, null);            try {              // create a message;              MimeMessage msg = new MimeMessage(session);               // extracts the senders and adds them to the message;              // Sender is a comma-separated list of e-mail addresses as              // per RFC822;              {                 InternetAddress[] TheAddresses = InternetAddress.parse(Sender); msg.addFrom(TheAddresses); } // extract the recipients and assign them to the message; // Recipient is a comma-separated list of e-mail addresses // as per RFC822; {                 InternetAddress[] TheAddresses = InternetAddress.parse(Recipient); msg.addRecipients(Message.RecipientType.TO, TheAddresses); } // extract the Cc-recipients and assign them to the // message; // CcRecipient is a comma-separated list of e-mail // addresses as per RFC822; if (null != CcRecipient) {                 InternetAddress[] TheAddresses = InternetAddress.parse(CcRecipient); msg.addRecipients(Message.RecipientType.CC, TheAddresses); } // extract the Bcc-recipients and assign them to the // message; // BccRecipient is a comma-separated list of e-mail // addresses as per RFC822; if (null != BccRecipient) {                 InternetAddress[] TheAddresses = InternetAddress.parse(BccRecipient); msg.addRecipients(Message.RecipientType.BCC, TheAddresses); } // subject field; msg.setSubject(Subject); // create the Multipart to be added the parts to; Multipart mp = new MimeMultipart(); // create and fill the first message part; {                 MimeBodyPart mbp = new MimeBodyPart();                 mbp.setText(Body);                  // attach the part to the multipart;                 mp.addBodyPart(mbp);              } // attach the files to the message; if (null != Attachments) {                 int StartIndex = 0, PosIndex = 0;                 while (-1 != (PosIndex = Attachments.indexOf("///",                                                        StartIndex))) {                    // create and fill other message parts;                    MimeBodyPart mbp = new MimeBodyPart();                    FileDataSource fds =                    new FileDataSource(Attachments.substring(StartIndex,                                                             PosIndex));                    mbp.setDataHandler(new DataHandler(fds));                    mbp.setFileName(fds.getName());                    mp.addBodyPart(mbp);                    PosIndex += 3;                    StartIndex = PosIndex;                 } // last, or only, attachment file; if (StartIndex < Attachments.length()) {                    MimeBodyPart mbp = new MimeBodyPart();                    FileDataSource fds =                  new FileDataSource(Attachments.substring(StartIndex));                    mbp.setDataHandler(new DataHandler(fds));                    mbp.setFileName(fds.getName());                    mp.addBodyPart(mbp);                 } } // add the Multipart to the message; msg.setContent(mp); // set the Date: header; msg.setSentDate(new Date()); // send the message; Transport.send(msg); } catch (MessagingException MsgException) {                ErrorMessage[0] = MsgException.toString(); Exception TheException = null; if ((TheException = MsgException.getNextException()) != null) ErrorMessage[0] = ErrorMessage[0] + "\n" + TheException.toString(); ErrorStatus = 1; } return ErrorStatus; } }

    Most common cause of the problem: JAVA_HOME environment variable not set, or set incorrectly.
    It should point to your java directory: ie C:\java1_4\ NOT C:\java1_4\bin
    Another possible cause is spaces in the path names where you have installed applications.
    Check out this page: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ for a tutorial on installing tomcat.
    If you can't sort it out on your own, we need more info:
    Where have you installed Java?
    Where have installed Tomcat?
    What is the value of JAVA_HOME environment variable?
    Good luck,
    evnafets

  • Unable to compile class for JSP

    Please can anyone help me to solve this.
    Actually,this is the condition.
    In my db,there is a table called UserPassword, which has 4
    fields(empNo,UserName,password,level). Now I want to do these things:
    When the user submits the data to create a new account via HTML form, it submits the data to the file called CreateAcc.jsp. In this file it perform some logic,here are they.
    1)To check the empNo,if it is already exist in the DB,
         if empNo =exist then display error.(record already exist)
         if empNo =notexist then do task 2).
    2)check the UserName,if it is already exist in the db,
         if UserName=exist then display error.(because it's a primary key)
         if UserName=notexist then do task 3).
    3)Create a new user account and save it to the db.
    To do these tasks,I never create a new objects for the tasks 1) and 2).
    only for task 3)create an object.
    Is it the right way?
    Here is the file CreateAcc.jsp
    <%@ page language="java" %>
    <%@ page import="core.UserAccManager" %>
    <%@ page import="data.UserPassword" %>
    <jsp:useBean id="UserAccManager" class="core.UserAccManager" scope="session"/>
    <jsp:setProperty name="UserAccManager" property="*"/>
    <jsp:useBean id="UserPassword" class="data.UserPassword" scope="session"/>
    <jsp:setProperty name="UserPassword" property="*"/>
    <%
    String nextPage ="MainForm.jsp";
    if(UserPassword.verifyEmpno()){
         if(UserPassword.verifyUsername()){
              if(UserPassword.createAcc()) nextPage ="MsgAcc.jsp";
          }else{
               nextPage="UserNameExist.jsp";
          else{
              nextPage="UserAccError.jsp";
    %>
    <jsp:forward page="<%=nextPage%>"/>The directory structure:
    UserPassword.java- F:/Project/core/data/UserPassword.java
    UserAccManager.java - F:/Project/core/UserAccManager.java
    Now both are compiling.I put the class files into the TOMCAT,as follows.
    UserAccManager.class - webapps/mySystemName/WEB-INF/classes/core/
    UserPassword.class - webapps/mySystemName/WEB-INF/classes/core/data/
    Here is the full code of the file UserAccManager.java.
    package core;               //Is this right?
    import data.UserPassword;     //Is this right?
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public final class UserAccManager{
       private static final String DRIVER = "com.mysql.jdbc.Driver";
       private static final String URL = "jdbc:mysql://localhost:3306/superfine";
       private static Connection connection;
       private static PreparedStatement pstmt1;
       private static PreparedStatement pstmt2;     
       private static PreparedStatement pstmt3;     
       private UserAccManager(){
       // Initializes the connection and statements
       public static void initConnection() {
          if (connection == null) {
             try {
                String sql;
                // Open the database
                Class.forName(DRIVER).newInstance();
                connection = DriverManager.getConnection(URL);
                // Prepare the statements
               sql = "SELECT * FROM UserPassword where empNo= ?";
               pstmt1 = connection.prepareStatement(sql);
                sql = "SELECT UserName FROM UserPassword where UserName= ?";
                pstmt2 = connection.prepareStatement(sql);
             sql ="INSERT INTO UserPassword VALUES(?,?,?,?)";
             pstmt3 = connection.prepareStatement(sql);
             catch (Exception ex) {
                System.err.println(ex.getMessage());
       // Closes the connection and statements
       // Method to be called by main class when finished with DB
       public  void closeConnection() {
          //same as previous
       public static boolean verifyEmpno(int empno) {
          boolean emp_no_select_ok = false;
          int emp = -1;
          initConnection();
         try {
          pstmt1.setInt(1, empno);
             ResultSet rs1 = pstmt1.executeQuery();
         while(rs1.next()){
              emp=rs1.getInt("empNo");
         if(emp>0)
              emp_no_select_ok = false;
         } else{
              emp_no_select_ok = true;     
            rs1.close();
         pstmt1.close();     
          catch (Exception ex) {
             System.err.println(ex.getMessage());
          return emp_no_select_ok;
       public static boolean verifyUsername(String username) {
          boolean user_name_select_ok = false;
          String user = "xxxx";
          initConnection();
          try {
          pstmt2.setString(1, username);
             ResultSet rs2 = pstmt2.executeQuery();
            while(rs2.next()){
              user=rs2.getString("UserName");
               if(!user.equals("xxxx"))
              user_name_select_ok = false;
            } else{
              user_name_select_ok = true;     
           rs2.close();
          catch (Exception ex) {
             System.err.println(ex.getMessage());
          return user_name_select_ok;
         public static boolean createAcc(int empno, String username, String password, int
    level){
              boolean create_acc_ok = false;
              initConnection();
              try{
                      //create a new object,from the UserPassword table.
                   UserPassword useraccount = new UserPassword();
                   useraccount.setEmpno(empno);
                   useraccount.setUsername(username);
                   useraccount.setPassword(password);
                   useraccount.setLevel(level);
                   //assign value for ???
                   pstmt3.setInt(1, useraccount.getEmpno());
                   pstmt3.setString(2, useraccount.getUsername());
                   pstmt3.setString(3, useraccount.getPassword());
                   pstmt3.setInt(4, useraccount.getLevel());          
                   if(pstmt3.executeUpdate()==1) create_acc_ok=true;
                   pstmt3.close();
                           //con.close();
                catch(SQLException e2){
                           System.err.println(e2.getMessage());
              return create_acc_ok;
    }here is the bean (part of it)
    package data;               //is it right?
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UserPassword
         private int empno;
         private String username;
         private String password;
         private int level;
         // Constructor
         public UserPassword()
              this.empno = empno;
              this.username = username;
              this.password = password;
              this.level = level;
         // setters and getters are here.
    //     public boolean verifyEmpno() {
    //               return UserAccManager.verifyEmpno(empno);
    //       public boolean verifyUsername(String username) {
    //            return UserAccManager.verifyUsername(username);
         // These 2 methods not compile with or without para's.So I leave that job for the      
         //controll class UserAccManager.java.
    Now my problem is this: When I submit data, there is an error;org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:8:
    cannot access core.data.UserPassword
    bad class file: C:\Program Files\Apache Group\Tomcat
    4.1\webapps\HRM\WEB-INF\classes\core\data\UserPassword.class
    class file contains wrong class: data.UserPassword
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import core.data.UserPassword;
    ^
    1 error
    Are there any mistakes? If so tell me where is it and how to change them.Please help.

    I try it that way, but it don't compile.
    Error:core\data\UserPassword.java:package javax.servlet does not exist
    import javax.servlet.*;
    core\data\UserPassword.java:package javax.servlet.http does not exist
    import javax.servlet.http.*;
    So,I comment them only in the UserPassword.java file,and compile it again.
    Then it compile well.I goto the directory to get the .class files.
    But there is only UserPassword.class inside the data folder. There is not
    UserAccManager.class in the core folder.
    Then I try this way,I put my 2 java files in to a new folder,
    F:\SystemName\com
    When I try it that way, but it don't compile.
    javac -classpath . -d . com\*.javaError:com\UserPassword.java:package javax.servlet does not exist
    import javax.servlet.*;
    com\UserPassword.java:package javax.servlet.http does not exist
    import javax.servlet.http.*;
    So,I comment them only in the UserPassword.java file,and compile it again.
    Now both are compiling well.There was 2 class files.
    I put them in to the WEB-INF/classes/com directory.
    Start the server.But it gave errors:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:68: cannot resolve symbol
    symbol  : variable empno
    location: class org.apache.jsp.CreateAcc_jsp
    if(UserPassword.verifyEmpno(empno)){
                                ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: cannot resolve symbol
    symbol  : variable username
    location: class org.apache.jsp.CreateAcc_jsp
         if(UserAccManager.verifyUsername(username)){
                                             ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: non-static method
    verifyUsername(java.lang.String) cannot be referenced from a static context
         if(UserAccManager.verifyUsername(username)){
                             ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable empno
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable username
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                       ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable password
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                                ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable level
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                                         ^
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: non-static method
    createAcc(int,java.lang.String,java.lang.String,int) cannot be referenced from a static
    context
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                     ^
    8 errorsTo solve the problem non-static method,I goto the UserAccManager.java file and do these
    things.
    package com;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.sql.*;
    //import javax.servlet.*;               //otherwise it tells an error.(package           
                                  //javax.servlet does not exist)
    //import javax.servlet.http.*;
    public  class UserAccManager {
       private static final String DRIVER = "com.mysql.jdbc.Driver";
       private static final String URL = "jdbc:mysql://localhost:3306/superfine";
       private static Connection connection;
       private static PreparedStatement pstmt1;
        private static PreparedStatement pstmt2;
          private static PreparedStatement pstmt3;
       private UserAccManager() {
       // Initializes the connection and statements
       private static void initConnection() {
             //same
       // Closes the connection and statements
       // Method to be called by main class when finished with DB
       public static void closeConnection() {
         //same
       public static boolean verifyEmpno(int empno) {
          // same.
       public static boolean verifyUsername(String username) {
         //same.
         public static boolean createAcc(int empno, String username, String password, int      
    level){
              //same
    package com;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.sql.*;
    //import javax.servlet.*;
    //import javax.servlet.http.*;
    public class UserPassword {
         // same
    Again compile those files and put .class filses into the WEB-INF/classes/com directory.
    When i submits the data via the form it generates an error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
        [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:68: cannot resolve symbol
    symbol  : variable empno
    location: class org.apache.jsp.CreateAcc_jsp
    if(UserAccManager.verifyEmpno(empno)){
                                  ^
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: cannot resolve symbol
    symbol  : variable username
    location: class org.apache.jsp.CreateAcc_jsp
         if(UserAccManager.verifyUsername(username)){
                                             ^
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable empno
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                ^
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable username
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                       ^
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable password
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                                ^
    An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
    symbol  : variable level
    location: class org.apache.jsp.CreateAcc_jsp
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
                                                                         ^
    6 errorshere is the CreateAcc.jsp file
    <%@ page language="java" %>
    <%@ page import="com.UserAccManager" %>
    <%@ page import="com.UserPassword" %>
    <jsp:useBean id="userPassword" class="com.UserPassword" scope="request"/>
    <jsp:setProperty name="userPassword" property="*" />
    <%
    String nextPage ="MainForm.jsp";
    if(UserAccManager.verifyEmpno(empno)){
         if(UserAccManager.verifyUsername(username)){
              if(UserAccManager.createAcc(empno, username,password,level)) nextPage
    ="MsgAcc.jsp";
          }else{
               nextPage="UserNameExist.jsp";
          else{
              nextPage="UserAccError.jsp";
    %>
    <jsp:forward page="<%=nextPage%>"/>Please, anyone know how to send these parameters to the java file.
    Thanks.

Maybe you are looking for

  • Unable to sync 30GB Ipod with Windows Vista

    Hi! I just got a new laptop today - it has 64 bit Vista on it. I downloaded the 64 bit version of Itunes and was able to transfer my music to the computer into itunes. But it will not sync. The ipod is formatted with FAT 32 which is what I think mayb

  • Full screen widget cut my images

    Hi, i´m using a full screen widget to show various images of my portfolio, but that widget cuts my images at bottom: Original Image: In Full Screen widget: It´s annoying because i need to show too many images, can someone help me? Thanks!

  • Audio level settings

    The audio level is very low in the QT movies that I am working for streaming videos. I could increase the volume to the desired level in audio settings, but those settings could not be saved with the movie. Could anyone please advice me how to increa

  • LSMW of runs with a mandator export/- import

    At present we migrate our system landscape of SAP the releases 4.6C on mySAPERP2005. Before the migration of the quality assurance system (FQ2) we imported here in the mandator 151 a mandator export of the productive mandator (FP2 system/mandator 150

  • Need to set static IP for iMac

    I have a fairly elaborate home network. I want my iMac to always use the same IP address when it connects because I use it for web development and need it to consistently identify itself on the network. At the same time I need DHCP on for some other