Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354373 - a piece of code is working when launched from plugin.xml but not working when it is exported as product
Summary: a piece of code is working when launched from plugin.xml but not working when...
Status: RESOLVED INVALID
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 09:08 EDT by Ramana CLA
Modified: 2011-08-12 15:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramana CLA 2011-08-10 09:08:50 EDT
Build Identifier: 

I have a problem with eclipse plugin development which is stopping me to further proceed. 

i have a code which parses the xml and formats it with neat indent with the help of the classes DocumentBuilderFactory, DocumentBuilder etc; the code works perfectly when i launch the UI from plugin.xml(Launch an Eclipse Application). but when i export the plugin application to make it a product using .product file, it is not formatting the xml. when i debugged the code, i found the statement db.parse(is) is not at all executed. but the same is working when i lanched from plugin.xml. i am using com.ibm.ws.runtime_6.1.0.jar , com.ibm.ws.admin.client_6.1.0.jar and ibm-jaxrpc-client.jar for calling webservice in another code of the same application...just to give info.

this is the code im using where in db.parse(is) is giving me the problem.

please help me over here ASAP.

private Document parseXmlFile(String in) {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            InputSource is = new InputSource(new StringReader(in));
            return db.parse(is);
        } catch (ParserConfigurationException e) {
            throw new RuntimeException(e);
        } catch (SAXException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }


Reproducible: Always
Comment 1 Curtis Windatt CLA 2011-08-10 10:46:25 EDT
I don't think you are describing a bug in PDE.  For help in developing, please try the Eclipse forums at www.eclipse.org/forums/ 

If your code runs when launched from Eclipse but not when exported, you likely have an issue in your product definition. Your plug-in is not being included or started. Look closely at what your product file is including and ensure all required plug-ins are included. In addition to exporting a product, you can also run it from within Eclipse which will set up a launch configuration.  If your code does not run when launched this way, it is very likely you have not set up your dependencies correctly in the .product file.
Comment 2 Curtis Windatt CLA 2011-08-12 15:19:42 EDT
Closing as INVALID.  Until more information is provided, this does not appear to be a bug in PDE.