Java.lang.NullPointerException by parsing a string into an int

Hi,
I am trying to call a method with the first argument as an int.
I have successfully tested to call it with normal int, it works.
The problem is that the int i need to send has first to be casted from a string ( a jtext field basically)
what i do is :
destAddrInt = (int)Integer.parseInt(destAddr.trim());
this.sendCommand(destAddrInt , cmdShortArray);but what ever i try it will not work, i always get the java.lang.NullPointerException.
i have even tried to copy the value into an int:
destAddrInt = (int)Integer.parseInt(destAddr.trim());
int dum;
dum = destAddrInt;
this.sendCommand(dum, cmdShortArray);What can I do?
Thanks for your help!

Why do you need to typecast the int again into an integer after you have parsed it?This was actually my last try (I did several tries to find a solution)!
Ok, know I did follow the stack trace with ex.printStackTrace(); and found that the exception was afterward (some uninitialized Set).
And now it work, and of course even with
Integer.parseInt(destAddr.trim())
If I had to guess, I'd say it's in the call to the trim() method on destAddr.Trim has not be a problem).
Thanks for your help!

Similar Messages

  • Java.lang.NullPointerException in Parser

    Hi,
    I appreciate any idea that can help me.
    I'm processing a sql sentence that can retrive 10.000 rows with XSU.
    I generate xml files with 1000 rows from the resultset and then I transform this xmls into xml files based of Onix Standard.
    I've nullpointer exception in random way, but I supose that there is a problem when the xml files are transformed.
    There are any limitation for user parser and tranformer. I supose that there is a memory problem with this because the class consume a lot of CPU memory.
    Thank in advance.

    Thank every body.
    I increase -mx stack to 200 but the NullPointerexception followed showed in my screen.
    In that moment I'm running the java program with jdk1.2.2, because Jdeveloper look like very hard.
    Some of random exception are here:
    Java.lang.NullPointerException
    void java.io.OutputStreamWriter.write(char[], int, int)
    void oracle.xml.parser.v2.XMLOutputStream.flush()
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLDocument.print(oracle.xml.parser.v2.PrintDriver)
    void oracle.xml.parser.v2.XMLDocument.print(java.io.OutputStream)
    void onix.IsbnXmlProcessor.main(java.lang.String[])
    Exception in thread main
    Se genero la excepcion al instanciar un Stylesheet
    java.lang.NullPointerException
    java.lang.String java.lang.String.intern()
    java.lang.String oracle.xml.parser.v2.XSLParseString.getQname()
    int oracle.xml.parser.v2.XSLParseString.nextToken()
    oracle.xml.parser.v2.XSLExprBase oracle.xml.parser.v2.XSLNodeSetExpr.parse(oracle.xml.parser.v2.XSLParseString, boolean, boolean)
    oracle.xml.parser.v2.XSLPatternInt oracle.xml.parser.v2.XSLExprBase.createPattern(java.lang.String, oracle.xml.parser.v2.NSResolver)
    void oracle.xml.parser.v2.XSLTemplate.<init>(oracle.xml.parser.v2.XMLElement, oracle.xml.parser.v2.XSLStylesheet, int, int)
    void oracle.xml.parser.v2.XSLStylesheet.updateStylesheet(oracle.xml.parser.v2.XMLDocument, int)
    void oracle.xml.parser.v2.XSLStylesheet.initStylesheet(oracle.xml.parser.v2.XMLDocument, java.net.URL)
    void oracle.xml.parser.v2.XSLStylesheet.<init>(oracle.xml.parser.v2.XMLDocument, java.net.URL)
    void onix.XMLToFile.transform(oracle.xml.parser.v2.XMLDocument, java.lang.String, java.lang.String)
    void onix.IsbnXmlGenerator.main(java.lang.String[])
    Se genero la excepcion al procesarse el xsl
    java.lang.NullPointerException
    void oracle.xml.parser.v2.XSLProcessor.processXSL(oracle.xml.parser.v2.XSLStylesheet, oracle.xml.parser.v2.XMLDocument, java.io.OutputStream)
    void onix.XMLToFile.transform(oracle.xml.parser.v2.XMLDocument, java.lang.String, java.lang.String)
    void onix.IsbnXmlGenerator.main(java.lang.String[])
    Se genero onix_2000.xml
    java.lang.NullPointerException
    void java.lang.Runtime.gc()
    void java.lang.System.gc()
    void onix.IsbnXmlGenerator.main(java.lang.String[])
    Exception in thread main
    java.lang.NullPointerException
    java.lang.String java.lang.StringBuffer.toString()
    void oracle.xml.parser.v2.XMLPrintDriver.printEndTag(oracle.xml.parser.v2.XMLElement, boolean)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLDocument.print(oracle.xml.parser.v2.PrintDriver)
    void oracle.xml.parser.v2.XMLDocument.print(java.io.OutputStream)
    void onix.IsbnXmlGenerator.setGenerator(java.lang.String)
    void onix.IsbnXmlGenerator.<init>(java.lang.String)
    void onix.IsbnXmlProcessor.main(java.lang.String[])
    java.lang.NullPointerException
    void oracle.xml.parser.v2.XMLPrintDriver.printEndTag(oracle.xml.parser.v2.XMLElement, boolean)
    void oracle.xml.parser.v2.XMLPrintDriver.printEl ement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLPrintDriver.printElement(oracle.xml.parser.v2.XMLElement)
    void oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(oracle.xml.parser.v2.XMLNode)
    void oracle.xml.parser.v2.XMLDocument.print(oracle.xml.parser.v2.PrintDriver)
    void oracle.xml.parser.v2.XMLDocument.print(java.io.OutputStream)
    void onix.IsbnXmlGenerator.setGenerator(java.lang.String)
    void onix.IsbnXmlGenerator.<init>(java.lang.String)
    void onix.IsbnXmlProcessor.main(java.lang.String[])
    Somebody Know how can I use OracleXMLQuery getSAX method....I appreciate an examples.
    null

  • Java.lang.NullPointerException errors when creating an object in Int.Build.

    We are on XI 7.0 AIX 64bit
    When we try to create an object in Integration Builder we get following errors:
    Internal Problem Occured (Internal Problem)
    java.lang.NullPointerException
    I have seen similar topics reported. They pointed to problems with SDK 1.4.2_10
    We have downgraded our Java 64 on AIX from SR6 back to SR5. So I guess we are back on SDK 1.4.2_2 (in AIX versions are slightly different and the version of SDK is shown as 1.4.2.75 as oposed to previous 1.4.2.100)
    Unfortunately downgrade of JAVA did not fix our problem. Did anyone managed to fix this? This is pretty much stopping us from doing anything on XI:(
    Here is the detailed log we are getting:
    #12 11:33:53 [AWT-EventQueue-0] FINE AutoLog.created.com.sap.aii.utilxi.swing.framework.FrameworkException: com.sap.aii.utilxi.swing.framework.FrameworkException: Internal problem occurred
         at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.init(ExceptionDialog.java:116)
         at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.<init>(ExceptionDialog.java:93)
         at com.sap.aii.utilxi.swing.toolkit.Guitilities.showExceptionDialog(Guitilities.java:1137)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:162)
         at com.sap.aii.ibdir.gui.scenario.wizard.CACreatePanel.postCreate(CACreatePanel.java:201)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doFakeCreate(CreateDialog.java:408)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doCreate(CreateDialog.java:392)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.access$100(CreateDialog.java:50)
         at com.sap.aii.utilxi.swing.framework.CreateDialog$CreateAction.actionPerformed(CreateDialog.java:382)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog.show(Unknown Source)
         at com.sap.aii.utilxi.swing.toolkit.BaseDialog.show(BaseDialog.java:320)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.showDialog(CreateDialog.java:149)
         at com.sap.aii.utilxi.swing.framework.cmd.CreateCommand.execute(CreateCommand.java:110)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)
         at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:69)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #11 11:33:53 [AWT-EventQueue-0] DEBUG AutoLog.created.com.sap.aii.utilxi.swing.framework.FrameworkException: Internal problem occurred
    #10 11:33:53 [AWT-EventQueue-0] FINE AutoLog.created.java.lang.NullPointerException: java.lang.NullPointerException
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.createPageById(PageFactory.java:477)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.getPageById(PageFactory.java:516)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.getPageByNumber(PageFactory.java:527)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.ProxyPage.update(ProxyPage.java:55)
         at com.sap.aii.ibdir.gui.scenario.wizard.core.WizardContext.publishPage(WizardContext.java:2022)
         at com.sap.aii.ibdir.gui.scenario.wizard.core.WizardContext.processPageEvent(WizardContext.java:285)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizard.firePageEvent(BasicWizard.java:64)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizard.setCurrentPage(BasicWizard.java:123)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog$WizardSelect.valueChanged(BasicWizardDialog.java:308)
         at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
         at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
         at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
         at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog$StepListModel.setSelectionInterval(BasicWizardDialog.java:337)
         at javax.swing.JList.setSelectedIndex(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog.setInitPages(BasicWizardDialog.java:152)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog.showDialog(BasicWizardDialog.java:74)
         at com.sap.aii.ibdir.gui.scenario.wizard.ConfigurationWizardCommand.execute(ConfigurationWizardCommand.java:80)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)
         at com.sap.aii.ibdir.gui.scenario.wizard.CACreatePanel.postCreate(CACreatePanel.java:201)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doFakeCreate(CreateDialog.java:408)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doCreate(CreateDialog.java:392)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.access$100(CreateDialog.java:50)
         at com.sap.aii.utilxi.swing.framework.CreateDialog$CreateAction.actionPerformed(CreateDialog.java:382)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog.show(Unknown Source)
         at com.sap.aii.utilxi.swing.toolkit.BaseDialog.show(BaseDialog.java:320)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.showDialog(CreateDialog.java:149)
         at com.sap.aii.utilxi.swing.framework.cmd.CreateCommand.execute(CreateCommand.java:110)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)
         at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:69)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #9 11:33:53 [AWT-EventQueue-0] DEBUG AutoLog.created.java.lang.NullPointerException: null
    #8 11:33:53 [AWT-EventQueue-0] ERROR com.sap.aii.utilxi.swing.toolkit.ExceptionDialog: Throwable
    Thrown:
    java.lang.NullPointerException: null
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.createPageById(PageFactory.java:477)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.getPageById(PageFactory.java:516)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.PageFactory.getPageByNumber(PageFactory.java:527)
         at com.sap.aii.ibdir.gui.scenario.wizard.page.ProxyPage.update(ProxyPage.java:55)
         at com.sap.aii.ibdir.gui.scenario.wizard.core.WizardContext.publishPage(WizardContext.java:2022)
         at com.sap.aii.ibdir.gui.scenario.wizard.core.WizardContext.processPageEvent(WizardContext.java:285)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizard.firePageEvent(BasicWizard.java:64)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizard.setCurrentPage(BasicWizard.java:123)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog$WizardSelect.valueChanged(BasicWizardDialog.java:308)
         at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
         at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
         at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
         at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog$StepListModel.setSelectionInterval(BasicWizardDialog.java:337)
         at javax.swing.JList.setSelectedIndex(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog.setInitPages(BasicWizardDialog.java:152)
         at com.sap.aii.utilxi.swing.framework.wizard.BasicWizardDialog.showDialog(BasicWizardDialog.java:74)
         at com.sap.aii.ibdir.gui.scenario.wizard.ConfigurationWizardCommand.execute(ConfigurationWizardCommand.java:80)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)
         at com.sap.aii.ibdir.gui.scenario.wizard.CACreatePanel.postCreate(CACreatePanel.java:201)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doFakeCreate(CreateDialog.java:408)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.doCreate(CreateDialog.java:392)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.access$100(CreateDialog.java:50)
         at com.sap.aii.utilxi.swing.framework.CreateDialog$CreateAction.actionPerformed(CreateDialog.java:382)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog.show(Unknown Source)
         at com.sap.aii.utilxi.swing.toolkit.BaseDialog.show(BaseDialog.java:320)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at com.sap.aii.utilxi.swing.framework.CreateDialog.showDialog(CreateDialog.java:149)
         at com.sap.aii.utilxi.swing.framework.cmd.CreateCommand.execute(CreateCommand.java:110)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)
         at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)
         at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:69)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #7 11:33:23 [AWT-EventQueue-0] FINE AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "ConfAsstntHelp" is not registered in the service class Type Service - Type Information
         at com.sap.aii.ib.core.service.ServiceBase.getServiceImpl(ServiceBase.java:71)
         at com.sap.aii.ib.bom.gen.TypeServiceImpl.getTypeInformation(TypeServiceImpl.java:82)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.getTypeInfo(InternalXiItemService.java:23)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.createEmptyXiItem(InternalXiItemService.java:92)
         at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.createEmptyXiItem(XiItemServiceProvider.java:97)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemServiceBase.<init>(InternalXiItemServiceBase.java:38)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemServiceBase.<init>(InternalXiItemServiceBase.java:25)
         at com.sap.aii.ibdir.gui.xiitem.DirInternalXiItemService$ForConfAssistantHelp.<init>(DirInternalXiItemService.java:607)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.localStartup(StartupCodeEntry.java:119)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:73)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:383)
         at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:209)
         at com.sap.aii.ib.gui.login.SplashLoginFrame$6.run(SplashLoginFrame.java:429)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #6 11:33:23 [AWT-EventQueue-0] DEBUG AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "ConfAsstntHelp" is not registered in the service class Type Service - Type Information
    #5 11:33:23 [AWT-EventQueue-0] FINE AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "TypeGroupFolder" is not registered in the service class Type Service - Type Information
         at com.sap.aii.ib.core.service.ServiceBase.getServiceImpl(ServiceBase.java:71)
         at com.sap.aii.ib.bom.gen.TypeServiceImpl.getTypeInformation(TypeServiceImpl.java:82)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.getTypeInfo(InternalXiItemService.java:23)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.createEmptyXiItem(InternalXiItemService.java:92)
         at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.createEmptyXiItem(XiItemServiceProvider.java:97)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemServiceBase.<init>(InternalXiItemServiceBase.java:38)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemServiceBase.<init>(InternalXiItemServiceBase.java:25)
         at com.sap.aii.ibdir.gui.xiitem.DirInternalXiItemService$ForFolder.<init>(DirInternalXiItemService.java:752)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.localStartup(StartupCodeEntry.java:113)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:73)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:383)
         at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:209)
         at com.sap.aii.ib.gui.login.SplashLoginFrame$6.run(SplashLoginFrame.java:429)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #4 11:33:23 [AWT-EventQueue-0] DEBUG AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "TypeGroupFolder" is not registered in the service class Type Service - Type Information
    #3 11:33:22 [AWT-EventQueue-0] FINE AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "TypeConntestObj" is not registered in the service class Type Service - Type Information
         at com.sap.aii.ib.core.service.ServiceBase.getServiceImpl(ServiceBase.java:71)
         at com.sap.aii.ib.bom.gen.TypeServiceImpl.getTypeInformation(TypeServiceImpl.java:82)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.getTypeInfo(InternalXiItemService.java:23)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.createEmptyXiItem(InternalXiItemService.java:92)
         at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.createEmptyXiItem(XiItemServiceProvider.java:97)
         at com.sap.aii.ib.gui.xiitem.InternalXiItemServiceForNameNamespaceObjects.addType(InternalXiItemServiceForNameNamespaceObjects.java:68)
         at com.sap.aii.ib.gui.xiitem.InternalXiItemServiceForNameNamespaceObjects.<init>(InternalXiItemServiceForNameNamespaceObjects.java:55)
         at com.sap.aii.ib.gui.applcomp.StartupCodeEntry.guiStartup(StartupCodeEntry.java:151)
         at com.sap.aii.ib.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:108)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:52)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:383)
         at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:209)
         at com.sap.aii.ib.gui.login.SplashLoginFrame$6.run(SplashLoginFrame.java:429)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #2 11:33:22 [AWT-EventQueue-0] DEBUG AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "TypeConntestObj" is not registered in the service class Type Service - Type Information
    #1 11:33:22 [AWT-EventQueue-0] FINE AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "versConflList" is not registered in the service class Type Service - Type Information
         at com.sap.aii.ib.core.service.ServiceBase.getServiceImpl(ServiceBase.java:71)
         at com.sap.aii.ib.bom.gen.TypeServiceImpl.getTypeInformation(TypeServiceImpl.java:82)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemService.getTypeInfo(InternalXiItemService.java:23)
         at com.sap.aii.ib.gui.xiitem.services.InternalXiItemServiceBase.<init>(InternalXiItemServiceBase.java:44)
         at com.sap.aii.ib.gui.xiitem.CommonInternalXiItemService$ForVersionConflictList.<init>(CommonInternalXiItemService.java:326)
         at com.sap.aii.ib.gui.applcomp.StartupCodeEntry.guiStartup(StartupCodeEntry.java:147)
         at com.sap.aii.ib.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:108)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ibdir.gui.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:52)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:383)
         at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:209)
         at com.sap.aii.ib.gui.login.SplashLoginFrame$6.run(SplashLoginFrame.java:429)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    #0 11:33:22 [AWT-EventQueue-0] DEBUG AutoLog.created.com.sap.aii.ib.core.service.TypeNotRegisteredException: Type "versConflList" is not registered in the service class Type Service - Type Information

    Hi Robert,
    For the same issue I follwed as below.Hope to sort out this problem.
    1)check after installing J2sdk1.4.2.13(you are with 1.42.75(might be some problem with upgrade version.I am not sure)
    2)Restart the J2EE engine.
    3)check the post installation steps again.
    Atlast, I solved this problem after Re-doing the post installation steps and above 2 process. I am not sure from which process it was resolved.
    Regards
    Sridhar

  • Java.lang.NullPointerException javax.xml.parsers.DocumentBuilder.parse

    Hi all,
    i have a problem by solving an error in my code. The Code is mainly from Ian Darwin.
    The code i am running works with j2sdk1.4.2_04. But now i have to bring it to work with jdk1.6.0_13.
    The code parses xml documents. With small xml documents the code works. With large xml documents i get the following error while running the produced class file.
    Exception in thread "main" java.lang.NullPointerException
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.setChunkIndex(DeferredDocumentImpl.java:1944)
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.appendChild(DeferredDocumentImpl.java:644)
    at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.characters(AbstractDOMParser.java:1191)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(XMLDTDValidator.java:862)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
    at XParse.parse(XParse.java:38)
    at XParse$JFileChooserrv.<init>(XParse.java:119)
    at XParse.main(XParse.java:213)
    I know what a java.lang.NullPointerException mens. But i don't know where i have to look for. Specially i don't know what or where "com.sun.org.apache...." is.
    Is there a package that a have to add to the environment? Can some one tell my where i can find this package?
    I wrote the code for some years ago, 2006 or so. With the knew jdk1.6.0_13 some thinks chance in the environment. Couldn't find what exactly.
    The code has only 215 lines, but some how i can't add it to this Message, because Maximum allowed is only 7500.
    Is there an other Forum, which may is better for my question?

    Here is the code:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Container;
    import javax.swing.JTextArea;
    * This code is mainly from @author Ian Darwin, [email protected]
    public class XParse {
         /** Convert the file */
         public static void parse(File file, boolean validate) {
              try {
                   System.err.println("");
                   String fileName = file.getAbsolutePath();
                   System.err.println("Parsing " + fileName + "...");
                   // Make the document a URL so relative DTD works.
                   //String uri = new File(fileName).getAbsolutePath();
                   //System.err.println(uri);
                   DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
                   if (validate)
                   f.setValidating(true);
                   DocumentBuilder p = f.newDocumentBuilder();
                   p.setErrorHandler(new MyErrorHandler(System.err));
                   //XmlDocument doc = XmlDocument.createXMLDocument(file);
                   boolean vaild =  p.isValidating();
                   if (vaild) {
                        System.out.println("yes parsing");
                        Document doc = p.parse(file); // <<<< ERROR
                   System.out.println("Parsed OK");
              } catch (SAXParseException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("At line " + ex.getLineNumber());
                   System.err.println("+================================+");
              } /**catch (RuntimeException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   //System.err.println("At line " + ex.getLineNumber());
                   //System.err.println("At line " + ex.getMessage());
                   System.err.println("+================================+");
              }**/ catch (SAXException ex) {
                   System.err.println("+================================+");
                   System.err.println("|          *SAX Error*           |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("+================================+");
              /*}} catch (SAXNotRecognizedException  ex) {
                   System.err.println(" no SAX");*/
              } catch (ParserConfigurationException ex) {
                   System.err.println(" ???");
               } catch (IOException ex) {
                   System.err.println("+================================+");
                   System.err.println("|           *XML Error*          |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
    private static class JFileChooserrv {
         JFileChooserrv(JFrame f, boolean vverabreiten) {
              String openfile;
              String verror;
              boolean validate = true;
              final JFrame frame = f;
              String vFilename = "Z:\\Boorberg\\parsen_vista\\daten";
              //String vFilename = "C:\\";
              File vFile = new File(vFilename);
              final JFileChooser chooser = new JFileChooser(vFile);
              JFileFilter filter = new JFileFilter();
              filter.addType("xml");
              filter.addType("sgml");
              filter.addType("html");
              filter.addType("java");
              filter.setDescription("strukturfiles");
              chooser.addChoosableFileFilter(filter);
              boolean vjeas = true;
              chooser.setMultiSelectionEnabled(vjeas);
              int returnVal = chooser.showOpenDialog(frame);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   //Array  filearry[] = chooser.getSelectedFiles();
                   //if (vFile = chooser.getSelectedFiles()) {
                   //File  file[] = chooser.getSelectedFiles();
                   File  vfile[] = chooser.getSelectedFiles();
                   //String openfile = new String();
                   int vlenght = vfile.length;
                   if (vlenght>1) {
                        int x=0;
                        while (x< vlenght) {
                                  parse(vfile[x], validate);
                                  x = x +1;
                   if (vlenght<=1) {
                        File v2file = chooser.getSelectedFile();
                             parse(v2file, validate);
              } else {
                   System.out.println("You did not choose a filesystem           object.");
         System.exit(0);
    private static class JFileFilter extends javax.swing.filechooser.FileFilter {
         protected String description, vnew;
         protected ArrayList<String> exts = new ArrayList<String>();
         protected boolean vtrue;
         public void addType(String s) {
              exts.add(s);
         /** Return true if the given file is accepted by this filter. */
         public boolean accept(File f) {
              // Little trick: if you don't do this, only directory names
              // ending in one of the extentions appear in the window.
              if (f.isDirectory()) {
                   return true;
              } else if (f.isFile()) {
                   Iterator it = exts.iterator();
                   while (it.hasNext()) {
                        if (f.getName().endsWith((String)it.next()))
                             return true;
              // A file that didn't match, or a weirdo (e.g. UNIX device file?).
              return false;
         /** Set the printable description of this filter. */
         public void setDescription(String s) {
              description = s;
         /** Return the printable description of this filter. */
         public String getDescription() {
              return description;
    private static class MyErrorHandler implements ErrorHandler {
            // Error handler output goes here
            private PrintStream out;
            MyErrorHandler(PrintStream out) {
                this.out = out;
             * Returns a string describing parse exception details
            private String getParseExceptionInfo(SAXParseException spe) {
                String systemId = spe.getSystemId();
                if (systemId == null) {
                    systemId = "null";
                String info = "URI=" + systemId +
                    " Line=" + spe.getLineNumber() +
                    ": " + spe.getMessage();
                return info;
            // The following methods are standard SAX ErrorHandler methods.
            // See SAX documentation for more info.
            public void warning(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                //out.println("Warning: " + getParseExceptionInfo(spe));
            public void error(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
            public void fatalError(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Fatal Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
         public static void main(String[] av) {
              JFrame vframe = new JFrame("chose files to pars");
              boolean vverabreiten = true;
              boolean validate = true;
              JFileChooserrv vdateienwaehlen = new JFileChooserrv(vframe, vverabreiten);
    }The Stack Trace i posted in the last Message. But i couldn't read it, i am not a programmer.

  • Java.lang.NullPointerException at com.sun.mail.iap.Response.parse

    I am getting this error when I try to download a message using IMAP from exchange server
    java.lang.NullPointerException
         at com.sun.mail.iap.Response.parse(Response.java:99)
         at com.sun.mail.iap.Response.<init>(Response.java:68)
         at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:31)
         at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:105)
         at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:153)
         at com.sun.mail.iap.Protocol.command(Protocol.java:215)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:882)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:874)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:656)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:645)
    This error occurs intermittantly. I placed one large mail (around 600 MB) and few normal size mails on exchange server. In few testing runs, this error occured while downloading the large mail as well as one normal mail. In one test run, all mails got downloaded successfully.
    Could anyone please suggest the cause and resolution?
    Thanks.

    I turned on the session debugging. I am running my application on Linux, so the debugging info was moved to a log file. This log file is very large (around 1GB) and I am unable to open it.
    One more thing: I am trying Message.writeTo() method to download the message. If an OutOfMemoryError occurs, I catch it and try to download the message using GetInputStream. NullPointerException is occuring in both the cases.
    Exception stack trace with writeTo():
    java.lang.NullPointerException
         at com.sun.mail.iap.Response.parse(Response.java:99)
         at com.sun.mail.iap.Response.<init>(Response.java:68)
         at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:31)
         at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:105)
         at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:153)
         at com.sun.mail.iap.Protocol.command(Protocol.java:215)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:882)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:874)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:656)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:645)
         at com.sun.mail.imap.IMAPMessage.writeTo(IMAPMessage.java:536)
    Exception stack trace with getInputStream():
    java.lang.NullPointerException
         at com.sun.mail.iap.Response.parse(Response.java:99)
         at com.sun.mail.iap.Response.<init>(Response.java:68)
         at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:31)
         at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:105)
         at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:153)
         at com.sun.mail.iap.Protocol.command(Protocol.java:215)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:882)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:874)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:653)
         at com.sun.mail.imap.protocol.IMAPProtocol.peekBody(IMAPProtocol.java:637)
         at com.sun.mail.imap.IMAPMessage.loadHeaders(IMAPMessage.java:1055)
         at com.sun.mail.imap.IMAPMessage.getAllHeaders(IMAPMessage.java:642)
    First I try to download the headers in case of an OutOfMemoryError. The above trace shows that.
    Could anyone point out the problem and help resolving it?

  • String problem java.lang.NullPointerException

    Hii all :)
    How are u?? :)
    I have a little a problem with String object in this class (You can say its a homework ^__^ ).
    public class Personne {
         private String nom;
         private String prenom;
         private int age;
         public Personne(){
              this(null, null, 0);
         public Personne(String nom, String prenom, int age){
              setNom(nom);
              setPrenom(prenom);
              setAge(age);
         public void setNom(String nom){
              this.nom = new String(nom);
         public void setPrenom(String prenom){
              this.prenom = new String(prenom);
         public void setAge(int age){
              this.age = age;
         public String getNom(){
              return this.nom;
         public String getPrenom(){
              return this.prenom;
         public int getAge(){
              return this.age;
         public String toString(){
              System.out.print("Nom : " + this.getNom() + ", Penom : " + this.getPrenom() + ", Age : " + this.getAge() + " ");
              return null;
    }When i call the class personne with the Personne() i get these errors in compiling-time :
    Exception in thread "main" java.lang.NullPointerException
         at java.lang.String.<init>(Unknown Source)
         at Personne.setNom(Personne.java:18)
         at Personne.<init>(Personne.java:12)
         at Personne.<init>(Personne.java:8)
         at Main.main(Main.java:4) // The line wich i inisialize my object in my main method.
    can someone help me??
    Thank you alll ^__^
    Edited by: La VloZ on 18 mai 2013 22:50
    Edited by: La VloZ on 18 mai 2013 22:51
    Edited by: La VloZ on 18 mai 2013 22:51
    Edited by: La VloZ on 18 mai 2013 22:53
    Edited by: La VloZ on 18 mai 2013 22:55

    Why the error? Because you invoke the constructor String(String s), with s null. The constructor would produce a new String with the same character sequence as s, but if s is null, it cannot do this, so it throws NullPointerException. What else could it do? Without throwing an exception, a constructor has to create a new object, but there is no raw material, so to speak, for the creation. Think what would/could you do if you had to write such a 'copy constructor' for your own class and you would be passed null.
    Now, the String copy constructor is probably useless, as the javadoc hints. When you have a String already, you don't need to create an identical one, as the original will:
    - Not be garbage collected, if you keep a reference to it
    - Never be modified, as strings are immutable
    You are right that the code you show would 'copy the reference of nom to this.nom' and this is ok. It's exactly what you need, for the reasons above.

  • Java.lang.NullPointerException after logging into portal

    We see the following error in the defaultTrace file when a user logs onto the portal for ESS (the user sees a 500 Internal Error):
    #1.#00144F3B617C006B000004CF000052B5000476A0EE463C6F#1256333471265#com.sap.tc.webdynpro.sessionmanagement#sap.com/tcwddispwda#com.sap.tc.web
    dynpro.sessionmanagement.ExceptionHandler.handleThrowable#Guest#0##n/a##623f0200c01b11de9d3d00144f3b617c#SAPEngine_Application_Thread[impl:3]_
    36##0#0#Error#1#/System/UserInterface#Java###Exception occured during processing of Web Dynpro application . The causing exception is neste
    d.
    [EXCEPTION]
    #2#sap.com/pb/PageBuilder#java.lang.NullPointerException
            at com.sap.security.core.logon.imp.WebLoginCallbackHandler.<init>(WebLoginCallbackHandler.java:41)
            at com.sap.security.core.logon.imp.SAPJ2EECallbackHandler.<init>(SAPJ2EECallbackHandler.java:45)
            at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.getHandler(SAPJ2EEAuthenticator.java:1191)
            at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.getLoggedInUser(SAPJ2EEAuthenticator.java:142)
            at com.sap.tc.webdynpro.serverimpl.wdc.um.ClientUserFactory.getLoggedInClientUser(ClientUserFactory.java:218)
            at com.sap.tc.webdynpro.services.sal.um.core.ClientUserInternal.getLoggedInClientUserInternal(ClientUserInternal.java:75)
            at com.sap.tc.webdynpro.clientserver.session.ClientSession.<init>(ClientSession.java:183)
            at com.sap.tc.webdynpro.serverimpl.defaultimpl.clientsession.HttpClientSession.<init>(HttpClientSession.java:43)
            at com.sap.tc.webdynpro.serverimpl.wdc.adapter.HttpRequestAdapter.createClientSession(HttpRequestAdapter.java:261)
            at com.sap.tc.webdynpro.serverimpl.core.adapter.AbstractHttpRequestAdapter.getSessionObject(AbstractHttpRequestAdapter.java:296)
            at com.sap.tc.webdynpro.serverimpl.core.adapter.AbstractHttpProtocolAdapter.getSessionObject(AbstractHttpProtocolAdapter.java:109)
            at com.sap.tc.webdynpro.clientserver.session.RequestManager.findClientSession(RequestManager.java:264)
            at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:146)
            at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
            at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.
    java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    This only happens immediately after logon; once the user clicks on another tab in ESS, the error is never re-produced again until the user logs off and logs back on.

    EP 7, ESS 603 SP4 P3.
    This apparently is only happening for one specific user. I'm in the process of gathering information about their internet browser to determine if that's the cause.
    I did check the JCos and they all tested successfully.
    Thanks,
    Setu

  • Java.lang.NullPointerException with OracleXMLParser V2

    Hi,
    I am getting java.lang.NullPointerException with OracleXMLParser V2.
    Following is some of the code snippet. I am not sure where I am going
    wrong. I am using the SAXParser. I tried both FileReader as well as URL
    InputSources But I am getting the same error.
    Parser parser = new SAXParser();
    parser.setDocumentHandler(this);
    parser.setEntityResolver(this);
    parser.setDTDHandler(this);
    parser.setErrorHandler(this);
    try {
    FileReader fileReader = new FileReader(defaultFileName);
    //InputSource iSource = new InputSource(fileReader);
    URL myURL = new URL("http://ewdev02/ooppub01.xml");
    InputSource iSource = new InputSource(myURL.toString());
    parser.parse(iSource);
    //parser.parse("http://ewdev02/ooppub01.xml");
    catch (FileNotFoundException fe) {
    System.err.println("File Not Found!");
    catch (SAXParseException se)
    System.out.println("Sax Exception: " + se.getMessage());
    catch (IOException ioe)
    System.out.println("IO Exception: " + ioe.getMessage());
    catch (Exception e){
    System.out.println("Error Parsing: " + e.toString ());
    Here are some of my habdlers:
    public void startDocument() {
    System.out.println("Beginning of the Document!");
    public void endDocument() throws SAXException {
    System.out.println("End of the Document!");
    System.out.println("A total of " + n + "Records inserted in the database!");
    public void startElement(String elname) throws SAXException {
    if (elname.equalsIgnoreCase("DOCS")){
    System.out.println("Biginning of the document! Ignoring <Docs>");
    curColumn = new AIColumns();
    else if (elname.equalsIgnoreCase("DOC")){
    System.out.println("Begining of <DOC>");
    curColumn.flush();
    n++;
    currentElement = elname;
    System.out.println( currentElement );
    public void endElement(String elname) throws SAXException {
    if (elname.equalsIgnoreCase("DOC")){
    System.out.println("End of <DOC>");
    //Now call the function to insert in the database
    try {
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    } catch ( Exception e ) {
    System.err.print("Exception: ");
    System.err.println( e.getMessage() );
    return;
    ..... after this I insert the record into database.
    Your help is greatly appreciated.
    Best Regards,
    Chandra Shirashyad

    Hi,
    Can you please also post the stack trace for where the Null pointer exception is occurring?
    Thank you,
    Oracle XML Team
    null

  • Java.lang.NullPointerException when deploying

    My developers are running into an issue when deploying onto our BPM cluster. At times deployment fails giving these errors. Redeploy the same code immediately it works. It seems like it's only failing on the second managed server though...
    ####<Aug 15, 2013 2:02:32 PM EDT> <Error> <ServletContext-/soa-infra> <fnelbpmd102.fcso.net> <BPM-Appeals-Unit_server2> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <al0h> <> <6e6476ca04c34712:50a1c68c:140828b9bb2:-8000-0000000000017f6b> <1376589752759> <BEA-000000> <Error during deployment
    oracle.fabric.common.FabricException: Operation failed - Member(Id=1, Timestamp=2013-08-15 11:11:18.596, Address=*removed*, MachineId=15781, Location=site:,machine:fnelbpmd101,process:17031, Role=WeblogicServer):Error occurred during deployment of component: Appeals to service engine: implementation.bpmn, for composite: Appeals: java.lang.NullPointerException; .  Please see the server diagnostic logs on BPM-Appeals-Unit_server2 for details
        at oracle.integration.platform.blocks.deploy.CompositeDeploymentCoordinatorMessages.throwOperationFailedOnNode(CompositeDeploymentCoordinatorMessages.java:132)
        at oracle.integration.platform.blocks.deploy.CoherenceCompositeDeploymentCoordinatorImpl.submitRequestAndWaitForCompletion(CoherenceCompositeDeploymentCoordinatorImpl.java:338)
        at oracle.integration.platform.blocks.deploy.CoherenceCompositeDeploymentCoordinatorImpl.coordinateCompositeRedeploy(CoherenceCompositeDeploymentCoordinatorImpl.java:244)
        at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.overwriteExistingComposite(BaseDeployProcessor.java:435)
        at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploySARs(BaseDeployProcessor.java:253)
        at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:168)
        at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:112)
        at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeploy(DeployProcessor.java:100)
        at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.process(DeployProcessor.java:81)
        at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPostInsideLoggingSession(CompositeDeployerServlet.java:219)
        at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPost(CompositeDeployerServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    This is the output from Enterprise Manager:
    oracle.fabric.common.FabricException: Error occurred during deployment of component: Appeals to service engine: implementation.bpmn, for composite: Appeals: java.lang.NullPointerException
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployComponents(CompositeDeploymentConnection.java:245)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deploy(CompositeDeploymentConnection.java:94)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.initDeployment(CompositeDeploymentManagerImpl.java:150)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.load(CompositeDeploymentManagerImpl.java:63)
    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:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.integration.platform.blocks.deploy.DeploymentEventPublisher.invoke(DeploymentEventPublisher.java:77)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy424.load(Unknown Source)
    at oracle.integration.platform.blocks.deploy.CoherenceCompositeDeploymentCoordinatorImpl.handleNewDeploymentCommand(CoherenceCompositeDeploymentCoordinatorImpl.java:596)
    at oracle.integration.platform.blocks.deploy.CoherenceCompositeDeploymentCoordinatorImpl.access$200(CoherenceCompositeDeploymentCoordinatorImpl.java:35)
    at oracle.integration.platform.blocks.deploy.CoherenceCompositeDeploymentCoordinatorImpl$2.entryInserted(CoherenceCompositeDeploymentCoordinatorImpl.java:140)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:568)
    at com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
    at com.tangosol.coherence.component.util.SafeNamedCache.entryInserted(SafeNamedCache.CDB:1)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:26)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.fabric.common.FabricDeploymentException: java.lang.NullPointerException {rootCauses=[]}
    at oracle.bpm.bpmn.engine.service.BPMNServiceEngine.deploy(BPMNServiceEngine.java:492)
    at oracle.bpm.bpmn.engine.service.BPMNServiceEngine.deploy(BPMNServiceEngine.java:161)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployComponents(CompositeDeploymentConnection.java:238)
    ... 27 more
    Caused by: java.lang.NullPointerException
    at java.util.Collections$UnmodifiableMap.<init>(Collections.java:1272)
    at java.util.Collections.unmodifiableMap(Collections.java:1258)
    at oracle.bpm.bpmn.engine.map.builder.BPMNCubeMapBuilderContext.getElementsByTagByProcessId(BPMNCubeMapBuilderContext.java:327)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.FlowNodeToRuntimeModelMapperImpl.getRuntimeId(FlowNodeToRuntimeModelMapperImpl.java:49)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.FlowNodeToRuntimeModelMapperImpl.getRuntimeId(FlowNodeToRuntimeModelMapperImpl.java:43)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.getUniqueFlowNodeId(AlterFlowModel.java:601)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.visitNode(AlterFlowModel.java:570)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseFromStart(AlterFlowModel.java:273)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseModel(AlterFlowModel.java:265)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:434)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseNodeByType(AlterFlowModel.java:385)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseTargets(AlterFlowModel.java:351)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:308)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:462)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseNodeByType(AlterFlowModel.java:395)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseTargets(AlterFlowModel.java:351)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:308)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:462)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseNodeByType(AlterFlowModel.java:395)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseTargets(AlterFlowModel.java:351)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:436)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseNodeByType(AlterFlowModel.java:385)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseTargets(AlterFlowModel.java:351)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:308)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseNodeByType(AlterFlowModel.java:398)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseTargets(AlterFlowModel.java:351)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverse(AlterFlowModel.java:308)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseFromStart(AlterFlowModel.java:275)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.traverseModel(AlterFlowModel.java:265)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.AlterFlowModel.create(AlterFlowModel.java:55)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.ComponentMigrationSupport$ProcessInstanceSynchronizerImpl.build(ComponentMigrationSupport.java:701)
    at oracle.bpm.bpmn.engine.model.runtime.instancehandling.ComponentInstanceMigrationAction$PreProcessTargetComponentAction.execute(ComponentInstanceMigrationAction.java:641)
    at oracle.bpm.bpmn.engine.service.BPMNServiceEngine.deploy(BPMNServiceEngine.java:484)
    ... 29 more

    Not sure if this is related, but I just restarted the whole domain. Everything started fine, but as soon as the second server started the logs were bombarded with an 'MBean attribute access denied.' error....
    MBean: com.oracle.jps:type=JpsCredentialStore
      Operation: getPortableCredentialMap(java.lang.String)
      Detail: Access denied. Required roles: Admin, executing subject: principals=[E1W3, IBPM-FCSO-Development, FCSO_IPM, C2C_Imaging, TMF_DME_USER, TMF_DME_ADMIN, TMF_PARTBN_USER, TMF_PARTBN_ADMIN, TMF_PDRC_USER, TMF_PDRC_ADMIN, TMF_ODC_USER, TMF_ODC_ADMIN, Linux-IBPM-FCSO-Development, Linux-IPM-FCSO-Development, CL_Rep_Appeals_FL_USVI, CL_Rep_Appeals_PR, AppealsBamReportViewers-Dev, AppealsBPMComposerViewProject-Dev, AppealsBPMComposerDeveloper-Dev, AppealsBPMComposerDesigner-Dev, AppealsBPMComposerDeployer-Dev, AppealsBPMComposerCreateProjectFromTemplate-Dev, AppealsBPMComposerCreateNewProject-Dev, AppealsBPMComposerDocumentProject-Dev, AppealsSOADesigner-Dev, AppealsSOAMonitor-Dev, AppealsSOAOperator-Dev, AppealsDeployer-BPM-Dev, AppealsOperator-BPM-Dev, AppealsDeployer-OSB-Dev, AppealsOperator-OSB-Dev]
    java.lang.SecurityException: Access denied. Required roles: Admin, executing subject: principals=[E1W3, IBPM-FCSO-Development, FCSO_IPM, C2C_Imaging, TMF_DME_USER, TMF_DME_ADMIN, TMF_PARTBN_USER, TMF_PARTBN_ADMIN, TMF_PDRC_USER, TMF_PDRC_ADMIN, TMF_ODC_USER, TMF_ODC_ADMIN, Linux-IBPM-FCSO-Development, Linux-IPM-FCSO-Development, CL_Rep_Appeals_FL_USVI, CL_Rep_Appeals_PR, AppealsBamReportViewers-Dev, AppealsBPMComposerViewProject-Dev, AppealsBPMComposerDeveloper-Dev, AppealsBPMComposerDesigner-Dev, AppealsBPMComposerDeployer-Dev, AppealsBPMComposerCreateProjectFromTemplate-Dev, AppealsBPMComposerCreateNewProject-Dev, AppealsBPMComposerDocumentProject-Dev, AppealsSOADesigner-Dev, AppealsSOAMonitor-Dev, AppealsSOAOperator-Dev, AppealsDeployer-BPM-Dev, AppealsOperator-BPM-Dev, AppealsDeployer-OSB-Dev, AppealsOperator-OSB-Dev]
    at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.checkAccess(AbstractMBeanSecurityInterceptor.java:371)
    at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.checkOperationAccess(AbstractMBeanSecurityInterceptor.java:288)
    at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.internalInvoke(AbstractMBeanSecurityInterceptor.java:189)
    at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:252)
    at oracle.security.jps.ee.jmx.JpsJmxInterceptor$2.run(JpsJmxInterceptor.java:358)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.jmx.JpsJmxInterceptor.internalInvoke(JpsJmxInterceptor.java:374)
    at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:252)
    at oracle.as.jmx.framework.generic.spi.interceptors.ContextClassLoaderMBeanInterceptor.internalInvoke(ContextClassLoaderMBeanInterceptor.java:103)
    at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:252)
    at oracle.as.jmx.framework.generic.spi.interceptors.MBeanRestartInterceptor.internalInvoke(MBeanRestartInterceptor.java:116)
    at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:252)
    at oracle.as.jmx.framework.generic.spi.interceptors.LoggingMBeanInterceptor.internalInvoke(LoggingMBeanInterceptor.java:524)
    at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:252)
    at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterMBean.invoke(OracleStandardEmitterMBean.java:924)
    at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterConfigMBean.doInvoke(OracleStandardEmitterConfigMBean.java:398)
    at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterConfigMBean.invoke(OracleStandardEmitterConfigMBean.java:365)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at weblogic.management.mbeanservers.domainruntime.internal.FederatedMBeanServerInterceptor.invoke(FederatedMBeanServerInterceptor.java:349)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
    at weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:263)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
    at weblogic.management.mbeanservers.internal.SecurityMBeanMgmtOpsInterceptor.invoke(SecurityMBeanMgmtOpsInterceptor.java:65)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
    at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:444)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:323)
    at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectorSubjectForwarder.java:663)
    at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:661)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invoke(JMXConnectorSubjectForwarder.java:654)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1454)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:74)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1295)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1394)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:818)
    at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:222)
    at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
    at weblogic.management.remote.wlx.ClientProvider$WLXMBeanServerConnectionWrapper.invoke(ClientProvider.java:291)
    at weblogic.management.remote.wlx.ClientProvider$WLXMBeanServerConnectionWrapper.invoke(ClientProvider.java:291)
    at oracle.sysman.emas.sdk.discovery.util.MonitoringCredentialsUtil.getMonitoringUidAndPassword(MonitoringCredentialsUtil.java:130)
    at oracle.sysman.emas.sdk.discovery.util.MonitoringCredentialsUtil.getMonitoringUidAndPasswordForFarm(MonitoringCredentialsUtil.java:107)
    at oracle.sysman.emas.sdk.model.mas.WLTransientTargetProvider.updateProperties(WLTransientTargetProvider.java:418)
    at oracle.sysman.emas.sdk.model.mas.WLTransientTargetProvider.getTransientTargets(WLTransientTargetProvider.java:218)
    at oracle.sysman.emdrep.repoless.TransientTargetCache.getCachedTargets(TransientTargetCache.java:196)
    at oracle.sysman.emdrep.repoless.RepolessTargetManager.pollAllTransientTargets(RepolessTargetManager.java:1486)
    at oracle.sysman.emdrep.repoless.RepolessTargetManager.getAllTargets(RepolessTargetManager.java:1591)
    at oracle.sysman.emdrep.repoless.RepolessTargetManager.getTargets(RepolessTargetManager.java:1116)
    at oracle.sysman.emSDK.repoless.TargetManager.getTargets(TargetManager.java:98)
    at oracle.sysman.emSDK.tgt.targetaccess.TargetManager.getAllTargetInstances(TargetManager.java:152)
    at oracle.sysman.emSDK.tgt.targetaccess.TargetManager.getAllTargetInstances(TargetManager.java:125)
    at oracle.sysman.core.model.targetauth.AppServerLogin.loginAction(AppServerLogin.java:1360)
    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:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:890)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:102)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:183)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: java.lang.SecurityException: Access denied. Required roles: Admin, executing subject: principals=[E1W3, IBPM-FCSO-Development, FCSO_IPM, C2C_Imaging, TMF_DME_USER, TMF_DME_ADMIN, TMF_PARTBN_USER, TMF_PARTBN_ADMIN, TMF_PDRC_USER, TMF_PDRC_ADMIN, TMF_ODC_USER, TMF_ODC_ADMIN, Linux-IBPM-FCSO-Development, Linux-IPM-FCSO-Development, CL_Rep_Appeals_FL_USVI, CL_Rep_Appeals_PR, AppealsBamReportViewers-Dev, AppealsBPMComposerViewProject-Dev, AppealsBPMComposerDeveloper-Dev, AppealsBPMComposerDesigner-Dev, AppealsBPMComposerDeployer-Dev, AppealsBPMComposerCreateProjectFromTemplate-Dev, AppealsBPMComposerCreateNewProject-Dev, AppealsBPMComposerDocumentProject-Dev, AppealsSOADesigner-Dev, AppealsSOAMonitor-Dev, AppealsSOAOperator-Dev, AppealsDeployer-BPM-Dev, AppealsOperator-BPM-Dev, AppealsDeployer-OSB-Dev, AppealsOperator-OSB-Dev]
    at oracle.as.jmx.framework.wls.spi.security.WLSMBeanSecurityHelper.isInWlsGlobalSecurityRoles(WLSMBeanSecurityHelper.java:245)
    at oracle.as.jmx.framework.wls.spi.security.WLSMBeanSecurityHelper.checkGlobalSecurityRoleBasedAccess(WLSMBeanSecurityHelper.java:139)
    at oracle.as.jmx.framework.wls.spi.security.WLSConfigMBeanSecurityInterceptor.checkGlobalRoleBasedAccess(WLSConfigMBeanSecurityInterceptor.java:46)
    at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.checkAccess(AbstractMBeanSecurityInterceptor.java:347)
    ... 126 more
    After this there's a "failed to execurte hearbeat update" error as well...

  • Getting java.lang.NullpointerException while closing resultset aft using it

    Hi,
    I kindly request to share your ideas reg. my problem.
    I am opening a database connection using connection pool and i am using two or more resultsets and statement objects.I am closing these objects at the end of their usage.But i am getting java.lang.NullpointerException when i close them(if i don't close them it works fine). what might be the reason. Had i did any thing wrong in the code.
    please view the code
    public String storeNewConnection(String CIRCLE,String DIVISION,String SUB_DIVISION,String SECTION,String CONSUMER_NAME,String FATHER_NAME,String STREET_NAME,String DOOR_NO,String TOWN_CITY,String LAND_MARK,String PINCODE,String STDCODE,String PHONE_NO,String EMAIL,String NEIGHBOUR_SCNO,String DOCUMENT_CODE,String LT_APR_NO,String year1,String month1,String day1,String PCBNO,String CONSUMER_STATUS,String SOCIAL_GROUP,String CATEGORY_SUPPLY,String LOCATION_PREMISES,String PURPOSE_OF_SUPPLY,String DURATION,String LOAD_TYPE,String CONNECTED_LOAD,String CONTRACTED_LOAD,String APPLICATION_FEE,String DEVELOPMENT_CHARGES,String SECURITY_DEPOSIT,String ADDL_SECURITY_DESPOSIT,String DEPOSITED_THRU,String DD_CHEQUE_DETAILS,String year2,String month2,String day2,String REMARKS,String POLE_NO)
              int count=0;
              Statement st=null;
              ResultSet rs=null,rs1=null,rs2=null,rs3=null;
              PreparedStatement pst=null;
              String result="",query="",sysDate="",sysDate2="";
              String reg_no = "";
              try
                   st=con.createStatement();
                   //Check dates with sys date
                   String date1 =null;                    
                   String date2 =null;
                   if(! (year1.equals("") || month1.equals("") || day1.equals("")) )
                        date1=day1+"-"+month1+"-"+year1;
                        rs2=st.executeQuery("select round(to_date('"+date1+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs2.next();
                        if(rs2.getInt(1) != 0)
                             return "false";                              
                   if(! (year2.equals("") || month2.equals("") || day2.equals("")) )
                        date2=day2+"-"+month2+"-"+year2;
                        rs3=st.executeQuery("select round(to_date('"+date2+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs3.next();
                        if(rs3.getInt(1) != 0)
                             return "false";     
                   rs1=st.executeQuery("select to_char(sysdate,'yyyyMONdd'),to_char(sysdate,'dd-Mon-yyyy') from dual");
                   rs1.next();
                   sysDate=rs1.getString(1);
                   sysDate2=rs1.getString(2);
                   rs=st.executeQuery("select max(SERIAL_NO) from NEW_CONNECTIONS where to_char(sysdate,'yyyy') = to_char(REG_DATE,'yyyy') and to_char(sysdate,'mm') = to_char(REG_DATE,'mm') and SUB_DIVISION_CODE = "+SUB_DIVISION+" and DIVISION_CODE = "+DIVISION+" and CIRCLE_CODE = "+CIRCLE+" ");
                   if(rs.next())
                        count = rs.getInt(1);
                        count++;                              
                   else
                        count=1;
                   query="insert into NEW_CONNECTIONS ( "+
                        " REG_NO,SERIAL_NO,REG_DATE,CIRCLE_CODE,DIVISION_CODE,SUB_DIVISION_CODE,SECTION_CODE, "+
                        " CONSUMER_NAME,FATHER_NAME,STREET_NAME,DOOR_NO,TOWN_CITY,LAND_MARK,PINCODE, "+
                        " STDCODE,PHONE_NO,EMAIL,NEIGHBOUR_SCNO,DOCUMENT_CODE,LT_APR_NO,LT_APR_DATE, "+
                        " PCBNO,CONSUMER_STATUS,SOCIAL_GROUP,CATEGORY_SUPPLY,LOCATION_PREMISES,PURPOSE_OF_SUPPLY,"+
                        " DURATION,LOAD_TYPE,CONNECTED_LOAD,CONTRACTED_LOAD,APPLICATION_FEE,DEVELOPMENT_CHARGES, "+
                        " SECURITY_DEPOSIT,ADDL_SECURITY_DEPOSIT,DEPOSITED_THRU,DD_CHEQUE_DETAILS,DD_CHEQUE_DATE,REMARKS,APPLICATION_STATUS,POLE_NO) "+
                        " values(?,?,'"+sysDate2+"',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                   pst = con.prepareStatement(query);
                   String cnt ="";
                   if(count <= 9)
                        cnt="0000";
                   else if(count <= 99)
                        cnt="000";
                   else if(count <= 999)
                        cnt="00";
                   else if(count <= 9999)
                        cnt="0";
                   cnt+=Integer.toString(count);
                   reg_no = CIRCLE+DIVISION+SUB_DIVISION+SECTION+"N"+cnt+sysDate;               
                   int serial_no =count;
                   int pin = 0;
                   if(!PINCODE.equals(""))
                        pin =Integer.parseInt(PINCODE);
                   int std = 0;
                   if(!STDCODE.equals(""))
                        std = Integer.parseInt(STDCODE);
                   int status = Integer.parseInt(CONSUMER_STATUS);
                   int social_group = Integer.parseInt(SOCIAL_GROUP);
                   int supply = Integer.parseInt(CATEGORY_SUPPLY);
                   int location = Integer.parseInt(LOCATION_PREMISES);
                   int purpose = Integer.parseInt(PURPOSE_OF_SUPPLY);
                   int duration = Integer.parseInt(DURATION);
                   int laod_type = Integer.parseInt(LOAD_TYPE);
                   float conn_load = Float.parseFloat(CONNECTED_LOAD);
                   int cont_load = 0;
                   if(!CONTRACTED_LOAD.equals(""))
                        cont_load =Integer.parseInt(CONTRACTED_LOAD);
                   int app_fee = Integer.parseInt(APPLICATION_FEE);
                   int dev_chg = Integer.parseInt(DEVELOPMENT_CHARGES);
                   int sec_dep = Integer.parseInt(SECURITY_DEPOSIT);
                   int addl_sec_dep = 0;     
                   if(!ADDL_SECURITY_DESPOSIT.equals(""))
                        addl_sec_dep =Integer.parseInt(ADDL_SECURITY_DESPOSIT);
                   int dep_thru = Integer.parseInt(DEPOSITED_THRU);          
                   pst.setString(1,reg_no);
                   pst.setInt(2,serial_no);
                   pst.setString(3,CIRCLE);
                   pst.setString(4,DIVISION);
                   pst.setString(5,SUB_DIVISION);
                   pst.setString(6,SECTION);
                   pst.setString(7,CONSUMER_NAME);
                   pst.setString(8,FATHER_NAME);
                   pst.setString(9,STREET_NAME);
                   pst.setString(10,DOOR_NO);
                   pst.setString(11,TOWN_CITY);
                   pst.setString(12,LAND_MARK);
                   pst.setInt(13,pin);
                   pst.setInt(14,std);
                   pst.setString(15,PHONE_NO);
                   pst.setString(16,EMAIL);
                   pst.setString(17,NEIGHBOUR_SCNO);
                   pst.setString(18,DOCUMENT_CODE);
                   pst.setString(19,LT_APR_NO);
                   pst.setString(20,date1);
                   pst.setString(21,PCBNO);
                   pst.setInt(22,status);
                   pst.setInt(23,social_group);
                   pst.setInt(24,supply );
                   pst.setInt(25,location);
                   pst.setInt(26,purpose);
                   pst.setInt(27,duration);
                   pst.setInt(28,laod_type);
                   pst.setFloat(29,conn_load );
                   pst.setInt(30,cont_load);
                   pst.setInt(31,app_fee);
                   pst.setInt(32,dev_chg);
                   pst.setInt(33,sec_dep);
                   pst.setInt(34,addl_sec_dep);
                   pst.setInt(35,dep_thru );
                   pst.setString(36,DD_CHEQUE_DETAILS);
                   pst.setString(37,date2);
                   pst.setString(38,REMARKS);
                   pst.setInt(39,1);
                   pst.setString(40,POLE_NO);
                   pst.executeUpdate();
                   result=reg_no;                                   
                   rs.close();
                   rs=null;
                   rs1.close();
                   rs1=null;
                   rs2.close();
                   rs2=null;
                   rs3.close();
                   rs3=null;
                   st.close();
                   st=null;
                   pst.close();
                   pst=null;
              catch(Exception e)
                   e.printStackTrace();
                   result="false";
                   return result;
              finally
                   if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
              return result;
    Also plz help me to improve the code if necessary so that it will work fine for multiple users
    thaks & regards
    Prasanth.C

    Thanks a lot.
    i replaced the code below
    if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
    instead of blindly closing the resultsets and statements
    now it works fine.
    One more thing, is my code structurally correct, i mean the variables, try...catch blocks,results,statements,database connections and overall coding. whether it looks like professional code.
    thaks & regards,
    Prasanth.C

  • Java.lang.NullPointerException

    hi,
    Im trying to run a application Transfer.java which uses a middleware XML-DBMS to transfer XML data to the Oracle database.Transfer.java compiles without any errors but when i try to run it it gives the 'java.lang.NullPointerException'.I dont know what to change in the code.the code is as follows
    import de.tudarmstadt.ito.xmldbms.DOMToDBMS; //XML-DBMS imports
    import de.tudarmstadt.ito.xmldbms.Map;
    import de.tudarmstadt.ito.xmldbms.helpers.KeyGeneratorImpl;
    import de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import org.xml.sax.InputSource;
    import org.xml.sax.Parser;
    import org.w3c.dom.Document;
    // Imports for the Xerces parser
    import de.tudarmstadt.ito.domutils.DF_Xerces;
    import de.tudarmstadt.ito.domutils.NQ_DOM2;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.parsers.SAXParser;
    import org.apache.xml.serialize.OutputFormat;
    import org.apache.xml.serialize.XMLSerializer;
    public class Transfer
    // Main methods
    public static void main (String[] argv)
    String mapFilename = null,
    xmlFilename = null,
    url = "jdbc:oracle:thin:@97.253.1.39:1521:rdn_ov";
    try
    if (argv.length < 2) throw new IllegalArgumentException();
    mapFilename = argv[0];
    xmlFilename = argv[1];
    toDBMS(mapFilename, xmlFilename, url); //ERROR HERE
    catch (IllegalArgumentException iae)
    System.out.println("\nUsage: java Transfer <map-file> <xml-file> \n");
    catch (Exception e)
    e.printStackTrace();
    static void toDBMS(String mapFilename, String xmlFilename, String url)
    throws Exception
    Connection conn1 = null, conn2 = null;
    Map map;
    Document doc;
    DOMToDBMS domToDBMS;
    KeyGeneratorImpl keyGenerator = null;
    try
    // Get the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Connect to the database.
    conn1 = DriverManager.getConnection(url,"project","project");
    conn2 = DriverManager.getConnection(url,"project","project");
    // Create and initialize a key generator
    keyGenerator = new KeyGeneratorImpl(conn1);
    keyGenerator.initialize();
    // Create the Map object and open the XML document.
    map = createMap(mapFilename, conn2); //ERROR HERE
    doc = openDocument(xmlFilename);
    // Create a new DOMToDBMS object and transfer the data.
    domToDBMS = new DOMToDBMS(map, keyGenerator, new NQ_DOM2());
    domToDBMS.storeDocument(doc);
    finally
    if (conn1 != null) conn1.close();
    if (conn2 != null) conn2.close();
    // General utility methods
    static Map createMap(String mapFilename, Connection conn) throws Exception
    MapFactory_MapDocument factory;
    // Create a new map factory and create the Map.
    factory = new MapFactory_MapDocument(conn, getSAXParser());
    return factory.createMap(new InputSource(getFileURL(mapFilename))); //ERROR HERE
    static String getFileURL(String fileName)
    File file;
    file = new File(fileName);
    return "file:///" + file.getAbsolutePath();
    // Methods that use the Xerces parser
    static Parser getSAXParser()
    return new SAXParser();
    static Document openDocument(String xmlFilename) throws Exception
    DOMParser parser;
    // Instantiate the parser and set various options.
    parser = new DOMParser();
    parser.setFeature("http://xml.org/sax/features/namespaces", true);
    // Parse the input file
    parser.parse(new InputSource(getFileURL(xmlFilename)));
    // Return the DOM tree
    return parser.getDocument();
    static void writeDocument(Document doc, String xmlFilename) throws Exception
    FileOutputStream xmlFile;
    OutputFormat format;
    XMLSerializer serial;
    // Write the DOM tree to a file.
    xmlFile = new FileOutputStream(xmlFilename);
    format = new OutputFormat(doc);
    format.setIndenting(true);
    serial = new XMLSerializer((OutputStream)xmlFile, format);
    serial.asDOMSerializer().serialize(doc);
    xmlFile.close();
    and when i try to run the program at the command line using
    java Transfer order.map order.xml
    i get the following error
    java.lang.NullPointerException
    at de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.processColumn(MapFactory_MapDocument.java:771)
    at de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.startElement(MapFactory_MapDocument.java:423)
    at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
    at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
    at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
    at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
    at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.createMap(MapFactory_MapDocument.java:311)
    at Transfer.createMap(Transfer.java:99)
    at Transfer.toDBMS(Transfer.java:77)
    at Transfer.main(Transfer.java:40)
    de.tudarmstadt.ito.xmldbms.InvalidMapException
    at de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.createMap(MapFactory_MapDocument.java:326)
    at Transfer.createMap(Transfer.java:99)
    at Transfer.toDBMS(Transfer.java:77)
    at Transfer.main(Transfer.java:40)
    i know that a null pointer exception happens when you have a variable that hasn't been assigned to a specific object yet.
    but i dont know what to change in the Transfer.java code.but i think the last three lines of the error can give a clue to an experianced eye.please help me as i am stuck with this error for a long time.I have indicated these lines by comment //ERROR HERE in the code .
    Thanks,
    -Rajiv

    import de.tudarmstadt.ito.xmldbms.DOMToDBMS; //XML-DBMS imports
    import de.tudarmstadt.ito.xmldbms.Map;
    import de.tudarmstadt.ito.xmldbms.helpers.KeyGeneratorImpl;
    import de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import org.xml.sax.InputSource;
    import org.xml.sax.Parser;
    import org.w3c.dom.Document;
    // Imports for the Xerces parser
    import de.tudarmstadt.ito.domutils.DF_Xerces;
    import de.tudarmstadt.ito.domutils.NQ_DOM2;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.parsers.SAXParser;
    import org.apache.xml.serialize.OutputFormat;
    import org.apache.xml.serialize.XMLSerializer;
    public class Transfer
    // Main methods
    public static void main (String[] argv)
    String mapFilename = null,
    xmlFilename = null,
    url = "jdbc:oracle:thin:@97.253.1.39:1521:rdn_ov";
    try
    if (argv.length < 2) throw new IllegalArgumentException();
    mapFilename = argv[0];
    xmlFilename = argv[1];
    toDBMS(mapFilename, xmlFilename, url); //ERROR HERE
    catch (IllegalArgumentException iae)
    System.out.println("\nUsage: java Transfer <map-file> <xml-file> \n");
    catch (Exception e)
    e.printStackTrace();
    static void toDBMS(String mapFilename, String xmlFilename, String url)
    throws Exception
    Connection conn1 = null, conn2 = null;
    Map map;
    Document doc;
    DOMToDBMS domToDBMS;
    KeyGeneratorImpl keyGenerator = null;
    try
    // Get the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Connect to the database.
    conn1 = DriverManager.getConnection(url,"project","project");
    conn2 = DriverManager.getConnection(url,"project","project");
    // Create and initialize a key generator
    keyGenerator = new KeyGeneratorImpl(conn1);
    keyGenerator.initialize();
    // Create the Map object and open the XML document.
    map = createMap(mapFilename, conn2); //ERROR HERE
    doc = openDocument(xmlFilename);
    // Create a new DOMToDBMS object and transfer the data.
    domToDBMS = new DOMToDBMS(map, keyGenerator, new NQ_DOM2());
    domToDBMS.storeDocument(doc);
    finally
    if (conn1 != null) conn1.close();
    if (conn2 != null) conn2.close();
    // General utility methods
    static Map createMap(String mapFilename, Connection conn) throws Exception
    MapFactory_MapDocument factory;
    // Create a new map factory and create the Map.
    factory = new MapFactory_MapDocument(conn, getSAXParser());
    return factory.createMap(new InputSource(getFileURL(mapFilename))); //ERROR HERE
    static String getFileURL(String fileName)
    File file;
    file = new File(fileName);
    return "file:///" + file.getAbsolutePath();
    // Methods that use the Xerces parser
    static Parser getSAXParser()
    return new SAXParser();
    static Document openDocument(String xmlFilename) throws Exception
    DOMParser parser;
    // Instantiate the parser and set various options.
    parser = new DOMParser();
    parser.setFeature("http://xml.org/sax/features/namespaces", true);
    // Parse the input file
    parser.parse(new InputSource(getFileURL(xmlFilename)));
    // Return the DOM tree
    return parser.getDocument();
    static void writeDocument(Document doc, String xmlFilename) throws Exception
    FileOutputStream xmlFile;
    OutputFormat format;
    XMLSerializer serial;
    // Write the DOM tree to a file.
    xmlFile = new FileOutputStream(xmlFilename);
    format = new OutputFormat(doc);
    format.setIndenting(true);
    serial = new XMLSerializer((OutputStream)xmlFile, format);
    serial.asDOMSerializer().serialize(doc);
    xmlFile.close();
    }Hi Rajiv,
    Sorry this isn't really a response but I'm reposting your code with code tags around to make it easier to read... it's really worth doing this if you're posting code in future, otherwise it's nearly impossible to read!
    Chris.

  • Urgent :-Need Help in DOtnet Dll integration with CFM 8. for error "java.lang.NullPointerException"

    Hi Everyone,
    I am trying to intergrate Dotnet DLL with coldfusion. The basic perpose of this DLL is putting value in cache.
    My code is working fine on my local machine but it giving me problem on live server.
    It is throwing "java.lang.NullPointerException" error.
    Description of task:-
    DLL:-
    made in : Dotnet 3.0
    Functions:-
    setCache:- setting a string into cache.
    getCache:- getting value from cache.
    ClearCache:- Clearing all value from Cache.
    Local Machine:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Developer
    Result:-Task is working fine.No error what so ever.
    Live server:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Standred
    Result:-Task is throwing error "java.lang.NullPointerException"

    Thanks for your response, but surely if the .NET Services was not running how can CF instantiate and dump the object with all the correct methods?
    Anyway for some strange reason there is no Coldfusion .NET service in my services control panel even though I am running CF8. I have since downloaded the .NET service installer, run it and done a restart but I can still see no such service and the error continues?
    I am running CF8 Dev on IIS 6 – Window XP pro and here is debug
    java.lang.NullPointerException
                   at com.jnbridge.jnbcore.clientTransports.d$b.close(Unknown Source)
                   at java.net.Socket.<init>(Socket.java:368)
                   at java.net.Socket.<init>(Socket.java:209)
                   at com.jnbridge.jnbcore.clientTransports.d$b.<init>(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.d.if(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.c.a(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.f.a(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.int(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.getObjectStaticProperty(Unknown Source)
                   at System.Environment.Get_CurrentDirectory()
                   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:597)
                   at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:87)
                   at coldfusion.runtime.dotnet.DotNetProxy.invoke(DotNetProxy.java:38)
                   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272)
                   at cftestDotNet2ecfm215937280.runPage(C:\Inetpub\wwwroot\his_clothing\testDotNet.cfm:20)
                   at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
                   at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
                   at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
                   at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273)
                   at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
                   at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
                   at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
                   at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
                   at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
                   at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
                   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
                   at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
                   at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
                   at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
                   at coldfusion.CfmServlet.service(CfmServlet.java:175)
                   at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
                   at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
                   at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
                   at jrun.servlet.FilterChain.service(FilterChain.java:101)
                   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
                   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
                   at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
                   at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
                   at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
                   at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
                   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
                   at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
                   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Java.lang.NullPointerException: When Get the PDF File Name

    Hi,
    i try to follow the blog on <b>Handling FileUpload and FileDownload in NetWeaver Developer Studio(NWDS) 2004S</b> on /people/rekha.malavathu2/blog/2006/12/12/handling-fileupload-and-filedownload-in-netweaver-developer-studionwds-2004s
    as i create a fileupload and i wish to get the file name and the pdf, then i to run and deploy it but i get <b>java.lang.NullPointerException</b>
    the code are as below when i click on send email button
    IPrivateEmail.IFileUploadNodeNode node = wdContext.nodeFileUploadNode();
    IPrivateEmail.IFileUploadNodeElement fileUploadEle = node.createFileUploadNodeElement();
         try{
         IWDResource resource = WDResourceFactory.createResource(wdContext.currentContextElement().getFileUploadUI().read(true), wdContext.currentContextElement().getFileUploadUI().getResourceName(), WDWebResourceType.PDF, true);
         fileUploadEle.setFileUploadAttr(resource);
         fileUploadEle.setFileUploadName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
         node.addElement(fileUploadEle);
         }catch(Exception e){
         wdComponentAPI.getMessageManager().reportSuccess("ERROR"+e.getMessage());
    but i wonder which part of the code i did wrongly.. as i wish to insert into my send email code
    Properties props = new Properties();
              String host = "SMTP HOST";
              props.put("mail.smtp.host", host);
              Session session = Session.getInstance(props, null);
              MimeMessage message = new MimeMessage(session);
              Address toAddress = new InternetAddress();
              Address fromAddress = new InternetAddress();
              Address ccAddress = new InternetAddress();
              Address bccAddress = new InternetAddress();
              try
                   MimeMultipart multipart = new MimeMultipart();
                   BodyPart messageBodyPart = new MimeBodyPart();
                   if (! wdContext.currentEmailElement().getFrom().equals(""))
                        fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());               
                        message.setFrom(fromAddress);
                   if (! wdContext.currentEmailElement().getTo().equals(""))
                        toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
                        message.setRecipient(Message.RecipientType.TO, toAddress);
                   if (! wdContext.currentEmailElement().getCc().equals(""))
                        ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
                        message.setRecipient(Message.RecipientType.CC, ccAddress);
                   if (! wdContext.currentEmailElement().getBcc().equals(""))
                        bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
                        message.setRecipient(Message.RecipientType.BCC, bccAddress);
                   if (! wdContext.currentEmailElement().getSubject().equals(""))
                        message.setSubject(wdContext.currentEmailElement().getSubject());
                   if (! wdContext.currentEmailElement().getBody().equals(""))
                        messageBodyPart.setText(wdContext.currentEmailElement().getBody());
                   multipart.addBodyPart(messageBodyPart);
                   messageBodyPart = new MimeBodyPart();
                   String filename = IWDResource.getResourceName();
                   DataSource source = new FileDataSource(filename);
                   messageBodyPart.setDataHandler(new DataHandler(source));
                   messageBodyPart.setFileName(source.getName());                    
                   messageBodyPart.setHeader("Content-Type","application/pdf");
                   multipart.addBodyPart(messageBodyPart);
                   message.setContent(multipart);
                   Transport.send(message);
              catch (AddressException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (SendFailedException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (MessagingException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
    so i wonder could anyone help me out.. as i need to get the pdf filename order to put into the variable call <b>filename</b> at the send mail code.
    below is the error message
    java.lang.NullPointerException
         at com.sap.example.uploademail.Email.wdDoInit(Email.java:124)
         at com.sap.example.uploademail.wdp.InternalEmail.wdDoInit(InternalEmail.java:146)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    facing same issue.
    jdev 10.1.3.3.0, on expanding the database connection, I get a null pointer exception.
    On the testing the connection it says 'success' though.
    any inputs ?

  • Runtime.exec error - java.lang.NullPointerException

    Hi,
    I am trying out the example code from javaWorld that shows how to use exec to execute external command. The problem is that I aways run into java.lang.NullPointerException on line that has "Process proc = rt.exec(cmd);" I have tried to run the code under Windows XP and Windows 2003; and I get the same error message. Any idea on what might be casing this?
    Thanks,
    // GoodWindowsExec.java
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class GoodWindowsExec
    public static void main(String args[])
    if (args.length < 1)
    System.out.println("USAGE: java GoodWindowsExec <cmd>");
    System.exit(1);
    try
    String osName = System.getProperty("os.name" );
    String[] cmd = new String[3];
    if( osName.equals( "Windows NT" ) )
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = args[0];
    else if( osName.equals( "Windows 95" ) )
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = args[0];
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1]
    + " " + cmd[2]);
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();
    }

    What is System.getProperty("os.name") returning when you run on Windows XP or 2003?
    You are only filling in your cmd array when os.name is either Windows NT or Windows 95. In other cases, the elements of cmd are left as null.
    The documentation for Runtime.exec() says you will get a NullPointerException when elements of the array are null:
    http://apidoc.org/view/10563?a=exec%28java.lang.String%5B%5D%29

  • Exception in thread "main" java.lang.NullPointerException error JDeveloper 12c

    Hello,
    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    I have a table "Beer" and I want to select all the data out with a stored procedure which I call out of Java app.
    I have a java.class file Store_A.java which I have loaded into the ORACLE database with LOADJAVA :
        import java.sql.*;
        import java.io.*;
        public class Store_a {
          public static void apskatit ()
            throws SQLException
            { String sql =
              "SELECT * FROM Beer";
            try { Connection conn = DriverManager.getConnection("jdbc:default:connection:");
              PreparedStatement pstmt = conn.prepareStatement(sql);
              ResultSet rset = pstmt.executeQuery();
              rset.close();
              pstmt.close();
            catch (SQLException e) {System.err.println(e.getMessage());
    Then I have created a procedure which I plan to call out in java:
        CREATE OR REPLACE PACKAGE Store_a AS
        PROCEDURE apskatit;
        END Store_a;
        CREATE OR REPLACE PACKAGE BODY Store_a AS
        PROCEDURE apskatit AS LANGUAGE JAVA
        NAME 'Store_a.apskatit()';
        END Store_a;
    And I have a java file that I have created with JDeveloper 12c:
        import java.sql.Connection;
        import java.sql.DriverManager;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        public class Class1 {
             * @param args
            public static void main(String[] args) throws SQLException {
                Connection conn = null;
                try {
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    //Izveidojam savienojumu
                    conn = DriverManager.getConnection("jdbc.oracle.thin:@localhost:1521", "SYSTEM", "asdasd");
                    // Izveidojam callable statement
                    CallableStatement stmt = conn.prepareCall("CALL Store_a.apskatit()");
                    ResultSet resul = stmt.executeQuery();
                    while (resul.next()) {
                        System.out.println(resul.getInt(1) + "\t" + resul.getString(2));
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                } finally {
                    try {
                        conn.close();
                    } catch (SQLException e) {
                        e.printStackTrace();
    When I try to run the java file, I get this error "Exception in thread "main" java.lang.NullPointerException at client.Class1.main(Class1.java:29).
    So the line I get error in is "conn.close();"
    How to fix this?
    Thank you very much in advance.

    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    Maybe you haven't read it yet but I told you in your other thread what you were doing wrong and, step by step, how to address the problem.
    https://forums.oracle.com/thread/2611124
    I'm not going to repeat everything again just this one main piece of advice:
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    You are trying to deal with too many different issues at the same time. Unless you solve your primary Java problem by fixing the code outside the DB you will have nothing but problems loading it into the DB.
    And just get rid of this line of code - you don't need it anymore and it hasn't been done like that for many years now:
    Class.forName("oracle.jdbc.driver.OracleDriver");

Maybe you are looking for

  • Need help linking 2 Computers via QMaster (clustering)

    I think I understand the general gist of how to accomplish this, but when I tried what various tutorials recommend, I wasn't able to see my MacBook Pro cluster while looking in the QAdministrator panel on my iMac. I had the two comps linked up via an

  • Can't view image that was made on photoshop on my mac on a vista computer.

    I made an image for my dad in photoshop and saved it as a gif on my mac. I put it in my dropbox in a shared folder and added my dad to the shared folder. He can see on his windows vista computer in dropbox that the image is there but when he tries to

  • Sap plz refe

    Hi Greetings to you all. We are looking for: SAP IS Retail experts for Mumbai SAP APO or SCM with demand planning, PPDS, SNP modules exposure for Calcutta, Mumbai, Bangalore. SAP CCS - Bangalore Relevant exp : 4 – 5yrs Salary : no constraint Can anyo

  • SAP AFARIA 7.0 in windows 2012 server

    Hi, I triedto install Afaria in windows server 2012. Installation of afaria and api goes fine.But when I install the package server it gives the error install MS.Net Windows communication  Foundation.After installing all the required components and I

  • My BBCurve 9300 Bluetooth stopped receiving files

    I have been using my BB curve 9300 for a while and I just discovered that I can now only send out file. I am not able to receive any file via Bluetooth. When I try to send file from my PC, it says " remote device does not support this service". Now I