Having an issue with a particular compiled class on Appian version 22.4.0

I am working on consolidating multiple plugins that used Appian versions 22.4.0 and 20.4.0.
My consolidated plugins is being developed on Appian version 22.4.0.

However, I am getting the following error:

NamedTypedValue.class cannot access com.appiancorp.core.expr.portable.PortableNamedTypedValue 

How would you solve such problem ?

Thanks,

-Bek

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Hi David,

    Thanks for the reply.
    I didn't think that would solve my problem since it is able to locate the jar from my .m2 forlder.

    This is the class that is not able to access another compiled class which it imports:

    import com.appiancorp.core.expr.portable.PortableNamedTypedValue;
    import com.appiancorp.type.NamedType;
    import com.google.common.annotations.GwtCompatible;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.List;
    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
    import javax.xml.namespace.QName;
    import org.apache.commons.lang.builder.EqualsBuilder;
    import org.apache.commons.lang.builder.HashCodeBuilder;
    import org.apache.commons.lang.builder.ToStringBuilder;

    @XmlJavaTypeAdapter(NamedTypedValueJaxbAdapter.class)
    @GwtCompatible
    public class NamedTypedValue extends TypedValue implements NamedType, PortableNamedTypedValue {
    The 
    import com.appiancorp.core.expr.portable.PortableNamedTypedValu is not contained in the appian plugin jar (v 22.4) that I am using.
    In addition to the NamedTypedValue.class, I have another class which is also not able to access a number of imported classes and hence throws "cannot access... " error.
    To verify if the classes are indeed missing i run " jar tf .\appian-22.4.0.jar | Select-String ".class" " command on the jar to list all the classes in the jar. I don't see the classes that are reported in the "cannot access..." error. 

    Does this mean Appain forgot to include those classes in the jar ?


    Since version 22.4 jar is not available for download from the Appian site, how can I get an updated and latest of appian skd on version 22.4 ?

    At this time we are not looking to upgrade to the latest version.
  • 0
    Certified Lead Developer
    in reply to Bek

    Could you be missing some dependency in your POM file?

    And could you get the SDK (which is included in the installation) and use it as a reference rather than using the dependency (which only encapsulates the call to the SDK)?

  • The imported classes referenced in a compiled class coming from the jar should also be in that same jar.
    The example I shared is the NamedTypedValue.class which I am able to find in the appian jar ver 22.4. But one of the classes referenced by the NamedTypedValue.class (com.appiancorp.core.expr.portable.PortableNamedTypedValue) is missing in the same jar.

  • 0
    Certified Lead Developer
    in reply to Bek

    That's because in java, you can reference in your class classes located in another library- Probably the class PortableNamedTypedvalue is located in another jar.

    That's why you add dependencies in your pom project, or the classpath if you are using a non maven project

  • Got it. I think you are correct.
    I am reading that the com.appiancorp.core.expr.portable.PortableNamedTypedValue is not publicly available since it is an internal class. Any idea what dependency/jar I can find it at ?