New ADL error

I have edited the party.orgranisation ADL to the following ( see attached) 

essential I added

<node name="showClinicianInHistoryItems" path="/details/showClinicianInHistoryItems" type="java.lang.Boolean"
              defaultValue="false()"/>
        <node name="showCustomerBalanceWindow" path="/details/showCustomerBalanceWindow" type="java.lang.Boolean" defaultValue ="true()"/>
        <node name="contacts" path="/contacts"
              type="java.util.HashSet" baseName="Contact" minCardinality="0" maxCardinality="*">

The archetypes loads through the loader ok but when you go into  the organisation workspace and attempt to view an existing organisation you get:

<type>java.lang.IllegalArgumentException</type>
<message>Argument 'shortNames' doesn't refer to a valid archetype</message>
<stackTrace>
<trace>org.openvpms.web.component.im.table.DescriptorTableModel.createColumnModel(DescriptorTableModel.java:154)</trace>

I traced the error but I cant work out why this adl change is causing it.

Incidently I added the same node to the security.user adl and it works as intended displaying a checkbox for the field.

I am testing this using the 1.7.1 snapshot built locally.

Netbeans running Tomcat7 , mysql 5.5

 

Broadly I have patched the system to add an option to not display financial information in the customer summary...which works a treat. 

 

Any pointers in debugging this one would be appreciated.

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: New ADL error

The archetype looks fine. I can load it without issues.

The code that's generating the exception is in DescriptorTableModel:

   protected TableColumnModel createColumnModel(String[] shortNames, LayoutContext context) {
        List<ArchetypeDescriptor> archetypes = DescriptorHelper.getArchetypeDescriptors(shortNames);
        if (archetypes.isEmpty()) {
            throw new IllegalArgumentException(
                    "Argument 'shortNames' doesn't refer to a valid archetype");
        }
        return createColumnModel(archetypes, context);
    }

Try adding a breakpoint on the line that throws the exception, and display the value of shortNames. Its probably referring to an archetype you haven't loaded. It could be the SMS archetypes from the openvpms-sms module.

 

 

Re: New ADL error

[WARN,ArchetypeHandlers,http-apr-8080-exec-2] No archetypes found matching short name=entity.SMSConfig*, loaded from path=jar:file:/C:/Users/benjamincharlton/Documents/NetBeansProjects/openvpms-web/openvpms-web-app/target/openvpms/WEB-INF/lib/openvpms-web-workspaces-1.7.1-SNAPSHOT.jar!/QueryFactory.properties
[WARN,ArchetypeHandlers,http-apr-8080-exec-5] No archetypes found matching short name=entity.SMSConfig*, loaded from path=jar:file:/C:/Users/benjamincharlton/Documents/NetBeansProjects/openvpms-web/openvpms-web-app/target/openvpms/WEB-INF/lib/openvpms-web-workspaces-1.7.1-SNAPSHOT.jar!/IMObjectTableModelFactory.properties

It was the fact the my dev version wasnt loading the sms archetypes by default.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content