Internal application error with 1.62 ?

Hi,

I have recently upgraded our system from 1.51 Beta to 1.62. All went smoothly or so I thought.

We are getting a unexpected errors popping up occassionally.

 'Error  An internal application error has occurred'. The latest came up on opening a customer information file. Also saw one on trying to access the patients attached to a customer.

This is a persistant error for these particular files.

No problems occurred under 1.5 Beta.

The error report is pasted below.

 

Much Thanks Geoff

 

 

 

 

<error-report>
<version>1.6.2</version>
<revision>5360</revision>
<message>An internal application error has occurred.</message>
<exception>
<type>java.lang.NullPointerException</type>
<stackTrace>
<trace>org.openvpms.web.component.im.util.IMObjectSorter$NodeTransformer.getDescriptor(IMObjectSorter.java:343)</trace>
<trace>org.openvpms.web.component.im.util.IMObjectSorter$NodeTransformer.transform(IMObjectSorter.java:302)</trace>
<trace>org.apache.commons.collections.comparators.TransformingComparator.compare(TransformingComparator.java:71)</trace>
<trace>org.apache.commons.collections.comparators.ComparatorChain.compare(ComparatorChain.java:277)</trace>
<trace>java.util.Arrays.mergeSort(Unknown Source)</trace>
<trace>java.util.Arrays.sort(Unknown Source)</trace>
<trace>java.util.Collections.sort(Unknown Source)</trace>
<trace>org.openvpms.web.component.im.util.IMObjectSorter.sort(IMObjectSorter.java:111)</trace>
<trace>org.openvpms.web.component.im.query.IMObjectListResultSet.sort(IMObjectListResultSet.java:113)</trace>
<trace>org.openvpms.web.component.im.table.PagedIMTableModel.sort(PagedIMTableModel.java:246)</trace>
<trace>org.openvpms.web.component.im.view.IMTableCollectionViewer.populateTable(IMTableCollectionViewer.java:284)</trace>
<trace>org.openvpms.web.component.im.view.IMTableCollectionViewer.doLayout(IMTableCollectionViewer.java:186)</trace>
<trace>org.openvpms.web.component.im.view.IMTableCollectionViewer.getComponent(IMTableCollectionViewer.java:145)</trace>
<trace>org.openvpms.web.component.im.view.AbstractReadOnlyComponentFactory.getCollectionViewer(AbstractReadOnlyComponentFactory.java:187)</trace>
<trace>org.openvpms.web.component.im.view.AbstractReadOnlyComponentFactory.create(AbstractReadOnlyComponentFactory.java:84)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.createComponent(AbstractLayoutStrategy.java:539)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.doTabLayout(AbstractLayoutStrategy.java:404)</trace>
<trace>org.openvpms.web.app.customer.info.CustomerViewLayoutStrategy.doTabLayout(CustomerViewLayoutStrategy.java:62)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.doTabLayout(AbstractLayoutStrategy.java:376)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.doComplexLayout(AbstractLayoutStrategy.java:277)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.doLayout(AbstractLayoutStrategy.java:193)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.doLayout(AbstractLayoutStrategy.java:169)</trace>
<trace>org.openvpms.web.component.im.layout.AbstractLayoutStrategy.apply(AbstractLayoutStrategy.java:136)</trace>
<trace>org.openvpms.web.component.im.view.AbstractIMObjectView.createComponent(AbstractIMObjectView.java:171)</trace>
<trace>org.openvpms.web.component.im.view.AbstractIMObjectView.getComponent(AbstractIMObjectView.java:108)</trace>
<trace>org.openvpms.web.component.subsystem.AbstractViewCRUDWindow.setObject(AbstractViewCRUDWindow.java:76)</trace>
<trace>org.openvpms.web.app.subsystem.BasicCRUDWorkspace.setObject(BasicCRUDWorkspace.java:99)</trace>
<trace>org.openvpms.web.app.customer.info.InformationWorkspace.setObject(InformationWorkspace.java:55)</trace>
<trace>org.openvpms.web.app.customer.info.InformationWorkspace.setObject(InformationWorkspace.java:38)</trace>
<trace>org.openvpms.web.component.subsystem.AbstractViewWorkspace.onSelected(AbstractViewWorkspace.java:286)</trace>
<trace>org.openvpms.web.app.customer.info.InformationWorkspace.onSelectClosed(InformationWorkspace.java:119)</trace>
<trace>org.openvpms.web.component.subsystem.AbstractViewWorkspace$3.onClose(AbstractViewWorkspace.java:366)</trace>
<trace>org.openvpms.web.component.event.WindowPaneListener.windowPaneClosing(WindowPaneListener.java:39)</trace>
<trace>nextapp.echo2.app.WindowPane.fireWindowClosing(WindowPane.java:154)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.fireWindowClosing(PopupWindow.java:221)</trace>
<trace>nextapp.echo2.app.WindowPane.userClose(WindowPane.java:795)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.userClose(PopupDialog.java:227)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.close(PopupWindow.java:145)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.close(PopupDialog.java:363)</trace>
<trace>org.openvpms.web.component.im.query.BrowserDialog.close(BrowserDialog.java:227)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.onOK(PopupDialog.java:279)</trace>
<trace>org.openvpms.web.component.im.query.BrowserDialog.onOK(BrowserDialog.java:207)</trace>
<trace>org.openvpms.web.component.im.query.BrowserDialog.onSelected(BrowserDialog.java:248)</trace>
<trace>org.openvpms.web.component.im.query.BrowserDialog$2.selected(BrowserDialog.java:143)</trace>
<trace>org.openvpms.web.component.im.query.BrowserAdapter$1.selected(BrowserAdapter.java:131)</trace>
<trace>org.openvpms.web.component.im.query.AbstractBrowser.notifySelected(AbstractBrowser.java:111)</trace>
<trace>org.openvpms.web.component.im.query.TableBrowser.onSelect(TableBrowser.java:391)</trace>
<trace>org.openvpms.web.component.im.query.TableBrowser.access$100(TableBrowser.java:52)</trace>
<trace>org.openvpms.web.component.im.query.TableBrowser$1.onAction(TableBrowser.java:289)</trace>
<trace>org.openvpms.web.component.event.ActionListener.actionPerformed(ActionListener.java:41)</trace>
<trace>nextapp.echo2.app.Table.fireActionEvent(Table.java:332)</trace>
<trace>nextapp.echo2.app.Table.processInput(Table.java:586)</trace>
<trace>org.openvpms.web.component.table.KeyTable.processInput(KeyTable.java:136)</trace>
<trace>nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)</trace>
<trace>nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)</trace>
<trace>nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471)</trace>
<trace>nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273)</trace>
<trace>org.openvpms.web.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:148)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:643)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:723)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</trace>
<trace>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</trace>
<trace>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</trace>
<trace>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)</trace>
<trace>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</trace>
<trace>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)</trace>
<trace>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)</trace>
<trace>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)</trace>
<trace>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)</trace>
<trace>java.lang.Thread.run(Unknown Source)</trace>
</stackTrace>
</exception>
<freeMemory>210501408</freeMemory>
<totalMemory>533528576</totalMemory>
<maxMemory>533528576</maxMemory>
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="C:\Program Files\Java\jre6\bin"/>
<property name="java.vm.version" value="19.1-b02"/>
<property name="shared.loader" value=""/>
<property name="java.vm.vendor" value="Sun Microsystems Inc."/>
<property name="java.vendor.url" value="http://java.sun.com/"/>
<property name="path.separator" value=";"/>
<property name="java.vm.name" value="Java HotSpot(TM) Client VM"/>
<property name="tomcat.util.buf.StringCache.byte.enabled" value="true"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="java.util.logging.config.file" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\logging.properties"/>
<property name="user.country" value="NZ"/>
<property name="sun.os.patch.level" value="Service Pack 3"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0"/>
<property name="java.runtime.version" value="1.6.0_24-b07"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed"/>
<property name="os.arch" value="x86"/>
<property name="java.io.tmpdir" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp"/>
<property name="line.separator" value="&#xd;
"/>
<property name="java.vm.specification.vendor" value="Sun Microsystems Inc."/>
<property name="user.variant" value=""/>
<property name="java.util.logging.manager" value="org.apache.juli.ClassLoaderLogManager"/>
<property name="java.naming.factory.url.pkgs" value="org.apache.naming"/>
<property name="os.name" value="Windows XP"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="org.apache.commons.jxpath.JXPathContextFactory" value="org.openvpms.component.system.common.jxpath.OpenVPMSContextFactoryReferenceImpl"/>
<property name="java.library.path" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;;C:\Program Files\OpenOffice.org 3\program;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\OpenVPN\bin"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="50.0"/>
<property name="sun.management.compiler" value="HotSpot Client Compiler"/>
<property name="os.version" value="5.1"/>
<property name="user.home" value="C:\Documents and Settings\openvpms"/>
<property name="user.timezone" value="Pacific/Auckland"/>
<property name="catalina.useNaming" value="true"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.6"/>
<property name="file.encoding" value="Cp1252"/>
<property name="catalina.home" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0"/>
<property name="user.name" value="openvpms"/>
<property name="java.class.path" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\tomcat-juli.jar"/>
<property name="java.naming.factory.initial" value="org.apache.naming.java.javaURLContextFactory"/>
<property name="openvpms" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\openvpms\"/>
<property name="package.definition" value="sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper."/>
<property name="java.vm.specification.version" value="1.0"/>
<property name="sun.arch.data.model" value="32"/>
<property name="java.home" value="C:\Program Files\Java\jre6"/>
<property name="java.specification.vendor" value="Sun Microsystems Inc."/>
<property name="user.language" value="en"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.6.0_24"/>
<property name="java.ext.dirs" value="C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes"/>
<property name="java.vendor" value="Sun Microsystems Inc."/>
<property name="server.loader" value=""/>
<property name="catalina.base" value="C:\Program Files\Apache Software Foundation\Tomcat 6.0"/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://java.sun.com/cgi-bin/bugreport.cgi"/>
<property name="common.loader" value="${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="package.access" value="sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans."/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value=""/>
</properties>
</error-report> 

Comment viewing options

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

Re: Internal application error with 1.62 ?

It means you have an object in the database where there is no corresponding archetype. In 1.7 you'll get a handy error message indicating whats missing; in 1.6 you'll just get the above.

To track it down, you need to run some SQL. The following will list objects that don't have  a corresponding archetype:

 select * from product_prices
where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors);

select * from entities
where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors);

select * from lookups
where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors);

select * from entity_relationships
    where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors);

select * from entity_identities
where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors);

select * from acts
where arch_short_name not in (
    select substring_index(name, '.', 2) from archetype_descriptors); 

Once you've identified what doesn't have an archetype there's a few options to fix the issue:

  • add the archetype from the earlier release (or wherever it came from)
  • create a dummy archetype for it, so you can delete it
  • delete the object using SQL

It depends what the object is and what its linked to.

Regards,

Tim

Syndicate content