Yes, I have seen errors like that before. Right off the bat, I can think of 2 paths toward troubleshooting it.
(1) Be certain the xmlns:dlm="http://www.uportal.org/layout/dlm" declaration is actually in the document you're operating on and attached to some element that is an ancestor of the element whose attribute you're trying to read.
I have given myself an issue like this before when cloning/detaching nodes and thereby severing the link to the namespace declaration. Also when I tried to evaluate an expression like that on a default, "empty" layout document that didn't have any dlm:-content and didn't declare it in the first place.
Try printing out the whole document just before you make that call to confirm the presence of the declaration.
(2) You may be able to get around this issue -- if 31 doesn't work -- with an XPath expression something like "attribute::*[name() = 'origin']"
drew On 3/20/2012 4:01 PM, Eric Dalquist wrote:
Drew, Just wondering if you've seen/dealt with an error like this before: org.dom4j.XPathException: Exception occurred evaluting XPath: //@dlm:origin. Exception: XPath expression uses unbound namespace prefix dlm at org.dom4j.xpath.DefaultXPath.handleJaxenException(DefaultXPath.java:374) at org.dom4j.xpath.DefaultXPath.selectNodes(DefaultXPath.java:134) at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:166) at org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore.importLayout(RDBMDistributedLayoutStore.java:754) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy115.importLayout(Unknown Source) at org.jasig.portal.io.xml.layout.LayoutImporter.importDataElement(LayoutImporter.java:44) at org.jasig.portal.io.xml.crn.AbstractDom4jImporter.importData(AbstractDom4jImporter.java:86) at org.jasig.portal.io.xml.crn.AbstractDom4jImporter.importData(AbstractDom4jImporter.java:53) at org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importOrUpgradeData(JaxbPortalDataHandlerService.java:567) at org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:530) at org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:497) at org.jasig.portal.io.xml.JaxbPortalDataHandlerService$1.callWithoutResult(JaxbPortalDataHandlerService.java:401) at org.jasig.portal.concurrency.CallableWithoutResult.call(CallableWithoutResult.java:32) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) I get it when importing user layouts. The line #s may not match up exactly with 4.0.4 but might be closer for what is in trunk. I'll be digging into this more tomorrow but I'm hoping you have an idea for a quick fix. -Eric
-- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
