Problem with JAXP

I have a following xml file AddressBook.xml
<?xml version = �1.0�?>
<addressbook>
<person>
<lastname>Idris</lastname>
<firstname>Nazmul</firstname>
<company>The Bean Factory, LLC.</company>
<email>[email protected]</email>
</person>
</addressbook>
and following java file
// JaxpXmlDomExample.java
// Core Java APIs
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
// JAXP
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
// DOM
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.NamedNodeMap;
* Used to provide an example of how to build a DOM Tree from an example XML
* file provided on the command line. This example uses Sun Microsystem's JAXP
* API's.
* COMPILE:
* javac JaxpXmlDomExample.java
* RUN PROGRAM:
* java JaxpXmlDomExample AddressBook.xml
public class JaxpXmlDomExample {
private static void printNode(Node node, String indent) {
switch (node.getNodeType()) {
case Node.DOCUMENT_NODE:
System.out.println("<xml version=\"1.0\">\n");
// recurse on each child
NodeList nodes = node.getChildNodes();
if (nodes != null) {
for (int i=0; i<nodes.getLength(); i++) {
printNode(nodes.item(i), "");
break;
case Node.ELEMENT_NODE:
String name = node.getNodeName();
System.out.print(indent + "<" + name);
NamedNodeMap attributes = node.getAttributes();
for (int i=0; i<attributes.getLength(); i++) {
Node current = attributes.item(i);
System.out.print(
" " + current.getNodeName() +
"=\"" + current.getNodeValue() +
System.out.print(">");
// recurse on each child
NodeList children = node.getChildNodes();
if (children != null) {
for (int i=0; i<children.getLength(); i++) {
printNode(children.item(i), indent + " ");
System.out.print("</" + name + ">");
break;
case Node.TEXT_NODE:
System.out.print(node.getNodeValue());
break;
public static void main(String[] args) {
if (args.length != 1) {
System.err.println ("\nUsage: java JaxpXmlDomExample filename\n");
System.exit (1);
// Create File object from incoming file
File xmlFile = new File(args[0]);
try {
// Get Document Builder Factory
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// Turn on validation, and turn off namespaces
factory.setValidating(true);
factory.setNamespaceAware(false);
// Obtain a document builder object
DocumentBuilder builder = factory.newDocumentBuilder();
System.out.println();
System.out.println("Passed in File : " + args[0]);
System.out.println("Object to Parse (File) : " + xmlFile);
System.out.println("Parser Implementation : " + builder.getClass());
System.out.println();
// Parse the document
Document doc = builder.parse(xmlFile);
// Print the document from the DOM tree and feed it an initial
// indentation of nothing
printNode(doc, "");
System.out.println("\n");
} catch (ParserConfigurationException e) {
System.out.println("The underlying parser does not support " + "the requested features.");
e.printStackTrace();
} catch (FactoryConfigurationError e) {
System.out.println("Error occurred obtaining Document Builder " + "Factory.");
e.printStackTrace();
} catch (Exception e) { e.printStackTrace();}
The above java program cmpiles perfectly, but when I try to exeecute the program
( c:\>java JaxpXmlDomExample AddressBook.xml )
the following error occuring:-
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder
(DocumentBuilderFactoryImpl.java:88)
at JaxpXmlDomExample.main(JaxpXmlDomExample.java:113)
Please tel me ASAP what should I do.
I am using
O/S :: Windows 2000
JDK :: 1.4.0
JAXP :: 1.1ea2 (Early Access 2)
Regards

Sealing violations usually mean that you are compiling with one version of a jar file, and trying to run against another.

Similar Messages

  • SAX problem with jaxp

    Hi all
    I tried the JAXP but I have this error: could anyone help? Thanks a lot (my java code is under the error)
    Thanks
    Cecile
    Exception in thread "main" org.xml.sax.SAXParseException: org.apache.crimson.parser/P-076 Malformed UTF-8 char -- is an
    XML encoding declaration missing?
    at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1038)
    at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1010)
    at org.apache.crimson.parser.InputEntity.peek(InputEntity.java, Compiled Code)
    at org.apache.crimson.parser.Parser2.peek(Parser2.java:2927)
    at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:999)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java, Compiled Code)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:232)
    at sivpn.ChargementSAX.main(ChargementSAX.java:521)
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(true);
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse("toto.xml", handler );

    The error is in your XML input, not in your Java code. Probably the XML doesn't declare its encoding, so the parser assumes that it is encoded in UTF-8. And probably it contains some character (like an accented letter, for example) that is not part of the UTF-8 encoding. So contact the person who created the XML -- which is not well-formed XML, by the way -- and get them to fix it. It's possible that declaring the encoding as ISO8859-1 might work, but it might not. All depends on what the invalid character is.

  • Problem with Application server

    Hi All,
    I'm facing problem with Application Server. When I installed the appserver and started it.. It started with the message " server has been started and some services will run at back". But when I tried stopping it using the stop default server i got the message that there is no server running but when i saw in the task manager i cud see two process running 1) appserver.exe and 2) imqbroker(something).exe so eventually I had to kill it.
    Now when I'm trying to start the application server again its giving me this message "CLI156 Could not start the domain domain1" and below is the log file attached if its of any help
    [#|2005-08-31T23:37:57.000+1000|WARNING|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|LAUNCHER005:Spaces in your PATH have been detected. The PATH must be consistently formated (e.g. C:\Program Files\Java\jdk1.5.0\bin; ) or the Appserver may not be able to start and/or stop.  Mixed quoted spaces in your PATH can cause problems, so the launcher will remove all double quotes before invoking the process. The most reliable solution would be to remove all spaces from your path before starting the Appservers components.  |#]
    [#|2005-08-31T23:37:57.015+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|
    C:/Program Files/Java/jdk1.5.0\bin\java
    -client
    -Xmx512m
    -XX:NewRatio=2
    -Dcom.sun.aas.defaultLogFile=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/logs/server.log
    -Djava.endorsed.dirs=C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/endorsed
    -Djava.security.policy=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/server.policy
    -Djava.security.auth.login.config=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/login.conf
    -Dsun.rmi.dgc.server.gcInterval=3600000
    -Dsun.rmi.dgc.client.gcInterval=3600000
    -Djavax.net.ssl.keyStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/keystore.jks
    -Djavax.net.ssl.trustStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/cacerts.jks
    -Djava.ext.dirs=C:/Program Files/Java/jdk1.5.0/jre/lib/ext;C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/lib/ext
    -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver
    -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
    -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
    -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
    -Dcom.sun.enterprise.taglisteners=jsf-impl.jar
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    -Dcom.sun.aas.configName=server-config
    -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
    -Ddomain.name=domain1
    -Djmx.invoke.getters=true
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
    -Dcom.sun.aas.promptForIdentity=true
    -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
    -Dcom.sun.aas.instanceRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1
    -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    -Dcom.sun.aas.domainName=domain1
    -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
    -Dproduct.name=Sun-Java-System/Application-Server
    -Dcom.sun.enterprise.overrideablejavaxpackages=javax.faces,javax.servlet.jsp.jstl,javax.xml.bind,javax.help
    -Dcom.sun.aas.configRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/config
    -Djava.library.path=C:\Program Files\Java\jdk1.5.0\jre\bin\client;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\Java\jdk1.5.0\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Sun\AppServer\bin;;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\jre\jdk1.5.0\bin;.;
    -Dcom.sun.aas.instanceName=server
    -Dcom.sun.aas.processLauncher=SE
    -cp
    C:/Program Files/Java/jdk1.5.0/lib/tools.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/appserv-rt.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\admin-cli.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-admin.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\dom.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote_optional.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\rmissl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xalan.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xercesImpl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-upgrade.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-ext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\activation.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-cmp.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-jstl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-launcher.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-logging.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee-svc.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jax-qname.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\mail.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\relaxngDatatype.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xsdlib.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/install/applications/jmsra/imqjmsra.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/jaxm-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/fscontext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/ant/lib/ant.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbclient.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbembedded.jar
    com.sun.enterprise.server.PEMain
    start
    display
    native|#]
    [#|2005-08-31T23:38:03.515+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5023: JMS service successfully started. Instance Name = imqbroker, Home = [C:\Program Files\netbeans-4.1\SunAppServer8.1\imq\bin].|#]
    [#|2005-08-31T23:38:03.515+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.core|_ThreadID=10;|CORE5098: AS Socket Service Initialization has been completed.|#]
    [#|2005-08-31T23:38:15.796+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0001:MBeanServer initialized successfully|#]
    [#|2005-08-31T23:38:16.484+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.core.security|_ThreadID=10;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]
    [#|2005-09-01T00:48:45.484+1000|WARNING|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|LAUNCHER005:Spaces in your PATH have been detected. The PATH must be consistently formated (e.g. C:\Program Files\Java\jdk1.5.0\bin; ) or the Appserver may not be able to start and/or stop.  Mixed quoted spaces in your PATH can cause problems, so the launcher will remove all double quotes before invoking the process. The most reliable solution would be to remove all spaces from your path before starting the Appservers components.  |#]
    [#|2005-09-01T00:48:45.531+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|
    C:/Program Files/Java/jdk1.5.0\bin\java
    -client
    -Xmx512m
    -XX:NewRatio=2
    -Dcom.sun.aas.defaultLogFile=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/logs/server.log
    -Djava.endorsed.dirs=C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/endorsed
    -Djava.security.policy=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/server.policy
    -Djava.security.auth.login.config=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/login.conf
    -Dsun.rmi.dgc.server.gcInterval=3600000
    -Dsun.rmi.dgc.client.gcInterval=3600000
    -Djavax.net.ssl.keyStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/keystore.jks
    -Djavax.net.ssl.trustStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/cacerts.jks
    -Djava.ext.dirs=C:/Program Files/Java/jdk1.5.0/jre/lib/ext;C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/lib/ext
    -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver
    -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
    -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
    -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
    -Dcom.sun.enterprise.taglisteners=jsf-impl.jar
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    -Dcom.sun.aas.configName=server-config
    -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
    -Ddomain.name=domain1
    -Djmx.invoke.getters=true
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
    -Dcom.sun.aas.promptForIdentity=true
    -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
    -Dcom.sun.aas.instanceRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1
    -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    -Dcom.sun.aas.domainName=domain1
    -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
    -Dproduct.name=Sun-Java-System/Application-Server
    -Dcom.sun.enterprise.overrideablejavaxpackages=javax.faces,javax.servlet.jsp.jstl,javax.xml.bind,javax.help
    -Dcom.sun.aas.configRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/config
    -Djava.library.path=C:\Program Files\Java\jdk1.5.0\jre\bin\client;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\Java\jdk1.5.0\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Sun\AppServer\bin;;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\jre\jdk1.5.0\bin;.;
    -Dcom.sun.aas.instanceName=server
    -Dcom.sun.aas.processLauncher=SE
    -cp
    C:/Program Files/Java/jdk1.5.0/lib/tools.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/appserv-rt.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\admin-cli.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-admin.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\dom.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote_optional.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\rmissl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xalan.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xercesImpl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-upgrade.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-ext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\activation.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-cmp.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-jstl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-launcher.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-logging.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee-svc.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jax-qname.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\mail.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\relaxngDatatype.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xsdlib.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/install/applications/jmsra/imqjmsra.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/jaxm-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/fscontext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/ant/lib/ant.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbclient.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbembedded.jar
    com.sun.enterprise.server.PEMain
    start
    display
    native|#]
    [#|2005-09-04T04:12:39.281+1000|WARNING|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|LAUNCHER005:Spaces in your PATH have been detected. The PATH must be consistently formated (e.g. C:\Program Files\Java\jdk1.5.0\bin; ) or the Appserver may not be able to start and/or stop.  Mixed quoted spaces in your PATH can cause problems, so the launcher will remove all double quotes before invoking the process. The most reliable solution would be to remove all spaces from your path before starting the Appservers components.  |#]
    [#|2005-09-04T04:12:39.343+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.tools.launcher|_ThreadID=10;|
    C:/Program Files/Java/jdk1.5.0\bin\java
    -client
    -Xmx512m
    -XX:NewRatio=2
    -Dcom.sun.aas.defaultLogFile=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/logs/server.log
    -Djava.endorsed.dirs=C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/endorsed
    -Djava.security.policy=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/server.policy
    -Djava.security.auth.login.config=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/login.conf
    -Dsun.rmi.dgc.server.gcInterval=3600000
    -Dsun.rmi.dgc.client.gcInterval=3600000
    -Djavax.net.ssl.keyStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/keystore.jks
    -Djavax.net.ssl.trustStore=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/config/cacerts.jks
    -Djava.ext.dirs=C:/Program Files/Java/jdk1.5.0/jre/lib/ext;C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1/lib/ext
    -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver
    -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
    -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
    -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
    -Dcom.sun.enterprise.taglisteners=jsf-impl.jar
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    -Dcom.sun.aas.configName=server-config
    -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
    -Ddomain.name=domain1
    -Djmx.invoke.getters=true
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
    -Dcom.sun.aas.promptForIdentity=true
    -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
    -Dcom.sun.aas.instanceRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/domains/domain1
    -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    -Dcom.sun.aas.domainName=domain1
    -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
    -Dproduct.name=Sun-Java-System/Application-Server
    -Dcom.sun.enterprise.overrideablejavaxpackages=javax.faces,javax.servlet.jsp.jstl,javax.xml.bind,javax.help
    -Dcom.sun.aas.configRoot=C:/Program Files/netbeans-4.1/SunAppServer8.1/config
    -Djava.library.path=C:\Program Files\Java\jdk1.5.0\jre\bin\client;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\Java\jdk1.5.0\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\Program Files\netbeans-4.1\SunAppServer8.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Sun\AppServer\bin;;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\jre\jdk1.5.0\bin;.;
    -Dcom.sun.aas.instanceName=server
    -Dcom.sun.aas.processLauncher=SE
    -cp
    C:/Program Files/Java/jdk1.5.0/lib/tools.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/appserv-rt.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\admin-cli.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-admin.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\dom.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jmxremote_optional.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jsf-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\rmissl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xalan.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xercesImpl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-upgrade.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-ext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\activation.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-cmp.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\appserv-jstl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-launcher.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\commons-logging.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\j2ee-svc.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jax-qname.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\jaxrpc-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\mail.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\relaxngDatatype.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\saaj-impl.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib\xsdlib.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/install/applications/jmsra/imqjmsra.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/jaxm-api.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/imq/lib/fscontext.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/lib/ant/lib/ant.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbclient.jar;C:/Program Files/netbeans-4.1/SunAppServer8.1/pointbase/lib/pbembedded.jar
    com.sun.enterprise.server.PEMain
    start
    display
    native|#]
    [#|2005-09-04T04:13:50.453+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5035: Timed out after 60000 milliseconds while trying to verify if the JMS service startup succeeded.|#]
    [#|2005-09-04T04:13:50.453+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5037: Check permissions of MQ instance directory C:\Program Files\netbeans-4.1\SunAppServer8.1\imq\var\instances|#]
    [#|2005-09-04T04:13:50.453+1000|INFO|sun-appserver-pe8.1_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5036: More details may be available in the log file for the JMS service broker instance imqbroker. Please refer to the JMS provider documentation for the exact location of this log file.|#]
    [#|2005-09-04T04:13:50.453+1000|SEVERE|sun-appserver-pe8.1_01|javax.enterprise.system.core|_ThreadID=10;|UnknownException during startup. Disable quick startup by setting system property com.sun.enterprise.server.ss.ASQuickStartup to false
    com.sun.appserv.server.ServerLifecycleException: [C4003]: Error occurred on connection creation [127.0.0.1:7676]. - cause: java.net.ConnectException: Connection refused: no further information
         at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:427)
         at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:54)
         at com.sun.enterprise.server.PEMain.run(PEMain.java:274)
         at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
    Caused by: com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [127.0.0.1:7676]. - cause: java.net.ConnectException: Connection refused: no further information
         at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSConnectException(ExceptionHandler.java:233)
         at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:180)
         at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:176)
         at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:101)
         at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:54)
         at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:61)
         at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:102)
         at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionOld(ConnectionInitiator.java:281)
         at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:107)
         at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:92)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:613)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1194)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1894)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:712)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:293)
         at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
         at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
         at com.sun.messaging.ConnectionFactory.createQueueConnection(ConnectionFactory.java:72)
         at com.sun.messaging.jmq.admin.jmsspi.JMSAdminImpl.pingProvider(JMSAdminImpl.java:783)
         at com.sun.enterprise.jms.JmsProviderLifecycle.waitForJmsProvider(JmsProviderLifecycle.java:335)
         at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:396)
         ... 3 more
    Caused by: java.net.ConnectException: Connection refused: no further information
         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
         at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:525)
         at com.sun.enterprise.server.ss.ASClientSocketImpl.connect(ASClientSocketImpl.java:175)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at java.net.Socket.<init>(Socket.java:365)
         at java.net.Socket.<init>(Socket.java:178)
         at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:156)
         ... 21 more
    |#]
    [#|2005-09-04T04:13:50.484+1000|SEVERE|sun-appserver-pe8.1_01|javax.enterprise.system.core|_ThreadID=10;|Exception while stoppping Lifecycle.
    com.sun.appserv.server.ServerLifecycleException: MQ startup failed :[C4003]: Error occurred on connection creation [127.0.0.1:7676]. - cause: java.net.ConnectException: Connection refused: no further information
         at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:376)
         at com.sun.enterprise.jms.JmsProviderLifecycle.onShutdown(JmsProviderLifecycle.java:445)
         at com.sun.enterprise.server.ss.ASLazyKernel.stopLifecycle(ASLazyKernel.java:175)
         at com.sun.enterprise.server.ss.ASLazyKernel.stopMQ(ASLazyKernel.java:169)
         at com.sun.enterprise.server.ss.ASLazyKernel.exitServer(ASLazyKernel.java:74)
         at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:67)
         at com.sun.enterprise.server.PEMain.run(PEMain.java:274)
         at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
    |#]
    Thanks in advance
    Ajay

