Hi Marc,

>Hi all!
>Trying to insert a XML-String into a Document I get following error using
>=
>following sourcecode:
>---
>public static String XmlTextString=3D"<=3Fxml
>version=3D\"1.0\"=3F><rdf:RDF xmlns=3D=
>\"http://www.w4.org/1999/02/22-rdf-syntax-ns#\";
>xmlns:rdf=3D\"http://www.w3.=
>org/1999/02/22-rdf-syntax-ns#\"
>xmlns:prf=3D\"http://www.wapforum.org/ccppsc=
>hema-20010430#\"></rdf:RDF>";
>try{
>  myDocument =3D DocumentHelper.parseText(XmlTextString);
>}
>catch (DocumentException e){
>  System.out.println("Error in method 'XXX' - "+e.toString());
>}
>---
>FATAL:java.net.BindException: Address in use: JVM=5FBind
>java.net.BindException: Address in use: JVM=5FBind
>        at java.net.PlainSocketImpl.socketBind(Native Method)
>        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
>        at java.net.ServerSocket.<init>(ServerSocket.java:170)
>        at java.net.ServerSocket.<init>(ServerSocket.java:121)
>        at
>org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(D=
>efaultServerSocketFactory.java:97)
>        at
>org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcp=
>Endpoint.java:239)
>        at
>org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnect=
>or.java:188)
>        at
>org.apache.tomcat.core.ContextManager.start(ContextManager.java=
>:527)
>        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
>       at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
>        at
>org.netbeans.modules.web.tomcat.WebAppMain.main(WebAppMain.java=
:>37)

Frist of all the stacktrace you submitted has nothing to do with dom4j. As I
can see you use netbeans to start test your servlet. Netbeans is
using a version of Tomcat 3.2 internally. If you use Apache JServer or
Apache and Tomcat on your machine and  Netbeans both Webservers are trying to use
the same port properly. Configure your Netbeans inbuild WebServer in order to
avoid that problem.


>What can be wrong=3F Can't be so difficult to insert a xml-String into a
>Doc=
>ument, right=3F Maybe there are other methods=3F

The code you posted actually parses an XML String using a XML Parser. This
can be inbuild Aelfred or a JAXP compliant Parser in classpath.
So it creates a completly new instance of org.dom4j.Document containing the
parsed Text.


Hope that helps.

Bye

Toby

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to