Odd compile errors using a struct in a vector

I am following Accelerated C++ by Koenig and Moo to learn C++, using Eclipse as my IDE and the MinGW tool chain. Chapter 4 teaches about the struct concept using a pretty simple multi-file example program which emulates reading in a series of student grades and outputs the averages. The struct it defines is called Student_info. Here is Student_info.h:
#ifndef STUDENT_INFO_H_GUARD
#define STUDENT_INFO_H_GUARD
#include <iostream>
#include <string>
#include <vector>
struct Student_info {
std::string name;
double midterm, final;
std::vector<double> homework;
bool compare(const Student_info&, const Student_info&);
std::istream& read(std::istream&, Student_info);
std::istream& read_hw(std::istream&, std::vector<double>&);
#endif /* STUDENT_INFO_H_GUARD */
There are no errors associated with compare, read or read_hw.
The problem I am having is that even though the simple variable declaration below seems to work,
#include "Student_info.h"
int main() {
vector<Student_info> students;
Student_info record;
string::size_type maxlen = 0;
in the sense that the Eclipse code editor signals via i) its color coding that it has found the data type; ii) when I mouseover, it shows me the underlying Student_info definition in the hover box; and iii) the code associated with the variable "record" doesn't generate errors.
However, when I try to use the students vector within main(), I get 'could not be resolved' errors on the property names or 'invalid arguments' for functions which try to pass the variables. For example,
for(vector<Student_info>::size_type i=0; i!=students.size(); ++i) {
cout << students[i].name
<< string(maxlen+1 - students[i].name.size(), ' ');
produces a "Method 'size' could not be resolved" error and a "Field 'name' could be resolved" error.
It's very odd to me, as I said, because mouseover of the vector students declaration at the beginning of main() produces a hover box with the correct struct definition, indicating the include file is being found and contains the intended definition with the 'name' property defined as a string.
I've been trying to solve this for a couple of days and have searched the web and this site, as well as going over all the code many times. The code seems to be exactly what is in the book and it's not too difficult to figure out what it is supposed to be doing. I haven't been able to find a similar error description here or elsewhere by Googling. These errors prevent the project from compiling and so I can't precede. I'm hoping someone can describe what might possibly cause such a thing.
Here's a shortened version of the file with main in it:
#include <algorithm>
#include <iomanip>
#include <ios>
#include <iostream>
#include <string>
#include <vector>
#include <stdexcept>
#include "Student_info.h"
//say what standard library names we use
using std::cin; using std::setprecision;
using std::cout; using std::sort;
using std::domain_error; using std::streamsize;
using std::endl; using std::string;
using std::max; using std::vector;
int main() { // begin main
vector<Student_info> students;
Student_info record;
string::size_type maxlen = 0;
//read and store all the records, and find the length
// of the longest name
while(read(cin, record)) {
maxlen = max(maxlen, record.name.size());
students.push_back(record);
//alphabetize the records
sort(students.begin(), students.end(), compare);
for(vector<Student_info>::size_type i=0; i!=students.size(); ++i) {
// write the name, padded on the right to maxlen+1 chars
cout << students[i].name
<< string(maxlen+1 - students[i].name.size(), ' ');
//compute and write the grade
cout << endl;
return 0;
} // end main
Here are the 'read' functions, which are in a separate file from main and don't seem to be producing any errors:
#include "Student_info.h"
using std::istream; using std::vector;
istream& read_hw(istream& in, vector<double>& hw) {
if (in) {
// get rid of previous contents
hw.clear();
// read homework grades
double x;
while (in >> x)
hw.push_back(x);
// clear the stream so that input will work for the
// next student
in.clear();
return in;
istream& read(istream& is, Student_info s) {
// read and store the student's name and midterm and final exam
is >> s.name >> s.midterm >> s.final;
read_hw(is, s.homework);
return is;
bool compare(const Student_info& x, const Student_info& y) {
return x.name < y.name;
}

Do you mind to try:
for(unsigned i=0; i < students.size(); ++i)
instead of :
for(vector<Student_info>::size_type i=0; i!=students.size(); ++i)

Similar Messages

  • [svn:fx-trunk] 5408: Fix for - Compiler error using Reparent in a Halo Navigator.

    Revision: 5408
    Author: [email protected]
    Date: 2009-03-18 20:57:19 -0700 (Wed, 18 Mar 2009)
    Log Message:
    Fix for - Compiler error using Reparent in a Halo Navigator.
    QE Notes: None.
    Doc Notes: None.
    Reviewer: Paul, please review.
    Bugs: SDK-20099
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-20099
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a

  • Odd Compiler Error in JSPs

    I found a really odd compiler problem today in my JSPs. When I tried to do a rebuild on my JSPs, all of them came up with the exact same error. Basicall it said that I could not have a -- within a comment. This error was reported on three lines and the editor showed three sections as having problems (using a squiggly yellow line). However, none of the pages had anything like what was mentioned on those lines.
    It turned out that the real problem was that the web.xml file had the error. I had put some '--' in a comment section and when the compiler parsed the web.xml file and found the problem, it failed to tag that file as the source but rather ended up showing the JP as being the source.
    Took a bit if time to figure that one out.
    Bill Berks

    You can file a bug at http://bugs.sun.com/services/bugreport/index.jsp

  • Compiler error using compareTo

    I get a compiler error when I use compareTo with the Character class. I confirmed the error with following code from The Java Tutorial:
    public class CharacterDemo {
    public static void main(String args[]) {
    Character a = new Character('a');
    Character a2 = new Character('a');
    Character b = new Character('b');
    // ******* Problem is here ************
    int difference = a.compareTo(b);
    if (difference == 0) {
    System.out.println("a is equal to b.");
    } else if (difference < 0) {
    System.out.println("a is less than b.");
    } else if (difference > 0) {
    System.out.println("a is greater than b.");
    System.out.println("a is "
    + ((a.equals(a2)) ? "equal" : "not equal")
    + " to a2.");
    System.out.println("The character " + a.toString() + " is "
    + (Character.isUpperCase(a.charValue()) ? "upper" : "lower")
    + "case.");
    The compilier is complaining that compareTo is not part of the Character class. I am compiling with whatever compilier was installed with Suse Linux 7.1. The code compiles fine on my university's Unix system that I can dial into.
    I figure my Linux version must have some old compiler. But to be honest, I am also new to Linux and am having trouble figuring out what I am compiling with. Can any expert out there give me advice on identifying/updating the Java technology I am using. Thanks in advance.
    Jim

    Check the jdk version using the java command:
    java -versionwhich will output the jdk version you're using.

  • Urgent: Form Compilation Error using frmcmp.sh on OAS 10.1.2, pls help..

    Hi All,
    I am upgrading from OAS 9.0.4 to 10.1.2 where Forms 10g application is deployed.
    When I try to recompile with frmcmp.sh :
    frmcmp.sh userid=system/oracle123@odb module_type=FORM module=menu1.fmb
    I get errors :
    Compiling Procedure GET_PATH...
    Compilation error on procedure GET_PATH:
    PL/SQL ERROR 201 at line 4, column 32
    Identifier 'APPS_MENU1_DET' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    SQL Statement ignored
    Compilation error have occured.
    Form not created
    What cause this error ?
    FYI, on the above compilation I connect to different database/schema, not the one
    which is used by the Form, is this the reason of th error ?
    During compilation, Do I have to connect to the database/schema I used when develop the form ?
    DO I have to create all tables in the schema first before compilation ?
    Tnank you for your hwlp,
    xtanto
    PS. When I compile the same Form with F90genm.sh on OAS 9.0.4, NO ERROR.

    From my experience it's a really bad idea to install OCS into a AS IM. When it comes to upgrades and patches you'll pull your hair out!
    Why not install OCS first and then install the BI into the OCS AS server... I have not checked the certification matrix but that might be a better solution to look into.

  • Studio 8 compiler error using rogue wave header in std mode

    I get the following compiler error. I am using -library=rwtools7_std in the CC command.
    The error is:-
    "/opt/studio/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.
    "/opt/studio/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.
    "/opt/studio/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The type "istream" is incomplete.
    Please help
    Kandiah

    All,
    I'm getting the following error when I moved to Rogue Wave release 7.0 from 4.0. We're using Sun's FORTE C++ compiler version 7.0.
    Please advise
    *** Build for src 'all' target STARTED: Thu Jan 18 16:37:04 EST 2007
    /xenv/Forte/sun4/7.0/5.8p4/prod/bin/CC -g -features=no%conststrings -DCPLUSREL=7 -D_RWCONFIG=12d -DRW_MULTI_THREAD -O -mt -D_REENTRANT -c -I. -I/xenv/rwsp_tools/sun4/5.8p4/7.0/32/core900_12d -I/xenv/mqi/sun4/5.x/5.3.0.5/inc -I/xenv/ccs_standard_s8/sun4/5.8p4/4.1_B1/include MQInfo.cc MQBase.cc ZeusAccountBridge.cc
    MQInfo.cc:
    MQBase.cc:
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 316: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 317: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 318: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/stringid.h", line 50: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/stringid.h", line 51: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/collint.h", line 75: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/collint.h", line 76: Error: A typedef name cannot be used in an elaborated type specifier..
    7 Error(s) detected.
    ZeusAccountBridge.cc:
    "/xenv/ccs_standard_s8/sun4/5.8p4/4.1_B1/include/ccs_data.h", line 126: Warning (Anachronism): Using int(*)(void*,ccs_Data*) to initialize void*.
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 316: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 317: Error: A typedef name cannot be used in an elaborated type specifier..
    "/xenv/Forte/sun4/7.0/5.8p4/prod/include/CC/rw7/rw/defs.h", line 318: Error: A typedef name cannot be used in an elaborated type specifier..
    3 Error(s) and 1 Warning(s) detected.

  • Compile errors using wsgen (WL 6.1sp2)

    I'm trying to create an rpc webservice using the wsgen tool, but I'm
    running into compilation errors when the tool tries to compile java files
    that it has generated. Attached are the two java files that wsgen generated
    for my webservice. The errors are pretty straightforward - there is no
    identifier in the package statement. Has anyone come across this problem
    before? Here's the relevant console output when running Ant:
    wsgen-weblogic6:
    c:\DOCUME~1\tohara\LOCALS~1\Temp\wsgen\tohara39\client-tmp\EventPublisher.ja
    va:1
    : <identifier> expected
    package ;
    ^
    c:\DOCUME~1\tohara\LOCALS~1\Temp\wsgen\tohara39\client-tmp\EventPublisherFac
    tory
    .java:1: <identifier> expected
    package ;
    ^
    2 errors
    [wsgen] Exec failed .. exiting
    Thanks,
    Timo
    [EventPublisherFactory.java]
    [EventPublisher.java]

    Hello,
    Could you post your build.xml? Also could you post the log from ant -verbose? Just a shot, but have
    you tried building in a directory tree that does not contain spaces in the name?
    Thanks,
    Bruce
    Timothy O'Hara wrote:
    I'm trying to create an rpc webservice using the wsgen tool, but I'm
    running into compilation errors when the tool tries to compile java files
    that it has generated. Attached are the two java files that wsgen generated
    for my webservice. The errors are pretty straightforward - there is no
    identifier in the package statement. Has anyone come across this problem
    before? Here's the relevant console output when running Ant:
    wsgen-weblogic6:
    c:\DOCUME~1\tohara\LOCALS~1\Temp\wsgen\tohara39\client-tmp\EventPublisher.ja
    va:1
    : <identifier> expected
    package ;
    ^
    c:\DOCUME~1\tohara\LOCALS~1\Temp\wsgen\tohara39\client-tmp\EventPublisherFac
    tory
    .java:1: <identifier> expected
    package ;
    ^
    2 errors
    [wsgen] Exec failed .. exiting
    Thanks,
    Timo
    package ;
    public class EventPublisherFactory {
    public static EventPublisher getService()
    throws javax.naming.NamingException
    String url = "http://localhost:80/bas-ws/bas.platform.components.EventPublisherHome/wsdl.jsp";
    java.util.Properties h = new java.util.Properties();
    h.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.wsdl.interface",
    EventPublisher.class.getName());
    h.put("weblogic.soap.verbose", "true");
    javax.naming.Context context =
    new javax.naming.InitialContext(h);
    return (EventPublisher)context.lookup(url);
    package ;
    public interface EventPublisher{
    void publishEvent( String arg0 );

  • Odd compile errors from /opt/sunstudioceres/prod/include/CC/Cstd/memory

    I'm trying to compile an MPI program using Sun Studio Ceres and I'm getting the errors below. The code compiles fine using g++ and openMPI. The non-MPI version of the code compiles fine with the Sun tools.
    "/opt/sunstudioceres/prod/include/CC/Cstd/memory", line 798: Error: "," expected instead of "(".
    "/opt/sunstudioceres/prod/include/CC/Cstd/memory", line 798: Error: Type name expected instead of "(".
    "/opt/sunstudioceres/prod/include/CC/Cstd/rw/locimpl", line 291: Error: Identifier expected instead of "(".
    Thanks in advance,
    Edward

    The header files for the default libCstd have in several places used identifiers like "X" or "T" or "size" that are reserved for programmer (your) use. Technically, the sequence
    #define X something
    #include <standard_header>
    is valid C++, but could break using the libCstd implementation.
    This problem was captured in two bug reports:
    6785883 Template parameter names in libCstd clash with user macros
    6797621 More template parameter names in libCstd clash with user macros
    These bugs should be fixed in the next patch released for Sun Studio 12, and are fixed in the Sun Studio Express release coming out in March.

  • Compile errors using bpelx:append

    I'm getting compile errors from one particular bpelx:append. I have others earlier in the bpel code, and they seem to be passing the check.
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    Produces:
    Error(437):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 437 of "D:\BPEL_SANITARIUM\BPELPM\integration\jdev\jdev\mywork\Workspace\identifyPanelMembers\identifyPanelMembers.bpel", XML parsing failed because Invalid content starting with element "bpelx:append".
    [Potential fix]: Fix the invalid XML.
    <assign name="appendTheRest">
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    </assign>
    Produces:
    Error(436):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 436 of "D:\BPEL_SANITARIUM\BPELPM\integration\jdev\jdev\mywork\Workspace\identifyPanelMembers\identifyPanelMembers.bpel", XML parsing failed because Invalid content starting with element "assign".
    [Potential fix]: Fix the invalid XML.
    The code is contained within a Switch block:
    <switch name="Switch_4">
    <case condition="bpws:getVariableData('index') = 1">
    <bpelx:annotation>
    <bpelx:pattern>First time only
    </bpelx:pattern>
    </bpelx:annotation>
    <assign name="setFirstPanelMember">
    <copy>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </copy>
    </assign>
    </case>
    <otherwise>
    <empty name="append.the.rest"/>
    <assign name="appendTheRest">
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    </assign>
    </otherwise>
    </switch>
    Any ideas?

    We are also receiving the same error. Our process was built for a client in 10.1.2.0.2 and the GUI interface never really liked the bpelx:append statement - it always showed up as an alert/error. But it worked on 10.1.2.0.2
    Now that the client is upgrading to 10.1.3, it won't actually compile.
    Anyone know of a solution?

  • Compiler error using T extends S

    The following produces an error on the last call to getWrap.
    incompatible types found: A.Wrap<java.util.HashMap> required: A.Wrap<java.util.Map>
    Is there anything in the declaration of getWrap to signify that S can be a super class of T?
    public class A {
        public static <S, T extends S> Wrap<S> getWrap(T t) {
            return new Wrap<S>(t);
        public static void main(String[] args) {
            Wrap<HashMap> map1 = getWrap(new HashMap()); // compiles
            Wrap<Map> map2 = getWrap((Map) new HashMap()); // compiles
            Wrap<Map> map3 = getWrap(new HashMap()); // incompatible types
        public static class Wrap<E> {
            private final E e;
            public Wrap(E e) {
                this.e = e;
    }

    From what you are saying, in this case, it appears the T extends S adds no value.
    Using explicit paratised types is a bit like casting, in this case casting to a super class.
    My preference would be for
    Wrap<Map> map3 = getWrap((Map) new HashMap());I have noted before that Java does not consider a desired return type. Some languages do, but imagine this is hard to get right. What I imagined was a return type of getWrap(new HashMap()) of something like Wrap<? super HashMap>.
    I have seen generic work very well for return types in other places, however the return type was determined by the IDE rather then the compiler.
    e.g.
    public interface Visitor<V,T> {
        public T visit(V visited) throws RuntimeException;
    // visits an object of type V and triggers optional events of type E
    public interface VisitProxy <V, E> {
        public <T> T visit(Visitor<V, T> visitor, Notifier<E> notifier) throws RuntimeException;
    public class CollectionProxy<E> implements Collection<E>, VisitProxy<Collection<E>, Event<Integer, E>> {
        private final VisitProxy<Collection<E>> proxy;
        public boolean add(E e) {
             return proxy.visit(new <Ctrl-Space>
    // The IDE fills in the following.
            return proxy.visit(new Visitor<Collection<E>, Event<Integer, E>, Boolean>() {
                public Boolean visit(Collection<E> es, Notifier<Event<Integer, E>> notifier) throws RuntimeException {
                    return null;
            });Another key turns the anonymous class into a method so I can make it static.
    Here the IDE is determining the approriate return type. In this case Boolean which can be unboxed into boolean.
    Thank you to everyone who replied.
    BTW: This is a simplified example based on a real program.

  • Compilation errors using jhs 10.1.3.1 and jdeveloper 10.1.3.2

    jdeveloper version: 10.1.3.2.0.4066
    jheadstart version: 10.1.3.1.25
    I have just installed both of the above and am receiving errors on compilation in both my viewcontroller and model projects.
    I receive the following error on the view project as soon as jheadstart is enabled:
    C:\myfilepath\ViewController\public_html\jheadstart\version.jsp
    Error(25,34): identifier Version not found
    which relates to this part of the jsp file in question:
    <HTML>
    <head>
    <title>JHeadstart Version Information
    </title>
    </head>
    <body>
    <H1>JHeadstart Version Information</H1>
    JHeadstart Runtime Version: <B><%= oracle.jheadstart.Version.VERSION %></B>
    </body>
    </html>
    and the following error in the model project after I have generated the application:
    C:\myfilepath\Model\src\test\jhs\model\common\AppModule.java
    Error(5,8): JhsApplicationModule not found
    which relates to this java file
    package test.jhs.model.common;
    import oracle.jbo.ApplicationModule;
    import oracle.jheadstart.model.adfbc.v2.JhsApplicationModule;
    // --- File generated by Oracle ADF Business Components Design Time.
    public interface AppModule extends ApplicationModule, JhsApplicationModule {
    Help.
    (sorry, not sure why this message is ignoring my formatting - makes it a bit hard to read)

    Sean,
    I just found out the same difference! Something must have gone wrong during the final production build. We have created a new build 10.1.3.1.26 with the correct jar file name, which can now be downloaded from cso.oracle.com.
    I apologize for the inconvenience. Anybody that already downloaded 10.1.3.1 build 25, please download build 26, which is the new "official" 10.1.3.1 build number.
    Steven Davelaar,
    JHeadstart Team.

  • An XJC compilation error - Could not load class (..) for type cvsversion

    I've got a strange compilation error using NetBeans 4.0 (I'd guess the version does not matter here) and Ant 1.6.2. When the following task is executed,
    <target name="compile_ofx_schema">
    <antcall target="clean-ofx"/>
    <delete dir="${ofx-jaxb-src.dir}"/>
    <mkdir dir="${ofx-jaxb-src.dir}" />
    <xjc schema="${schema.dir}/ofx102.xsd" package="com.xxx.ofx102" target="${ofx-jaxb-src.dir}">
    <arg value="-nv" />
    <arg value="-extension" />
    </xjc>
    </target>
    I get the error from NetBeans console,
    Class org.xml.sax.SAXException loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    D:\appserver\build.xml:797: unable to parse the schema. Error messages should have been provided
    at com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:334)
    at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:283)
    at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:227)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:217)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
    BUILD FAILED (total time: 4 seconds)
    Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
    Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
    And when I run the Ant task from the command line, I don't get the error at all.
    Any help is greatly appreciated.

    That was a great finding from you. Thank you.
    I followed your alternative approach and updated the ant.jar file. The "Could not load class..." error went away but the stack trace still remains. Now I am clueless again since I have ant on the debug mode and can't find any more useful info.
    Class com.sun.tools.xjc.reader.internalizer.LocatorTable loaded from ant loader (parentFirst)
    Class java.util.HashSet loaded from parent loader (parentFirst)
    Class javax.xml.parsers.DocumentBuilderFactory loaded from parent loader (parentFirst)
    Couldn't load Resource org/netbeans/core/xml/DOMFactoryImpl.class
    Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.DocumentBuilderFactory
    Class org.apache.crimson.jaxp.DocumentBuilderFactoryImpl loaded from parent loader (parentFirst)
    Class javax.xml.parsers.SAXParserFactory loaded from parent loader (parentFirst)
    Couldn't load Resource org/netbeans/core/xml/SAXFactoryImpl.class
    Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory
    Class org.apache.crimson.jaxp.SAXParserFactoryImpl loaded from parent loader (parentFirst)
    Class javax.xml.parsers.DocumentBuilder loaded from parent loader (parentFirst)
    Class java.util.Map loaded from parent loader (parentFirst)
    Class javax.xml.parsers.SAXParser loaded from parent loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic$ReferenceFinder.class
    Finding class com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.class
    Class org.xml.sax.helpers.XMLFilterImpl loaded from parent loader (parentFirst)
    Class com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl loaded from ant loader (parentFirst)
    Class com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder loaded from ant loader (parentFirst)
    Class org.xml.sax.XMLFilter loaded from parent loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.internalizer.VersionChecker
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/VersionChecker.class
    Class com.sun.tools.xjc.reader.internalizer.VersionChecker loaded from ant loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.internalizer.DOMBuilder
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/DOMBuilder.class
    Finding class com.sun.xml.bind.marshaller.SAX2DOMEx
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-impl.jar com/sun/xml/bind/marshaller/SAX2DOMEx.class
    Class org.xml.sax.ContentHandler loaded from parent loader (parentFirst)
    Class com.sun.xml.bind.marshaller.SAX2DOMEx loaded from ant loader (parentFirst)
    Class com.sun.tools.xjc.reader.internalizer.DOMBuilder loaded from ant loader (parentFirst)
    Class java.util.Stack loaded from parent loader (parentFirst)
    Class org.w3c.dom.Document loaded from parent loader (parentFirst)
    Class org.xml.sax.XMLReader loaded from parent loader (parentFirst)
    Class org.w3c.dom.Node loaded from parent loader (parentFirst)
    Class org.w3c.dom.Element loaded from parent loader (parentFirst)
    Class javax.xml.parsers.ParserConfigurationException loaded from parent loader (parentFirst)
    Class org.xml.sax.SAXException loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    D:\bbw\build\Common_3.6\Packaged\appserver\build.xml:799: unable to parse the schema. Error messages should have been provided
    at com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:334)
    at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:283)
    at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:227)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:217)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
    BUILD FAILED (total time: 1 second)
    Any suggestions? BTW, I did not upgrade NetBeans to v5.5 due that my code is still JDK1.4 based.

  • Errors using aCC 3.31--- Unexpected 'std'

    [Compilation Errors using aCC 3.31/HP-UX 11.0 --
                           Unexpected 'std']
    Hi,
    I get the following errors when I try to include 'occi.h' in my programs while working with the OCCI classes for Oracle9i database connectivity. Please let me know if I'm missing anything or perhaps do anything different to get rid of this problem.
    Thanks for your time.
    Chandra M.
    =========================================================
    Error 19:
    "/nfs/scec/disks/imo043/oracle/92/product/9.2.0/rdbms/demo/occiCommon.h",
    line 339 # Unexpected 'std'.
    void getVector( const AnyData &any, OCCI_STD_NAMESPACE::vector&lt;OCCI_STD_N
    ^^^^^^^^^^^^^^^^^^
    Error 19:
    "/nfs/scec/disks/imo043/oracle/92/product/9.2.0/rdbms/demo/occiCommon.h",
    line 339 # Unexpected 'std'.
    void getVector( const AnyData &any, OCCI_STD_NAMESPACE::vector&lt;OCCI_STD_NAMESPACE::
    ^^^^^^^^^^^^^^^^^^
    =========================================================

    Yeah, I did use that but it did give me problems when using aCC 3.31. But later on when I used aCC 3.34, it barely compiled with a bunch of Future errors and Warnings. BTW. do you have any specific version of aCC that has to be used with occi.h. Please let me know.
    And specifically, when I had to use Rogue Wave Libraries in the program code.
    Thanks a lot
    Chandra M.

  • JSP Compilation Error when using OC4J out of the box

    Hello.
    After installing Java jdk 1.5.0_05, setting ORACLE_HOME, setting JAVA_HOME, rebooting, and installing OC4J standalone straight out of the box, I have deployed a simple web project that consists of just one JSP. I receive the following error message:
    NOTIFICATION J2EE JSP-0008 Unable to dispatch jsp Page: oracle.jsp.provider.JspCompilationException: Errors compiling: C:\LocalApps\OC4J\j2ee\home\application-deployments\oc4j_jsp\persistence\_pages\\_Test.java<pre></pre>
    I have deployed a number of Flex2 applications without incident. What am I missing here? Another odd thing is that my organization has OAS running and it can render JSPs fine.
    Any help is appreciated thanks,
    Mike
    P.S. I have gone back and set the JSP debug switches, but they do not yeild much more info. Here is the stacktrace:
    NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\LocalApps\OC4J\j2ee\home\application-deployments\oc4j_jsp\oc4j_jsp\persistence\_pages\\_Test.java</H3><pre></pre>
         at oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456)
         at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Unknown Source)

    I had the very same Problem, and I spent a lot of time on it.
    When installing Oc4j as a service using Javaservice opnesource, I had no problem, even using J.D.K 1.6:
    %JSEXE% -install %JSNAME% %JVMDIR%\jvm.dll -XX:PermSize=128m -XX:MaxPermSize=256m -Xmx1024M -Xms1024M -Djava.class.path=%OC4J_HOME%\oc4j.jar -start oracle.oc4j.loader.boot.BootStrap -params -config %OC4J_HOME%\config\server.xml -out %OC4J_HOME%\log\OC4J_service_stdout.log -err %OC4J_HOME%\log\OC4J_service_stderr.log -current %JSBINDIR% -auto -description OC4JService
    Then I wanted to install it using "ServiceMill" or "Javaservice Wrapper", becuase it has a better control on the process and I had that awfull compilation error.
    I guess it is because ServiceMills uses java.exe and javaservice the .dll to launch the oc4j, no idea.
    Anyway, thank you very much!!!!!
    Antonio

  • Compiler error when useing switch statements in an inner class

    I have defined several constants in a class and want to use this constans also in an inner class.
    All the constants are defined as private static final int.
    All works fine except when useing the switch statement in the inner class. I get the compiler error ""constant expression required". If I change the definition from private static final to protected static final it works, but why?
    What's the difference?
    Look at an example:
    public class Switchtest
       private static final int AA = 0;     
       protected static final int BB = 1;     
       private static int i = 0;
       public Switchtest()
          i = 0; // <- OK
          switch(i)
             case AA: break; //<- OK, funny no problem
             case BB: break; //<- OK
             default: break;
      private class InnerClass
          public InnerClass()
             i = 0; // <- OK: is accessible
             if (AA == i) // <- OK: AA is seen by the inner class; i  is also accessible
                i = AA + 1;
             switch(i)
                case AA: break; // <- STRANGE?! Fail: Constant expression required
                case BB: break; // <- OK
                default: break;
    }Thank's a lot for an explanation.

    Just a though:
    Maybe some subclass of Switchtest could decalare its own variable AA that is not final, but it can not declare its own BB because it is visible from the superclass. Therefore the compiler can not know for sure that AA is final.

Maybe you are looking for

  • HAL won't start (false alarm)

    I recently installed Arch on a new computer.  The install went without a hitch, but once I rebooted into KDE4.1 HAL wouldn't work preventing me from mounting my CD/DVD drives. When I boot, it says D-Bus and HAL start OK, but once I get into KDE there

  • IPhone & Bluetooth Car Kit

    I have connected my Bluetooth to my car radio system via Bluetooth, and whilst the connection works fine, when I make a telephone call, whilst I can hear the other party, they cannot hear me. With other mobile 'phones connected in the smae care via B

  • Force Quitting active Application

    When holding down Shift & clicking the Apple menu whilst having an Application active, "Force Quit..." becomes "Force Quit xxx" whereby xxx is the current Application. I'm having trouble using the keyboard shortcut for this command, Option + Shift +

  • 3 Terabytes of data?

    I'm working with a small firm to put together a 3 TB system.  Any recommendations? I've been thinking about getting server case that can hold as many drives as possible (they don't have to be hot swappable).  Any suggestions for a good case that is c

  • Sensor chooses where to push, what to do?

    sensor chooses where to push, allocates tex copies on my touch responds through time, I think caught the virus, what to do?