Problem in using org.jdom.Parent in my EJB

Hi All,
I am using a code below to read a EBM and replace some of the node values in it. For that , initiallly, i want to check whether the XPATH class is working ..
While i run this code in my SOAP-UI i get teh No class definition found exception for the class org.jdom.Parent. But i hav imported that jar inside my project. and i am able to use the line import org.jdom.parent. in my class file.
package EBMhandling;
import java.io.StringReader;
import javax.jws.WebService;
import java.io.StringReader;
import javax.jws.WebService;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
import org.jdom.xpath.XPath;
import org.xml.sax.InputSource;
import org.jdom.Parent;
@WebService
public class UsingJDOMclass {
public String ReplaceEBM(String input,String nodeXpath) {
String modifiedEBM=null;
try
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build( new InputSource(new StringReader(input)) );
modifiedEBM=(new XMLOutputter()).outputString(doc);
// String innerXml = (new XMLOutputter()).outputString(XPath.selectSingleNode(doc,nodexpath));
try
XPath myxpath=XPath.newInstance(nodeXpath);
modifiedEBM=myxpath.toString();
catch(Exception e) {
modifiedEBM="ERROR: inside :" + e.toString();
catch(Exception e) {
modifiedEBM="ERROR :" + e.toString();
return modifiedEBM;
This is the error i get:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:ReplaceEBMResponse xmlns:ns2="http://EBMhandling/">
<return>ERROR: inside :org.jdom.JDOMException: java.lang.NoClassDefFoundError: org/jdom/Parent: org/jdom/Parent</return>
</ns2:ReplaceEBMResponse>
</S:Body>
</S:Envelope>
Kindly help me in this regard.
Thanks,
Sabarisri. N

Hi Sameera,
I found the conflict is because that, i hav added two different jars to my project folder. Both the jars contiained the definition of the class org.jdom.parent.
So why the error have occured. I came to know a solution defined in https://issues.apache.org/jira/browse/GERONIMO-3894
Not sure.. hw well it would work..
So i think i can go for some alternative classes.
Can u pls help me in the below requirement.
I need to get a method which take input as (XMLasString,xpathOfElement,NewValueForThatElement)
I shd replace the old value of that element by the NewValueForThatElement and again return back the XMLasString only..
Thanks,
Sabarisri. N

Similar Messages

  • How to use org.jdom.NameSpace in setAttribute() method of org.jdom.Element?

    Hi to all,
    Iam building xml file.In that iam trying to create org.jdom.NameSpace in setAttribute() method of org.jdom.Element object. Iam getting runtime errors like illegal name.
    What exactly i want is i want to set "xmlns" as attribute name and "http://www.loc.gov/MARC21/slim" as attribute value. When iam directly creating that it is throwing exception that no attribute name should be xmlns in org.jdom.Element. That is why i approched to org.jdom.NameSpace. But iam not getting the way, how to set org.jdom.NameSpace in setAttribute method of org.jdom.Element object. I tried several ways but it is not comming.
    can any budy help me please.
    thanks to one and all.

    Hi Marc
    I solved the problem
    Actually the oRootElement.toString was returning me only the string and not the
    XML formatted String eg:
    <?xml version="1.0" encoding="UTF-8"?>
    <response id="2"><apartment id="1"/><clips><clip><id>1</id><timeStamp>2000000</timeStamp><size>100</size></clip><clip><id>2</id><timeStamp>4000000</timeStamp><size>200</size></clip></clips></response>
    So the very first tag was missing <?xml version="1.0" encoding="UTF-8"?> when i used element.toString();
    But now i used StreamResult and Transformer
    which gives me the same XMl format as i want and it works fine with both
    JRE1.4 and JRE1.5
    Thank you
    Geetanjalee

  • Problem of using "org.w3c.dom.Node" class

    I try to use removeChild(child) method of "org.w3c.dom.Node" object. it don't work.
    is it better to do child=null;

    child=null does nothing to the dom object
    removeChild works fine. You're just confused.
    You would need more info to have any chance of fixing the problem.

  • A strange problem of using jbuilder6&weblogic6.1 to develop EJB

    I just use jbuilder create an blank EJB, without add anything,then I begin to compile��when it excute "run ejbc on west.jar",there are some errors:
    "west.ejbgrpx": <2002-5-14 AM 02:46:35> <Warning> <EJB> <EJB Deployment: west has a class www.westBean which is in the classpath. This class should only be located in the ejb-jar file.>
    "west.ejbgrpx": <2002-5-14 AM 02:46:35> <Warning> <EJB> <EJB Deployment: west has a class www.westHome which is in the classpath. This class should only be located in the ejb-jar file.>
    "west.ejbgrpx": <2002-5-14 AM 02:46:35> <Warning> <EJB> <EJB Deployment: west has a class www.west which is in the classpath. This class should only be located in the ejb-jar file.>
    "west.ejbgrpx": ERROR: Error from ejbc: ERROR: The classes which ejbc generated from your home and remote interfaces cannot be loaded. Please ensure that you have set the -d option to a writeable directory.
    "west.ejbgrpx": ERROR: ejbc found errors
    but a few days ago,it works very well, Then i change the ejb server weblogic6.1 to borland application server,there is no problem during compiling.
    Please help me,Thank you very much!

    You have probably some space in your TEMP,TMP or CLASSPATH environments variable. ejbc don't like these spaces at all, so you have to move your libraries and code in order to remove these spaces.

  • Org.jdom.XPath set up issues (jaxen)

    I'm trying to use org.jdom.XPath but am having trouble creating the jaxen jar.
    When I try to create the jar, the following occurs:
    maven jar
    Error retrieving artifact from [http://ibiblio.org/maven/xom/jars/xom-1.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301I have tried updating the repository list in project.properties but am still getting the same error. Is there something that I am missing? Or is there a jar file that already exists that I can use? If not, is there something other than jaxen that I can use with org.jdom.XPath?

    HTTP status code 301 means "Moved Permanently". So that jar file has been moved to a new URL. When I pasted that URL into my browser I could see the result of the redirect:
    http://mirrors.ibiblio.org/pub/mirrors/maven2/xom/xom/1.0/xom-1.0.jar
    So if you can change whatever uses the original URL to that URL instead, it should work. Otherwise, changing whatever HTTP client tries to access the URL so that it automatically follows redirects would work as well, but I have no idea how you would do that.

  • In Reply to : How to validate org.jdom.Document object using xsd: dvohra09

    Hi All
    I am creating org.jdom.Document object using constructor Document() and adding children using setRootElement(), setChildren() and addContent() methods. The children are objects of org.jdom.Element. If i want to validate the org.jdom.Document using xsd what i have to do. Thanks in anticipation.

    I tried the below code and it is always giving the
    Parsing fatal error : The markup in the document preceding the root element must be well-formed.
    But it is possible to validate the same Document object as right document after writing it onto xml file using XMLOutputter and parsing it using DOMParser
    Thanks in anticipation
    org.jdom.Document document;
    String documentString=document.toString();
    StringReader stringReader=new
    StringReader(documentString);
    SAXBuilder saxBuilder =new
    SAXBuilder("org.apache.xerces.parsers.SAXParser",true);
    saxBuilder.setFeature("http://xml.org/sax/features/vali
    ation",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema-full-checking", true);
    //Set a error handler with
    setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
    saxBuilder.build(stringReader);

  • Java.lang.LinkageError: Class org/jdom/Document

    I run my program in developemnt its working... but its working in production it throws these below mention error.... Any one help me to olve this problem.....
    Exception : java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: ; nested exception is:
         java.lang.LinkageError: Class org/jdom/Document violates loader constraints: parent and child already loaded different classes

    What program is this? Something you wrote in Java? If so, you're posting to a forum that can't help you. We deal with Messagng Server here, not Java programming. . .

  • Problem when using weblogic.jspc from an IDE

    I am trying to call JSPC from an IDE (as part of an Eclipse Builder). To optimize performance I want to avoid to spwan a new process. So I am trying to call weblogic.jspc's main method directly from the IDE. Everything works fine for simple simple pages.
              But when the page refers to a tag library with a tag providing a TagExtraInfo class, weblogic.jspc complains about the class not extending the TagExtraInfo base class although it does:
              Errors encountered while compiling 'D:\vrp-localdeploy\applications\wot\WOT' :
              Translation of /rentalcar/tiles/i18n/CarCapacityView.jsp failed: (line 17): Error in using tag library uri='/tags/i18n' prefix='i18n': For tag 'bundle', extra info class 'org.apache.taglibs.i18n.BundleTEI' does not extend javax.servlet.jsp.tagext.TagExtraInfo
              I could not figure out what exactly causes the problem. Using exactly the same settings workes just fine.
              Any suggestions?

    The full stack trace reads as follows:
              <p>
              Errors encountered while compiling 'D:\vrp-localdeploy\applications\wot\WOT' :
              <p>
              Translation of /common/include/i18n/definitions.inc failed: (line 17): Error in using tag library uri='/tags/i18n' prefix='i18n': For tag 'bundle', extra info class 'org.apache.taglibs.i18n.BundleTEI' does not extend javax.servlet.jsp.tagext.TagExtraInfo
              <br>
                   at weblogic.jspc.runJspc(jspc.java:559)
                   at weblogic.jspc.runBodyInternal(jspc.java:410)
                   at weblogic.jspc.runBody(jspc.java:319)
                   at weblogic.utils.compiler.Tool.run(Tool.java:146)
                   at weblogic.utils.compiler.Tool.run(Tool.java:103)
                   at weblogic.jspc.main(jspc.java:708)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.compileJSP(PresentationBuilder.java:1173)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.checkResource(PresentationBuilder.java:718)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder$PresentationDeltaVisitor.visit(PresentationBuilder.java:102)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.incrementalBuild(PresentationBuilder.java:1268)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.build(PresentationBuilder.java:677)
                   at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
                   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
                   at org.eclipse.core.runtime.Platform.run(Platform.java:783)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
                   at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
                   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
                   at org.eclipse.core.runtime.Platform.run(Platform.java:783)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
                   at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
                   at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
                   at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
                   at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
                   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
              <p>
              Unfortunately it doesn't really give any real reason - it is a general piece of code in jspc to report problems.
              <p>
              But I dug a lot bit deeper into the code and realized that the original problem is a ClassCastException in line 1290 of class StandardTagLib, which reads as follows:
              <p>
                   tagextrainfo = (TagExtraInfo)Beans.instantiate(classloader, s3);
              <p>
              This looks quite obvious that the class named by s3 simply is no extension of TagExtraInfo, but unfortunately the only class with that name being referenced by the class path does extend this class. I wondered what the problem might be and came up with the following answer:
              <p>
              The class of the bean instantiated by Beans.instantiate extends a class with the name "javax.servlet.jsp.tagext.TagExtraInfo" which is cast to another class with exactly <b>the same name, but a different class loader</b>. Since neither of the class loaders is parent of the other one, both classes are not considered being the same class although they have the same name. Sounds weird, but exactly this is the problem!
              <p>
              Where does it come from and why it works fine when the tool is executed in a separate thread or on the console?
              <p>
              From my understanding the problem is caused in line 395 of the class weblogic.jspc:
              <p>
                   GenericClassLoader genericclassloader = new GenericClassLoader(classpathclassfinder);
              <p>
              This line of code creates a class loader not knowing a parent class loader by which the class weblogic.jspc was loaded. All classes weblogic.jspc is using or calling will be loader by either the same or a parent class loader - this is important to understand. Since TagExtraInfo is directly referenced by StandardTagLib one instance of the class object (the object of type class) will be generated and linked when the class StandardTagLib is instantiated for the first time by the class loader which loaded weblogic.jspc (or by its parent). This is consequence which can not be avoided.
              <p>
              But now look at line 1290 of class StandardTagLib: It explicitly requests the class to be loaded by the GenericClassLoader instantiated in line 395 of the class weblogic.jspc. This class loader, off course, is not aware of the same class just being loaded by another class loader since it has no knowledge of it. It simply creates a fresh copy of the class object, which only differs in the reference to the class loader which created this class object.
              <p>
              Actually, I figured that the following line of code replacing the upper one, would resolve the problem:
              <p>
              GenericClassLoader genericclassloader = new GenericClassLoader(classpathclassfinder, this.getClass().getClassLoader());
              <p>
              Doing this, the GenericClassLoader would know its logical parent by reference and would implicitly - thanks to the implementation of java.lang.ClassLoader - try to find the class using its parent first, would find a valid class, and hence use the same instance of the class object instantiated by the parent class loader. The problem would be solved.
              <p>
              It works fine in the console or under a running application server, because they will always have the weblogic jar in their system class path. ClassLoaders not having a parent are implied to have the system class loader as their parent - the piece of code does work in this case.
              <p>
              Under Eclipse this is no option, off course. We would restrain us to exactly this version of the APIs used by the weblogic version in the system class path.
              <p>
              I was trying to patch this myself by extending weblogic.jspc by my own class to pass on a proper class loader knowing its parent, and I was sort of successful: The problem disappeared. But I can't gain exactly what I am looking for, because the method runJspc with four parameters (around line 447) of weblogic.jspc is private to the class and its public brother always passes true to this method as the fourth parameter - causing jspc to recompile all JSPs instead of just the requested ones.
              <p>
              Everything refers to WL81SP3.
              <p>
              That's were I got stuck currently. I have read some postings about this problem in the internet - some dating far back into the history. So, I have the impression that there have been some folks around with the same problem. I think the patch I suggested does not any harm and I could simply use jspc in my builder without any problems.
              <p>
              Regards,
              <p>
              Elmar Schwarz

  • Org.jdom.input.JDOMParseException: Error on line 0: File not found

    Hi Everybody!
    I´ve changed the version of Weblogic from 8.6 to 9.2 and I had several problems. One of them was that several web services made in Axis2 didn´t work because when I tried to access to wsdl the program resolve an error. I solved this problem including in weblogic.xml the following lines:
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    This solutins works fine with the services but now I have another problem. I have to open a xml file and to do that I use the following senetences:
    SAXBuilder builder=new SAXBuilder(false);
    org.jdom.Document doc=builder.build(myXML);
    In the second line the program fails and show me the following:
    org.jdom.input.JDOMParseException: Error on line 0: File "c:/temp/1219308978141\
    docucad.xml" not found.
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    ... 23 more
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    If I change the value <prefer-web-inf-classes>true</prefer-web-inf-classes> from true to false the previous senences works fine but the web services don´t work.
    Any idea?
    Thanks in advance.
    Pope

    Yes, I entirely agree with James's comment : filtering class loader mechanism is THE way to play with classloaders.
    The child-delegation model (with the option "prefer-web-inf-classes") comes from WebLogic 6.1 : it's the old-fashion way to do so. Moreover it can bring some linkage errors or unexepected behaviors.
    In addition to the official documentation, I would suggest to read the article on my blog.
    I tried to explain it in a easy way.
    http://m-button.blogspot.com/2008/08/how-to-use-weblogic-filteringclassloade.html
    Hope this helps.

  • Org/jdom/JDOMException

    When a deploy a application on localhost development mode, it works fine!!!
    When a try to deploy the same application on other machine with production mode, the follow message is displayed:
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
    Any idea?

    In development mode has the weblogic test client.
    The weblogic test client is inside of admin console and appers when you need test a webservice.
    The weblogic test client has a jdom.jar file in your war (web archive).
    Look the file:
    <DOMAIN_HOME>\servers\AdminServer\tmp\_WL_internal\wlstestclient\<XPTO>\war\WEB-INF\lib\jdom.jar
    To solve your problem, you need add a jdom.jar to dependencies of your application.
    If you use maven, edit your pom file and add this dependencie.

  • Time machine: An error occurred while copying files. The problem could be temporary. If the problem persists, use Disk Utility to repair your backup disk.

    Time machine backups are failing. I've followed the instructions I found on the Time Machine troubleshooting page (http://pondini.org/TM/Troubleshooting.html) but have gotten to where I don't know what to do next.
    Sequence of events:
    The main error message is always:
    An error occurred while copying files. The problem could be temporary. If the problem persists, use Disk Utility to repair your backup disk.
    Yesterday, I opened Disk Utility and verified the disk. Got this error:
    Error: This disk needs to be repaired using the Recovery HD. Restart your computer, holding down the Command key and the R key until you see the Apple logo. When the OS X Utilities window appears, choose Disk Utility.
    I ran Disk Utility and repaired the hard drive. Then I manually started the backup before going to bed, figuring it was going to take a long time to run. When I got up this morning, the backup had failed with the same "could be temporary" error. I checked the log, which says:
    Starting manual backup
    Attempting to mount network destination URL: afp://Tery%20Griffin;[email protected]/Tery%20Griffin's%20Time%20Ca psule
    Mounted network destination at mount point: /Volumes/Tery Griffin's Time Capsule using URL: afp://Tery%20Griffin;[email protected]/Tery%20Griffin's%20Time%20Ca psule
    Disk image /Volumes/Tery Griffin's Time Capsule/Tery Griffin’s Computer (44).sparsebundle mounted at: /Volumes/Time Machine Backups
    Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
    Event store UUIDs don't match for volume: Macintosh HD
    Error: (-36) Applying backup protections to /Volumes/Time Machine Backups/Backups.backupdb/Tery Griffin’s Computer (44)/2014-03-05-201742.inProgress/ABB10CF2-F041-4DE5-B6AE-3C228B59ADCC
    Error: (5) setxattr for key:com.apple.backupd.SnapshotStartDate path:/Volumes/Time Machine Backups/Backups.backupdb/Tery Griffin’s Computer (44)/2014-03-05-201742.inProgress/ABB10CF2-F041-4DE5-B6AE-3C228B59ADCC size:17
    Error: (5) setxattr for key:com.apple.backupd.SnapshotState path:/Volumes/Time Machine Backups/Backups.backupdb/Tery Griffin’s Computer (44)/2014-03-05-201742.inProgress/ABB10CF2-F041-4DE5-B6AE-3C228B59ADCC size:2
    Deep event scan at path:/ reason:must scan subdirs|new event db|
    Finished scan
    Found 145601 files (11.88 GB) needing backup
    16.1 GB required (including padding), 620.77 GB available
    Copied Zero KB of 11.88 GB, 0 of 145601 items
    Copied 0 files (Zero KB) from volume Macintosh HD.
    Copy stage failed with error:11
    Backup failed with error: 11
    Ejected Time Machine disk image: /Volumes/Tery Griffin's Time Capsule/Tery Griffin’s Computer (44).sparsebundle
    Ejected Time Machine network volume.
    Starting automatic backup
    Attempting to mount network destination URL: afp://Tery%20Griffin;[email protected]/Tery%20Griffin's%20Time%20Ca psule
    Mounted network destination at mount point: /Volumes/Tery Griffin's Time Capsule using URL: afp://Tery%20Griffin;[email protected]/Tery%20Griffin's%20Time%20Ca psule
    Disk image /Volumes/Tery Griffin's Time Capsule/Tery Griffin’s Computer (44).sparsebundle mounted at: /Volumes/Time Machine Backups
    Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
    Event store UUIDs don't match for volume: Macintosh HD
    Error: (-36) Applying backup protections to /Volumes/Time Machine Backups/Backups.backupdb/Tery Griffin’s Computer (44)/2014-03-05-201742.inProgress/9F8E7957-9C50-49C3-8314-880E5203E3D9
    Error: (5) setxattr for key:com.apple.backupd.SnapshotStartDate path:/Volumes/Time Machine Backups/
    Does anyone know what the problem is here and what I should do?
    Thanks,
    Tery

    You have repaired your boot drive (which is good) but have you repaired your time machine drive?  I don't own a Time Capsule so I don't know if disk utility can operate on it.  If it can, you should repair it as well.  You may need to erase it and start a new backup.  That happens to time machine volumes from time to time and is why people who are serious about their data never rely on a single source of backup.

  • Trying to use ord.jdom package with a jar - it's not working...

    Guys, I'm trying to build a Swing app that uses jdom classes and interfaces. I built the app in NetBeans, and to get the jdom packages to work, I had to mount the jdom.jar. Then suddenly, I had no errors using the jdom classes Document, Element, SAXBuilder etc. I have the program running perfectly inside the netbeans interface.
    Now, how do I get everything working together in a JAR?
    Here's the starts of the respective files:
    * CTATool.java
    * Created on January 3, 2004, 1:23 PM
    package CTATool;
    * @author  jason_michael_trk
    public class CTATool extends javax.swing.JFrame
        /** Creates new form CTATool */
        public CTATool()
            initComponents();...
    * FileWriterXML.java
    * Created on March 5, 2004, 10:06 AM
    package CTATool;
    import org.jdom.*;
    import org.jdom.output.*;
    import java.io.*;
    * @author  Jason L Michael
    public class FileWriterXML
        private Document doc;
        private FileWriter fw;
        private File f;
    I need to include in the JAR the org.jdom package. How do I do this?
    Here's the manifest I am using cirrently:
    Manifest-Version: 1.0
    Created-By: NetBeans IDE
    Specified-By: CTATool.V2.jarContent
    Main-Class: CTATool.CTAToolThe jar includes the CTATool.class file, the FileWriterXML.class file and the jdom.jar.
    I'm getting the following errors, when I attempt to execute the CTATool.V2.jar:
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
            at CTATool.CTATool.saveStatsAndExit(CTATool.java:1457)
            at CTATool.CTATool.quitMenuItemActionPerformed(CTATool.java:1450)
            at CTATool.CTATool.access$400(CTATool.java:13)
            at CTATool.CTATool$5.actionPerformed(CTATool.java:157)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
            at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
            at java.awt.Component.processMouseEvent(Component.java:5134)
            at java.awt.Component.processEvent(Component.java:4931)
            at java.awt.Container.processEvent(Container.java:1566)
            at java.awt.Component.dispatchEventImpl(Component.java:3639)
            at java.awt.Container.dispatchEventImpl(Container.java:1623)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
            at java.awt.Container.dispatchEventImpl(Container.java:1609)
            at java.awt.Window.dispatchEventImpl(Window.java:1590)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)this is right when the FileWriterXML class is created and ran.
    Help??!??Thanks in advance!
    chewy

    I think I figured this out, if it helps anyone...
    You have to wrap up all of YOUR classes into a jar, and have a manifest entry that specifies:
    Class-Path: jdom.jar
    Next, you have to put the two together (I used a self-extracting zip file. It contained MyApp.jar and jdom.jar).
    when the client extracts it onto their desktop and double clicks on MyApp.jar, it works perfectly.
    I don't think there's an easy way to package the jdom.jar in my jar and make this work.
    Hope this helps some other wary traveler!
    chewy

  • Problem in using Tomahawk 1.1.3 jar with jsf-api.jar & jsf-impl.jar

    Hi All,
    i am facing the problem while using <t:panelTabbedPane> in jsp.APplication has jsf-api.jar and jsf-impl.jar and Tomahawk 1.1.3 jar files in lib folder. This is a Portal Application.While deplyoing on portal server, i am getting following exception
    Nested Exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
    at org.apache.myfaces.shared_tomahawk.config.MyfacesConfig.<clinit>(MyfacesConfig.java:80).
    if any faces problem previously, please help me out in debugging this issue

    Please don't resurrect old topics. Start a new topic for each stand alone question. If necessary put links to the topics you found with search/google.
    Back to the actual problem:java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException The given class is missing in the classpath during runtime. Add that class, or at least the JAR file with that class, to the classpath of the runtime environment, then you're fine.

  • Detecting transform errors when using org.xml.sax.XMLFilter

    I am using javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter to transform xml against a pipeline of stylesheets (See function testPipelineTransform in the example below). The process works okay, excepting that I cannot figure out how to detect errors in the transformation process.
    I would like to achieve the same result for the pipeline process as I would for a single transformation using javax.xml.transform.Transformer.setErrorListener. The example below demonstrates how the call to javax.xml.transform.Transformer.setErrorListener does not generate the same result when using org.xml.sax.XMLFilter as it does when using a single transformation.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.XMLFilter;
    import javax.xml.transform.ErrorListener;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class FilterChain {
        static private final String newline = System.getProperty("line.separator");
         public static void main(String argv[]) {
              System.out.println("Testing pipeline transform");
              testPipelineTransform();
              System.out.println("Testing single transform");
              testXsltSingleTransform();
         } // main
         static private void testPipelineTransform() {
              try {
                   // Set up the input stream
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   InputSource input = new InputSource(bis);
                   // Set up to read the input file
                   SAXParserFactory spf = SAXParserFactory.newInstance();
                   SAXParser parser = spf.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   // Create the filters
                   SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory
                             .newInstance();
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   XMLFilter filter2 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet2())));
                   // Wire the output of the reader to filter1
                   // and the output of filter1 to filter2
                   filter1.setParent(reader);
                   filter2.setParent(filter1);
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   // Set up the transformer to process the SAX events generated
                   // by the last filter in the chain
                   Transformer transformer = stf.newTransformer();
                   transformer.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(filter2, input);
                   transformer.transform(transformSource, result);
              } catch (TransformerConfigurationException tce) {
                   // Error generated by the parser
                   System.out.println("\n** Transformer Factory error");
                   System.out.println("   " + tce.getMessage());
                   // Use the contained exception, if any
                   Throwable x = tce;
                   if (tce.getException() != null)
                        x = tce.getException();
                   x.printStackTrace();
              } catch (TransformerException te) {
                   // Error generated by the parser
                   System.out.println("\n** Transformation error");
                   System.out.println("   " + te.getMessage());
                   // Use the contained exception, if any
                   Throwable x = te;
                   if (te.getException() != null)
                        x = te.getException();
                   x.printStackTrace();
              } catch (SAXException sxe) {
                   // Error generated by this application
                   // (or a parser-initialization error)
                   Exception x = sxe;
                   if (sxe.getException() != null)
                        x = sxe.getException();
                   x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   // Parser with specified options can't be built
                   pce.printStackTrace();
         static private void testXsltSingleTransform() {
              try {
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   InputSource input = new InputSource(bis);
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Source source = new StreamSource(new StringReader(getStylesheet2()));
                   Transformer stylesheet = factory.newTransformer(source);
                   stylesheet.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(input);
                   stylesheet.transform(transformSource, result);
              } catch (Exception exc) {
                   exc.printStackTrace();
         private static String getStylesheet1() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='xml'/>" + newline
                   + "<xsl:template match='/'>" + newline
                   + "<DontCareAboutContent></DontCareAboutContent>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getStylesheet2() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='html'/>" + newline
                   + "<xsl:template match='/'>" + newline
                  + "<html><body>" + newline
                 + "<xsl:message>" + newline
                 + "Error Message for the xslt processor" + newline
                 + "</xsl:message>" + newline
                 + "Dont care about the xslt content," + newline
                 + "The only significant part is the xsl:message element" + newline
                 + "which results in a error to be handled by the xslt" + newline
                 + "processor" + newline
                   + "</body></html>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getExample() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<DontCareAboutContent>" + newline
                   + "</DontCareAboutContent>" + newline;
    }

    I made the following change which solves the problem but the sollution is tightly coupled to Xalan. If anyone has any ideas, I would still like to find a way to achieve the desired result using JAXP API's.
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   if (filter1 instanceof org.apache.xalan.transformer.TrAXFilter) {
                        ((org.apache.xalan.transformer.TrAXFilter)filter1).getTransformer().setErrorListener(...);
    ...

  • When using FireFox I often cannot view pictures in Hotmail, but have no problem when using other browsers

    When using FireFox I often cannot view pictures in Hotmail emails, but I have no problem when using other browsers

    Do you also have this issue if you temporarily switch to Private Browsing mode?
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Select: [X] "Always use private browsing mode"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    See also:
    *https://support.mozilla.org/kb/fix-login-issues-on-websites-requrie-passwords

Maybe you are looking for