Logging Not Working in Java Code

Hi everyone,
I'm looking into the Java code for the Portal app, and I'm trying to do some debugging as to what's going on.  I see a lot of the Adobe classes use the log4j Logger to output general logging information as well as errors, but there never seems to be any output in the log files.  The files I'm checking for activity are:
Adobe LiveCycle ES2\jboss\server\lc_turnkey\log\server.log
Adobe LiveCycle ES2\jboss\bin\correspondencemanagement.log
When I build and deploy the application onto the LC server, just before my application starts I get the following line in the server.log:
2011-04-29 14:30:49,055 INFO  [STDOUT] **** No servlet context set in ServletLogTarget - logging disabled.
followed by a message saying that my application has started.  The line above happens everytime I re-deploy the application (without actually running the app), right before it starts, so I'm assuming that it is directly related to my application.
The only 'com.adobe' related logging lines that happen in the correspondencemanagement.log file are written when I physically run the app, and I get the following line:
2011-04-29 14:31:34,298 69729 INFO  [com.adobe.dct.service.impl.DataDictionaryRegistryServiceImpl] Fetching Complete Data Dictionary object graph.
Looking into the code for the com.adobe.dct.service.impl.DataDictionaryRegistryServiceImpl class, I see it uses a completely different logging system (ie not log4j).
*sigh*
I've changed the services-config.xml file and tried setting the logging target to both flex.messaging.log.ServletLogTarget and flex.messaging.log.ConsoleTarget, but neither seem to make a difference.
I must be missing some kind of configuration to get the logging to work correctly, but Google has been little help as well.
Hopefully someone has crossed this issue before, and has a solution?  Any help / pointers / advice etc welcome and appreciated!!!
Thanks,
Kristian

Thanks for the reply Saket.
It turns out that the logging was working correctly all along.  The messages I could not find were all related to bootstrap code.  I was assuming that the bootstrapper would run each time the application was deployed, or at the very least each time the server was started.  It turns out that you manually need to run the bootstrapper.  So I was looking for log lines that would never appear by themselves.  Once I manually ran the bootstrap process, the log lines ran as expected.
Cheers,
K.

