XPath & Java

Aim
Make search in XML file with XPath expression, which sets in Web form.
Return search results to user browser.
I understand the task, but the method evaluate from XPath interface
it's signature
xPath.evaluate(xPathExpression,
docWrite,
XPathConstants.STRING);
It's third parameter, which define, what to receive, may be one of
XPathConstants.BOOLEAN
XPathConstants.NODE
XPathConstants.NODESET
XPathConstants.NUMBER
XPathConstants.STRING
and when we use overloaded version of the 3d parameter, this is analogous to XPathConstants.STRING.
I need that user receive XML answer, and XPathConstants.STRING returns results without XML tags. How I may make it?
And if the user will search attribute value, then return it as string( no xml).

If you want the xml tags, you need to use NodeSet, ant then use an empty transformer to convert it to a string. This is tricky however, because a NodeSet isn't necessarily a well formed document, so you may have to add root element to the node set.

Similar Messages

  • Unknown Error in XPath?!

    Hi.
    I've been trying to use javax.xml.xpath.XPath to get a Node from a DOMSource. But with event the absolute simplest XPath expression //StaticComponent I get the following exception.
    Here's the code I'm using:
    XPath path = XPathFactory.newInstance().newXPath();
    Node newnode = (NodeList) path.evaluate("//StaticComponent", source, XPathConstants.NODESET);(source is defined elsewhere in the program, and I am SURE that it is properly defined, because I use it for something else in the program too.)
    The exception I get tells me NOTHING, and I can't why a simple expression won't evaluate. Has anybody run into this before?
    javax.xml.transform.TransformerException: Unknown error in XPath.
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:363)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:213)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
         at ca.nrc.imti.dmdc.wiseshopfloor.editor.EditorModel$2.tableChanged(EditorModel.java:408)
         at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
         at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:259)
         at javax.swing.JTable$1.setValueAt(JTable.java:417)
         at javax.swing.JTable.setValueAt(JTable.java:1783)
         at javax.swing.JTable.editingStopped(JTable.java:3129)
         at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
         at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:328)
         at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:213)
         at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:3460)
         at javax.swing.plaf.basic.BasicTableUI$NavigationalAction.actionPerformed(BasicTableUI.java:154)
         at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1512)
         at javax.swing.JComponent.processKeyBinding(JComponent.java:2435)
         at javax.swing.JTable.processKeyBinding(JTable.java:3254)
         at javax.swing.JComponent.processKeyBindings(JComponent.java:2481)
         at javax.swing.JComponent.processKeyEvent(JComponent.java:2398)
         at java.awt.Component.processEvent(Component.java:4902)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1688)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:593)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:765)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:698)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:559)
         at java.awt.Component.dispatchEventImpl(Component.java:3468)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xpath.internal.axes.DescendantIterator.setRoot(DescendantIterator.java:261)
         at com.sun.org.apache.xpath.internal.axes.NodeSequence.setRoot(NodeSequence.java:213)
         at com.sun.org.apache.xpath.internal.axes.LocPathIterator.execute(LocPathIterator.java:210)
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:335)
         ... 37 more
    java.lang.NullPointerException
         at com.sun.org.apache.xpath.internal.axes.DescendantIterator.setRoot(DescendantIterator.java:261)
         at com.sun.org.apache.xpath.internal.axes.NodeSequence.setRoot(NodeSequence.java:213)
         at com.sun.org.apache.xpath.internal.axes.LocPathIterator.execute(LocPathIterator.java:210)
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:335)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:213)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
         at ca.nrc.imti.dmdc.wiseshopfloor.editor.EditorModel$2.tableChanged(EditorModel.java:408)
         at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
         at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:259)
         at javax.swing.JTable$1.setValueAt(JTable.java:417)
         at javax.swing.JTable.setValueAt(JTable.java:1783)
         at javax.swing.JTable.editingStopped(JTable.java:3129)
         at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
         at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:328)
         at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:213)
         at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:3460)
         at javax.swing.plaf.basic.BasicTableUI$NavigationalAction.actionPerformed(BasicTableUI.java:154)
         at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1512)
         at javax.swing.JComponent.processKeyBinding(JComponent.java:2435)
         at javax.swing.JTable.processKeyBinding(JTable.java:3254)
         at javax.swing.JComponent.processKeyBindings(JComponent.java:2481)
         at javax.swing.JComponent.processKeyEvent(JComponent.java:2398)
         at java.awt.Component.processEvent(Component.java:4902)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1688)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:593)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:765)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:698)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:559)
         at java.awt.Component.dispatchEventImpl(Component.java:3468)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    --------------- linked to ------------------
    javax.xml.xpath.XPathExpressionException
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:289)
         at ca.nrc.imti.dmdc.wiseshopfloor.editor.EditorModel$2.tableChanged(EditorModel.java:408)
         at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
         at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:259)
         at javax.swing.JTable$1.setValueAt(JTable.java:417)
         at javax.swing.JTable.setValueAt(JTable.java:1783)
         at javax.swing.JTable.editingStopped(JTable.java:3129)
         at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
         at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:328)
         at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:213)
         at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:3460)
         at javax.swing.plaf.basic.BasicTableUI$NavigationalAction.actionPerformed(BasicTableUI.java:154)
         at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1512)
         at javax.swing.JComponent.processKeyBinding(JComponent.java:2435)
         at javax.swing.JTable.processKeyBinding(JTable.java:3254)
         at javax.swing.JComponent.processKeyBindings(JComponent.java:2481)
         at javax.swing.JComponent.processKeyEvent(JComponent.java:2398)
         at java.awt.Component.processEvent(Component.java:4902)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1688)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:593)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:765)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:698)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:559)
         at java.awt.Component.dispatchEventImpl(Component.java:3468)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Caused by: javax.xml.transform.TransformerException: Unknown error in XPath.
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:363)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:213)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
         ... 35 more
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xpath.internal.axes.DescendantIterator.setRoot(DescendantIterator.java:261)
         at com.sun.org.apache.xpath.internal.axes.NodeSequence.setRoot(NodeSequence.java:213)
         at com.sun.org.apache.xpath.internal.axes.LocPathIterator.execute(LocPathIterator.java:210)
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:335)
         ... 37 more
    java.lang.NullPointerException
         at ca.nrc.imti.dmdc.wiseshopfloor.editor.EditorModel$2.tableChanged(EditorModel.java:414)
         at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
         at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:259)
         at javax.swing.JTable$1.setValueAt(JTable.java:417)
         at javax.swing.JTable.setValueAt(JTable.java:1783)
         at javax.swing.JTable.editingStopped(JTable.java:3129)
         at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
         at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:328)
         at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:213)
         at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:3460)
         at javax.swing.plaf.basic.BasicTableUI$NavigationalAction.actionPerformed(BasicTableUI.java:154)
         at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1512)
         at javax.swing.JComponent.processKeyBinding(JComponent.java:2435)
         at javax.swing.JTable.processKeyBinding(JTable.java:3254)
         at javax.swing.JComponent.processKeyBindings(JComponent.java:2481)
         at javax.swing.JComponent.processKeyEvent(JComponent.java:2398)
         at java.awt.Component.processEvent(Component.java:4902)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1688)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:593)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:765)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:698)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:559)
         at java.awt.Component.dispatchEventImpl(Component.java:3468)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

    The root cause seems to be a NullPointerException,
    but the line given is a line of comment in my
    src.zip. Intriguing. What's your line 261 of
    com.sun.org.apache.xpath.internal.axes.DescendantItera
    tor?As far as I can tell, my jaxp libraries did not come with any source files, in a zip, jar or otherwise. At least, if it did, I can't find them.

  • Parse xml document with xpath

    I would like to parse an xml document using xpath, see:
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    however, in the documentation (in the link above), it states that I need J2SE 5.0.
    Currently, I have:
    $ java -version
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    Does that mean that I really have to install J2SE 5.0 in order to use J2SE 5.0's XPath support? Does anybody know anything about getting started with XPath, and whether I can just use my existing version of Java? I've never used XPath.
    For more documentation, one can view:
    http://www.w3.org/TR/xpath20/
    Thank you.

    I have copied the code for the xpath tutorial on
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    exactly as it is on the tutorial, and imported the correct jars (I think).
    But still my code is giving lots of errors!
    Granted its my first shot but anyway here's the code and the errors...
    package test;
    import org.jdom.xpath.*;
    import java.io.*;
    import javax.xml.xpath.*;
    public class XPath {
         public static void main (String [] args){
              XPathFactory factory = XPathFactory.newInstance();
              XPath xPath=factory.newXPath();
              XPathExpression  xPathExpression=xPath.compile("/catalog/journal/article[@date='January-2004']/title");
              File xmlDocument = new File("/home/myrmen/workspace/Testing/test/catalog.xml");     
              //FileInputStream fis = new FileInputStream(xmldocument); 
              InputSource inputSource = new InputSource(new FileInputStream(xmlDocument));
              String title = xPathExpression.evaluate(inputSource);
              String publisher = xPath.evaluate("/catalog/journal/@publisher", inputSource);
              String expression="/catalog/journal/article";
              NodeSet nodes = (NodeSet) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);
              NodeList nodeList=(NodeList)nodes;
              SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
              org.jdom.Document jdomDocument = saxBuilder.build(xmlDocument);
              org.jdom.Attribute levelNode = (org.jdom.Attribute)(XPath.selectSingleNode(jdomDocument,"/catalog//journal[@title='JavaTechnology']" + "//article[@date='January-2004']/@level"));
              levelNode.setValue("Intermediate");
              org.jdom.Element titleNode = (org.jdom.Element) XPath.selectSingleNode( jdomDocument,"/catalog//journal//article[@date='January-2004']/title");
              titleNode.setText("Service Oriented Architecture Frameworks");
              java.util.List nodeList = XPath.selectNodes(jdomDocument,"/catalog//journal[@title='Java Technology']//article");
              Iterator iter=nodeList.iterator();
              while(iter.hasNext()) {
                   org.jdom.Element element = (org.jdom.Element) iter.next();
                   element.setAttribute("section", "Java Technology");
              XPath xpath = XPath.newInstance("/catalog//journal:journal//article/@journal:level");
              xpath.addNamespace("journal", "http://www.w3.org/2001/XMLSchema-Instance");
              levelNode = (org.jdom.Attribute) xpath.selectSingleNode(jdomDocument);
              levelNode.setValue("Advanced");
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         Type mismatch: cannot convert from XPath to XPath
         The method compile(String) is undefined for the type XPath
         InputSource cannot be resolved to a type
         InputSource cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeList cannot be resolved to a type
         NodeList cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         The method selectSingleNode(Document, String) is undefined for the type XPath
         The method selectSingleNode(Document, String) is undefined for the type XPath
         Duplicate local variable nodeList
         The method selectNodes(Document, String) is undefined for the type XPath
         Iterator cannot be resolved to a type
         The method newInstance(String) is undefined for the type XPath
         The method addNamespace(String, String) is undefined for the type XPath
         The method selectSingleNode(Document) is undefined for the type XPath
         at test.XPath.main(XPath.java:12)

  • XPath expression for getting nodes based on date

    Hello,
    using javax.xml.xpath.XPath (Java 5) I want to get only nodes with dates (element pubDate) greater then some provided date. What is the expression for getting, say only first two <item> nodes? Is it at all possible?
    Example XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0">
         <channel>
              <title>Channel title</title>
              <link>http://www.foo.bar</link>
              <description>Channel description</description>
              <item>
                   <title>title 1</title>
                   <link>http://foo.bar.org/1</link>
                   <author>author 1</author>
                   <pubDate>Thu, 15 Jun 2006 13:14:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 2</title>
                   <link>http://foo.bar.org/2</link>
                   <author>author 2</author>
                   <pubDate>Thu, 15 Jun 2006 13:11:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 3</title>
                   <link>http://foo.bar.org/3</link>
                   <author>author 3</author>
                   <pubDate>Thu, 14 Jun 2006 13:03:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 4</title>
                   <link>http://foo.bar.org/4</link>
                   <author>author 4</author>
                   <pubDate>Thu, 13 Jun 2006 12:59:00 GMT</pubDate>
              </item>
         </channel>
    </rss>Thanks for any hints!

    I would simply assign value to a variable inside package and use the value in the expression. You can also add variable to configuration if you want to pass a value from outside. You can also add another variable to determine whether you need yesterday or
    specific date and set expression accordingly so that you expression will look like
    (DT_WSTR,30)([User::DateCategory] == "Specific Date"? @[User::Date]:(DT_WSTR, 4) DATEPART( "yyyy", DATEADD( "dd" , -1, GETDATE() ) ) + Right("0"+(DT_WSTR, 2)DATEPART( "mm", DATEADD( "dd" , -1, GETDATE() ) ),2) + Right("0"+(DT_WSTR, 2)DATEPART( "dd", DATEADD( "dd" , -1, GETDATE() ) ) ,2)) +"_*.TXT"
    DateCategory variable should be of type string
    and Date should of type date
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Jdom xpath runtime error

    First, I am a newbie.
    I am getting an error while trying to use xpath and jdom. Here is the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/saxpath/SAXPathEx
    ception
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:140)
            at org.jdom.xpath.XPath.newInstance(XPath.java:133)
            at hello.main(hello.java:26)Here is my code:
    import java.io.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    import org.jdom.xpath.*;
    import java.util.*;
    public class hello
        public static void main( String args[] ) throws Exception {
              System.out.println("Hello") ;
              System.out.println("Hello ugh") ;
              Document doc = new SAXBuilder().build("catalog.xml");
              List compositions = doc.getRootElement().getChildren("composition");
              for(int i=0; i < compositions.size(); i++) {
                   String title = ((Element)compositions.get(i)).getChildText("title");
                   //here i want to get the composer, will use xpath to find it
                   //this line gets the 'key'
                   String comp = ((Element)compositions.get(i)).getAttribute("composer").getValue();
                   //this one does the xpath lookup
                   XPath xpath = XPath.newInstance("composer");
                   //List results = xpath.selectNodes(doc);
                   System.out.println("  " + title + " -- " + comp );
              System.out.println("Done:");     
    }Thanks,
    LNMEgo

    I'm sorry. I am confused. I don't know how to do
    that-- I thought I only needed to do that when I
    compiled. How can I make sure it works in other
    environments?
    Thanksno need to be sorry.
    when you run java.exe, you need to tell the jvm where the classes that you are referring to are. you do this with the -classpath or set the environment variable CLASSPATH. i prefer to tell it in my script. for example
    java -classpath ".;C:\Work\myclasses\" test.SessionManager
    . - indicates the current directory, in addition to c:\work\myclasses
    in the path can be .classes or .jar which hold the classes.

  • XPath Namespace resolver problem

    I've trying to run a simple XPath query
    //z:rowin Java against against the following XML.
    <?xml version="1.0" encoding="utf-8"?>
    <test xmlns:rs="urn:schemas-microsoft-com:rowset"
         xmlns:z="#RowsetSchema">
    <rs:data>
      <z:row>XX</z:row>
    </rs:data>
    </test>I've written my own namespace prefix resolver, and also used the NamespaceContext object at the end of this example [http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-|http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-]
    The problem is that I also get the following error:
    javax.xml.transform.TransformerException:A location step was expected following the '/' or '//' token.
    The problem is the *#* sign in the xmlns:z="#RowsetSchema". If I rename the namespace to be just xmlns:z="RowsetSchema" then it works fine.
    Help, this is driving me mad.
    TIA
    Ian

    Hi,
    Sorry for the delay in responding to the request for a sample. I've put one together now, running a failing test and a working test...
    import com.sun.org.apache.xerces.internal.parsers.DOMParser;
    import java.io.StringReader;
    import java.util.Iterator;
    import javax.xml.XMLConstants;
    import javax.xml.namespace.NamespaceContext;
    import javax.xml.transform.TransformerException;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathExpressionException;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class TestXPath {
        public static void main(String[] args) {
            try {
                System.out.println("Running Test 1");
                String test1 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                        "<test xmlns:rs=\"urn:schemas-microsoft-com:rowset\" xmlns:z=\"#RowsetSchema\">" +
                            "<rs:data>" +
                                "<z:row>XX</z:row>" +
                            "</rs:data>" +
                        "</test>";
                DOMParser parser = new DOMParser();
                parser.parse(new InputSource(new StringReader(test1)));
                runXpathQueryTest( parser.getDocument(), "//z:row");
            } catch (Exception e) {
                e.printStackTrace(System.out);
            try {
                System.out.println("Running Test 2 - Only difference is we have changed '#RowsetSchema' to 'RowsetSchema'");
                String test1 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                        "<test xmlns:rs=\"urn:schemas-microsoft-com:rowset\" xmlns:z=\"RowsetSchema\">" +
                            "<rs:data>" +
                                "<z:row>XX</z:row>" +
                            "</rs:data>" +
                        "</test>";
                DOMParser parser = new DOMParser();
                parser.parse(new InputSource(new StringReader(test1)));
                runXpathQueryTest( parser.getDocument(), "//z:row");
            } catch (Exception e) {
                e.printStackTrace(System.out);
        private static void runXpathQueryTest(Document document, String xPathExpression)
                throws XPathExpressionException, TransformerException {
            XPath xPath = XPathFactory.newInstance().newXPath();
            xPath.setNamespaceContext(new UniversalNamespaceResolver(document));
            NodeList result1 = (NodeList) xPath.evaluate( xPathExpression, document, XPathConstants.NODESET);
            System.out.println(xPathExpression + " returned " + result1.getLength() + " matching node(s)");
        static class UniversalNamespaceResolver implements NamespaceContext {
            private Document sourceDocument;
            public UniversalNamespaceResolver(Document document) {
                sourceDocument = document;
            public String getNamespaceURI(String prefix) {
                if (prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
                    return sourceDocument.lookupNamespaceURI(null);
                } else {
                    return sourceDocument.lookupNamespaceURI(prefix);
            public String getPrefix(String namespaceURI) {
                return sourceDocument.lookupPrefix(namespaceURI);
            public Iterator getPrefixes(String namespaceURI) {
                // not implemented yet
                return null;
    }Full output when it is run is:
    Running Test 1
    javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:608)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.Step(XPathParser.java:1737)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1624)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.LocationPath(XPathParser.java:1595)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1315)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:832)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:805)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:788)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:127)
            at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:176)
            at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:264)
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:193)
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
            at com.categoric.pindar.TestXPath.runXpathQueryTest(TestXPath.java:59)
            at com.categoric.pindar.TestXPath.main(TestXPath.java:30)
    --------------- linked to ------------------
    javax.xml.xpath.XPathExpressionException
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:289)
            at com.categoric.pindar.TestXPath.runXpathQueryTest(TestXPath.java:59)
            at com.categoric.pindar.TestXPath.main(TestXPath.java:30)
    ...cut...
    Running Test 2 - Only difference is we have changed '#RowsetSchema' to 'RowsetSchema'
    //z:row returned 1 matching node(s)

  • JDK 1.6 doesn't choose proper XPathFactory...

    Hello,
    I was using jdk 1.5.0 with the saxon api to give me XPath 2.0 functionallity. I've recently upgraded to JDK6 and now the XPathFactory.newInstance() doesn't give me the saxon implementation anymore.
    When I try to compile the the XPath Expression I get the following error and the only thing I have changed is the jdk.
    Can anyone help suggest a fix for this problem or should I open a bug with Sun to get a fix?
    javax.xml.transform.TransformerException: Could not find function: matches
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:608)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.FunctionCall(XPathParser.java:1505)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PrimaryExpr(XPathParser.java:1444)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.FilterExpr(XPathParser.java:1343)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1276)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:832)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:805)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:788)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PredicateExpr(XPathParser.java:1952)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Predicate(XPathParser.java:1934)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Step(XPathParser.java:1724)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1633)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.LocationPath(XPathParser.java:1595)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1315)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:832)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:805)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:788)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Argument(XPathParser.java:1467)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.FunctionCall(XPathParser.java:1535)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PrimaryExpr(XPathParser.java:1444)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.FilterExpr(XPathParser.java:1343)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1276)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:832)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:805)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:788)
         at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:127)
         at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:176)
         at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:264)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:394)
         at com.thestar.util.XmlUtils.getExpression(XmlUtils.java:164)Message was edited by:
    saschwen
    Hey I Just wanted to add that this problem used to happen on JDK 1.5.0 too. To fix this I had to put the saxon jars into the jre/lib/ext directory to work. This however doesn't work for jdk1.6

    I seem to recall there was an issue with Saxon's jar file and the way it defined its services which made it incompatible with JDK 6. Michael Kay was aware of the problem, and I believe had found a way to make it worth in both JDK 5 and 6. You should ask this question in Saxon's forum too.

  • x:forEach using expressions inside the select value

    Hey everyone. I am trying to use a <c:include> statement to include a jsp file multiple times. The included file parses and processes an XML file but I want to be able to pass in a string representing the XPath to select the elements I want to process. However the <x:foreach> does not allow expressions for the select value. Is there a way around this or a better way to do it? Thanks!
    John

    Sorry maybe I don't quite understand because I can't get this to work.
    This is the parent file code:
    <jsp:include page="includes/XMLParse/traveltimesMilwaukee.jsp" >
        <jsp:param name="select" value="Route[ID>999]" />
    </jsp:include>And this is the called file code where I am trying to use the path:
    <x:forEach var="r"  select="$dom/WisDotTrafficData/Routes/$param:select">This is the most pertinent error:
    javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Error evaluating XPath expression "/WisDotTrafficData/Routes/$param:select": javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.Below will be the whole error page but I want to put some comments right here. I also tried without the second $ but that didn't work - the loop never executed. I can't get the JSTL specs to load right now so I couldn't check those out but do you have any other suggestions or maybe you see what my mistake is? Thanks again!
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /milwaukee/traveltimes.jsp:86
    83:                     </tr>
    84:                     <tr VALIGN="TOP">
    85:                       <td>
    86:                         <jsp:include page="includes/XMLParse/traveltimesMilwaukee.jsp" >
    87:                           <jsp:param name="select" value="Route[ID>999]" />
    88:                         </jsp:include>
    89:                       </td>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Exception in JSP: /milwaukee/includes/XMLParse/traveltimesMilwaukee.jsp:14
    11:        on the first iteration and not on further iterations --%>
    12:   <c:set var="alreadyPrinted" value="0" />
    13:
    14:   <x:forEach var="r"  select="$dom/WisDotTrafficData/Routes/$param:select">
    15:
    16:     <%-- Prints the header if it has not been printed already --%>
    17:     <c:if test="${alreadyPrinted == '0'}" >
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         org.apache.jsp.milwaukee.traveltimes_jsp._jspService(traveltimes_jsp.java:314)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Error evaluating XPath expression "/WisDotTrafficData/Routes/$param:select": javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:839)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
         org.apache.jsp.milwaukee.includes.XMLParse.traveltimesMilwaukee_jsp._jspService(traveltimesMilwaukee_jsp.java:254)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         org.apache.jsp.milwaukee.traveltimes_jsp._jspService(traveltimes_jsp.java:314)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.
         org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)
         org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1637)
         org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1595)
         org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)
         org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
         org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
         org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
         org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
         org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
         org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
         org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)
         org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)
         org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)
         org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)
         org.apache.xpath.XPath.<init>(XPath.java:176)
         org.apache.taglibs.standard.tag.common.xml.JSTLXPathAPI.eval(JSTLXPathAPI.java:285)
         org.apache.taglibs.standard.tag.common.xml.XPathUtil.selectNodes(XPathUtil.java:527)
         org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTag.java:50)
         javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:227)
         org.apache.jsp.milwaukee.includes.XMLParse.traveltimesMilwaukee_jsp._jspService(traveltimesMilwaukee_jsp.java:102)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         org.apache.jsp.milwaukee.traveltimes_jsp._jspService(traveltimes_jsp.java:314)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  • Error starting thread: Not enough storage is available to process...

    Hi all,
    We are seeing server going down frequently with below exception:
    [ERROR][thread ] Failed to start new thread
    [2010-04-08 14:36:54,046][ERROR][com.astrazeneca.portal.rss.ContentTransformer] - Error processing item:null
    ; SystemID: http://beaa.astrazeneca.net:10002/NewsBroker/resources/newsToRss.xsl; Line#: 21; Column#: 128
    javax.xml.transform.TransformerException: java.lang.Error: Error starting thread: Not enough storage is available to process this command.
         at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:403)
         at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:426)
         at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:220)
         at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:437)
         at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:199)
         at org.apache.xpath.XPath.execute(XPath.java:268)
         at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:279)
         at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:247)
    I have a weblogic support SR open and they suggested to add -XXtlaSize and -XXlargeObjectLimit to our JVM parameter. With these parameters, we are getting below error in Windows frequently:
    Reporting queued error: faulting application java.exe, version 1.5.0.11, faulting module jvm.dll, version 27.3.1.1, fault address 0x0014b442.
    I have seen few threads on Sun forum, but answer was not posted there. Details of our environment are as below:-
    JVM : JROCKIT 1.5.0.11
    OS : Windows 2003
    Application Server : Weblogic 10
    Any inputs or pointers will be highly appreciated as this is a bit urgent for me...
    Thanks & Regards,
    Sanjeev

    Hi Henrik,
    I am running Weblogic with below parameters now:
    -Xnohup -Xms:1536m -Xmx:1536m -XXtlaSize:min=32k,preferred=768k -XXlargeObjectLimit:32K
    Weblogic crashed again with below dump:
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 0 days, 07:17:18 on Fri May 07 15:26:16 2010
    Additional information is available in:
    E:\PortalLIVDomaina\jrockit.5772.dump
    E:\PortalLIVDomaina\jrockit.5772.mdmp
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error Message: Illegal memory access. [54]
    Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x005148AF - memory at 0x00000000 could not be written.
    Minidump : Wrote mdmp. Size is 1406MB
    SafeDllMode : -1
    Version : BEA JRockit(R) R27.3.1-1_CR344434-89345-1.5.0_11-20070925-1628-windows-ia32
    GC Strategy : Mode: throughput. Currently using strategy: genparpar
    GC Status : OC currently running, in phase: sweeping. This is OC#3000.
    : YC is not running. Last finished YC was YC#9937.
    OC History : Strategy genparpar was used for OC#1.
    : Strategy singleparpar was used for OC#2.
    : Strategy genparpar was used for OC#3 to OC#3000.
    YC History : Ran 11 YCs before OC#2996.
    : Ran 18 YCs before OC#2997.
    : Ran 11 YCs before OC#2998.
    : Ran 8 YCs before OC#2999.
    : Ran 1 YCs before OC#3000.
    Heap : 0x00900000 - 0x60900000
    Compaction : 0x06900000 - 0x0C900000
    Could you please provide some input on this?
    Thanks,
    Sanjeev

  • ZFS webconsole show (no devices)

    ZFS from command line works perfectly. I can work with all my configured pools and file systems. But when I run the webconcole and go to zfs application it shows me
    System Summary/Tasks      
         Storage Pools (0)
         File Systems (0)
         Volumes (0)
         Snapshots (0)
    Device Hierarchy
         (no devices)
    Can somebody help me?

    Some additional information.
    I found in log the following exception:
    javax.xml.transform.TransformerException: Unknown error in XPath.
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:296)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:213)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
         at com.sun.zfs.common.model.XMLDataModel.getAvailableDisks(XMLDataModel.java:466)
         at com.sun.zfs.common.model.LockhartDataModel.getAvailableDisks(LockhartDataModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:60)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createTableModel(AvailableDevicesTableViewHelper.java:111)
         at com.sun.zfs.web.admin.zfsmodule.view.TableViewHelper.createChild(TableViewHelper.java:62)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createChild(AvailableDevicesTableViewHelper.java:86)
         at com.sun.zfs.web.admin.zfsmodule.wizard.common.WizardPageView.createChild(WizardPageView.java:159)
         at com.sun.zfs.web.admin.zfsmodule.wizard.appendpool.AppendPoolDevicesPageView.createChild(AppendPoolDevicesPageView.java:83)
         at com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:187)
         at com.iplanet.jato.view.ContainerViewBase.getChild(ContainerViewBase.java:541)
         at com.iplanet.jato.view.ContainerViewBase.beginChildDisplay(ContainerViewBase.java:819)
         at com.iplanet.jato.taglib.TagBase.fireBeginDisplayEvent(TagBase.java:133)
         at com.sun.web.ui.taglib.common.CCTagBase.fireBeginDisplayEvent(CCTagBase.java:149)
         at com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:108)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_cc_actiontable_0(AppendPoolDevicesPageView_jsp.java:352)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_jato_pagelet_0(AppendPoolDevicesPageView_jsp.java:180)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspService(AppendPoolDevicesPageView_jsp.java:56)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
         at org.apache.catalina.core.ApplicationDispatcher.access$100(ApplicationDispatcher.java:71)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedInclude.run(ApplicationDispatcher.java:102)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:501)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.getWizardPageHTML(CCWizardTag.java:1564)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.appendPageletBodyContentHTML(CCWizardTag.java:668)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.appendWizardBodyHTML(CCWizardTag.java:658)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.getHTMLStringInternal(CCWizardTag.java:469)
         at com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:114)
         at org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspx_meth_cc_wizard_0(WizardWindow_jsp.java:271)
         at org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspService(WizardWindow_jsp.java:182)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:71)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:86)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:304)
         at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
         at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
         at com.sun.web.ui.view.wizard.CCWizard.handleNextButtonRequest(CCWizard.java:730)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
         at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
         at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
         at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
         at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at com.sun.management.services.session.CoreSessionManagerFilter.handleRequest(CoreSessionManagerFilter.java:638)
         at com.sun.management.services.session.CoreSessionManagerFilter.doFilter(CoreSessionManagerFilter.java:401)
         at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xpath.internal.axes.AxesWalker.setRoot(AxesWalker.java:218)
         at com.sun.org.apache.xpath.internal.axes.WalkingIterator.setRoot(WalkingIterator.java:153)
         at com.sun.org.apache.xpath.internal.axes.NodeSequence.setRoot(NodeSequence.java:212)
         at com.sun.org.apache.xpath.internal.axes.LocPathIterator.execute(LocPathIterator.java:211)
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:268)
         ... 148 more
    java.lang.NullPointerException
         at com.sun.org.apache.xpath.internal.axes.AxesWalker.setRoot(AxesWalker.java:218)
         at com.sun.org.apache.xpath.internal.axes.WalkingIterator.setRoot(WalkingIterator.java:153)
         at com.sun.org.apache.xpath.internal.axes.NodeSequence.setRoot(NodeSequence.java:212)
         at com.sun.org.apache.xpath.internal.axes.LocPathIterator.execute(LocPathIterator.java:211)
         at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:268)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:213)
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
         at com.sun.zfs.common.model.XMLDataModel.getAvailableDisks(XMLDataModel.java:466)
         at com.sun.zfs.common.model.LockhartDataModel.getAvailableDisks(LockhartDataModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:60)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createTableModel(AvailableDevicesTableViewHelper.java:111)
         at com.sun.zfs.web.admin.zfsmodule.view.TableViewHelper.createChild(TableViewHelper.java:62)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createChild(AvailableDevicesTableViewHelper.java:86)
         at com.sun.zfs.web.admin.zfsmodule.wizard.common.WizardPageView.createChild(WizardPageView.java:159)
         at com.sun.zfs.web.admin.zfsmodule.wizard.appendpool.AppendPoolDevicesPageView.createChild(AppendPoolDevicesPageView.java:83)
         at com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:187)
         at com.iplanet.jato.view.ContainerViewBase.getChild(ContainerViewBase.java:541)
         at com.iplanet.jato.view.ContainerViewBase.beginChildDisplay(ContainerViewBase.java:819)
         at com.iplanet.jato.taglib.TagBase.fireBeginDisplayEvent(TagBase.java:133)
         at com.sun.web.ui.taglib.common.CCTagBase.fireBeginDisplayEvent(CCTagBase.java:149)
         at com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:108)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_cc_actiontable_0(AppendPoolDevicesPageView_jsp.java:352)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_jato_pagelet_0(AppendPoolDevicesPageView_jsp.java:180)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspService(AppendPoolDevicesPageView_jsp.java:56)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
         at org.apache.catalina.core.ApplicationDispatcher.access$100(ApplicationDispatcher.java:71)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedInclude.run(ApplicationDispatcher.java:102)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:501)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.getWizardPageHTML(CCWizardTag.java:1564)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.appendPageletBodyContentHTML(CCWizardTag.java:668)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.appendWizardBodyHTML(CCWizardTag.java:658)
         at com.sun.web.ui.taglib.wizard.CCWizardTag.getHTMLStringInternal(CCWizardTag.java:469)
         at com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:114)
         at org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspx_meth_cc_wizard_0(WizardWindow_jsp.java:271)
         at org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspService(WizardWindow_jsp.java:182)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:71)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:86)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:304)
         at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
         at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
         at com.sun.web.ui.view.wizard.CCWizard.handleNextButtonRequest(CCWizard.java:730)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
         at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
         at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
         at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
         at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at com.sun.management.services.session.CoreSessionManagerFilter.handleRequest(CoreSessionManagerFilter.java:638)
         at com.sun.management.services.session.CoreSessionManagerFilter.doFilter(CoreSessionManagerFilter.java:401)
         at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    --------------- linked to ------------------
    javax.xml.xpath.XPathExpressionException
         at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:289)
         at com.sun.zfs.common.model.XMLDataModel.getAvailableDisks(XMLDataModel.java:466)
         at com.sun.zfs.common.model.LockhartDataModel.getAvailableDisks(LockhartDataModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:34)
         at com.sun.zfs.web.admin.zfsmodule.model.AvailableDevicesTableModel.<init>(AvailableDevicesTableModel.java:60)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createTableModel(AvailableDevicesTableViewHelper.java:111)
         at com.sun.zfs.web.admin.zfsmodule.view.TableViewHelper.createChild(TableViewHelper.java:62)
         at com.sun.zfs.web.admin.zfsmodule.view.AvailableDevicesTableViewHelper.createChild(AvailableDevicesTableViewHelper.java:86)
         at com.sun.zfs.web.admin.zfsmodule.wizard.common.WizardPageView.createChild(WizardPageView.java:159)
         at com.sun.zfs.web.admin.zfsmodule.wizard.appendpool.AppendPoolDevicesPageView.createChild(AppendPoolDevicesPageView.java:83)
         at com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:187)
         at com.iplanet.jato.view.ContainerViewBase.getChild(ContainerViewBase.java:541)
         at com.iplanet.jato.view.ContainerViewBase.beginChildDisplay(ContainerViewBase.java:819)
         at com.iplanet.jato.taglib.TagBase.fireBeginDisplayEvent(TagBase.java:133)
         at com.sun.web.ui.taglib.common.CCTagBase.fireBeginDisplayEvent(CCTagBase.java:149)
         at com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:108)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_cc_actiontable_0(AppendPoolDevicesPageView_jsp.java:352)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspx_meth_jato_pagelet_0(AppendPoolDevicesPageView_jsp.java:180)
         at org.apache.jsp.jsp.zfsmodule.AppendPoolDevicesPageView_jsp._jspService(AppendPoolDevicesPageView_jsp.java:56)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
         at org.apache.catalina.core.ApplicationDispatcher.access$100(ApplicationDispatcher.java:71)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedInclude.run(ApplicationDispatcher.java:102)
         at java.security.AccessController.doPrivileged(Native Method)
         at or

  • Is there any possibility to combine XPath with SAX in Java?

    HI Gentlemen,
    I have an XML instance to parse. One solution works with XPath and Document builder. However, the tree in memory is too big so that I can not build it in my storage (8 GB). Does anyone of you know a method where I use an XPath expression (Java) to select a node but with a better parser (e g SAX) which is not so space hungry? Direct access of nodes is obligatory.
    Thanks, kind regards from
    Miklos HERBOLY

    As SAX  parsers do not build a DOM structure and XPath requires a DOM structure to select elements from, XPath is not usable with SAX, but some analysers support setting the XPath expressions to analyse before invoking the SAX parser and provide the result for XPath expressions.
    Refer
    https://code.google.com/p/xpath4sax/

  • Why can't I get basic XPath to work in a Java 6 environment?

    Why do I get the following exception when trying to invoke XPathFactory.newInstance() in a Java 6 runtime? The runtime is hosting an OSGi container that underlies an Atlassian JIRA 4.1.x environment.
    [INFO] [talledLocalContainer] Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
    [INFO] [talledLocalContainer] at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:101)
    How can an XPathFactory implementation not be found in a Java 6 environment? Is it because JIRA placed the following three JARs in my dependencies automatically (sucked in from an M2 REPO that is automatically created when setting up this plugin project):
    * xalan-2.7.0.jar
    * xercesImpl-2.9.1.jar
    * xml-apis-1.3.04.jar
    How can I work around this?
    Thanks

    Please see the following Atlassian Answers thread for how I was able to work around the problem:
    https://answers.atlassian.com/questions/22875/how-can-i-use-xpath-when-writing-a-plugin
    Thanks,
    Mike

  • XPath in Java Mapping

    Hello,
    I'd like to ask you if and how it is possible to use XPath expressions in Java Mapping. There is a way with Xalan but SAP is using their own XML parser...
    Many Thanks,
    Milan

    actually he can't use XPath with Java 1.4 DOM and SAX based parsers.
    For example, suppose you want to get the value of field <value> of XML below:
    <xml>
      <data>
        <field>F001</field>
        <value>123</value>
      </data>
    </xml>
    In DOM parser, after parsing, you do something like:
    Node xml = doc.getDocumentElement();
    xml.normalize();
    String value = xml.getFirstChild().getChildNodes().item(1).getNodeValue();
    With XALAM, you do something like:
    doc.getNoveValue("xmldatavalue");
    They work pretty differently.
    Regards,
    Henrique.

  • Java.lang.NoSuchMethodError at at weblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)

    I am getting this xml parser error after migrating to weblogic7.0 from wl 6.1
    I am using the sax parser. I am using the jaxp.jar and xalan.jar for compilation
    as well as running the application. However I am also using the weblogic.jar for
    compilation and runtime in the classpath. I am wandering if there are any changes
    to the version of SAX parser which weblogic 7.0 is using. Does anybody has any
    idea..
    Thanks,
    This is the error which I am getting on the server.
    java.lang.NoSuchMethodError
    at weblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)
    at weblogic.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:366)
    at weblogic.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:190)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactory
    Impl.java:232)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactory
    Impl.java:331)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImp
    l.java:875)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryI
    mpl.java:757)
    at weblogic.xml.jaxp.WebLogicTransformerFactory.newTransformer(WebLogicTransformerFactory.ja
    va:195)
    at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.ja

    The version of the xalan in weblogic7.0 is 2.2 transformer.
    You can refer to the following upgrade guide.
    Ajay
    "sameer" <[email protected]> wrote in message
    news:3e78d50e$[email protected]..
    >
    I am getting this xml parser error after migrating to weblogic7.0 from wl6.1
    I am using the sax parser. I am using the jaxp.jar and xalan.jar forcompilation
    as well as running the application. However I am also using theweblogic.jar for
    compilation and runtime in the classpath. I am wandering if there are anychanges
    to the version of SAX parser which weblogic 7.0 is using. Does anybody hasany
    idea..
    Thanks,
    This is the error which I am getting on the server.
    java.lang.NoSuchMethodError
    atweblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)
    atweblogic.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:366)
    atweblogic.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:190)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(Trans
    formerFactory
    Impl.java:232)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(Trans
    formerFactory
    Impl.java:331)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transfor
    merFactoryImp
    l.java:875)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transf
    ormerFactoryI
    mpl.java:757)
    atweblogic.xml.jaxp.WebLogicTransformerFactory.newTransformer(WebLogicTransfor
    merFactory.ja
    va:195)
    atweblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransfor
    merFactory.ja

  • Java XML Parser v2 xpath problem

    I have a lot of trouble using the xpath functionality. I want to get the name of different elements. I'm using some xpath expressions which in my opinion should work (see http://www.w3.org/TR/xpath ), but they don't. I'm calling XMLNode.selectSingleNode.
    For example :
    /*/name()
    name(/*[1])
    name(/*)
    name()
    I've tried those with Saxon and they do work. Using the Oracle implementation an exception is thrown on most expressions. So what's wrong here?
    Bye,
    Jan

    Consider this example
    --- Test.java -----
    import java.io.*;
    import javax.xml.transform.sax.SAXSource;
    import net.sf.saxon.sxpath.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.InputSource;
    public class Test
    public Test() {
    try {
    DOMParser domParser = new DOMParser();
    domParser.parse(new FileReader("test.xml"));
    XMLDocument document = domParser.getDocument();
    InputSource is = new InputSource(new File("test.xml").toURL().toString());
    SAXSource source = new SAXSource(is);
    testXPathOracle(document,"count(//*)");
    testXPathOracle(document,"name(/*)");
    testXPathOracle(document,"name(/root)");
    testXPathOracle(document,"/*/name()");
    testXPathSaxon(source,"count(//*)");
    testXPathSaxon(source,"name(/*)");
    testXPathSaxon(source,"name(/root)");
    testXPathSaxon(source,"/*/name()");
    } catch(Exception e) {
    System.out.println(e.getMessage());
    public void testXPathOracle(XMLNode context, String xpath) {
    try {
    Node node = context.selectSingleNode(xpath);
    System.out.println(node.getNodeValue());
    } catch(Exception e) {
    System.out.println(e.getMessage());
    public void testXPathSaxon(SAXSource source, String xpath) {
    try {
    XPathEvaluator xpe = new XPathEvaluator();
    XPathExpression exp = xpe.createExpression(xpath);
    Object object = exp.evaluateSingle(source);
    System.out.println(object);
    } catch(Exception e) {
    System.out.println(e.getMessage());
    public static void main(String[] args) {
    Test test = new Test();
    --- test.xml -----
    <root>
         <element/>
    </root>
    Result is on my computer:
    Unknown expression at EOF: (count(//*))[1].
    Unknown expression at EOF: (name(/*))[1].
    Unknown expression at EOF: (name(/root))[1].
    Error in expression: '(/*/name())[1]'.
    2
    root
    root
    root
    I think the xpath expressions are valid. So what's wrong?

Maybe you are looking for

  • Error in transaction code ABAON

    Dear all, my user gets an error while he is running ABAON tc, its an ABAP runtime error GETWA_NOT_ASSIGNED Pls kindly assist me

  • 802.1X Authentication Failed with WPA 1/2

    Hi i have a wlc 2106 , when a user want to connnect to the wireless , it will show the log as below . the user can not connect to the wireless network . After disable and re-enable the wifi nic or connect to another AP(not cisco ) and retry to connec

  • Unhandled exception detected during a "MergeData" operation.

    I am trying to open a Interactive PDF form through browser window. I am running a SAP ABAP+Java ERP ECC 6.0 system and i have installed ADS service. All four tests, FP_TEST_00, FP_PDF_TEST_00, FP_TEST_IA_00 and FP_CHECK_DESTINATION_SERVICE run okay a

  • Does the hp psc 1210v all-in-one have the ability to print back to front?

    My hp psc 1210v all-in-one is still working and it is driving me crazy that this printer doesn't have the ability to print back to front. I am also upset that there is no software to print double sided like with the newer hp printers. Is it just me o

  • Half duplex or full duplex configuration for MDS9124 management port?

    Hi All, Is it possible to set the management port of mds 9124 about half or full duplex configuration? I want to correct following error: Jun 13 10:27:20.799 GMT: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on GigabitEthernet4/18 (not half dup