Enum type is retrieving me a null reference

Hi, i have a very strange bug in my code that is messing me up.
I defined two enum types in separated files like this:
public enum Section {
     SectionA, SectionN;
public enum Subsection {
    SubA(1, SectionA), SubN(2, SectionN);
    private Section sec;
    private int num;
    Subsection (int num, Section sec) {
        this.num = num;
        this.sec = sec;    // Here is the problem
}Well, the problem is that in the line with the comment I'm recieving a null reference and I think that is not possible. Is that a compiler bug?

I'm no getting any error message, let me show you my code:
The problematic enum type.
public enum Subseccion {
    ALUMNOS_ALTA(1, AltaAlumnos.class, "Alta", Privilegio.ALTA_ALUMNOS, Seccion.ALUMNOS),
    ALUMNOS_BUSCAR(2, BuscarAlumno.class, "Buscar", Privilegio.BUSCAR_ALUMNOS, Seccion.ALUMNOS),
    ALUMNOS_EDITAR(3, EditarAlumno.class, "Editar", Privilegio.EDITAR_ALUMNOS, Seccion.ALUMNOS),
    PERSONAL_ALTA(1, AltaPersonal.class, "Alta", Privilegio.ALTA_PROFESORES, Seccion.PERSONAL),
    PERSONAL_BUSCAR(2, BuscarPersonal.class, "Buscar", Privilegio.PERSONAL_BUSCAR, Seccion.PERSONAL),
    PERSONAL_EDITAR(3, EditarPersonal.class, "Editar", Privilegio.PERSONAL_EDITAR, Seccion.PERSONAL),
    MATERIAS(1, Materias.class, "Materias", Privilegio.ASIGNATURAS, Seccion.CURSOS),
    CURSOS(2, Cursos.class, "Cursos", Privilegio.CURSOS, Seccion.CURSOS),
    GRUPOS(3, Grupos.class, "Grupos", Privilegio.GRUPOS, Seccion.CURSOS),
    ASIGNAR_GRUPOS(4, AlumnosSalones.class, "Asignar Grupos", Privilegio.ASIGNAR_GRUPOS, Seccion.CURSOS);
    private final Class<? extends JPanel> panel;
    private final String texto;
    private final Seccion pa;  // La secci�n a la que pertenece
    private final Privilegio priv;   
    private final int importancia;
    Subseccion(int importa, Class<? extends JPanel> panel, String texto, Privilegio priv, Seccion fad) {
        this.panel = panel;
        this.texto = texto;
        if (fad == null)
            System.err.println("A NULL REFERENCE");   // Always happen
        pa = fad;
        this.priv = priv;
        this.importancia = importa;
    public int getImportancia() {
        return importancia;
     * Regresa el Panel construido que corresponde a la secci�n.
     * @param d El Objeto de base de datos que se usar� para crear el Panel.
     * @param ven El Objeto de ventana que se usar� para crear el Panel.
    public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
        throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                java.lang.reflect.InvocationTargetException {
        // Construyo el panel si es que hay uno asociado
        Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
        JPanel panel = cons.newInstance(d, ven);
        return panel;
     * Devuelve el privilegio asociado a esta secci�n.
    public Privilegio getPrivilegio() {
        return priv;
     * Pone el "bot�n" en RollOver.
     * @param btn El "bot�n"
    public void setEstadoRollOver(JPanel btn) {
     * Pone el "bot�n" en estado presionado.
     * @param btn El "bot�n"
    public void setEstadoPresionado(JPanel btn) {
     * Devuelve la secci�n a la que pertenece.
    public Seccion getSec() {
        return pa;
     * Pone el "bot�n" en estado normal.
     * @param btn El "bot�n"
    public void setEstadoNormal(JPanel btn) {
The enum type that is getting null.
public enum Seccion {
    ALUMNOS(null, "/alumno", "Alumnos",
            new Subseccion[] {Subseccion.ALUMNOS_BUSCAR, Subseccion.ALUMNOS_ALTA, Subseccion.ALUMNOS_EDITAR},
            null),
    PERSONAL(null, "/profesor", "Personal",
             new Subseccion[] {Subseccion.PERSONAL_BUSCAR, Subseccion.PERSONAL_ALTA, Subseccion.PERSONAL_EDITAR},
             null),
    CURSOS(null, "/cursos", "Cursos",
           new Subseccion[] {Subseccion.CURSOS, Subseccion.GRUPOS, Subseccion.MATERIAS, Subseccion.ASIGNAR_GRUPOS},
           null),
    CURSOS_CALIFICAR(CalificarCursos.class, "/default", "Calificar Cursos", null, Privilegio.CALIFICAR_CURSOS),
    ASISTENCIA(Asistencia.class, "/default", "Asistencia", null, Privilegio.ASISTENCIA);
    private final Class<? extends JPanel> panel;
    private final String prefijoImagen;
    private final Subseccion[] subs;  // Las subseciones de esta secci�n
    private final String etiqueta;  // El texto que va a llevar el icono
    private final Privilegio priv;
    Seccion (Class<? extends JPanel> panel, String prefijoImagen, String etiqueta, Subseccion[] subs, Privilegio priv) {
        this.panel = panel;
        this.prefijoImagen = prefijoImagen;
        this.subs = subs;
        this.etiqueta = etiqueta;
        this.priv = priv;
     * Regresa el Panel construido que corresponde a la secci�n.
     * @param d El Objeto de base de datos que se usar� para crear el Panel.
     * @param ven El Objeto de ventana que se usar� para crear el Panel.
     * @return <code>null</code> Si no tiene un panel asociado.
    public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
        throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                java.lang.reflect.InvocationTargetException {
        if (panel != null) {
            // Construyo el panel si es que hay uno asociado
            Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
            JPanel panel = cons.newInstance(d, ven);
            return panel;
        return null;
     * Devuelve el privilegio asociado a esta secci�n.
     * @return <code>null</code> Si no existe un privilegio asociado.
    public Privilegio getPrivilegio() {
        return priv;
     * Pone el icono de estado RollOver.
     * @param etiq El JLabel asociado a esta secci�n
    public void setIconoRollOver(JLabel etiq) {
        etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnOver.jpg") ) );
     * Pone el icono de estado Presionado.
     * @param etiq El JLabel asociado a esta secci�n
    public void setIconoPresionado(JLabel etiq) {
        etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "Btn.jpg") ) );
     * Pone el icono de estado Normal.
     * @param etiq El JLabel asociado a esta secci�n
    public void setIconoNormal(JLabel etiq) {
        etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnBco.jpg") ) );           
     * Obtiene un arreglo con las subsecciones disponibles, en primer lugar la que
     * se deber�a mostrar por defecto.
     * @return <code>null</code> Si no tiene subsecciones asociadas.
    public Subseccion[] getSubsecciones() {
        return subs;
     * Le pone el texto a la etiqueta que muestra el icono de la secci�n.
    public void setTextoIcono(JLabel etiq) {
        etiq.setText(etiqueta);
}And if you do
Subseccion.ALUMNOS_ALTA;The message "NULL REFERENCE" is printed.

Similar Messages

  • Enum type as generic

    In the following, what should X be so that E is recognized as an enum type?
    class A<E extends X> {
        . . . E.values() . . .
    }It seems that X of Enum<E> should work, but no joy. I thought that enum types were subclasses of java.lang.Enum, but apparently not fully.

    Enum<E> does not have a method values(). The compiler generates this method for every enum, but it is not declared in Enum.
    It can't be declared in Enum because it is static, and in Enum it would also be abstract (it is not implemented there), but static and abstract are incompatible modifiers.
    Even though we know it will always work, the language has no way to specify that every Enum<E> has that method, and so you can't call it on a type variable.
    As a solution (if you really need this to work), put a Class<E> argument in the constructor, save the Class<E> reference, use reflection on the reference to get values().class A<E extends Enum<E>> {
        Class<E> type;
        A(Class<E> type) { this.type = type; }
        void yourMethod() {
            E[] values=type.getMethod("values").invoke(null);
    }You'll need to deal with a few exceptions but they shouldn't in practice get thrown.
    Bruce

  • SGEN: error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Hi,
    I appollogize if this post is off topic. I have problem wiht publish WebApp MVC.
    I have website (MVC) with one Web reference. Build and run in VS working. But when I tried to publish to disk I get error:
    SGEN: error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    I have VS2013 Profesional with all updates and Windows 8.1.
    If I remove web reference then publishing working. Where can be a problem? Thanks.

    @Marek Bober,
    Thanks for sharing the solution back to here.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why are static methods called with null references,valid ?

    This is my code :
    package inheritance;
    public class inh6{
         public static void method(){
         System.out.println("Called");
         public static void main(String[] args){
              inh6 t4 = null;
         t4.method();
    O/P :
    CalledHere t4 is a null reference and yet we are able to call a method on it,why is null pointerexception not thrown.Why are we able to call static methods using null references ?
    t4 is null means it doesnot refer to any memeory address,hence how is method() called correctly.
    I hope i am clear. :)
    Thank you for your consideration.

    punter wrote:
    jverd wrote:
    Memory addresses have nothing to do with it. I doubt memory addresses are even mentioned once in the JLS.
    By memory address i mean the memory location the reference is pointing to.I know what you mean. But if you think it's relevant, can you show me where in the JLS it says anything about memory locations?
    >
    You can do that because a) t4's type is "reference to inh6" and b) method() is declared static, which means that you don't need an object to call it, just the class. That class comes from the compile time type of t4. The fact that t4 is null at runtime is irrelevant.
    So at compile time the type of t4 is inh6 and hence the method is called.Is it ? Had method() not been static a NullPointerException would have been thrown.Correct.
    With non-static, non-private, non-final methods, which implementation of the method gets called is determined at runtime, buy the class of the object on which it's being called. If any one of those "non"s goes away, then the method is entirely determined at compile time, and in the case of static methods, there's no instance necessary to call the method in the first place.

  • Reflection and enum types: help needed

    Hello, I just released a new version of my OpenSource project (http://sourceforge.net/projects/jdbcmanager).
    The application needs JRE 1.5 just only for printing tables (JTable.getPrintable(...) method).
    I have had a lot of complains from users due to requiring 1.5
    So I'm trying to make it compatible with 1.4.2 and also provide JTable printing functionality to 1.5 users.
    I can check if JRE in use is 1.5 and then invoke getPrintable(...) method via reflection, but I do not find a way to pass its first argument (an enum) via reflection, because in 1.4.x enum type does not exist, and without solving this the compiler reports a compilation error.
    Here is the code I'm using:String sJavaVer = System.getProperty( "java.version" );
           if( sJavaVer.charAt( 0 ) == '1' && sJavaVer.charAt( 2 ) < '5' )
               MessageFormat mfHeader = new MessageFormat( sHeader );
               MessageFormat mfFooter = new MessageFormat( sFooter );
               Printable     p        = getPrintable( PrintMode.FIT_WIDTH, mfHeader, mfFooter );
               PrintShop     ps       = new PrintShop( p );
               if( bPreview )
                   ps.showPreview( "Preview: "+ sHeader, getPreferredScrollableViewportSize() );
               else
                   ps.print( bPageDialog );
           else
               App.showMessage( "Warning", "You need JRE 1.5.0 or above to be able to print tables." );
           }Obviously this can't compile under 1.4.x
    Every suggestion is more than welcome.

    I haven't worked with 1.5 enums, but my best guess is that you'd have to get instances of the enums via reflection as well.
    As an incidental suggestion: rather than doing a text search on the "java.version" property, you should simply try to retrieve the "getPrintable" method via reflection. The "if" condition then checks to see if you got anything back.

  • Dereferencing of the NULL reference

    Hi,
    I have created an a form view with a value node "ZINVOICE" , i have written few lines of code to set the collection,
    create object lr_col
        type
          cl_crm_bol_bo_col.
       create data lr_tabline.
       ls_favs-PROCESS = 'mahe'.
       ls_favs-SERTYPE = 'SRVR'.
       create object lr_valuenode
          exporting
            iv_data_ref = lr_tabline.
      lr_valuenode->set_properties( ls_favs ).
      lr_col->add( lr_valuenode ).
    set collection
      me->zinvoice->set_collection( lr_col ).
    After this the node "ZINVOICE" has the collection ref and entity list shows the entity as well,
    But still wen i try to test the view it gives errors saying
    Cannot display view ZCNODE_INST/ZWASL of UI Component ZCNODE_INST
    An exception has occurred Exception Class  CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference 
    BSP Application:  ZCNODE_INST 
    View Layout:  ZWASL.htm 
    Method:  CL_O2D8A1MNCT9O5WAN3TF3CDQNNQY=>_ONLAYOUT 
    Source Text Row:  42
    can somebody help me with this,

    Hi Mannif,
    I am not including this view in any component as an AB, when i include in any other standard component it does work fine. The problem is when i try to run it as a stand alone component. I am trying to set the collection of the contect node. I tried the same for a model node with bol entity "BuilHeader". I set the collection using "CL_CRM_bol_query_services", and it worked fine.
    try.
    query ?= cl_crm_bol_dquery_service=>get_instance( iv_query_name = 'BuilHeaderAdvancedSearch' ).
    catch cx_sy_no_handler.
    endtry.
    CALL METHOD QUERY->add_selection_param
    EXPORTING
    iv_attr_name = 'PARTNER'
    iv_sign = 'I'
    iv_option = 'EQ'
    iv_low = '*'.
    *get query result*
    col = QUERY->get_query_result( ).
    CALL METHOD me->BP->SET_COLLECTION
      EXPORTING
        COLLECTION                    = col
    By the same logic is not working for a value node.

  • Access via NULL reference object not possible

    Hi friends,
      I have created an wda application which uses the table popin to display data.
      So that i have created a view with two of the  fields as link to action UI element.
      In the Events/Actions of the link to action element i implemented the following logic.
      data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
      data wd_popin             type ref to cl_wd_table_popin.
      data id type string.
    <b> wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
      wd_table_column ?= wd_table_cell_editor->get__parent( ).
      wd_popin = wd_table_column->get_popin( ).
      context_element->set_attribute( name = 'SELECTED_POPIN' value =
    wd_popin->id ).
    So when i click on the link to action in the table column of the field am getting the following error
    <b>Access via NULL reference object not possible.</b>
    While debugging i have noticed that this error was coming at the below step of the code.
    <b>wd_table_cell_editor ?= wd_this->m_view->get_element( id )</b>
    in the m_view->get_element( id ) does not contan any value , its showing as table , as null value cannnot be assigned may be its throwing the above error.
    But i didnt understand why the view is not getting UI element id ....
    Can one please suggest me where might be the wrong....
    Regards
    Sireesha.

    Hi nithya,
      Could you please calrify the doubts for the following q's.
    1. As u said in the above post, i have changed the code to the below.
         data: lr_table type ref to cl_wd_table,
    lr_table_col type ref to cl_wd_table_column.
    lr_table ?= wd_this->m_view->get_element( 'TABLE' ).
    lr_table_col = lr_table->get_column( ID = 'TABLE_CONNECTID' ).
      <b>wd_popin = lr_table_col->get_popin( ).</b>
    (At the above step which is in bold , eventhough there is value in lr_table_col->get_popin , its not assigning a value to the wd_popin, throwing same error NULL etc.,)
      context_element->set_attribute( name = 'SELECTED_POPIN' value =
    wd_popin->id ).
    2. Before changing the code suggested by u, the follwoing was the code from standard example.Its working fine in the application wdr_test_table.I have debugged the code.The value is getting assigned into wd_table_cell_editor.
    The same thing i have done but its failing to assign the value. thats y its throwing null reference error. Here i have a confusion how its assigning a value and y not in the z application.am giving the code below which is in standard and my application.Please clarify these.
    data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
      data wd_popin             type ref to cl_wd_table_popin.
      <b>wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
    ( Note :  wd_this->m_view->get_element contains value but not assigning it to the wd_table_cell_editor and same code in the standard behaving correctly like assigning the view value to the cell editor. Y this behavior, please advice me)
      wd_table_column ?= wd_table_cell_editor->get__parent( ).
      wd_popin = wd_table_column->get_popin( ).
      context_element->set_attribute( name = 'SELECTED_POPIN' value = wd_popin->id )
    Regards
    Sireesha.

  • Null reference method call behaving oddly

    Hi all, and a very happy new year!!
    My question concerns the null reference; simply, why does the following code chooses to call any other method than the Object version (try it out). No matter what type i choose to replace the current String version with... I have not paid much thought to this, but i would have guessed the null reference calls the Object version in such a situation.
    If i leave only the Object method and comment out all others, the code compiles fine and calls the Object version at runtime - but in case there are sub class versions, those will be called. WHY?
    (im running jre 1.4.1).
    The code:
    public class NullTest {
         public void method(Object o) {
              System.out.println("Object Version");
         public void method(String s) {
              System.out.println("String Version");
         public static void main(String args[]) {
    NullTest nullTest = new NullTest();
              nullTest.method(null);
    }

    schapel, the question related specifically to
    null, in a context where no runtime type can be
    inferred. It wasn't about overloading in general.Yes, I understand that. But here is the rule from the JLS:
    "If more than one method declaration is both accessible and applicable to a method invocation, it is necessary to choose one to provide the descriptor for the run-time method dispatch. The Java programming language uses the rule that the most specific method is chosen."
    Note that it does not refer specifically to a null argument.
    The question is "why is the most specific method called?" The reason is that there are only a few possibilities for this rule:
    1. The least specific method should be called. In this case, overloaded methods with more specific types could not be called.
    2. If there is more than one method, it is a compile time error. Again, this would cause overloading to be useless.
    3. The most specific method is called. It is only with this rule that overloading works. That's why Java uses this rule.

  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Hi there,
    I use visual studio community 2013 to develop app for office. When I create app project using template and directly run it, it shows me this error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Can anyone help? Thanks in advance.

    Hi holm0104,
    Did you add custom code into the project? Can you reproduce the issue in a new project without custom code?
    If not, did you have issue when you create a normal web application?
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information" while attempting to open UNIX/Linux monitor

    We have upgraded our System Center to 2012 R2, and we cannot open any of the UNIX/Linux LogFile monitor property or the UNIX/Linux process monitor property for those monitors created prior to the upgrade.  Error we get is below.  Any assitance
    appreciated.
    Date: 9/30/2014 10:01:46 PM
    Application: Operations Manager
    Application Version: 7.1.10226.0
    Severity: Error
    Message:
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.TypeContainer.get_ContainedType()
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.AddTemplatePages(LaunchTemplateUIData launchData, Form form)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.Initialize(Object launchData, Form form)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.RunPrivate(Object[] userData)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.Run(Object[] userData)

    It's possible the upgrade did not update everything properly as it looks like a dll mismatch or a missing file. I'd open a support ticket with MS and have a support engineer look at the upgrade logs. What version of SCOM did you upgrade from?
    Regards,
    -Steve

  • [svn:bz-trunk] 11030: Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null .

    Revision: 11030
    Author:   [email protected]
    Date:     2009-10-20 11:35:02 -0700 (Tue, 20 Oct 2009)
    Log Message:
    Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null. It appears that there is some logic in the LC remoting code that relies on a non-null class name to always exist. This change reverts to the old behavior of not allowing empty string as a value for the ASObject.namedType.
    This should fix bug 2448442 and its duplicates caused by the recent serialization changes.
    I don't think this is the perfect fix. Pending further investigation, a better fix would be either:
    a. If it's OK to assume that empty string should always mean null for the type of the ASObject, the code that enforces it should be in the setter/getter inside ASObject and not in the deserializer.
    b. ASObject doesn't guarantee that a named type exists or is valid. In that sense an empty string is as bad as some random characters that cannot be a valid class name in java, so depending on how disruptive it may be, the fix should be in any logic that uses ASObject.getType().
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/io/amf/AbstractAmfInput.java

    Hi Pavan,
    "In your payload there is no namespace prefix for the elements under PayloadHeader element."
    Yes, you are right - but this message is standard AQ Adapter Header message - it's not defined by me. I just used message which was automatically added to my project when I have defined AQ Adapter.
    "In your process is the default namespace is same as namespace value of tns ??"
    Do you mean targetNamespace? If yes it's different as it points to process "targetNamespace="http://xmlns.oracle.com/PF_SOA_jws/PF_APPS/APPS_PROCESS" (names of application and process have changed as I try different ways to do that)
    ns1 is: xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/aq/PF_SOA/PF_APPS/PO_AQ"
    "another thing is tns and ns1 should have same values.."
    When I create a variable of header type, namespace ns1 is automatically created for it. I set it as property of receive activity. When process is instantiated on the serwer I get the error in which you can see that namespace is tns.
    Maybe I'm doing something wrong but I don't see how I could fix this in my process.
    You can see that the message I get on the server has nothing in common with the application/project/process names. Is it possible to define such variable?
    Regards
    Pawel
    PS:
    In Transformation xsl file, both variables (source and target) has tns namespace for Header and PayloadHeader, and no namespace for subfields.
    Edited by: pawel.fidelus on 2010-01-05 02:37

  • Dereferencing the NULL reference while saving a Survey

    While saving a survey first time, I am getting an error message "Dereferencing the NULL reference".
    More details as follows:
    Exception: Class CX_SY_REF_IS_INITIAL
    Program: CL_SVY_H_SVYDETAIL_IMPL=======CP
    Include: CL_SVY_H_SVYDETAIL_IMPL=======CM001
    ABAP Class: CL_SVY_H_SVYDETAIL_IMPL
    Method: DO_PREPARE_OUTPUT
    Line: 26 
    Long text: An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    I opened the Survey creation page in crm ui, and filled in the ID, Application as Marketing and  selected CSS Style Sheet as CRM_SVY_OPP_WINLOSS.CSS
    I am very new to CRM module.
    Regards,
    Harsh

    Are you using internal CATT Server? If yes then you might need to turn on the CATT server again, see below:
    JTS based internal CATServer:
    Execute method SET_CATSERVER_JTS of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    ABAP based internal CATServer:
    Execute method SET_CATSERVER_ABAP of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    Cherrs,
    Ankur

  • Dynamic type conflict during the assignment of references. - Error while generating proxy in the backend

    Hi All,
    I get a short dump while generating a proxy in the backend.I give the package and the prefix and end up with a short dump.
    Does any one know why this mught come up
    "Dynamic type conflict during the assignment of references."
    background: I imported a WSDl provided by legacy into PI and created service interfaces and then trying to generate a proxy class while i get this error.
    Thanks.

    Hi Shyamsundar,
    I will explain a problem that I usually see in some developments:
    XSD originally:                                  XSD transformed:
    Root                                                     -> Root
    Tag 1 type int                                    -> Tag 1 type int
    Tag2 type string                               -> Tag2 type string
    Tag3 type  any                                  - Tag3 type  string
    Normally the tag3 should have a XML inside. Then the ABAPers have to construct the tag3 with  a CDATA structure (CDATA is used to put in an XML tag more XML tags inside like a text and no to be interpreted).
    Later in SAP PI you can extract the cdata with an XSL, you can find some examples in the SCN.
    I don’t like to convert the whole XML in only one string tag, because this makes difficult the develop for the ABAPers, although the work inside the PI is very easy because with an XSL you can extract the whole message easily. (You can find some examples in the SCN)
    Regards.

  • Problem with null reference

    Hey,
    I have a "Window" class wich extends JFrame and then creates a tabbedPane. In each of the tabs it's necessary to access to another class (Code).
    Each of the tabs follows something like this:
    public class Tab1 extends JPanel {
       private Code code;
       public Tab1 ( Code c ) {
          code = c;
    }When the tabs are created they receive the Code object.
    The Code object declared in the main class and passed into the "Window" class (still a null reference) and then to each of the tabs (null). The instantiation of the Code object is done in one of the tabs. The Other tabs need it to set some values.
    The problem is the tab that instantiates the Code object is doing so, however the other tabs don't get the new instance (it's always null). Although it's always the same reference.
    Any ideas?
    Thanks.

    It looks like setting the Code is something the Window object will
    have to help with.//in Window (assuming Tab is a superclass of Tab1 Tab2
    Tab[] tabArr = {new Tab1(null, this), new Tab2(null, this)};
    void setCode(Code c) {
        for(Tab tab :tabArr) tab.setCode(c);
    //then the Tabs look like
    public class Tab1 extends Tab { // or extends JPanel implements Tab
        private Code code;
        private Window wind
        public Tab1( Code c, Window w ) {
            code = c;
            wind = w;
        void setCode(Code c) {
            code = c;
        void someEventPerformed() {
            Code c = null;
                // figure out what flavour of Code the user wants
            switch ( userOption ) {
                case 0:
                    code = new Code1 ();
                    break;
                case 1:
                    code = new CodeY ();
                    break;
                // and have the Window tell all the Tabs to use it
            wind.setCode(c);
    }

  • Int to enum type loookup

    I am iterating in a while loop and using the index terminal to build an array of differnet values of the same enumerated type control that are from a strict type def enumerated control. What I want to do is to iterate and do a comparison and if the comparison holds, I want to build an array of the correlating enumerated types so that I can use this later on.
    I am using a Function that came with the state diagram toolkit called "int to enum" that the state diagram uses when calculating its next state info. It seems to bomb out when I attempt to wire my enum type control to its input.
    Any ideas?

    I have not used the state diagram toolkit but have extensively employed enums from typedefs. This is very convenient since for comparisons just compare it to a constant version of the typedefs. If you use a strict typedef remember that almost everything must be identical and this causes many problems. Since typedefs of enums rarely have to be strict I would think about why you chose a strict type def as opposed to a normal typedef. One additional added feature is that when wiring a enum typedef to a case structure you can populate the case with the enum named cases. I would speculate that your problems are due to the use of a strict typedef which is only necessary when you are concerned with more than just a typdef's structure and values (i.e aesthetic properties). Hope this helps (again I have not used the state diagram toolkit).
    -Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

Maybe you are looking for