    The VERY FIRST message in the server log gives you a hint as to what the problem might be. The server thinks you have spaces in your PATH to the application server. Therefore, the solution is to kill the server however you need to (task manager, whatever) and then reinstall it in a path that doesn't contain spaces. That's the low-hanging fruit here; if that doesn't work, well, then we will have to find some other solution.

  • Problem with the NodeManager in Weblogic 10.0 MP1

    Hi,
    I have a problem starting the Nodemanager successfully. I have currently installed BEA Weblogic 10.0 MP1. The admin server is getting started successfully. When, I start the Nodemanager with the command:
    startnodemanager -machine <hostname>, it neither gives the success message nor the error message. It comes to a stand still. Please see the below text, which appears on the Command prompt, when I run the nodemanager command.
    Machine PUNITP128166D.ad.infosys.com
    Listen Address: PUNITP128166D.ad.infosys.com
    Listen Port: 8097
    PID for D:\Ariba9r1\shared/bin/startNodeManager.cmd: 5980
    D:\Ariba9r1\BuyerDev9r1\Server\bin>
    D:\Ariba9r1\BuyerDev9r1\Server>set CLASSPATH=D:\BEA10\wlserver_10.0\server\lib\A
    ribaWebLogic81Patches.jar;.;D:\BEA10\jdk150_11\lib\tools.jar;D:\BEA10\wlserver_1
    0.0\server\lib\weblogic_sp.jar;D:\BEA10\wlserver_10.0\server\lib\weblogic.jar;
    D:\Ariba9r1\BuyerDev9r1\Server>chdir /d "D:\Ariba9r1\shared\nodemanager"
    D:\Ariba9r1\shared\nodemanager>"D:\BEA10\jdk150_11\bin\java.exe" -client -Xms32m
    -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning -Xverify:none -classpath "D:\BE
    A10\wlserver_10.0\server\lib\AribaWebLogic81Patches.jar;.;D:\BEA10\jdk150_11\lib
    \tools.jar;D:\BEA10\wlserver_10.0\server\lib\weblogic_sp.jar;D:\BEA10\wlserver_1
    0.0\server\lib\weblogic.jar;" -Dbea.home=D:\BEA10 -Djava.security.policy=D:\BEA1
    0\wlserver_10.0\server\lib\weblogic.policy -DSavedLogsDirectory=D:\Ariba9r1\shar
    ed\nodemanager\logs -DJavaHome=D:\BEA10\jdk150_11 -DTrustedHosts=D:\BEA10\wlserv
    er_10.0\common\nodemanager\config\nodemanager.hosts -DListenAddress=PUNITP128166
    D.ad.infosys.com -DListenPort=8097 -DReverseDnsEnabled=true -DLogToStderr=true -
    DLogFile=D:\Ariba9r1\shared\nodemanager\nodemanager.log -DNodeManagerHome=D:\Ari
    ba9r1\shared\nodemanager weblogic.NodeManager
    After this, when I check the nodemanager status in Console, then the status appears as REACHABLE. Assuming, this to be the successfully message, I try to start the managed servers associated with the Machine/Server. But, it fails and there appears a message on the console with the status as 'Force Shutting Down' for this server.
    When I check the logs, there seems to be some problem with the Nulll exception. Please see the below logs as it appears, its only a part of the logs
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory" with its JNDI name "weblogic.jms.XAConnectionFactory" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "QueueConnectionFactory" with its JNDI name "javax.jms.QueueConnectionFactory" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory2" with its JNDI name "weblogic.jms.XAConnectionFactory2" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "MessageDrivenBeanConnectionFactory" with its JNDI name "weblogic.jms.MessageDrivenBeanConnectionFactory" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory0" with its JNDI name "weblogic.jms.XAConnectionFactory0" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "DefaultConnectionFactory" with its JNDI name "weblogic.jms.ConnectionFactory" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040407> <Default connection factory "TopicConnectionFactory" with its JNDI name "javax.jms.TopicConnectionFactory" is started.>
    ####<Jun 28, 2010 4:20:25 PM IST> <Info> <JMS> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722225995> <BEA-040306> <JMS service is active now.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <SAFService> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226041> <BEA-281003> <SAF Service has been initialized.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <SAFService> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226041> <BEA-281002> <SAF Service has been started.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <HTTP> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226120> <BEA-101128> <Initializing HTTP services.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <HTTP> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226135> <BEA-101135> <buyerserver1 is the default Web server.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <HTTP> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226135> <BEA-101052> <[HttpServer (defaultWebserver) name: buyerserver1] Initialized>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <HTTP> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226135> <BEA-101129> <Initializing the Web application container.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226198> <BEA-180046> <INFO: Logging service enabled.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC license service instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC Configuration Helper instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC Task Manager instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC security service instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC Outbound routing service instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Debug> <WTC> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226213> <BEA-180046> <INFO: TC Transaction service instantiated!>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <WebService> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226229> <BEA-220031> <The server does not support reliable SOAP messaging.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <WebService> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226229> <BEA-220027> <Web Service reliable agents are started on the server.>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <JMX> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226604> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://PUNITP128166D.ad.infosys.com:8050/jndi/weblogic.management.mbeanservers.runtime .>
    ####<Jun 28, 2010 4:20:26 PM IST> <Info> <WebLogicServer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722226651> <BEA-000287> <Invoking startup class: ariba.j2ee.appserver.weblogic.Startup.startup(directory=D:\Ariba9r1\BuyerDev9r1\Server)>
    ####<Jun 28, 2010 4:20:27 PM IST> <Info> <WebLogicServer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722227229> <BEA-000288> <ariba.j2ee.appserver.weblogic.Startup reports: Changed directory to D:\Ariba9r1\BuyerDev9r1\Server>
    ####<Jun 28, 2010 4:20:27 PM IST> <Info> <Management> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722227244> <BEA-141187> <Java system properties are defined as follows:
    ariba.server.home = D:\Ariba9r1\BuyerDev9r1\Server
    awt.toolkit = sun.awt.windows.WToolkit
    bea.home = D:\BEA10
    file.encoding = Cp1252
    file.encoding.pkg = sun.io
    file.separator = \
    java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
    java.awt.headless = true
    java.awt.printerjob = sun.awt.windows.WPrinterJob
    java.class.path = D:\Ariba9r1\BuyerDev9r1\Server\classes\extensions\aribaDBOracleJDBC.zip;D:\Ariba9r1\BuyerDev9r1\Server\classes\extensions\aribaDBDB2JDBC.zip;D:\Ariba9r1\BuyerDev9r1\Server\classes\extensions\aribaDBMssqlJDBC.zip;D:\BEA10\wlserver_10.0\server\lib\weblogic.jar;D:\Ariba9r1\BuyerDev9r1\Server\classes;D:\Ariba9r1\BuyerDev9r1\Server\classes\AribaJ2EE.jar;D:\Ariba9r1\BuyerDev9r1\Server\classes\extensions;D:\BEA10\wlserver_10.0\server\lib\wls-api.jar
    java.class.version = 49.0
    java.endorsed.dirs = D:\Ariba9r1\BuyerDev9r1\Server\classes\endorsed
    java.ext.dirs = D:\BEA10\jdk150_11\jre\lib\ext
    java.home = D:\BEA10\jdk150_11\jre
    java.io.tmpdir = C:\DOCUME~1\suram_vishal\Local Settings\Temp\
    java.library.path = D:\BEA10\jdk150_11\bin;.;C:\SYSROOT\system32;C:\SYSROOT;D:\BEA10\wlserver_10.0\server\bin;D:\BEA10\jdk150_11\bin;D:\BEA10\patch_wlw1001\profiles\default\native;D:\BEA10\patch_wls1001\profiles\default\native;D:\BEA10\wlserver_10.0\server\native\win\32;D:\BEA10\wlserver_10.0\server\bin;D:\BEA10\modules\org.apache.ant_1.6.5\bin;D:\BEA10\jdk150_11\jre\bin;D:\BEA10\jdk150_11\bin;D:\Ariba9r1\BuyerDev9r1\Server\bin;D:/Ariba9r1/BuyerDev9r1/Server/bin/Win32;D:/Ariba9r1/BuyerDev9r1/Server/bin;C:\SYSROOT\system32;C:\SYSROOT;C:\SYSROOT\System32\Wbem;C:\Program Files\Java\jre1.5.0_06;C:\Program Files\CA\SharedComponents\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\SubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;D:\BEA10\wlserver_10.0\server\native\win\32\oci920_8;D:\Ariba9r1\BuyerDev9r1\Server;D:\Ariba9r1\BuyerDev9r1\Server\bin;D:\Ariba9r1\BuyerDev9r1\Server;D:\Ariba9r1\BuyerDev9r1\Server\lib\Win32;D:\Ariba9r1\BuyerDev9r1\Server\internal\lib\Win32
    java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
    java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
    java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.utils|weblogic.net
    java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version = 1.5.0_11-b03
    java.security.policy = D:\BEA10\wlserver_10.0\server\lib\weblogic.policy
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.5
    java.vendor = Sun Microsystems Inc.
    java.vendor.url = http://java.sun.com/
    java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
    java.version = 1.5.0_11
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) Client VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Sun Microsystems Inc.
    java.vm.specification.version = 1.0
    java.vm.vendor = Sun Microsystems Inc.
    java.vm.version = 1.5.0_11-b03
    javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
    javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
    javax.xml.rpc.ServiceFactory = weblogic.webservice.core.rpc.ServiceFactoryImpl
    javax.xml.soap.MessageFactory = weblogic.webservice.core.soap.MessageFactoryImpl
    org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
    org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
    org.xml.sax.driver = weblogic.apache.xerces.parsers.SAXParser
    org.xml.sax.parser = weblogic.xml.jaxp.RegistryParser
    os.arch = x86
    os.name = Windows 2003
    os.version = 5.2
    path.separator = ;
    sun.arch.data.model = 32
    sun.boot.class.path = D:\Ariba9r1\BuyerDev9r1\Server\classes\endorsed\serializer.jar;D:\Ariba9r1\BuyerDev9r1\Server\classes\endorsed\xalan.jar;D:\Ariba9r1\BuyerDev9r1\Server\classes\endorsed\xercesImpl.jar;D:\Ariba9r1\BuyerDev9r1\Server\classes\endorsed\xml-apis.jar;D:\BEA10\jdk150_11\jre\lib\rt.jar;D:\BEA10\jdk150_11\jre\lib\i18n.jar;D:\BEA10\jdk150_11\jre\lib\sunrsasign.jar;D:\BEA10\jdk150_11\jre\lib\jsse.jar;D:\BEA10\jdk150_11\jre\lib\jce.jar;D:\BEA10\jdk150_11\jre\lib\charsets.jar;D:\BEA10\jdk150_11\jre\classes
    sun.boot.library.path = D:\BEA10\jdk150_11\jre\bin
    sun.cpu.endian = little
    sun.desktop = windows
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = Cp1252
    sun.management.compiler = HotSpot Client Compiler
    sun.os.patch.level = Service Pack 2
    user.country = US
    user.dir = D:\Ariba9r1\BuyerDev9r1\Server
    user.home = C:\Documents and Settings\suram_vishal
    user.language = en
    user.name = suram_vishal
    user.timezone = Asia/Calcutta
    vde.home = D:\BEA10\user_projects\VanillaBuyer\servers\buyerserver1\data\ldap
    weblogic.Name = buyerserver1
    weblogic.ReverseDNSAllowed = false
    weblogic.classloader.preprocessor = weblogic.diagnostics.instrumentation.DiagnosticClassPreProcessor
    weblogic.management.server = http://PUNITP128166D.ad.infosys.com:8099
    weblogic.net.http.URLStreamHandlerFactory = ariba.util.net.URLStreamHandlerFactory
    weblogic.nodemanager.ServiceEnabled = true
    weblogic.security.SSL.ignoreHostnameVerification = true
    weblogic.security.TrustKeyStore = DemoTrust
    weblogic.system.BootIdentityFile = D:\BEA10\user_projects\VanillaBuyer\servers\buyerserver1\data\nodemanager\boot.properties
    >
    ####<Jun 28, 2010 4:20:29 PM IST> <Notice> <WebLogicServer> <punitp128166d> <buyerserver1> <main> <<WLS Kernel>> <> <> <1277722229510> <BEA-000365> <Server state changed to STANDBY>
    ####<Jun 28, 2010 4:20:29 PM IST> <Notice> <WebLogicServer> <punitp128166d> <buyerserver1> <main> <<WLS Kernel>> <> <> <1277722229525> <BEA-000365> <Server state changed to STARTING>
    ####<Jun 28, 2010 4:20:29 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722229572> <BEA-149209> <Resuming.>
    ####<Jun 28, 2010 4:20:30 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722230182> <BEA-149059> <Module Buyer of application Buyer is transitioning from STATE_NEW to STATE_PREPARED on server buyerserver1.>
    ####<Jun 28, 2010 4:20:30 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722230728> <BEA-149060> <Module Buyer of application Buyer successfully transitioned from STATE_NEW to STATE_PREPARED on server buyerserver1.>
    ####<Jun 28, 2010 4:20:30 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722230728> <BEA-149059> <Module Buyer of application Buyer is transitioning from STATE_PREPARED to STATE_ADMIN on server buyerserver1.>
    ####<Jun 28, 2010 4:20:30 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722230728> <BEA-149060> <Module Buyer of application Buyer successfully transitioned from STATE_PREPARED to STATE_ADMIN on server buyerserver1.>
    ####<Jun 28, 2010 4:20:35 PM IST> <Warning> <HTTP> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722235212> <BEA-101162> <User defined listener ariba.server.ormsserver.ServletContextListener failed: java.lang.NullPointerException.
    java.lang.NullPointerException
         at java.util.Hashtable.put(Hashtable.java:396)
         at ariba.j2ee.weblogic.Properties.initialize(Properties.java:53)
         at ariba.j2ee.core.J2EEServer.initialize(J2EEServer.java:77)
         at ariba.j2ee.core.AribaServletContextListener.contextInitialized(AribaServletContextListener.java:25)
         at ariba.server.ormsserver.ServletContextListener.contextInitialized(ServletContextListener.java:26)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:458)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:168)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1744)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2909)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:973)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    >
    ####<Jun 28, 2010 4:20:35 PM IST> <Info> <Deployer> <punitp128166d> <buyerserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1277722235212> <BEA-149059> <Module Buyer of application Buyer is transitioning from STATE_ADMIN to STATE_PREPARED on server buyerserver1.>
    ####<Jun 28, 2010 4:20:35 PM IST> <Notice> <WebLogicServer> <punitp128166d> <buyerserver1> <Thread-1> <<WLS Kernel>> <> <> <1277722235212> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
    ####<Jun 28, 2010 4:20:35 PM IST> <Alert> <WebLogicServer> <punitp128166d> <buyerserver1> <Thread-1> <<WLS Kernel>> <> <> <1277722235212> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
    ####<Jun 28, 2010 4:20:35 PM IST> <Notice> <WebLogicServer> <punitp128166d> <buyerserver1> <Thread-1> <<WLS Kernel>> <> <> <1277722235212> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    Kindly help me in getting this resolved.
    Thanks,
    Vishal.

    The error appears to come from the ariba code. I suggest asking them.
    java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at ariba.j2ee.weblogic.Properties.initialize(Properties.java:53)

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • XDK9.2.0.2, pb with JAXP and XSL Processor

    Hello,
    I'm using XDK 9.2.0.2 and I try to use JAXP.
    I have a difference between using the Oracle XSL processor directly and through JAXP.
    Through JAXP, the processor don't care about the xsl:outpout encoding attribute !
    Why ?
    It take care of method, indent, ... but not encoding !
    I try to set the property with : transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    It works but I don't want to do that this way !
    TIA
    Didier
    sample (from XSLSample2):
    /* $Header: XSLSample2.java 07-jan-2002.02:24:56 sasriniv Exp $ */
    /* Copyright (c) 2000, 2002, Oracle Corporation. All rights reserved. */
    * DESCRIPTION
    * This file gives a simple example of how to use the XSL processing
    * capabilities of the Oracle XML Parser V2.0. An input XML document is
    * transformed using a given input stylesheet
    * This Sample streams the result of XSL transfromations directly to
    * a stream, hence can support xsl:output features.
    import java.net.URL;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XMLDocumentFragment;
    import oracle.xml.parser.v2.XSLStylesheet;
    import oracle.xml.parser.v2.XSLProcessor;
    // Import JAXP
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class XSLSample2
    * Transforms an xml document using a stylesheet
    * @param args input xml and xml documents
    public static void main (String args[]) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL xslURL;
    URL xmlURL;
    try
    if (args.length != 2)
    // Must pass in the names of the XSL and XML files
    System.err.println("Usage: java XSLSample2 xslfile xmlfile");
    System.exit(1);
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    // parser input XSL file
    xslURL = DemoUtil.createURL(args[0]);
    parser.parse(xslURL);
    xsldoc = parser.getDocument();
    // parser input XML file
    xmlURL = DemoUtil.createURL(args[1]);
    parser.parse(xmlURL);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLProcessor processor = new XSLProcessor();
    processor.setBaseURL(xslURL);
    XSLStylesheet xsl = processor.newXSLStylesheet(xsldoc);
    // display any warnings that may occur
    processor.showWarnings(true);
    processor.setErrorStream(System.err);
    // Process XSL
    processor.processXSL(xsl, xml, System.out);
    // With JAXP
    System.out.println("");
    System.out.println("With JAXP :");
    TransformerFactory tfactory = TransformerFactory.newInstance();
    String xslID = xslURL.toString();
    Transformer transformer = tfactory.newTransformer(new StreamSource(xslID));
    //transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    String xmlID = xmlURL.toString();
    StreamSource source = new StreamSource(xmlID);
    transformer.transform(source, new StreamResult(System.out));
    catch (Exception e)
    e.printStackTrace();
    My XML file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ListePatients>
    <Patient>
    <Nom>Zeublouse</Nom>
    <NomMarital/>
    <Prinom>Agathe</Prinom>
    </Patient>
    <Patient>
    <Nom>Stick</Nom>
    <NomMarital>Laiboul</NomMarital>
    <Prinom>Ella</Prinom>
    </Patient>
    <Patient>
    <Nom>`ihnotvy</Nom>
    <NomMarital/>
    <Prinom>Jacques</Prinom>
    </Patient>
    </ListePatients>
    my XSL file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/">
    <HTML>
    <HEAD>
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <xsl:apply-templates select='ListePatients'/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match='ListePatients'>
    <TABLE>
    <xsl:for-each select='Patient'>
    <xsl:sort select='Nom' order='ascending' data-type='text'/>
    <TR TITLE='`ihnotvy'>
    <TD><xsl:value-of select='Nom'/></TD>
    <TD><xsl:value-of select='NomMarital'/></TD>
    <TD><xsl:value-of select='Prinom'/></TD>
    </TR>
    </xsl:for-each>
    </TABLE>
    </xsl:template>
    </xsl:stylesheet>
    The result :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="`ihnotvy">
    <TD>`ihnotvy</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    With JAXP :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>C C)C(C.C/C4C6C9</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    You can also use a PrintWriter to wrap a JspWriter
    since PrintWriter has a constructor that takes any
    Writer instance.I'm having the same problem, I've spent a lot of time
    on it but I can't get it work.
    Could you post some working code that shows how you
    can do it?
    Thanks.
    It works now, I have used the code:
    result = processor.processXSL(stylesheet, xml);
    PrintWriter pw = new PrintWriter(out);
    result.print(pw);
    I had tried this before but there was an error in other place that prevented it to work.
    Thank you anyway.

  • Ugly problem with java.lang.reflect.InvocationTargetException

    Hello,
    I am writing a web service which connects to WebSphere MQ queue manager and puts a message on a queue.
    I use Eclipse and as usual I followed more or less the hints given at:
    http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html
    I have chosen Tomcat 5.5.20 as target server (had to, because otherwise it does not create a server-config.wsdd file), the web service WSDL thingies and the client were created successfully.
    I have created WAR files and everything went fine when I tested the thing on JBoss.
    Bad things started after I deployed the things on the Tomcat server. When I start the client I receive java.lang.reflect.InvocationTargetException as a result. The web service itself does not generate any exception, but the client does (I'll post the dump later..).
    During the debug it turned that the exception is generated at the moment when the web service program tries to call any of the WebSphere functions.
    Now - 1st obvious thing was to check if I have com.ibm.mq.jar in the WEB-INF/lib directory inside my WAR files. Yep! There it was.
    So.. if the thing works just fine on JBoss and it booms on Tomcat I wonder whats the hack here? I copied all of the MQ libraries i have from JBOSS_HOME/lib to CATALINA_HOME/shared/lib and CATALINA_HOME/common/lib. Well.. that's quite ugly, because all necessary jars are inside the WEB-INF/lib directory. Anyway nothing of the above helped me running the thing on Tomcat.
    Do you have any suggestions or have anyone of you ever had such problem?
    Here are the exception dump and part of the code:
      - Setting up MQ environment:
         - Setting hostname...
    An AxisFault exception occured: java.lang.reflect.InvocationTargetException
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.reflect.InvocationTargetException
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}hostname:ghjvk0j
    java.lang.reflect.InvocationTargetException
         at org.apache.axis.message.SOAPFaultBuilder.create
    Fault(SOAPFaultBuilder.java:222)
         at org.apache.axis.message.SOAPFaultBuilder.endElement(
    SOAPFaultBuilder.java:129)
         at org.apache.axis.encoding.DeserializationContext.endElement(
    DeserializationContext.java:1087)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(
    Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.
    scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScanne
    rImpl$Fragment ContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerI
    mpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse
    (Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at org.apache.axis.encoding.DeserializationContext.parse(
    DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
         at org.apache.axis.handlers.soap.
    MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at pl.pzu.services.TfiAuthenticationSoapBindingStub.
    verify(TfiAuthenticationSoapBindingStub.java:245)
         at pl.pzu.services.TfiAuthenticationProxy.
    verify(TfiAuthenticationProxy.java:45)
         at org.apache.jsp.sampleTfiAuthenticationProxy.
    Result_jsp._jspService(Result_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.
    service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.
    service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.
    service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.
    serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.
    service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
    (ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(
    StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke
    (StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(
    StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(
    ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(
    StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(
    CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(
    Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11Connec
    tionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Pool
    TcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Lea
    derFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
    ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)There is the part of the web service code where the event occurs:
         public void writeMessage(String message,
    String message_ID) throws Exception
              System.out.println("      - Setting up MQ environment: ");
              try
                   System.out.println("      - Setting hostname...");
         NEXT LINE CAUSES THE CLIENT TO THROW
         This is the first call to any WebSphere assets.
         During debug It says the it is unable to inspect the MQEnvironment
         object...
                   MQEnvironment.hostname = m_config.getQMHost();
                   System.out.println("      - Setting port...");
                   MQEnvironment.port = m_config.getQMPort();
                   System.out.println("      - Setting channel...");
                   MQEnvironment.channel = m_config.getQMChannel();
         }I think that if it works on JBoss and it doesn't on Tomcat it is not coding problem, but rather a configuration...
    Thanx for any ideas or help from ur side.

    Did you have any success on this?
    I also have the same problem with Tomcat 6.
    I had Tomcat 5.0 working with this code, but when we migrated to Tomcat 6.0, I am getting this exception on the clent side. I figured out that it is occuring on invoking WebSphere MQ call from the code.
    Thanks

  • WLS 7.0 sp2 - Servlet Problems with SOAP messages

              I'm using Weblogic 7.0 SP2 and trying to create a Servlet to receive SOAP wrapped
              XML messages. I'm getting the following error. Is this a problem with WLS7.0sp2's
              support of JAXM? The System.out.println's indicate I have successfully received
              the incoming SOAP request and then successfully formatted the SOAP response, but
              upon returning saving the response it appears to blow up. Does anyone have any
              suggestions?
              I need to do the following in a servlet:
              - receive an incoming SOAP request with an embedded XML message
              - perform some processing
              - return a SOAP response with an embedded XML message
              Should I be using JAXM? Or can I do this same task easily with JAX-RPC?
              <Feb 24, 2004 4:10:42 PM AST> <Error> <HTTP> <101017> <[ServletContext(id=260434
              7,name=isd.war,context-path=)] Root cause of ServletException
              java.lang.Error: NYI
              at weblogic.webservice.core.soap.SOAPMessageImpl.saveRequired(SOAPMessag
              eImpl.java:360)
              at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
              (ServletStubImpl.java:1058)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:401)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:306)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:5445)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
              eManager.java:780)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:3105)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2588)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              >
              I've stripped the code down so that all it does is verifies the incoming SOAP/XML
              request and creates a hard-coded response... be gentle... I'm a novice at this
              import javax.xml.soap.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              // import javax.xml.transform.*;
              import java.util.*;
              import java.io.*;
              public class RegisterServlet extends HttpServlet
              static MessageFactory fac = null;
              static
              try
              fac = MessageFactory.newInstance();
              catch (Exception ex)
              ex.printStackTrace();
              public void init(ServletConfig servletConfig) throws ServletException
              super.init(servletConfig);
              public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
              IOException
              try
              System.out.println("** Note: doPost() Entering req = " + req);
              // Get all the headers from the HTTP request
              MimeHeaders headers = getHeaders(req);
              // Get the body of the HTTP request
              InputStream is = req.getInputStream();
              // Now internalize the contents of a HTTP request
              // and create a SOAPMessage
              SOAPMessage msg = fac.createMessage(headers, is);
              System.out.println("** Note: doPost() Step A");
              SOAPMessage reply = null;
              reply = onMessage(msg);
              System.out.println("** Note: doPost() Step B reply = " + reply);
              if (reply != null)
              * Need to call saveChanges because we're
              * going to use the MimeHeaders to set HTTP
              * response information. These MimeHeaders
              * are generated as part of the save.
              if (reply.saveRequired())
              System.out.println("** Note: doPost() Step C reply.saveRequired()");
              reply.saveChanges();
              resp.setStatus(HttpServletResponse.SC_OK);
              putHeaders(reply.getMimeHeaders(), resp);
              // Write out the message on the response stream
              OutputStream os = resp.getOutputStream();
              System.out.println("** Note: doPost() Step D os = " + os);
              reply.writeTo(os);
              os.flush();
              else
              resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
              catch (Exception ex)
              throw new ServletException("** Error: SAAJ POST failed: " + ex.getMessage());
              static MimeHeaders getHeaders(HttpServletRequest req)
              Enumeration enum = req.getHeaderNames();
              MimeHeaders headers = new MimeHeaders();
              while (enum.hasMoreElements())
              String headerName = (String)enum.nextElement();
              String headerValue = req.getHeader(headerName);
              StringTokenizer values =
              new StringTokenizer(headerValue, ",");
              while (values.hasMoreTokens())
              headers.addHeader(headerName,
              values.nextToken().trim());
              return headers;
              static void putHeaders(MimeHeaders headers, HttpServletResponse res)
              Iterator it = headers.getAllHeaders();
              while (it.hasNext())
              MimeHeader header = (MimeHeader)it.next();
              String[] values = headers.getHeader(header.getName());
              if (values.length == 1)
              res.setHeader(header.getName(),
              header.getValue());
              else
              StringBuffer concat = new StringBuffer();
              int i = 0;
              while (i < values.length)
              if (i != 0)
              concat.append(',');
              concat.append(values[i++]);
              res.setHeader(header.getName(), concat.toString());
              // This is the application code for handling the message.
              public SOAPMessage onMessage(SOAPMessage message)
              SOAPMessage replymsg = null;
              try
              System.out.println("** Note: OnMessage() Entering msg = " + message);
              //Extract the ComputerPart element from request message and add to reply SOAP
              message.
              SOAPEnvelope reqse = message.getSOAPPart().getEnvelope();
              SOAPBody reqsb = reqse.getBody();
              //System.out.println("** Note: OnMessage() Step B");
              System.out.println("** Note: OnMessage () Step A Soap Request Message Body = "
              + reqsb);
              //Create a reply mesage from the msgFactory of JAXMServlet
              System.out.println("** Note: OnMessage () Step B");
              replymsg = fac.createMessage();
              SOAPPart sp = replymsg.getSOAPPart();
              SOAPEnvelope se = sp.getEnvelope();
              SOAPBody sb = se.getBody();
              System.out.println("** Note: OnMessage () Step C Soap Reply Before Message Body
              = " + sb);
              se.getBody().addBodyElement(se.createName("RegisterResponse")).addChildElement(se.createName("ErrorCode")).addTextNode("000");
              System.out.println("** Note: OnMessage () Step D Soap Reply After Message Body
              = " + sb);
              replymsg.saveChanges();
              System.out.println("** Note: OnMessage() Exiting replymsg = " + (replymsg));
              catch (Exception ex)
              ex.printStackTrace();
              return replymsg;
              

    Michael,
    I got the same error on WLS8.1/Win2K professional and apache FOP (old version).
    After digging into the WLS code and FOP(old version). i found the conflict happens
    on
    the "org.xml.sax.parser" system property. In WLS code, they hard coded like the
    following when startup weblogic server:
    System.setProperty("org.xml.sax.parser", "weblogic.xml.jaxp.RegistryParser");
    But the FOP code try to use the "org.xml.sax.parser" system property to find the
    sax parser then conlict happens.
    Here is the response from BEA support :
    "I consulted with our developers regarding the question of whether we can change
    the hard-coded value for the java system property: org.xml.sax.parser by using
    a configuration parameter and I found that unfortunately there is no specific
    setting to change the value. As you had mentioned in your note the org.xml.sax.parser
    system property can be changed programmatically in your application code."
    I solve my problem by using newer apache FOP (it never use the system property:org.xml.sax.parser
    any more) and XML Registy for WLS8.1.
    Good luck.
    David Liu
    Point2 Technologies Inc.
    "p_michael" <[email protected]> wrote:
    >
    Help.
    When we migrated from WLS 6.1 to WLS 7.0 SP2 when encountered a problem
    with XML
    parsing that did not previously exist.
    We get the error "weblogic.xml.jaxp.RegistryParser is not a SAX driver".
    What does this mean? And, what should we do about it.
    p_michael

  • EntityResolver problem with InputStream other than FileInputStream

    Hi everybody,
    I have problems with resolving entities. I tried parsing xml-data with JAXP / Xerces 2.6 Sax and needed an EntityResolver for including xml-data, stored in an external-file:
    <!ENTITY test SYSTEM "test.xml">
    <a>
    &test;
    </a>It was working, as long as I put the xml above in a file and used a fileInputStream for creating the inputSource-object. Of course I set a SystemId with the path to test.xml. When I used a fileInputStream, the EntityResolver was called (I implemented it just for tracing reasons) and my data was processed correctly. As soon as I put the xml above e.g. in a ByteArrayInputStream, and used this for creating a InputSource-object, the my EntityResolver wasn't called and it didn't work. So why is this problem with EntityResolver and other Streams but FileInputStream?? Is it a bug? Did I miss something??
    Thanks for any help!!!

    I appologize for my mistake with my first post.
    While I was copying the code for this forum today, I recognized a typing error in my xml-string:
    String xmlString = "<?xml version=\"1.0\"?> <!DOCTYPE staticinc [ <!ENTITY test SYSTEM \"test.xml\">]><a>%test;</a>";I used a percent-sign instead of amp for the test-entity, and as stupid this is - this was of course the reason for my entity resolver not being called. I get a warning by xml-editors if I have this error in a file, but not during parse of a string.
    Somehow I got on the wrong track, because of the description I found in the other thread about entityResolver problems for "none-file-sources" and it seemed to fit.
    Again, sorry !! Thanks for your offer to help!!

  • Error when I replaced  the DOM parcer with JAXP

    I replaced the DOM parcer with JAXP ....
    We moved from DOM parcer �import org.apache.xerces.parsers.DOMParser;� to JAXP.
    Here is my code:
    // Step 1: create a DocumentBuilderFactory and setNamespaceAware
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    // Step 2: create a DocumentBuilder
      DocumentBuilder db = dbf.newDocumentBuilder();
    // Step 3: parse the input file to get a Document object
    Document doc = db.parse(location);
      root = doc.getDocumentElement();
      root.normalize();
    AND when we run stress test after a while we start getting error
    java.lang.NullPointerException
    at org.apache.xerces.dom.DeepNodeListImpl.nextMatchingElementAfter(Unknown Source)
    at org.apache.xerces.dom.DeepNodeListImpl.item(Unknown Source)
    at org.apache.xerces.dom.DeepNodeListImpl.getLength(Unknown Source)
    at com.xxx.yyy.WfStartTasksXmlDAO.getActionPerformed(Unknown Source)
    at com.xxx.yyy.WfStartTasksXmlDAO.getAction(Unknown Source)
    - Any idea why we are getting this error. Is this server (Linux) problem? or JAXP?
    Message was edited by:
    TamerBasha

    This is happening because JAXP is not thread safe. need to synchronize bracket or use thread safe parser.

  • Problem with Integration Repository

    Hi,
    I have problem with Integration Respository.when i am trying to connect it showing the fallowing.
    Application Digital Signature can not be verified. you want to run the application.
    when i click on run it showing
    Unable to launch the application. 
    The details of Error is given below.
    Launch File :
    <jnlp spec="1.0+" codebase="http://ps3181:50000/rep">
        <information>
            <title>Integration Builder</title>
            <vendor>SAP AG</vendor>
            <homepage href="http://www.sap.com" />
            <description type="one-line">Repository</description>
            <description type="short">Repository</description>
            <description type="tooltip">Repository</description>
            <icon hight="64" href="start/graphics/sap6464.gif" type="splash" width="64" />
            <icon hight="32" href="start/graphics/SAP3232.gif" width="32" />
        </information>
        <security>
            <all-permissions />
        </security>
        <resources>
            <j2se version="1.4+" initial-heap-size="32m" max-heap-size="512m" />
            <jar href="repository/aii_ibrep_client.jar" />
            <jar href="repository/aii_ibrep_core.jar" />
            <jar href="repository/aii_ibrep_sbeans.jar" />
            <jar href="repository/aii_ibrep_rb.jar" />
            <jar href="repository/aii_ib_client.jar" />
            <jar href="repository/aii_ib_core.jar" />
            <jar href="repository/aii_ib_sbeans.jar" />
            <jar href="repository/aii_ib_rb.jar" />
            <jar href="repository/aii_proxy_gen.jar" />
            <jar href="repository/aii_map_api.jar" />
            <jar href="repository/aii_mt_base.jar" />
            <jar href="repository/aii_mt_rb.jar" />
            <jar href="repository/aii_mt_rt.jar" />
            <jar href="repository/aii_util_icons.jar" />
            <jar href="repository/aii_util_swing.jar" />
            <jar href="repository/aii_util_xsd.jar" />
            <jar href="repository/aii_util_xml.jar" />
            <jar href="repository/aii_utilxi_misc.jar" />
            <jar href="repository/aii_util_rb.jar" />
            <jar href="repository/aii_upload_core.jar" />
            <jar href="repository/aii_upload_sap.jar" />
            <jar href="repository/clientaii_ib_sbeans.jar" />
            <jar href="repository/clientaii_ibrep_sbeans.jar" />
            <jar href="repository/frog.jar" />
            <jar href="repository/focus14.jar" />
            <jar href="repository/sapxmltoolkit.jar" />
            <jar href="repository/jta.jar" />
            <jar href="repository/ejb20.jar" />
            <jar href="repository/exception.jar" />
            <jar href="repository/logging.jar" />
            <jar href="repository/guidgenerator.jar" />
            <jar href="repository/jperflib.jar" />
            <jar href="repository/tenComposite.jar" />
            <jar href="repository/tenGraph.jar" />
            <jar href="repository/tenGraphics.jar" />
            <jar href="repository/tenGenerics.jar" />
            <jar href="repository/tenGui.jar" />
            <jar href="repository/sapni.jar" />
            <jar href="repository/sapj2eeclient.jar" />
            <property name="jnlp.log.initialConfiguration" value="FILE, SIMPLE" />
        <property name="jnlp.com.sap.aii.ib.client.properties" value="com.sap.aii.ib.client., com.sap.aii.ib.core., com.sap.aii.util.xml., com.sap.aii.connect., com.sap.aii.repository.mapping.additionaltypes, com.sap.aii.docu., com.sap.aii.ibrep.core.cms., com.sap.aii.ibdir.core.cms.*" /><property name="jnlp.com.sap.aii.connect.integrationserver.r3.sysnr" value="00" /><property name="jnlp.com.sap.aii.connect.landscape.contextroot" value="sld" /><property name="jnlp.com.sap.aii.connect.cr.name" value="ps3181" /><property name="jnlp.com.sap.aii.ib.client.content.languages" value="EN,DE" /><property name="jnlp.com.sap.aii.connect.repository.contextroot" value="rep" /><property name="jnlp.com.sap.aii.ib.client.login.languages" value="EN,DE" /><property name="jnlp.com.sap.aii.connect.directory.rmiport" value="50004" /><property name="jnlp.com.sap.aii.connect.cr.contextroot" value="sld" /><property name="jnlp.com.sap.aii.connect.rwb.r3.client" value="000" /><property name="jnlp.com.sap.aii.connect.directory.contextroot" value="dir" /><property name="jnlp.com.sap.aii.connect.rwb.contextroot" value="rwb" /><property name="jnlp.com.sap.aii.connect.landscape.httpsport" value="@com.sap.aii.server.httpsport.lcr@" /><property name="jnlp.com.sap.aii.connect.repository.rmiport" value="50004" /><property name="jnlp.com.sap.aii.connect.repository.httpport" value="50000" /><property name="jnlp.com.sap.aii.connect.directory.name" value="ps3181" /><property name="jnlp.com.sap.aii.connect.cr.httpsport" value="@com.sap.aii.server.httpsport.cr@" /><property name="jnlp.com.sap.aii.connect.repository.name" value="ps3181" /><property name="jnlp.com.sap.aii.connect.integrationserver.contextroot" value="run" /><property name="jnlp.com.sap.aii.connect.integrationserver.name" value="ps3181" /><property name="jnlp.com.sap.aii.connect.rwb.httpsport" value="@com.sap.aii.connect.rwb.httpsport@" /><property name="jnlp.com.sap.aii.connect.landscape.httpport" value="50000" /><property name="jnlp.com.sap.aii.docu.languages" value="null" /><property name="jnlp.com.sap.aii.ib.client.jnlp.j2se.initialheapsize" value="32m" /><property name="jnlp.com.sap.aii.util.xml.parserFactory" value="com.sap.engine.lib.jaxp.SAXParserFactoryImpl" /><property name="jnlp.com.sap.aii.repository.mapping.additionaltypes" value="none" /><property name="jnlp.com.sap.aii.connect.directory.httpport" value="50000" /><property name="jnlp.com.sap.aii.connect.directory.httpsport" value="@com.sap.aii.server.httpsport.directory@" /><property name="jnlp.com.sap.aii.connect.integrationserver.r3.httpport" value="8000" /><property name="jnlp.com.sap.aii.connect.rwb.name" value="ps3181" /><property name="jnlp.com.sap.aii.connect.integrationserver.r3.client" value="000" /><property name="jnlp.com.sap.aii.connect.cr.httpport" value="50000" /><property name="jnlp.com.sap.aii.connect.landscape.name" value="ps3181" /><property name="jnlp.SAPMYNAME" value="ps3181_TD1_00" /><property name="jnlp.com.sap.aii.connect.rwb.httpport" value="50000" /><property name="jnlp.com.sap.aii.docu.url" value="null" /><property name="jnlp.com.sap.aii.ib.client.applicationname.directory" value="sap.com/com.sap.xi.directory/" /><property name="jnlp.com.sap.aii.util.xml.transformerFactory" value="com.sap.engine.lib.jaxp.TransformerFactoryImpl" /><property name="jnlp.com.sap.aii.ib.client.applicationname.repository" value="sap.com/com.sap.xi.repository/" /><property name="jnlp.com.sap.aii.ib.client.login.InitialContextFactory" value="com.sap.engine.services.jndi.InitialContextFactoryImpl" /><property name="jnlp.com.sap.aii.connect.integrationserver.httpport" value="50000" /><property name="jnlp.client" value="true" /><property name="jnlp.com.sap.aii.connect.repository.httpsport" value="@com.sap.aii.server.httpsport.repository@" /><property name="jnlp.com.sap.aii.ib.client.jnlp.j2se.maxheapsize" value="512m" /><property name="jnlp.com.sap.aii.connect.integrationserver.httpsport" value="@com.sap.aii.connect.integrationserver.httpsport@" /><property name="jnlp.com.sap.aii.connect.integrationbuilder.startpage.url" value="rep/start/index.jsp" /><property name="jnlp.com.sap.aii.connect.integrationserver.r3.httpsport" value="@com.sap.aii.connect.integrationserver.r3.httpsport@" /><property name="jnlp.com.sap.aii.connect.rwb.r3.sysnr" value="00" /><property name="jnlp.com.sap.aii.util.xml.schemaValidator" value="com.sap.engine.lib.schema.validator.SchemaValidator" /><property name="jnlp.rc.release" value="30_VAL_REL" /><property name="jnlp.rc.applname" value="REPOSITORY" /><property name="jnlp.rc.supportpackage" value="09" /><property name="jnlp.rc.synctime" value="200410262202" /></resources>
        <application-desc main-class="com.sap.aii.ibrep.gui.appl.ApplicationImpl">
            <argument>webstart</argument>
        </application-desc>
    </jnlp>
    Exception :
    java.lang.NullPointerException
         at com.sap.plaf.frog.FrogScrollPaneUI$1.propertyChange(FrogScrollPaneUI.java:113)
         at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
         at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
         at java.awt.Component.firePropertyChange(Unknown Source)
         at javax.swing.JScrollPane.setHorizontalScrollBar(Unknown Source)
         at javax.swing.plaf.basic.BasicComboPopup.createScroller(Unknown Source)
         at javax.swing.plaf.basic.BasicComboPopup.<init>(Unknown Source)
         at com.sap.plaf.frog.FrogComboPopup.<init>(FrogComboPopup.java:34)
         at com.sap.plaf.frog.FrogComboBoxUI.createPopup(FrogComboBoxUI.java:185)
         at javax.swing.plaf.basic.BasicComboBoxUI.installUI(Unknown Source)
         at com.sap.plaf.frog.FrogComboBoxUI.installUI(FrogComboBoxUI.java:115)
         at javax.swing.JComponent.setUI(Unknown Source)
         at javax.swing.JComboBox.setUI(Unknown Source)
         at javax.swing.JComboBox.updateUI(Unknown Source)
         at javax.swing.JComboBox.init(Unknown Source)
         at javax.swing.JComboBox.<init>(Unknown Source)
         at com.sap.aii.utilxi.swing.toolkit.JComboBoxExt.<init>(JComboBoxExt.java:22)
         at com.sap.aii.utilxi.swing.toolkit.Guitilities.createComboBox(Guitilities.java:987)
         at com.sap.aii.ib.gui.personalization.CommonResource.getLoginLanguageBox(CommonResource.java:153)
         at com.sap.aii.ib.gui.login.SplashLoginFrame.<init>(SplashLoginFrame.java:166)
         at com.sap.aii.ib.gui.login.SplashLoginImpl.doSplashLogin(SplashLoginImpl.java:96)
         at com.sap.aii.ibrep.gui.appl.ApplicationImpl.main(ApplicationImpl.java:624)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    kiran.B

    Hi Kiran,
    your XI J2EE engine is not properly initialized so you are not able to open IR....
    just ask your Basis guys to see the startup log of your J2EE engine....if it has some errors, then just restart your J2EE engine.....then your this problem will be resolved....
    also see in  SMICM, whether ICM status is green or not..if not green then restart ICM from Administration->ICM monitor->restart->yes option of your XI server..
    when XI restarts, just enquire from basis guys whether J2EE engine is up and running..... then open IR.....then your XI IR will open........
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • Problems with XML Instance Generator

    Hi.
    I still have problems with the XML instance Generator. I had the problem other people have commented here before:
    parsing a grammar: newspaper.dtd
    generating document #1
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
    at com.sun.msv.generator.Driver.run(Unknown Source)
    at com.sun.msv.generator.Driver.main(Unknown Source)
    I read somewhere that xercesImpl.jar was necessary. I have downoladed a version of it of about 3 Mb size, and now the message I receive is the following:
    parsing a grammar: newspaper.dtd
    generating document #1
    Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.newDocume
    nt(DocumentBuilderImpl.java:206)
    at com.sun.msv.generator.Driver.run(Unknown Source)
    at com.sun.msv.generator.Driver.main(Unknown Source)
    after executing the command: java -jar xmlgen.jar -dtd newspaper.dtd
    All .jar files coming with the xmlgen.zip are in the same directory where I type the command. Does anybody know what am I doing wrong?
    Thanks to all.

    Hi,
    I am also getting the same problem.
    Thanks
    -Manoj

  • Problems with XMLSchema

    Hi,
    Our project currently uses JBoss for development, but we want to convert it to Weblogic.
    Our application loads XML using the DocumentBuilderFactory, but for some reason Weblogic has problems with the XMLConstants.W3C_XML_SCHEMA_NS_URI it seems. What do we need to set differently in BEA to make this work?
    The stackstrace we get now is:
    Caused by: java.lang.IllegalArgumentException: Schema
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:140)
         at weblogic.xml.jaxp.WebLogicDocumentBuilderFactory.setAttribute(WebLogicDocumentBuilderFactory.java:140)
         at weblogic.xml.jaxp.RegistryDocumentBuilder.setupDocumentBuilderFactory(RegistryDocumentBuilder.java:319)
         at weblogic.xml.jaxp.RegistryDocumentBuilder.getDefaultDocumentBuilderFactory(RegistryDocumentBuilder.java:276)
         at weblogic.xml.jaxp.RegistryDocumentBuilder.getDocumentBuilder(RegistryDocumentBuilder.java:212)
         at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:144)
         at nl.ordina.stateengine.xml.io.XMLEngineReader.getXMLEngineDocument(XMLEngineReader.java:108)
    The code that causes this stacktrace is:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setIgnoringComments(true);
    factory.setIgnoringElementContentWhitespace(true);
    try {
    // System.out.println("Using DocumentBuilderFactory:"+factory.getClass().toString());
    factory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(xsd));
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse(xml);
    // Debug: printNodes(doc.getChildNodes());
    return doc;
    } catch (Exception e) {
    e.printStackTrace();
    throw new DocumentCreationException("The document could not be created due to:", e.getMessage());
    The code works fine using JBoss/Websphere and Tomcat...

    Ah, I solved it by not using the setSchema anymore (work-around).
    This is how I do it now:
    static final String JAXP_SCHEMA_LANGUAGE =
    "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    static final String W3C_XML_SCHEMA =
    "http://www.w3.org/2001/XMLSchema";
    static final String JAXP_SCHEMA_SOURCE =
    "http://java.sun.com/xml/jaxp/properties/schemaSource";
    try {
    /* Instead of using the setSchema:
    factory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(xsd));
    We now use setAttribute:
    try {
    factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    factory.setAttribute(JAXP_SCHEMA_SOURCE, xsd);
    } catch (IllegalArgumentException x) {
    x.printStackTrace();
    throw new DocumentCreationException("Parser doesn't support SAXP 1.2");
    }

  • Strange problem with Istant DB

    Hello,
    i have a strange problem with idb and classloader... if i try to connect to my db using a servlet, i get a ClassNotFoundException, but if i try to connect to it normally, it's all ok...
    C:\jwsdp\webapps\ROOT\prova\DB>java DataBase
    Enhydra InstantDB - Version 3.26
    The Initial Developer of the Original Code is Lutris Technologies Inc.
    Portions created by Lutris are Copyright (C) 1997-2001 Lutris Technologies, Inc.
    All Rights Reserved.
    Database movies is shutting down...
    Database movies shutdown complete.
    What's the problem??? why
    Class.forName("org.enhydra.instantdb.jdbc.idbDriver");
    in a servlet application catch a ClassNotFoundException???
    this is my classpath:
    %JAXP_HOME%\lib\jaxp-api.jar;
    %JAXB_LIBS%\jaxb-api.jar;
    %JAXB_LIBS%\jaxb-ri.jar;
    %JAXB_LIBS%\jaxb-xjc.jar;
    %JAXB_LIBS%\jaxb-libs.jar;
    %JWSDP_HOME%\common\lib\catalina-ant.jar;
    %JWSDP_HOME\common\lib\servlet.jar;
    C:\idb\Classes;
    C:\idb\Classes\idb.jar;
    C:\idb\Classes\idbexmpl.jar;
    C:\idb\Classes\jta-spec1_0_1.jar;
    C:\j2sdk\lib;
    C:\jwsdp\jaxb-1.0\lib;
    C:\jwsdp\jaxb-1.0;
    C:\jwsdp\jaxb-1.0\lib\jaxb-api.jar;
    C:\jwsdp\jaxb-1.0\lib\jaxb-libs.jar;
    C:\jwsdp\jaxb-1.0\lib\jaxb-ri.jar;
    C:\jwsdp\jaxb-1.0\lib\jaxb-xjc.jar;
    Thanks, Marco

    There should be a xml configuration file for tomcat, and it should be possible to state additional classpaths there. But I'd suggest to use the pre-configured classpaths. In which directory does your servlet class reside, or where is your document root for the web application of this servlet?
    Regards

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

Maybe you are looking for

  • Error while deleting file

    Hello, I want to remove a file from a content area. But when i do that i get th efollowing error message: An unexpected error has occurred (WWS-32100) An unexpected error has occurred (WWS-32100) ORA-1403: ORA-01403: no data found ORA-01403: no data

  • Pls help : How to get the client ip address in EJB

    Hi experts, I need to find the ip addr of the client which makes the remote call. I tried using java.rmi.server.RemoteServer.getClientHost() But it throws ServerNotActiveException . When I tried this in RMI it works fine perfectly. If i am right EJB

  • Why,when I click on a link it can not be located & Firefox stops working?

    when I click on a link (for example in an e-mail) the following message appears: The procedure entry point js_NextActiveContext could not be located in the dynamic link library js3250.dll Then another message comes up stating: Firefox has stopped wor

  • FCP 7 - make a bunch of small clips already in TL - same duration

    looked at copy paste attribs but this doesnt seem to allow this tried multiselecting and option-drag (doesnt work) is there not some easier way to change the duration of multiple clips at the with a simple keyboard command or GUI technique ?

  • Failure of multiple bridges

    Hi - OK I've had a site up and running for about 1 month, there are 4 buildings over the span of about 2 miles. One of the buildings has 2 bridges in it because of the distance required for the last hop (about 1.25 miles). So one of those 2 bridges k