Similar Messages

  • Layout Mode not working in T-Code SQVI for some GUI

    Dear Experts,
    It has been found that the Layout mode is not working in T-code SQVI in some of our users Systems . The Layout Mode is working perfectly fine in some system though. If we select Layout mode in some system it is showing screens the same as in Basis Mode.
    The GUI version is same in both the machines and both are having the same OS.
    GUI Version : 710
    OS : XP
    Kindly suggest if any settings needs to be done in System or GUI so that all the systems get the same interface of Layout Mode as required.
    - Jitesh

    Hi experts,
    Just wished to post the solution of the Issue raised by me...
    I just needed to update my GUI Patch level available at market Place.
    Thanks.
    Jitesh

  • Applets not working with Java 1.7.0_51 in MII 14.0 SP4 Patch 5

    Hi,
    I'm currently evaluating the migration of our MII 12.0 developments to MII 14.
    But I'm running in several issues just trying to use simple things like a SQL query template with an iGrid Display template in test mode.
    Used versions are: MII 14.0 SP4 Patch 5 and on client side the latest Mozilla Firefox with Java 1.7.0_51
    At first I always get a java security warning when the applet is being loaded about unsigned applications.
    At second the applet itself is not running. It always shows "No data available" and the java console shows the following errors (iResult is the id of the applet):
    iResult [ERROR] - Couldn't set query template: No Query Defined
    iResult [ERROR] - Couldn't set display template: null
    iResult [ERROR] - Couldn't set display template: null
    Is this perhaps a general problem, that the MII applets are not working with Java 1.7.x versions?
    If I call the same MII page from a client with Java 1.6.x it is working without errors.
    Do you have some suggestions for me?
    Regards Timo

    please clear your JAVA Cache. that should solve the JRE issue. thanks

  • BAPI not working in Java Webdynpro

    Hi,
    My BAPI from SAP is working in Netweaver perfectly, but when I call the same with the equal parameters in Java webdynpro, no results.
    I'm using following function: 'CVAPI_DOC_VIEW'.
    Any idea why the BAPI is not working in Java Webdynpro?
    Regards,
    Tim

    Hi Tim,
    AFAIK 'CVAPI_DOC_VIEW'  will work only in standard SAP Dynpro. Inside Webdynpro it is forbidden to save files in the background and using GUI class with execute, so you cannot use that Standard FM.
    Check this thread .
    Thanks
    Katrice

  • How to configure the work manager java code to eclipse?

    Hello all,
                   I am working with the syclo work manager app. I have successfully installed all components required.
                   I imported the work manager mobile application and I want to import the standard work manager java code, what is the process to import java code into work space.
                   Guide me with some screen shots.
                   When I try to start the WM server it is giving me the following error:
    How to resolve the error.
    Please anyone provide me complete setup needed to run the work manager app smoothly.
    Please guide me.
    Thanks & Regards,
    Swaroopa.

    Swaroopa,
    That error is telling you the SAP JCo library cannot find one of the needed DLLs on the system.  The sapjco.jar loads two additional DLL files (sapjcorfc.dll and librfc32.dll).  Both should be installed by default into your ServerDev directory (assuming you are running Agentry 6.0.x).
    I would guess it is having trouble loading the librfc32.dll based on the message but confirm both are in the correct location.
    --Bill

  • Reposting ! string concatanation not working in java

    hi I am using the following code to construct a string and i see that it seems that the correct string is made but the application does not run
    if i just cut n paste the same string into command prompt it works fine . please advise :
    also note iam costructing string in two way , but using stringbuffer and by using , but both ways dont work.
    If the parameter is just one word for example say "Testing" then the shell command works fine which tells me that the string concatanation is not working or embedding some special chars?
    public static void main(String args[]) {
    String s = null;
    // system command to run
    String quotes="\"";
    String parameter = quotes args[0] quotes;
    String cmd = "awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s " parameter;
    System.out.println(cmd);
    File workDir = new File("/opt/CA/SharedComponents/ccs/atech/services/bin");
    StringBuffer sb = new StringBuffer();
    sb.append("awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s ");
    sb.append("\"");
    sb.append(args[0]);
    sb.append("\"");
    String str2 = sb.toString();
    System.out.println(str2);
    try {
    Process p = Runtime.getRuntime().exec(cmd, null, workDir);
    ========================================== below is the run log ============================================
    awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    usage: /opt/CA/SharedComponents/ccs/atech/services/bin/awtrap [-v 1 | 2c | 3] [-i] [-r retries] [-f from_addr | from_host]
    [-h dest_addr | dest_host] [-p port] [-t timeout ] [-d logLevel]
    [-c community] enterprise type [subtype] [oid oidtype value]
    ================================= now if I just cut n paste the string on command prompt it runs fine =====================
    Pt$ awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    Pt$

    I am putting the code in code tags and in preview it shows up perfect, can you see it now ?
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.InputStream;
    public class RunSystemCommand {
    public static void main(String args[]) {
    String s = null;
    // system command to run
    String quotes="\"";
    String parameter = quotes + args[0] + quotes;
    String cmd = "awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2  6 4 1.3.6.1.4.1.791.2.9.2 -s " + parameter;
    System.out.println(cmd);
    File workDir = new File("/opt/CA/SharedComponents/ccs/atech/services/bin");
    StringBuffer sb = new StringBuffer();
    sb.append("awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2  6 4 1.3.6.1.4.1.791.2.9.2 -s ");
    sb.append("\"");
    sb.append(args[0]);
    sb.append("\"");
    String str2 = sb.toString();
    System.out.println(str2);
    try {
    Process p = Runtime.getRuntime().exec(cmd, null, workDir);
    int i = p.waitFor();
    if (i == 0){
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
    // read the output from the command
    while ((s = stdInput.readLine()) != null) {
    System.out.println(s);
    else {
    BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    // read the output from the command
    while ((s = stdErr.readLine()) != null) {
    System.out.println(s);
    catch (Exception e) {
    System.out.println(e);
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Logging Not Working?

    For some reason i cant get the logging to work on weblogic, although it was working the other day. Im going mad with this problem as the code is some simple. In an EJB i basically do this...
    serverLogger = LoggingHelper.getServerLogger();
    serverLogger.log(Level.Info, "WORKING");
    But it does not appear in the logs on weblogic admin, i have put in checks for null pointers, exceptions, everything but still i see no logs.
    The other day the servers crashed out with an error about a cyclic queue being full, which i have since traced to the shared capacity for work managers being full. Could this be related? Do i need to do something else to force the log message, i.e. flush() or something similar.
    Thanks.

    Chris, here's the code, read it and dispair at my works!
    package org.acme;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import weblogic.ejbgen.*;
    import java.util.logging.Logger;
    import java.util.logging.Handler;
    import weblogic.logging.LoggingHelper;
    import weblogic.logging.WLLevel;
    @FileGeneration(remoteClass = Constants.Bool.TRUE,
    localHome = Constants.Bool.FALSE,
    remoteHome = Constants.Bool.TRUE,
    remoteClassName = "Hello",
    remoteHomeName = "HelloHome",
    localClass = Constants.Bool.FALSE)
    @JarSettings(ejbClientJar = "hello_client.jar")
    @JndiName(remote = "HelloHome")
    @Session(maxBeansInFreePool = "1000",
    initialBeansInFreePool = "0",
    transTimeoutSeconds = "0",
    type = Session.SessionType.STATELESS,
    defaultTransaction = Constants.TransactionAttribute.REQUIRED,
    ejbName = "statelessSession",
    enableCallByReference = Constants.Bool.TRUE)
    public class HelloBean implements SessionBean {
    private SessionContext ctx;
    private Logger serverLogger = LoggingHelper.getServerLogger();
    // You might also consider using WebLogic's log service
    private void log(String s) {
    Handler[] handlerArray = serverLogger.getHandlers();
    for (int i=0; i < handlerArray.length; i++) {
    Handler h = handlerArray;
    h.setLevel(WLLevel.INFO);
    serverLogger.log(WLLevel.INFO, s);
    * This method is required by the EJB Specification,
    * but is not used by this example.
    public void ejbActivate() {
    log("ejbActivate called");
    * This method is required by the EJB Specification,
    * but is not used by this example.
    public void ejbRemove() {
    log("ejbRemove called");
    * This method is required by the EJB Specification,
    * but is not used by this example.
    public void ejbPassivate() {
    log("ejbPassivate called");
    * Sets the session context.
    * @param ctx SessionContext Context for session
    public void setSessionContext(SessionContext ctx) {
    log("setSessionContext called");
    this.ctx = ctx;
    * This method corresponds to the create method in the home interface.
    * @exception javax.ejb.CreateException if there is
    * a communications or systems failure
    * @see org.acme.HelloBean
    public void ejbCreate () throws CreateException {
    log("ejbCreate called");
    @RemoteMethod()
    public void sayHello() {
    log("Hello");

  • Why windows command prompt is not working with java

    I installed java 1.6 to my computer (Laptop) and it is perfectly working with Netbeans and Eclipse
    but not working with windows xp xommand prompt
    It compiles the code but when it is going to run it throw the following exception
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Example (Unsupported major.minor version 50.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            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)I've reinstalled java 1.6, but the output is same
    Please help me to get it correct
    Thank you

    E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracl
    e\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progr
    am Files\Microsoft SQL Server\90\Tools\binn\;C:\OrCAD\OrCAD_10.0\tools\pcb\bin;C
    :\OrCAD\OrCAD_10.0\tools\specctra\bin;C:\OrCAD\OrCAD_10.0\tools\bin;C:\OrCAD\OrC
    AD_10.0\tools\PSpice\Library;C:\OrCAD\OrCAD_10.0\tools\fet\bin;C:\OrCAD\OrCAD_10
    .0\tools\jre\bin;C:\OrCAD\OrCAD_10.0\tools\Capture;C:\Program Files\QuickTime\QT
    System\;C:\Program Files\Java\jdk1.6.0_01\bin;C:\Program Files\Microsoft Visual
    Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev9
    8\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Mic
    rosoft Visual Studio\VC98\bin;

  • Dynamic configuration not working in Java mapping

    Hi All,
    I have a scenario where i  am using java mapping. In this i am doing following
    1)Read file name from input message header
    2)set file name in output message Header
    3) set Directory name in output message Header
    i  have used following code .. but iit is not working... when i test end  to end...  in reciver communication channel it is failing stating " message failed as "Directory is not set in Header. Also i checked in SXMB_MONI  "dynamic configuration".It is not showing Directory.
    this is code.
    public void transform(TransformationInput transformationInput,TransformationOutput transformationOutput)
                   throws StreamTransformationException {
                   private Map para;
                   String Directory ;
                   String  inputFileName;
                   String var1 = "ABC";
                   para = transformationInput.getInputHeader().getAll();
                   DynamicConfiguration conf = (DynamicConfiguration) para
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
                         inputFileName = conf.get(keyFileName1);
                   DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "FileName");
                   DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "Directory");
                   Directory = "tmp/"+var1;
                   conf.put(keyFilename,inputFileName);
                   conf.put(keyDirecory, Directory);
    I am in PI 7.1 ,   and in eclipse its showing warning that Para is not used.
    Can anyone show some lights.
    Also is there any way to debug this?? like is there any function by which i can write the trace for each step to see those in MONI.

    Method name:   public void createDirectory(Resultlist result, Container container)throws StreamTransformationException
    //Use Simple UDF and do the following lines
    String Directory ;
    String  inputFileName;
    String var1 = "ABC";
    DynamicConfiguration conf = container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
      inputFileName = conf.get(keyFileName1);
    DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "Directory");
    Directory = "tmp/"+var1;
    conf.put(keyFilename,inputFileName);
    conf.put(keyDirecory, Directory);
    and remove these 3 lines
    //private Map para;
    //para = transformationInput.getInputHeader().getAll();
    //DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION
    >>I am in PI 7.1 , and in eclipse its showing warning that Para is not used.Can anyone show some lights.
    You can simply remove declaring Map Para line... The eclipse gives warning because you dont assign values for it and you are trying to use...
    For using the same input file name in output side, you dont need coding ... you need only for the directory...
    Enable ASMA attributes in the channel.
    Edited by: Baskar Gopal on Feb 24, 2011 10:58 AM

  • Delete and renameto not working in java

    guys, i have written a java program that reads file1 into temp file and finally writes into another file. program is working fine with no errors, it even reported that the file is deleted. But actually the file was not deleted and renameto was never successful. could you guys see any problem with file definetion so that delete is not successful. please see code from 6th line from bottm.
    public class Mergewrs {public static void main (String[] args) throws IOException {
    /* Creates a new instance of mergewrsFile */
         /* Making sure an argument is specified */
         if(args.length > 0)
              String line           = null;
              String policyflag      = null;
              int addCnt          = 0;
              File mergein = new File("c:\\javat\\mergein.dat");
              /* Specifiying input file to be used */
              BufferedReader  inFile  = new BufferedReader(new FileReader(mergein));
              line = inFile.readLine();
              /* Read all lines in the wrsfile specified */
              while(line != null)
                   System.out.println("Process1: ");
                   policyflag      = line.substring(0,1);
                   // Reads input record from 2 thru 1025
                   String actionIndicator = new String();
                   if(policyflag != null && policyflag.equalsIgnoreCase("A"))
                        { actionIndicator = "A";
                          addCnt = addCnt+1;
                          process(actionIndicator, line);
                   catch(IOException e)
                        {System.err.println("File input error");}
                   line = inFile.readLine();
              } //while ends
         } //if ends
    public static void process(String actionIndicator, String line) throws IOException
         String line1 = null;
         String templine = null;
         String policyId = null;
         File policyOutfile = new File("c:\\javat\\mergeout.dat");
         File policyOutfileold = new File("c:\\javat\\mergeoutold.dat");
         BufferedReader  policyOut  = new BufferedReader(new FileReader(policyOutfile));
         File tempfile = new File("c:\\javat\\tempfile.dat");
         BufferedWriter tempout = new BufferedWriter(new FileWriter(tempfile));
         line1 = policyOut.readLine();
         try{
              policyId =line1.substring(150,165);
              while(line1 != null)
              {     policyId =line1.substring(150,165);
                   try
                        if(policyId.equals(line.substring(151,166)))
                             { templine =line1.substring(0,151);
                        else { templine=line1;}
                        tempout.write(templine);
                        tempout.newLine();
                        line1 = policyOut.readLine();
                   catch (Exception e) {System.err.println("File exception h");}
              } //while ends
              try { tempout.close(); }
              catch (Exception e) { e.printStackTrace();}
              try { policyOut.close(); }
              catch (Exception e) { e.printStackTrace();}
              try
                   if(policyOutfile.exists())
                        policyOutfile.delete();
                        tempfile.renameTo(policyOutfile);
              catch (Exception e) {System.out.println("error"); }
    }

    guys, i have written a java program that reads file1
    into temp file and finally writes into another file.
    program is working fine with no errors, it even
    reported that the file is deleted. But actually the
    file was not deleted and renameto was never
    successful. could you guys see any problem with file
    definetion so that delete is not successful. please
    see code from 6th line from bottm.Since you don't actually do anything with the return value how do you know it was successful?

  • {@inheritDoc} not working for Java Classes

    Hello,
    i am using {@inheritDoc} for inherting super class's JavaDoc for a perticular function..
    It is working, if super class is my own class. i am able to see all JavaDoc in child class.
    But when i use {@inheritDoc} for extending JavaDoc of java class it is not working.
    i.e. if i am writing {@inheritDoc} in public void actionPerformed(ActionEvent e) method..
    It wont show any javadoc..
    How to add it? Do i need to give source of java classes too???
    And if it is Yes, then where to specifiy. and where to find source of Java classes, do they come with JDK? or NetBeans?? (If yes then where it is in JDK or Netbeans???)
    Thanks,
    Nachiket.

    Yes, you need to have the Java source, with the -sourcepath option, as described here:
    Inheriting Comments from J2SE - Your code can also automatically inherit comments from interfaces and classes in the J2SE. You can do this by unzipping the src.zip file that ships with the SDK (it does not contain all source files, however), and add its path to -sourcepath. When javadoc runs on your code, it will load the doc comments from those source files as needed. For example, if a class in your code implements java.lang.Comparable, the compareTo(Object) method you implement will inherit the doc comment from java.lang.Comparable.
    http://java.sun.com/j2se/javadoc/faq/#incrementalbuild
    If you want the full Java source get it from here:
    http://www.sun.com/software/communitysource/j2se/java2/index.xml
    http://java.sun.com/j2se/javadoc/faq/#sourcecode
    -Doug

  • Stopsap is not working in Java ystem

    Hi All,
    We have a Java system connected to XI. stopsap command is not working when I try to shutdown the java system. I have to kill all the processes to stop the Java. The error that I am getting is the following. I used <SID>adm user to stop the Java system. We need to fix this. Please help ASAP.
    stopping the SAP instance J00
    Shutdown-Log is written to /home/JP2adm/stopsap_J00.log
    /usr/sap/JP2/J00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Stop
    stop of Instance failed
    See /home/JP2adm/stopsap_J00.log for details
    Trace of system startup/check of SAP System JP2 on Mon Feb  7 16:54:02 CST 2011
    Called command: /usr/sap/JP2/SYS/exe/uc/rs6000_64/stopsap stop
    stopping the SAP instance J00
    /usr/sap/JP2/J00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Stop
    07.02.2011 16:54:03
    Stop
    FAIL: HTTP error, HTTP/1.1 401 Unauthorized
    stop of Instance failed
    Thanks,
    Kavitha.
    Edited by: Kavitha Rajan on Feb 9, 2011 5:26 PM

    Thank you Sarbjeet. Your answer is very helpful.
    Thanks again,
    Kavitha Rajan.

  • Specifying Schema Location in XML file and not in the Java code

    I have a repository of schema xsd files. When I receive my xml file, I need to validate it against the specified schema. The xml file would declare the schema location, using the following syntax:
    <CERD:CERD xsi:schemaLocation = "..\CERD.xsd" xmlns:CERD = "CERD.xsd" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
    Is it really necessary to define the schema location again in the JAVA code? Why set the schemaLocation in the xml file at all then?
    Does anybody have any examples where the schema location is not set in the JAVA code? I am using Java 1.6, and at this point in time I only need to validate. Any help would be appreciated.

    Thank you very much for your quick reply. I have made some progress but I am still stumped.
    In my code I am doing this:
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = factory.newSchema();
    Validator validator = schema.newValidator();
    validator.validate(XML_SOURCE);
    I find this works if my schema does not have a target namespace. I have downloaded the following simple example from the internet that uses a target namespace and it fails:
    library1.xsd:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://example.org/prod"
    xmlns:prod="http://example.org/prod">
    <xsd:element name="product" type="prod:ProductType"/>
    <xsd:complexType name="ProductType">
    <xsd:sequence>
    <xsd:element name="number" type="xsd:integer"/>
    <xsd:element name="size" type="prod:SizeType"/>
    </xsd:sequence>
    <xsd:attribute name="effDate" type="xsd:date"/>
    </xsd:complexType>
    <xsd:simpleType name="SizeType">
    <xsd:restriction base="xsd:integer">
    <xsd:minInclusive value="2"/>
    <xsd:maxInclusive value="18"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    <prod:product xmlns:prod="http://example.org/prod"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="library1.xsd"
    effDate="2001-04-02">
    <number>557</number>
    <size>10</size>
    </prod:product>
    I get the following SAXParseException when I validate:
    [line 4, col 36|
    cvc-elt.1: Cannot find the declaration of element 'prod:product'.
    Am I doing something wrong with the namespace declaration?
    Edited by: alfredamorrissey on Oct 31, 2007 6:34 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • J2EE_ADMIN not working in Java Side

    Hi All,
    The J2ee_admin Id is not working on the Java side, but is working on the ABAP Side. I changed the password of SAPJSF, is it bcoz of that? If yes, pls suggest what can be done.
    Regards,
    Divya

    Hi Divya,
    You can Activate the Emergency User (find the directions at http://help.sap.com/saphelp_nw04/helpdata/en/3a/4a0640d7b28f5ce10000000a155106/content.htm ).
    The you can login using the SAP* account. After which you can go in to the User Administrator and update the j2ee_admin account password. Then logout, disable the Emerengy User (SAP*), and login using the j2ee_admin account.
    hope this would resolve your issue. If still it persists, do revert.
    Regards,
    P. Kumaravel.
    Ps: Award points for heelpful answers.

  • Logging not working in RH Linux (ALUI portal 6.1MP1)

    Hi,
    we've installed the ALUI portal 6.1MP1 on a RedHat Enterprise Linux 4, and the logging does not seem to be working - PTSpy does not show anything.
    We've also installed the same portal version on a couple of Windows machines - there the logging works fine.
    Any ideas on where to look for possible causes?

    fwiw, I recently installed ALUI 6.1 MP1 on RHEL 4 Update 3 and was able to have both the Spy Logger and the consolelogger working locally on the RHEL console (running GNOME).
    I then tried to access the RHEL virtual machine from my host Windows OS where I access things via Cygwin (startx) and Putty (SSH). Spy Logger still does not work (because of the SWT issues I mentioned earlier) but consolelogger works fine.
    If you are still having issues I'd encourage you to open a case with tech Support.
    john

Maybe you are looking for

  • HP LaserJet 700 color MFP ME

    Does anyone know if faxes can be received digitally or stored on the machine and manually printed, rather than being received and printed out automatically? When a fax is received, say overnight when the office is unattended and a paper copy is sitti

  • Firefox will hang on a website then everything else will no longer load and forces me to close and open firefox to get it to work.

    As the question says I am having several issues with Firefox lately. I've tried disabling every addon, disabling JavaScript, running it in safe mode - no addons. Nothing seems to work. I'll be on pandora listening to music, I open a new tab and go to

  • IPad won't finish cancelling sync

    I was syncing my iPad mini on my computer, when the memory filled up as I forgot to untick items, then it automatially started to finish sync, however it still was finishing sync for a while, so I clicked eject but all that did was bring up a separat

  • Trying to run ASDM on Linux

    As the title says, I'm trying to run ASDM on Linux (Mint 14), and failing miserably.  I have Oracle Java 6 installed.  Other web-based Java apps seem to work fine, however, when I try to open ASDM, whether directly from the ASA web interface or by ru

  • USB Hub & Kernel Panic

    I started getting near-daily kernel panics about the same time I started using a new USB 2.0 hub. It's not plugged in now, and I haven't gotten one today, but you know what they say about the tiger repellant: "What are you doing?" "Oh, I'm spreading