Menu

JObject is not a member of JArray

Help
Avi
2009-01-07
2013-04-29
  • Avi

    Avi - 2009-01-07

    I keep getting the error below in VC++ 6. I passed my Java Peers through PeerGenerator & pushed that output through AutoProxy. Any help would be greatly appreciated. Thanks.

    --------------------Configuration: jt5 - Win32 Debug--------------------
    Compiling...
    EventConstant_peer.cpp
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2039: 'JObject' : is not a member of 'JArray<class jace::proxy::com::athena::client::constant::EventConstant>'
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >::jace::JFieldP
    roxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2039: 'JObject' : is not a member of 'JArray<class jace::proxy::com::athena::client::constant::EventConstant>'
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >::jace::JFieldP
    roxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2614: 'JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >' : illegal member initialization: 'JObject' is not a base or member
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >::jace::JFieldP
    roxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(122) : error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jclass *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >::jace::JFieldP
    roxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >(struct _jfieldID *,union jvalue,class _jclass *)'
    HelperMethods_peer.cpp
    d:\program files\microsoft visual studio\vc98\include\string(31) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
    QuoteEventConstant_peer.cpp
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2039: 'JObject' : is not a member of 'JArray<class jace::proxy::types::JInt>'
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >::jace::JFieldProxy<class jace::JArray<class jac
    e::proxy::types::JInt> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2039: 'JObject' : is not a member of 'JArray<class jace::proxy::types::JInt>'
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >::jace::JFieldProxy<class jace::JArray<class jac
    e::proxy::types::JInt> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2614: 'JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >' : illegal member initialization: 'JObject' is not a base or member
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >::jace::JFieldProxy<class jace::JArray<class jac
    e::proxy::types::JInt> >(struct _jfieldID *,union jvalue,class _jclass *)'
    d:\program files\jace\release\include\jace\jfieldproxy.h(122) : error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jclass *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
            d:\program files\jace\release\include\jace\jfieldproxy.h(117) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >::jace::JFieldProxy<class jace::JArray<class jac
    e::proxy::types::JInt> >(struct _jfieldID *,union jvalue,class _jclass *)'
    Error executing cl.exe.
    Creating browse info file...
    BSCMAKE: error BK1506 : cannot open file '.\Debug\jace\peer\com\athena\client\constant\HelperMethods_peer.sbr': No such file or directory
    Error executing bscmake.exe.

    jt5.dll - 10 error(s), 0 warning(s)

     
    • Gili Tzabari

      Gili Tzabari - 2009-01-08

      Hi Avi,

      Try this version and let me know if it fixes your problem: http://bbs.darktech.org/jace-snapshot.rar

      Thanks,
      Gili

       
      • Avi

        Avi - 2009-01-09

        Gili,

           Thanks for your help. That seemed to fix one problem but caused another. Here is the new error. Any suggestions?

        --------------------Configuration: jt6 - Win32 Debug--------------------
        Compiling...
        EventConstantMappings.cpp
        EventConstant_peer.cpp
        d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jclass *'
                Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
                d:\program files\jace\release\include\jace\jfieldproxy.h(113) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >::jace::JFieldP
        roxy<class jace::JArray<class jace::proxy::com::athena::client::constant::EventConstant> >(struct _jfieldID *,union jvalue,class _jclass *)'
        HelperMethodsMappings.cpp
        d:\program files\jace\release\include\jace\jfieldproxy.h(148) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
                d:\program files\jace\release\include\jace\jfieldproxy.h(148) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::proxy::com::athena::client::AGSConnector>::~jace::JFieldProxy<class jace::proxy::com::at
        hena::client::AGSConnector>(void)'
        HelperMethods_peer.cpp
        d:\program files\jace\release\include\jace\jenlister.h(80) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
                d:\program files\jace\release\include\jace\jenlister.h(78) : while compiling class-template member function 'void __thiscall jace::JEnlister<class jace::proxy::com::aegisoft::connection::nio::NIOSocketConnection>::throwInstance(union jvalue)
        '
        QuoteEventConstantMappings.cpp
        QuoteEventConstant_peer.cpp
        d:\program files\jace\release\include\jace\jfieldproxy.h(118) : error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jclass *'
                Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
                d:\program files\jace\release\include\jace\jfieldproxy.h(113) : while compiling class-template member function '__thiscall jace::JFieldProxy<class jace::JArray<class jace::proxy::types::JInt> >::jace::JFieldProxy<class jace::JArray<class jac
        e::proxy::types::JInt> >(struct _jfieldID *,union jvalue,class _jclass *)'
        Error executing cl.exe.

        jt6.dll - 4 error(s), 0 warning(s)

        Thanks again.

         
        • Gili Tzabari

          Gili Tzabari - 2009-01-09

          Just curious, any chance you could upgrade to a newer version of VC++, such as VC++ Express Edition which is free? I'd like to avoid having to support VC++ 6.0 if possible.

          Gili

           
          • Avi

            Avi - 2009-01-12

            Gili,

            I upgraded to VC++ Express Edition like you suggested. Now I'm getting a bunch of errors like these:

            1>AccountEntryPanel.cpp
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\athenaorder.h(177) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\symbol.h(159) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
            1>AdjustmentType.cpp
            1>AGSConnector.cpp
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\basketorder.h(225) : error C2504: 'jace::proxy::com::athena::client::data::Order' : base class undefined
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\symbol.h(159) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(188) : error C2039: 'AthenaOrder' : is not a member of 'jace::proxy::com::athena::client::data'
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(188) : error C2504: 'AthenaOrder' : base class undefined
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C2039: 'AthenaOrder' : is not a member of 'jace::proxy::com::athena::client::data'
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C2146: syntax error : missing ';' before identifier 'createEditOrder'
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : warning C4183: 'createEditOrder': missing return type; assumed to be a member function returning 'int'
            1>AGSConnector.SendThread.cpp

            Data.h & Data.cpp exist where they should be, so I'm not really sure why it can't find the base classes. Any suggestions? Thank you very much.

            -Avi

             
    • Avi

      Avi - 2009-01-12

      Gili,

         I upgraded to VC++ Express Edition like you suggested. Now I'm getting a bunch of errors like these:

      1>AccountEntryPanel.cpp
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\athenaorder.h(177) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\symbol.h(159) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
      1>AdjustmentType.cpp
      1>AGSConnector.cpp
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\basketorder.h(225) : error C2504: 'jace::proxy::com::athena::client::data::Order' : base class undefined
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\symbol.h(159) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(188) : error C2039: 'AthenaOrder' : is not a member of 'jace::proxy::com::athena::client::data'
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(188) : error C2504: 'AthenaOrder' : base class undefined
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C2039: 'AthenaOrder' : is not a member of 'jace::proxy::com::athena::client::data'
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C2146: syntax error : missing ';' before identifier 'createEditOrder'
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      1>d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\waveorder.h(688) : warning C4183: 'createEditOrder': missing return type; assumed to be a member function returning 'int'
      1>AGSConnector.SendThread.cpp

      Data.h & Data.cpp exist where they should be, so I'm not really sure why it can't find the base classes. Any suggestions? Thank you very much.

      -Avi

       
      • Gili Tzabari

        Gili Tzabari - 2009-01-12

        How are you generating the proxies? What command-line are you using?

        I am expecting athenaorder.h to contain #include "Data.h". Can you attach the contents of athenaorder.h?

         
        • Avi

          Avi - 2009-01-12

          The command I am using to create the proxies is:

          "%JACE_HOME%\bin\AutoProxy.cmd" oldH oldS header source "D:\products\jdk1.6.0\jre\lib/rt.jar;R:\atf\projects\athena\classes;R:\atf\projects\aegisoft\classes;R:\atf\projects\athena\lib/commons-logging.jar;R:\atf\projects\athena\lib/DBPool.jar;R:\atf\projects\ath
          ena\lib/mseries.jar"

          The original headers & sources are from PeerGenerator on a few specific Java classes.

          Here is the beginning of AthenaOrder.h

          #ifndef JACE_PROXY_COM_ATHENA_CLIENT_DATA_ATHENAORDER_H
          #define JACE_PROXY_COM_ATHENA_CLIENT_DATA_ATHENAORDER_H

          #ifndef JACE_OS_DEP_H
          #include "jace/os_dep.h"
          #endif

          #ifndef JACE_NAMESPACE_H
          #include "jace/namespace.h"
          #endif

          #ifndef JACE_JOBJECT_H
          #include "jace/proxy/JObject.h"
          #endif

          #ifndef JACE_JENLISTER_H
          #include "jace/JEnlister.h"
          #endif

          #ifndef JACE_JARRAY_H
          #include "jace/JArray.h"
          #endif

          #ifndef JACE_JFIELD_PROXY_H
          #include "jace/JFieldProxy.h"
          #endif

          /**
          * The super class for this class.
          *
          */
          #ifndef JACE_PROXY_COM_ATHENA_CLIENT_DATA_DATA_H
          #include "jace/proxy/com/athena/client/data/Data.h"
          #endif

          Thank you very much.

           
          • Gili Tzabari

            Gili Tzabari - 2009-01-12

            Two things:

            1) Try adding -mindep to the command-line, though it shouldn't make a difference.
            2) Can you paste me all the relevant information associated with the first compiler error?

            d:\jace\jacetest7\jt7\header\jace\proxy\com\athena\client\data\athenaorder.h(177) : error C2504: 'jace::proxy::com::athena::client::data::Data' : base class undefined

            I need to know where this is relative to #include "data.h", what line (the contents, not the number) triggers this error, whether class Data is really defined, etc.

            Thanks,
            Gili

             
            • Avi

              Avi - 2009-01-12

              I tried -mindep and you were correct, it didn't make a difference. Also, I e-mailed you the source of Data.h & AthenaOrder.h to "cowwoc at users.sourceforge.net". Thanks again for your help.

              -Avi

               

Log in to post a comment.