Exception while trying to write xml file
When I try to write my DOM tree to an XML file a get the following exception form the transformer.transform() function call:
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at CentMon.ConfigRW.writeConfig(ConfigRW.java:77)
The whole thing worked for 2 years. I did not change anything on the code. the only difference is that i have now office 2007 installed instead of office 2003.
That's the code which generates the exception:
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public void writeConfig(Document doc){
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer;
if (doc==null){
System.out.println("Document is null");
else{
try {
transformer = tFactory.newTransformer();
} catch (TransformerConfigurationException e) {
transformer = null;
System.out.println(e.getMessage());
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new File(filename));
try {
if (transformer != null){
transformer.transform(source, result);
} catch (TransformerException ex) {
Logger.getLogger(ConfigRW.class.getName()).log(Level.SEVERE, null, ex);
}
I am getting the exact same error when trying to write out an XML file. I have been following the J2EE Tutorial. Perhaps I need to look for a more recent tutorial.
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at com.wordhopper.xml.DOMXMLParser.writeXMLFile(DOMXMLParser.java:55)
at com.wordhopper.gui.xmltool.XMLEditor.writeButtonActionPerformed(XMLEditor.java:217)
at com.wordhopper.gui.xmltool.XMLEditor.access$100(XMLEditor.java:13)
at com.wordhopper.gui.xmltool.XMLEditor$2.actionPerformed(XMLEditor.java:139)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6348)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6113)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Similar Messages
-
Exception while trying to play wav file
Hello,
Right now I'm experimenting the J2ME WTK on a Motorola A1000 (still taking my first steps). I'm trying to play a .wav file but I keep getting this error:
.... MediaException: SymbianOS error=-5: Not supported
I'm using the following midlet code:
Display display;
Alert alert;
Player player;
public Midlet3()
super();
display = Display.getDisplay(this);
alert = new Alert("MIDLET 3 - PLAYING MP3");
protected void startApp() throws MIDletStateChangeException
InputStream stream=null;
try
stream = getClass().getResourceAsStream("/newalert.wav");
player = Manager.createPlayer(stream, "audio/x-wav");
alert.setString("starting...");
display.setCurrent(alert);
player.realize();
alert.setString(player.getContentType());
display.setCurrent(alert);
Thread.sleep(1000);
player.prefetch();
alert.setString("going to play");
display.setCurrent(alert);
Thread.sleep(1000);
player.start();
....Am I doing something wrong? The .wav file is included in .jar file
Thanks in advance,
PauloHi
So the wav file is included in a jar file which is in the resources directory of your application. Have you tried to put the wav file directly in the resources directory and see if it works?
Also, I think the order should be like this: player.prefetch();
player.realize();
player.start(); but I'm not sure if it is mandatory.
Mihai -
NotSerializable error while trying to write arraylist
I am getting a NotSerializable error while trying to write an arraylist to a file.
Here's the part of the code causing problem
File temp = fileOpenerAndSaver.getSelectedFile(); // fileOpenerAndSaver is a JFileChooser object which has been created and initialized and was already used to select a file with
currentWorkingFile = new File (temp.getAbsolutePath() + ".gd"); // currentWorking file is a file object
try
ObjectOutput output = new ObjectOutputStream (new BufferedOutputStream(new FileOutputStream(currentWorkingFile)));
output.writeObject(nodeList); // <-- This is the line causing problem (it is line 1475 on which exception is thrown)
output.writeObject(edgeList);
output.writeObject(nodesWithSelfLoop);
output.writeObject(nextId);
output.writeUTF(currentMessage);
output.close();
catch (Exception e2)
JOptionPane.showMessageDialog (graphDrawer, "Unknown error writing.", "Error", JOptionPane.ERROR_MESSAGE);
e2.printStackTrace();
} As far as what nodeList is -- it's an arraylist of my own class Node which has been serialized and any object used inside the class has been serialized as well.
Here is the declaration of nodeList:
private ArrayList <Node> nodeList; // ArrayList to hold a list all the nodesLet me show you whats inside the node class:
private class Node implements Serializable
private static final long serialVersionUID = -4625153386839971250L;
/* edgeForThisNodeList holds all the edges that are between this node and another node
* nodesConnected holds all the nodes that are connected (adjacent) to this node
* p holds the top left corner coordinate of this node. The centre. of this node is at (p.x + 5, p.y + 5)
* hasSelfLoop holds whether this node has a self loop.
* **NOTE**: ONLY ONE SELF LOOP IS ALLOWED FOR A NODE.
ArrayList <Edge> edgeForThisNodeList = new ArrayList <Edge> ();
ArrayList <Node> nodesConnected = new ArrayList <Node> ();
Point p;
boolean hasSelfLoop = false;
int index = -1;
BigInteger id;
... some methods following this....
}Here is the edge class
private class Edge implements Serializable
private static final long serialVersionUID = -72868914829743947L;
Node p1, p2; // The two nodes
Line2D line;
* Constructor:
* Assigns nodes provided as appropriate.
* Also calls the addEdge method on each of the two nodes, and passes
* "this" edge and the other node to the nodes, so that
* this edge and the other node can be added to the
* data of the node.
public Edge (Node p1, Node p2)
this.p1 = p1;
this.p2 = p2;
line = new Line2D.Float(p1.p.x+5,p1.p.y+5,p2.p.x+5,p2.p.y+5);
p1.addEdge(this, p2, true);
p2.addEdge(this, p1, false);
}Here is the error I am getting:
java.io.NotSerializableException: javax.swing.plaf.metal.MetalFileChooserUI
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at MyPanel.save(MyPanel.java:1475)
at GraphDrawer.actionPerformed(GraphDrawer.java:243)
I inentionally did not write the whole error stack because it was way too long and I ran out of characters. But line 1475 is where I do the writeObject call. I also goet some weird not serialized exceptions before on some other classes that are not being written to the file or are not part of the object that I am writing. I serialized those classes and now it's this unknown object that's causing problems.
Edit: The problem may be due to the JFileChooser I am using to select the file as it is a non-serializable object. But I am not trying to write it to the file and in fact am just writing the arrayLists and BigInteger as objects to the file.
Edited by: Cricket_struck on Dec 21, 2009 1:25 PM
Edited by: Cricket_struck on Dec 21, 2009 1:32 PM
Edited by: Cricket_struck on Dec 21, 2009 2:16 PMjava.io.NotSerializableException: javax.swing.plaf.metal.MetalFileChooserUIThat's a Swing component and it is clearly related to the JFileChooser.
I also get some weird not serialized exceptions before on some other classes that are not being written to the file or are not part of the object that I am writing.That's a contradiction in terms. If you get NotSerialzableException it means the objects are being written. So they are reachable from the objects you're writing.
Edit: The problem may be due to the JFileChooser I am using to select the file as it is a non-serializable object.JFileChooser implements Serializable, but you're right, you shouldn't try to serialize it. But clearly this is the current problem. Somewhere you have a reference to it reachable via the object(s) you are serializing.
I suspect that Node and Edge inner classes and that you aren't aware that inner classes contain a hidden reference to their containing class. The solution for serializaition purposes is to make them static nested classes, or outer classes. -
I'm trying to generate XML files on a client machine. I'm using SQL*Plus Instant Client v 10.1.0.4.0 connected to DB version 10.1.0.3.0. I've created a view of XMLType and am able to select XML from this view. I've been unable to figure out a way to generate well-formed XML via a Spool command and Select statement as Sqlplus returns the XML as one row and has problems with line wrapping, embedded spaces, and also including the SQL command in the spooled output. I've tried many different permutations of Set commands to no avail.
Is there a way to generate a valid XML file from Sqlplus on a client machine using the Spool command? If not Sqlplus, any other suggestions?
Thanks,
GlennI would be inclined to write a pipelined function to take a clob, and break it up into pieces (perhaps after a '>').
Here's an example of a pipelined function, which you can modify to suit your needs, such as working with CLOBs. You may also want to add more intelligence to it, such as checking for when the chunk is longer than 2000 characters.
CREATE TYPE tvc2000 AS TABLE OF VARCHAR2(2000)
CREATE OR REPLACE
FUNCTION chopper
p_string IN VARCHAR2
RETURN tvc2000
PIPELINED
IS
l_len NUMBER := LENGTH(p_string);
l_out NUMBER := 0;
l_pos NUMBER;
BEGIN
l_pos := INSTR(p_string, '>', l_out+1);
WHILE l_pos > 0 LOOP
PIPE ROW(SUBSTR(p_string, l_out+1, l_pos - l_out));
l_out := l_pos;
l_pos := INSTR(p_string, '>', l_out+1);
END LOOP;
IF l_out < l_len THEN
PIPE ROW(SUBSTR(p_string, l_out+1, l_len - l_out));
END IF;
RETURN;
END;
SELECT *
FROM TABLE(chopper('abc>def>'))
COLUMN_VALUE
abc>
def>Tak -
BEA-423442-Exception while starting the client classifications file poller
While Weblogic 10.3.2 server is started, below error is displayed in console. Please provide if any solution for this.
<netuix> <BEA-423442> <Exception while starting the client classifications file poller: [java.lang.AbstractMethodError]
java.lang.AbstractMethodError
at com.bea.netuix.xml.util.DomToolkit.parse(DomToolkit.java:166)
at com.bea.netuix.xml.util.JDomToolkit.build(JDomToolkit.java:45)
at com.bea.netuix.client.repository.ClassifierRepository.getDocumentFromInputStream(ClassifierRepository.java:339)
at com.bea.netuix.client.repository.ClassifierRepository.createRepositoryFromInputStream(ClassifierRepository.java:326)
at com.bea.netuix.client.ClientClassifierImpl.<init>(ClientClassifierImpl.java:103)
Truncated. see log file for complete stacktraceHi Angel,
Please see the following doc for instructions on starting an OMS.
http://docs.oracle.com/cd/E24628_01/doc.121/e24473/emctl.htm#BABFEEAJ
Regards,
- Loc -
Error while saving the FM8 XML file
Hello,
While saving the FM8 XML file, an error message appears (see attached screen shot).
Is there a solution to resolve this issue? Please suggest.Hi,
This type of error is non-descript and could be caused by any number of things. It is impossible to troubleshoot from here based solely on that message. Let me ask a couple of questions, though:
- Are you using structured FrameMaker? If so, are you using a structured app that has worked successfully before? In other words, did this just suddenly start happening to an otherwise-stable process?
- Is there anything unusual about your layout; that is, anything other than a single text flow with graphics?
Russ -
Hi everyone,
I just installed SP09 and i was testing the solution. And I found a problem with the approvals tasks.
I configured a simple ROLE approval task for validate add event. And when the runtime executes the task, the dispatcher log shows a error:
ERROR: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'
And the notifications configured on approval task does not start either.
The approval goes to the ToDO tab of the approver, but when approved, also the ROLE stays in "Pending" State.
I downgraded the Runtime components to SP08 to test, and the approvals tasks works correctly.
Has anyone passed trough this situation in SP09?
I think there is an issue with the runtime components delivered with this initial package of SP09.
Suggestions?Hi Kelvin,2016081
The issue is caused by a program error in the Dispatcher component. A fix will be provided in Identity Management SP9 Patch 2 for the Runtime component. I expect the patch will be delivered within a week or two.
For more info about the issue and the patch please refer to SAPNote 2016081.
@Michael Penn - I might be able to assist if you provide the ticket number
Cheers,
Kristiyan
IdM Development -
Getting exception while trying to lookup jmsconnectionfactory
Hi All,
I am getting an exception while trying to do a lookup JMSConnection Factory.
javax.naming.InvalidNameException: Exception in lookup. [Root exception is org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg
.org/CosNaming/NamingContext/InvalidName:1.0]
I have two different machines i have installed my program. On one its working perfectly will but on other machine its giving this error. There is no change in code and java version on both machine.
Do any one have clue why this will be happening. I urgently need the solution of it.
weblogic version is : 8.1 SP6
java version is : 1.4That is an iiop problem. Try using t3 protocol replacing thin client with thick client(weblogic.jar).
- Sathish -
Getting Exception while trying to get Connection
Getting Exception while trying to get Connection from Data Source in ejbCreate() for the First time when ejbCreate() is called.
Thanks in AdvanceHello Mallidi,
And the exception is ?
Cheers, Tsvetomir -
JMS Exception while trying to send a message on Login
I am getting the following exception while trying to send a JMS message after the login.
2012-06-01 12:09:30,688 ERROR [nucleusNamespace.com.tesco.events.manager.ILActivityManager] JMSException Occured
javax.jms.JMSException: A transaction-related exception occurred while trying to obtain a JMS Session from provider "Login": javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted] Can't register synchronization because the transaction is in aborted state
at atg.dms.patchbay.SessionManager.getSession(SessionManager.java:190)
at atg.dms.patchbay.Provider.getQueueSession(Provider.java:632)
at atg.dms.patchbay.OutputDestination.getPooledSession(OutputDestination.java:268)
at atg.dms.patchbay.OutputPort.getPooledSession(OutputPort.java:156)
at atg.dms.patchbay.ElementManager.createTextMessage(ElementManager.java:848)
at atg.dms.patchbay.ElementManager.createTextMessage(ElementManager.java:546)
at atg.dms.patchbay.ElementManager.createTextMessage(ElementManager.java:557)
at com.tesco.events.manager.ILActivityManager.sendLogMessage(ILActivityManager.java:81)
at com.tesco.events.manager.ILActivityManager.logActivity(ILActivityManager.java:69)
at com.tesco.events.listener.ATGLogEventListenerImpl.logActivity(ATGLogEventListenerImpl.java:46)
at com.tesco.events.source.ATGLogEventSource.logActivity(ATGLogEventSource.java:61)
at com.tesco.ecom.userprofiling.ProfileFormHandler.postLoginUser(ProfileFormHandler.java:2022)
at com.tesco.ecom.userprofiling.ProfileFormHandler.handleLogin(ProfileFormHandler.java:1191)
at sun.reflect.GeneratedMethodAccessor1140.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at atg.droplet.EventSender.sendEvent(EventSender.java:582)
at atg.droplet.FormTag.doSendEvents(FormTag.java:791)
at atg.droplet.FormTag.sendEvents(FormTag.java:640)
at atg.droplet.DropletEventServlet.sendEvents(DropletEventServlet.java:523)
at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:550)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.tesco.ecom.userprofiling.AssignCookieServlet.service(AssignCookieServlet.java:139)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2442)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:128)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:191)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.spindrift.sitebuilder.request.AuthServlet.service(AuthServlet.java:74)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.tesco.ecom.userprofiling.LoginControlServlet.service(LoginControlServlet.java:61)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.tesco.ecom.userprofiling.AccessControlServlet.processExpiredSession(AccessControlServlet.java:645)
at com.tesco.ecom.userprofiling.AccessControlServlet.service(AccessControlServlet.java:392)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.tesco.bns.droplets.AddingRecentlyViewedDroplet.service(AddingRecentlyViewedDroplet.java:235)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:169)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:477)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.search.servlet.SearchClickThroughServlet.service(SearchClickThroughServlet.java:396)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at com.tesco.servlet.pipeline.LogOutputFilterServlet.logWithMdc(LogOutputFilterServlet.java:68)
Edited by: 915252 on Jun 4, 2012 2:39 AMHi,
you may be interested in a solution I tracked down at http://support.bea.com/application?namespace=askbea&origin=ask_bea.jsp&event=button.search_ask_bea&askbea_display=relevancy&askbea_max_number_returned=50&question=weblogic.jms.common.JMSException%3A+Connection+not+found&all_bea_products=all_bea_products&ES=ES#
Basically : you need to have your Weblogic servers, JMS servers and JMS stores
on each domain named uniquely !!!
"Joe Mooney" <[email protected]> wrote:
>
Any news on this one ?
"B Liu" <[email protected]> wrote:
Can u tell me how you supplied the required security credentials?
Thanks,
-Ben
"Andy" <[email protected]> wrote:
Hi.
I have a situation where I am sending an JMS message to external queue
on Weblogic
Server which is not part of cluster. This happens in a session bean,which
is wrapped
in a container transaction. I have supplied the required security credentials
like user, password etc.
I get an error while tryign to send the message through bean. The stack
trace
is :
weblogic.jms.common.JMSException: Connection not found
at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:136)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:596)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:153)
at weblogic.jms.client.JMSConnection.createSessionInternal(JMSConnection.java:400)
at weblogic.jms.client.JMSConnection.createQueueSession(JMSConnection.java:347)
also one thing interesting is that if I call the same server and queue
outside
of the session bean,it works fine.
Any ideas what might be causing the issue?
Thanks
Andy -
Removing the user define comments while trying to write to the property fil
Hi All,
While using new Properies().setPropety(). It is removing the user define comments from property file.
Could you please explain me why it is happening and how can I restrict it
Thanks & Regards
Edited by: Rakesh83 on Feb 20, 2008 4:33 AMRakesh83 wrote:
Could you please provde me sample code for this?
#! /usr/bin/groovy
xml = '''
<config>
<property name="foo" value="bar" comment="blah, blah, blah" />
<property name="baz" value="qux" comment="doodle doodle dee" />
</config>
def config = new XmlParser().parse(new StringReader(xml))
def property = config.property.find { it.'@name' =~ 'baz' }
assert 'doodle doodle dee' == property.@comment
property.@value = 'snorp'
assert 'doodle doodle dee' == property.@comment // comments preserved!
// write xml as needed~ -
Errors while trying to write Vector of JPanels to Object File.
Does anyone know why I'm getting the following errors and how can I fix it?
I'm trying to output a Vector that contains a bunch of JPanels (that are fixed to a JFrame):
public class MyFrame extends JFrame {
Vector panels
.... code here
try {
FileOutputStream fos = new FileOutputStream(this.saveObjectPath+this.scriptName+".dat");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(panels);
oos.close();
} catch (Exception e) {
System.out.println("Count not write Data file");
... more code
and I get the following mass of errors:
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicScrollPaneUI.paint(BasicScrollPaneUI.java:66)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:53)
at javax.swing.JComponent.paintComponent(JComponent.java:418)
at javax.swing.JComponent.paint(JComponent.java:718)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JViewport.paint(JViewport.java:679)
at javax.swing.JComponent.paintWithBuffer(JComponent.java:3940)
at javax.swing.JComponent._paintImmediately(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintImmediately(JComponent.java:3731)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:384)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue Utilities.java:135)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:168)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:432)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 172)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:13 1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:118)
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicScrollPaneUI.paint(BasicScrollPaneUI.java:66)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:53)
at javax.swing.JComponent.paintComponent(JComponent.java:418)
at javax.swing.JComponent.paint(JComponent.java:718)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JComponent.paintChildren(JComponent.java:529)
at javax.swing.JComponent.paint(JComponent.java:727)
at javax.swing.JViewport.paint(JViewport.java:679)
at javax.swing.JComponent.paintWithBuffer(JComponent.java:3940)
at javax.swing.JComponent._paintImmediately(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintImmediately(JComponent.java:3731)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:384)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue Utilities.java:135)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:168)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:432)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 172)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:13 1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:118)
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicScrollPaneUI.paint(BasicScrollPaneUI.java:66)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:53)
at javax.swing.JComponent.paintComponent(JComponent.java:418)
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JViewport.paint(JViewport.java:679)
at javax.swing.JComponent.paintWithBuffer(JComponent.java:3940)
at javax.swing.JComponent._paintImmediately(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintImmediately(JComponent.java:3731)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:384)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue Utilities.java:135)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:168)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:432)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 172)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:13 1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:118)
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicScrollPaneUI.paint(BasicScrollPaneUI.java:66)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:53)
at javax.swing.JComponent.paintComponent(JComponent.java:418)
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JViewport.paint(JViewport.java:679)
at javax.swing.JComponent.paintWithBuffer(JComponent.java:3940)
at javax.swing.JComponent._paintImmediately(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintImmediately(JComponent.java:3731)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:384)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue Utilities.java:135)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:168)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:432)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 172)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:13 1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:118)
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicScrollPaneUI.paint(BasicScrollPaneUI.java:66)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:53)
at javax.swing.JComponent.paintComponent(JComponent.java:418)
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintChildren(JComponent.java(Compiled Code))
at javax.swing.JComponent.paint(JComponent.java(Compiled Code))
at javax.swing.JViewport.paint(JViewport.java:679)
at javax.swing.JComponent.paintWithBuffer(JComponent.java:3940)
at javax.swing.JComponent._paintImmediately(JComponent.java(Compiled Code))
at javax.swing.JComponent.paintImmediately(JComponent.java:3731)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:384)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue Utilities.java:135)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:168)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:432)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 172)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:13 1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:118)can you post this line of code, or section of relevant code:
BasicScrollPaneUI.java:66, as this is where the problem is -
Please Help. Trying to create XML file from 2 tables.
Step1: Target XML format
Created an XML
<DEPART>
<DEPARTMENT_ID>10</DEPARTMENT_ID>
<DEPARTMENT_NAME>Administration</DEPARTMENT_NAME>
<MANAGER_ID>200</MANAGER_ID>
<LOCATION_ID>1700</LOCATION_ID>
<EMP><EMPLOYEE_ID>100</EMPLOYEE_ID>
<FIRST_NAME>Steven</FIRST_NAME>
<LAST_NAME>King</LAST_NAME>
<SALARY>24000</SALARY>
</EMP>
</DEPART>Step 2. Created a target data server from the above mentioned xml. Specified the logical and physical schema.
Step3.Logged into Designer and reverse engineered from the the schema created in step2.
step 4. Following Hierarchy is created
DEPART
--> EMP
Step 5. Reverse engineered 2 tables from oraclexe (HR ) Schema
Employees
Departments
Step 6. Created an interface and made DEPART from step 4 as target
and Departments from step 5 as source.
Step 7. Staging area is different to the target.
step 8. modified the IKM SQL Control Append to write to a file
create xmlfile #filename from schema DEPART
Step 9. Changed the DEPART PK Column in the TARGET to 0
Step 10. File is created.
Problem:
1. When i view the file it has all the departments but the employees are also displayed eventhough i haven't done the mapping.
2. All the employees are listed under every department.
Please help as i have tried everything. I know i am missing something somewhere.
Thanks a lot for reading it.
Alvinder
Edited by: alvinder on Jun 30, 2010 5:29 PMHi Alvindar,
Thanks u posted good issue,
Can u clarify this about how your issue got ressolved. I am also trying with same XML as you have pasted here. I have following doubts.
While setting up XML data server the ro option i have deleted as defalut value is false which allows both read/write & its look like this
jdbc:snps:xml?f=../demo/XML/EMPDEPT.xml&s=SCH_EMPDEPT.
I have mapped and written create XML commands in commit section of IKM which looks like this :CREATE XMLFILE #ExportXMLFileLoc FROM SCHEMA SCH_FLDEPT
created the interface and executed,it went through fine,4 rows data transformed into target xml data store,file is generated in the given path .
But in the generated file is same as which have EMPDEPT.xml with data change,but in the target xml data store depart i am able to view newly inserted records.
i want generate an output xml for each of the target of the XML data store, how we can do that please explain me.
this is my xml
<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<DEPART>
<DEPARTMENT_ID>10</DEPARTMENT_ID>
<DEPARTMENT_NAME>Admin</DEPARTMENT_NAME>
<MANAGER_ID>200</MANAGER_ID>
<LOCATION_ID>1700</LOCATION_ID>
</DEPART>
</REQUEST>
tried only with DEPART table.
Waiting for ur repply,
Thanks,
MNK -
Trying to export xml file using tcExportOperationsIntf
Hi All,
I am trying to export the xml files using tcExportOperationsIntf in OIM 10g. But I am getting the null pointer exception while finding the objects using findObjects method
FileWriter fstream = new FileWriter("OIMResources.xml");
BufferedWriter out = new BufferedWriter(fstream);
tcExportOperationsIntf xlexportOper = (tcExportOperationsIntf)tc.getUtility("Thor.API.Operations.tcExportOperationsIntf");
System.out.println("Before export..1");
Collection<RootObject>lstObjects = (List)xlexportOper.findObjects("Resource", "AD User");
System.out.println(lstObjects);
Error:
java.lang.NullPointerException
at Thor.API.Operations.tcExportOperationsClient.findObjects(Unknown Sour
ce)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source
at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
at $Proxy5.findObjects(Unknown Source)
at ExportFile.create(ExportFile.java:32)
at ExportFile.main(ExportFile.java:16)
Can any one tell me where I did the mistake.
Thanks
KTry this:
tcExportOperationsIntf exportIntf = oimClient
.getService(tcExportOperationsIntf .class);
Collection roots = exportIntf.findObjects("Resource", "AD User");
//Export Selected Objects
String xml = exportIntf.getExportXML(roots, "AD User");
System.out.println(xml); -
While trying to merge pdf files which are having the version 1.4 throws err
As per my business need i need to merge some pdf files. Among those files some are having the version above 1.4. I am using the api "oracle.apps.xdo.jar ".
While trying to merging the pdf files its throwing the exceeption like
" oracle.apps.xdo.XDOException: oracle.apps.xdo.template.pdf.exception.FatalException: The template seems to be in either corrupted one or newer version than PDF1.4 ".
If all of the files are having the below 1.4 version then working fine. But any one of the file have above 1.4 version then it is throwing the above error.
Please can i have the solution for this problem.Thanks for the response.
Sorry.there is no option to feed again into <1.4 version. cause those documents are already existed in database and i have to use the same documents to merge.
So is there any alternate solution on the same .
Maybe you are looking for
-
How do I get OS 9 to install when it claims "software is not supported"?
Hello all. I have an iMac running OS X v10.4.11. I have Mac OS 9 Install discs from my iBook G3. When I try to restart using the disc, it won't bring me to the install menu. I hold down C and everything. The disc's info is accessible but has the whit
-
Photo does not appear on my blog
Hello everyone, I'm a newbie in Photoshop and require your kind help! I recently created a blog dedicated to Baby Names: http://www.babynameslog.com/top-baby-names-2013/ I'm trying to show a 728x90 image under the main menu, I've created a nice (don'
-
Discover the Result Type of a Notification
Hello Dear all, I am building a web Front-End for Oracle Workflow in HTML DB. I managed to display a notification with its Body etc. Now i have to implement the Result buttons like for Approval an Approve and Reject button. How can I discover the Res
-
Vesrion control and transport system
Hi all, how version control works in XI..i know we have history for each and every objects in IR and D.but if something is went wrong and i want ton activate older version is that possible thorugh this history or we have to develop any othe
-
Different Aggregation rule while aggregating
Hi Folks in OBIEE 10.1.3.4.1 and BI Apps 7.9.6, using answers, i developed a report which has Organization division dimension and active headcounts as fact. while the report is created, the default aggregation( Server determined) rule that the server