SO_OBJECT_SEND problem- Throws X_error

Hi,
Recently hotpack (4.6 / 27)was applied to the system and the functional module ha started failing, it throws x_error, but the strange thing is that it works in the development, but fails in Quality and production. I checked the scot settings.they look the same. Any thoughts on this is highly appreciated.

Hi Aakash,
Did u solve this problem? I have exactly similar problem. My code is working fine in dev system whereas failing in integration system. Any inputs on this would be of great help.
Thanks,
Prasath N

Similar Messages

  • Having problem triggering an external device needing 5V DC

    I am having a problem throwing open a solenoid valve with 5 volts DC. The valve requires 5V DC, and it seems that I am getting a response from an LED on the valve, but the valve will not open. When I attach the valve to a 5V battery, the valve has no problem, and the LED has a stronger intensity to it. I am using Visual Basic to program the valve switching event with a 6024E card and CB-68LP board. Also, would it matter if this were a pulsed DC voltage as opposed to a constant DC voltage?

    The most probable reason for this behaviour is that the solenoid valve requires too much current to switch. Daq cards are limited in the available current, so you will probably have to use an auxiliary switch and a separate power supplier to drive the solenoid.
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How do you fix a connection problem to the store?

    I cannot connect to the iTunes store, use homesharing, or get new updates. I get a time out error. I have tried uninstalling, I've emailed, read articles, called, read more articles and I still can't get it to work. I'm going to school soon and I really need this fixed.

    i can sympathize here - i used to get the exact same thing and and something that rubs salt in the wounds is when people who have never had network problems throw the "contact your network provider" at you ... yea, i don't speak fluent indian so i'm going to have trouble there.
    then they say "change to a different ISP" ... well they're all the same - if one ***** up on sunday mornings the others will just **** up on tuesday evenings instead lol. anyway no time to moan about the rest - i have to go out in 3 hours
    in my case i found the problem was nothing to do with my mac and that getting a different router and/or WiFi hub station sorted the problem out - i got rid of my old router and WiFi box and replaced them with an "all in one" thing and the problem seems to be about 95% better

  • Throw to Sony bluray theatre worked then stopped

    When I got going with tablet, I could throw to my bluray theatre system BDV E380 and it worked no problem. Somewhere along the line however it stopped working - I can no longer see the hometheatre when adding device. No problem throwing to Bluetooth device, and I can even throw to an XMBC renderer on my Mac. Also tried the media remote app, but cannot register the tablet.
    I've done factory resets on both the home theatre as well as the tablet, no luck.
    Where to start looking?

    Well, the first thing would be to try sending something to your bluray theatre from another device, to see if the problem is related to the tablet or the BR system. Since the tablet can send to other devices it seems like there might be something with the BR system.
    What are your thoughts about this forum? Let us know by doing this short survey.
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • "File Not Found" when addCourse through iTunesU web service.

    I have problem to add Course to my institute's iTunesU site through Web Service.
    I was able to get the xml doc back through showTree operation and here is part of it:
    <Site>
    <Name>my institute's name</Name>
    <Handle>123</Handle>
    <AggregateFileSize>63057465318</AggregateFileSize>
    <Section> <Name>Your Classes</Name>
    <Handle>456</Handle>
    <AggregateFileSize>57423912007</AggregateFileSize>
    <Course>
    <Name>course 1</Name>
    <Handle>111</Handle>
    </Course>
    </Section>
    <Section>
    I was able to get the uploadURL back too. The URL to get the uploadURL request:
    https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/myInstitute.edu.45 6?type=XMLControlFile
    The uploadURL I got back looks like:
    https://deimos2.apple.com/WebObjects/Files.woa/Upload/myInstitute.edu.456/X_1371095208_1a.43c06fa3.467dc4f2/%5Banonymous1371095208%5D/0046e71254900a071aa9241221a469d98ff1ef6fa973544c45ef9 5260dac6c64f05b10aefc
    But when I use the uploadURL above and post the addCourse.xml:
    <ITunesUDocument>
    <AddCourse>
    <ParentHandle>456</ParentHandle>
    <Course>
    <Name>Jing Test iTunesU Web service Course</Name>
    <ShortName>Jing Test</ShortName>
    </Course>
    </AddCourse>
    </ITunesUDocument>
    The response I got
    <error>File Not Found</error> File Not Found
    I used myInstitute.edu.456 to get the uploadURL and set it to ParentHandle on addCourse.xml since 456 is the section handler in whoch I want to add the course.
    I tried to remove 456 from the myInstitute.edu to get the uploadURL and then use it to add course, got the same error.
    Is there something wrong with the URL I used to get the uploadURL?
    here is the code and the values pass to the methodI used to send addCourse request:
    url = uploadURl on above
    name="file"
    fileName="file.xml";
    data=addCourse xml on above
    contentType="text/xml"
    public String invokeAction(String url,
    String name,
    String fileName,
    String data,
    String contentType) throws MessagingException {
    // Send a request to iTunes U and record the response.
    StringBuffer response = null;
    System.out.println("xml doc: ---" + data);
    try {
    // Verify that the communication will be over SSL.
    if (!url.startsWith("https")) {
    throw new MalformedURLException("ITunesUFilePOST.invokeAction(): URL \""
    + url + "\" does not use HTTPS.");
    // Build the multipart data.
    MimeMultipart multipart = new MimeMultipart();
    MultipartFormBuilder.addMultipartFormBody(multipart,
    name,
    fileName,
    data,
    contentType);
    // Create a connection to the requested iTunes U URL.
    HttpURLConnection connection =
    (HttpURLConnection) new URL(url).openConnection();
    connection.setUseCaches(false);
    connection.setDoOutput(true);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Content-Type",
    "multipart/form-data; boundary="
    + MultipartFormBuilder.getMultipartBoundary(multipart));
    String multipartData = MultipartFormBuilder.getMultipartData(multipart);
    // Send the multipart data to iTunes U.
    connection.connect();
    OutputStream output = connection.getOutputStream();
    output.write(multipartData.getBytes("UTF-8"));
    output.flush();
    output.close();
    // Read iTunes U's response.
    response = new StringBuffer();
    InputStream input = connection.getInputStream();
    Reader reader = new InputStreamReader(input, "UTF-8");
    reader = new BufferedReader(reader);
    char[] buffer = new char[16 * 1024];
    for (int n = 0; n >= 0;) {
    n = reader.read(buffer, 0, buffer.length);
    if (n > 0) response.append(buffer, 0, n);
    // Clean up.
    input.close();
    connection.disconnect();
    } catch (UnsupportedEncodingException e) {
    // ITunes U requires UTF-8 and ASCII encoding support.
    throw new java.lang.AssertionError("ITunesUFilePOST.invokeAction(): UTF-8 encoding not supported!");
    } catch (IOException e) {
    // Report communication problems.
    throw new java.lang.AssertionError("ITunesUFilePOST.invokeAction(): I/O Exception " + e);
    // Return the response received from iTunes U.
    System.out.println("response from ITunesUFilePOST: " + response.toString());
    return response.toString();
    }

    I'm having a similar "File Not Found" error, but it's happening for any API request other than GetUploadURL. I'm sending a POST request to the GetUploadURL, and that part is working correctly, as I get a URL such as the following:
    https://deimos2.apple.com/WebObjects/Files.woa/Upload/wvu.edu/X_1372071795_4d9433be.4c3fdd3d.4c3fdd3e/%22Chris%20Scharf%22%20%3Ccbscharf%40mail.wvu.edu%3E%20%28cbscharf%29%20%5B3258 7%5D/0046eaaaf078cf5d6b60f18926106a50a5050cf8f9c91a7608074e6d2949a8759017969ece
    Then, I've tried using curl (within 90 seconds) to submit a simple XML document containing a ShowTree request:
    <?xml version="1.0" encoding="UTF-8"?>
    <ITunesUDocument>
    <ShowTree>
    <KeyGroup>most</KeyGroup>
    </ShowTree>
    </ITunesUDocument>
    The command executed is "curl -F file=test.xml URL" (where URL is the URL retrieved from GetUploadURL. But I simply get "<error>File Not Found</error>"
    I'm correctly sending credentials, since I'm getting upload URLs. And it's not an issue with the XML document, since it's not even getting to the server.

  • How can i login to a website using java

    hi,
    i tried to write a java program to which will take username and password and login to a given site. but some how its not working. i am actually trying to login to the follwoing website:
    https://roundup.ffmpeg.org/roundup/ffmpeg/
    can anyone provide some example program to login to this website.
    br
    mahbubul-syeed

    Hi,
    i am really sorry... but i am new in this forum and i did not know this. here is my code that i have written. it did not show any error and displays the content of the page but did not logged in. please give your comment.. i badly need a solution.
    package myUtility_files;
    import java.net.*;
    import java.io.*;
    public class LogInByHttpPost {
         //private static final String POST_CONTENT_TYPE = "application/x-www-form-urlencoded";
    private static final String LOGIN_ACTION_NAME = "submit";
    private static final String LOGIN_USER_NAME_PARAMETER_NAME = "__login_name";
    private static final String LOGIN_PASSWORD_PARAMETER_NAME = "__login_password";
    private static final String LOGIN_USER_NAME = "mahbubul";
    private static final String LOGIN_PASSWORD = "mahbubul007";
    private static final String TARGET_URL = "http://roundup.ffmpeg.org/roundup/ffmpeg/";
    public static void main (String args[])
    LogInByHttpPost httpUrlBasicAuthentication = new LogInByHttpPost();
    httpUrlBasicAuthentication.httpPostLogin();
    public void httpPostLogin ()
    try
    // Prepare the content to be written
    // throws UnsupportedEncodingException
    String urlEncodedContent = preparePostContent(LOGIN_USER_NAME, LOGIN_PASSWORD);
    HttpURLConnection urlConnection = doHttpPost(TARGET_URL, urlEncodedContent);
    //String response = readResponse(urlConnection);
    System.out.println("Successfully made the HTPP POST.");
    //System.out.println("Recevied response is: '/n" + response + "'");
    BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
                   String inputLine;
                   while ((inputLine = in.readLine()) != null)
                        System.out.println(inputLine);
    catch(IOException ioException)
         ioException.printStackTrace();
    System.out.println("Problems encounterd.");
    private String preparePostContent(String loginUserName, String loginPassword) throws UnsupportedEncodingException
    // Encode the user name and password to UTF-8 encoding standard
    // throws UnsupportedEncodingException
    String encodedLoginUserName = URLEncoder.encode(loginUserName, "UTF-8");
    String encodedLoginPassword = URLEncoder.encode(loginPassword, "UTF-8");
    String content = "login=" + LOGIN_ACTION_NAME +" &" + LOGIN_USER_NAME_PARAMETER_NAME +"="
    + encodedLoginUserName + "&" + LOGIN_PASSWORD_PARAMETER_NAME + "=" + encodedLoginPassword;
    return content;
    public HttpURLConnection doHttpPost(String targetUrl, String content) throws IOException
    HttpURLConnection urlConnection = null;
    DataOutputStream dataOutputStream = null;
    try
    // Open a connection to the target URL
    // throws IOException
    urlConnection = (HttpURLConnection)(new URL(targetUrl).openConnection());
    // Specifying that we intend to use this connection for input
    urlConnection.setDoInput(true);
    // Specifying that we intend to use this connection for output
    urlConnection.setDoOutput(true);
    // Specifying the content type of our post
    //urlConnection.setRequestProperty("Content-Type", POST_CONTENT_TYPE);
    // Specifying the method of HTTP request which is POST
    // throws ProtocolException
    urlConnection.setRequestMethod("POST");
    // Prepare an output stream for writing data to the HTTP connection
    // throws IOException
    dataOutputStream = new DataOutputStream(urlConnection.getOutputStream());
    // throws IOException
    dataOutputStream.writeBytes(content);
    dataOutputStream.flush();
    dataOutputStream.close();
    return urlConnection;
    catch(IOException ioException)
    System.out.println("I/O problems while trying to do a HTTP post.");
    ioException.printStackTrace();
    // Good practice: clean up the connections and streams
    // to free up any resources if possible
    if (dataOutputStream != null)
    try
    dataOutputStream.close();
    catch(Throwable ignore)
    // Cannot do anything about problems while
    // trying to clean up. Just ignore
    if (urlConnection != null)
    urlConnection.disconnect();
    // throw the exception so that the caller is aware that
    // there was some problems
    throw ioException;
    br
    mahbubul-syeed
    Edited by: mahbubul-syeed on Jun 11, 2009 5:07 AM

  • Help with Java script

    So , I edited the ITunes.java as described in the Admin guide.Copied the .class to my cgi folder in the server.I copied the itunesu file from the shell folder of the sample code.I have modified it accordingly.But when I run it in browser(Firefox) as ..../cgi-bin/itunesu it just gives me a blank page.Nothing shows up.I ran the ITunes.java file locally and it generates an HTML output, which I copied and created a new html.After I run this HTML file, it opens my itunes, but again it says page not found and url contains https://www.xxx.edu/cgi-bin/itunesu?destination=xxx.edu where xxx is my institution name.Not sure if I am supposed to display my institution name in forum.
    The admin guide says on page 15 step 4.Copy the itunes.class file and other itunes file to your web server's cgi-bin directory.
    I am not quiet sure what does other itunes file mean??
    This is how my .java file looks.
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.util.*;
    * The <CODE>ITunesU</CODE> class permits the secure transmission
    * of user credentials and identity between an institution's
    * authentication and authorization system and iTunes U.
    * The code in this class can be tested by
    * running it with the following commands:
    * <PRE>
    * javac ITunesU.java
    * java ITunesU</PRE>
    * Changes to values defined in this class' main() method must
    * be made before it will succesfully communicate with iTunes U.
    public class ITunesU extends Object {
    * Generate the HMAC-SHA256 signature of a message string, as defined in
    * RFC 2104.
    * @param message The string to sign.
    * @param key The bytes of the key to sign it with.
    * @return A hexadecimal representation of the signature.
    public String hmacSHA256(String message, byte[] key) {
    // Start by getting an object to generate SHA-256 hashes with.
    MessageDigest sha256 = null;
    try {
    sha256 = MessageDigest.getInstance("SHA-256");
    } catch (NoSuchAlgorithmException e) {
    throw new java.lang.AssertionError(
    this.getClass().getName()
    + ".hmacSHA256(): SHA-256 algorithm not found!");
    // Hash the key if necessary to make it fit in a block (see RFC 2104).
    if (key.length > 64) {
    sha256.update(key);
    key = sha256.digest();
    sha256.reset();
    // Pad the key bytes to a block (see RFC 2104).
    byte block[] = new byte[64];
    for (int i = 0; i < key.length; ++i) block = key;
    for (int i = key.length; i < block.length; ++i) block = 0;
    // Calculate the inner hash, defined in RFC 2104 as
    // SHA-256(KEY ^ IPAD + MESSAGE)), where IPAD is 64 bytes of 0x36.
    for (int i = 0; i < 64; ++i) block ^= 0x36;
    sha256.update(block);
    try {
    sha256.update(message.getBytes("UTF-8"));
    } catch (UnsupportedEncodingException e) {
    throw new java.lang.AssertionError(
    "ITunesU.hmacSH256(): UTF-8 encoding not supported!");
    byte[] hash = sha256.digest();
    sha256.reset();
    // Calculate the outer hash, defined in RFC 2104 as
    // SHA-256(KEY ^ OPAD + INNER_HASH), where OPAD is 64 bytes of 0x5c.
    for (int i = 0; i < 64; ++i) block ^= (0x36 ^ 0x5c);
    sha256.update(block);
    sha256.update(hash);
    hash = sha256.digest();
    // The outer hash is the message signature...
    // convert its bytes to hexadecimals.
    char[] hexadecimals = new char[hash.length * 2];
    for (int i = 0; i < hash.length; ++i) {
    for (int j = 0; j < 2; ++j) {
    int value = (hash >> (4 - 4 * j)) & 0xf;
    char base = (value < 10) ? ('0') : ('a' - 10);
    hexadecimals[i * 2 + j] = (char)(base + value);
    // Return a hexadecimal string representation of the message signature.
    return new String(hexadecimals);
    * Combine user credentials into an appropriately formatted string.
    * @param credentials An array of credential strings. Credential
    * strings may contain any character but ';'
    * (semicolon), '\\' (backslash), and control
    * characters (with ASCII codes 0-31 and 127).
    * @return <CODE>null</CODE> if and only if any of the credential strings
    * are invalid.
    public String getCredentialsString(String[] credentials) {
    // Create a buffer with which to generate the credentials string.
    StringBuffer buffer = new StringBuffer();
    // Verify and add each credential to the buffer.
    if (credentials != null) {
    for (int i = 0; i < credentials.length; ++i) {
    if (i > 0) buffer.append(';');
    for (int j = 0, n = credentials.length(); j < n; ++j) {
    char c = credentials.charAt(j);
    if (c != ';' && c != '\\' && c >= ' ' && c != 127) {
    buffer.append(c);
    } else {
    return null;
    // Return the credentials string.
    return buffer.toString();
    * Combine user identity information into an appropriately formatted string.
    * @param displayName The user's name (optional).
    * @param emailAddress The user's email address (optional).
    * @param username The user's username (optional).
    * @param userIdentifier A unique identifier for the user (optional).
    * @return A non-<CODE>null</CODE> user identity string.
    public String getIdentityString(String displayName, String emailAddress,
    String username, String userIdentifier) {
    // Create a buffer with which to generate the identity string.
    StringBuffer buffer = new StringBuffer();
    // Define the values and delimiters of each of the string's elements.
    String[] values = { displayName, emailAddress,
    username, userIdentifier };
    char[][] delimiters = { { '"', '"' }, { '<'(', ')' }, { '[', ']' } };
    // Add each element to the buffer, escaping
    // and delimiting them appropriately.
    for (int i = 0; i < values.length; ++i) {
    if (values != null) {
    if (buffer.length() > 0) buffer.append(' ');
    buffer.append(delimiters[0]);
    for (int j = 0, n = values.length(); j < n; ++j) {
    char c = values.charAt(j);
    if (c == delimiters[1] || c == '\\') buffer.append('\\');
    buffer.append(c);
    buffer.append(delimiters[1]);
    // Return the generated string.
    return buffer.toString();
    * Generate an iTunes U digital signature for a user's credentials
    * and identity. Signatures are usually sent to iTunes U along
    * with the credentials, identity, and a time stamp to warrant
    * to iTunes U that the credential and identity values are
    * officially sanctioned. For such uses, it will usually makes
    * more sense to use an authorization token obtained from the
    * {@link #getAuthorizationToken(java.lang.String, java.lang.String, java.util.Date, byte[])}
    * method than to use a signature directly: Authorization
    * tokens include the signature but also the credentials, identity,
    * and time stamp, and have those conveniently packaged in
    * a format that is easy to send to iTunes U over HTTPS.
    * @param credentials The user's credentials string, as
    * obtained from getCredentialsString().
    * @param identity The user's identity string, as
    * obtained from getIdentityString().
    * @param time Signature time stamp.
    * @param key The bytes of your institution's iTunes U shared secret key.
    * @return A hexadecimal representation of the signature.
    public String getSignature(String credentials, String identity,
    Date time, byte[] key) {
    // Create a buffer in which to format the data to sign.
    StringBuffer buffer = new StringBuffer();
    // Generate the data to sign.
    try {
    // Start with the appropriately encoded credentials.
    buffer.append("credentials=");
    buffer.append(URLEncoder.encode(credentials, "UTF-8"));
    // Add the appropriately encoded identity information.
    buffer.append("&identity=");
    buffer.append(URLEncoder.encode(identity, "UTF-8"));
    // Add the appropriately formatted time stamp. Note that
    // the time stamp is expressed in seconds, not milliseconds.
    buffer.append("&time=");
    buffer.append(time.getTime() / 1000);
    } catch (UnsupportedEncodingException e) {
    // UTF-8 encoding support is required.
    throw new java.lang.AssertionError(
    "ITunesU.getSignature(): UTF-8 encoding not supported!");
    // Generate and return the signature.
    String signature = this.hmacSHA256(buffer.toString(), key);
    return signature;
    * Generate and sign an authorization token that you can use to securely
    * communicate to iTunes U a user's credentials and identity. The token
    * includes all the data you need to communicate to iTunes U as well as
    * a creation time stamp and a digital signature for the data and time.
    * @param credentials The user's credentials string, as
    * obtained from getCredentialsString().
    * @param identity The user's identity string, as
    * obtained from getIdentityString().
    * @param time Token time stamp. The token will only be valid from
    * its time stamp time and for a short time thereafter
    * (usually 90 seconds).
    * @param key The bytes of your institution's iTunes U shared secret key.
    * @return The authorization token. The returned token will
    * be URL-encoded and can be sent to iTunes U with
    * a form
    * submission. iTunes U will typically respond with
    * HTML that should be sent to the user's browser.
    public String getAuthorizationToken(String credentials, String identity,
    Date time, byte[] key) {
    // Create a buffer with which to generate the authorization token.
    StringBuffer buffer = new StringBuffer();
    // Generate the authorization token.
    try {
    // Start with the appropriately encoded credentials.
    buffer.append("credentials=");
    buffer.append(URLEncoder.encode(credentials, "UTF-8"));
    // Add the appropriately encoded identity information.
    buffer.append("&identity=");
    buffer.append(URLEncoder.encode(identity, "UTF-8"));
    // Add the appropriately formatted time stamp. Note that
    // the time stamp is expressed in seconds, not milliseconds.
    buffer.append("&time=");
    buffer.append(time.getTime() / 1000);
    // Generate and add the token signature.
    String data = buffer.toString();
    buffer.append("&signature=");
    buffer.append(this.hmacSHA256(data, key));
    } catch (UnsupportedEncodingException e) {
    // UTF-8 encoding support is required.
    throw new java.lang.AssertionError(
    "ITunesU.getAuthorizationToken(): "
    + "UTF-8 encoding not supported!");
    // Return the signed authorization token.
    return buffer.toString();
    * Send a request for an action to iTunes U with an authorization token.
    * @param url URL defining how to communicate with iTunes U and
    * identifying which iTunes U action to invoke and which iTunes
    * U page or item to apply the action to. Such URLs have a
    * format like <CODE>[PREFIX]/[ACTION]/[DESTINATION]</CODE>,
    * where <CODE>[PREFIX]</CODE> is a value like
    * "https://deimos.apple.com/WebObjects/Core.woa" which defines
    * how to communicate with iTunes U, <CODE>[ACTION]</CODE>
    * is a value like "Browse" which identifies which iTunes U
    * action to invoke, and <CODE>[DESTINATION]</CODE> is a value
    * like "example.edu" which identifies which iTunes U page
    * or item to apply the action to. The destination string
    * "example.edu" refers to the root page of the iTunes U site
    * identified by the domain "example.edu". Destination strings
    * for other items within that site contain the site domain
    * followed by numbers separated by periods. For example:
    * "example.edu.123.456.0789". You can find these
    * strings in the items' URLs, which you can obtain from
    * iTunes. See the iTunes U documentation for details.
    * @param token Authorization token generated by getAuthorizationToken().
    * @return The iTunes U response, which may be HTML or
    * text depending on the type of action invoked.
    public String invokeAction(String url, String token) {
    // Send a request to iTunes U and record the response.
    StringBuffer response = null;
    try {
    // Verify that the communication will be over SSL.
    if (!url.startsWith("https")) {
    throw new MalformedURLException(
    "ITunesU.invokeAction(): URL \""
    + url + "\" does not use HTTPS.");
    // Create a connection to the requested iTunes U URL.
    HttpURLConnection connection =
    (HttpURLConnection)new URL(url).openConnection();
    connection.setUseCaches(false);
    connection.setDoOutput(true);
    connection.setRequestMethod("POST");
    connection.setRequestProperty(
    "Content-Type",
    "application/x-www-form-urlencoded; charset=UTF-8");
    // Send the authorization token to iTunes U.
    connection.connect();
    OutputStream output = connection.getOutputStream();
    output.write(token.getBytes("UTF-8"));
    output.flush();
    output.close();
    // Read iTunes U's response.
    response = new StringBuffer();
    InputStream input = connection.getInputStream();
    Reader reader = new InputStreamReader(input, "UTF-8");
    reader = new BufferedReader(reader);
    char[] buffer = new char[16 * 1024];
    for (int n = 0; n >= 0;) {
    n = reader.read(buffer, 0, buffer.length);
    if (n > 0) response.append(buffer, 0, n);
    // Clean up.
    input.close();
    connection.disconnect();
    } catch (UnsupportedEncodingException e) {
    // ITunes U requires UTF-8 and ASCII encoding support.
    throw new java.lang.AssertionError(
    "ITunesU.invokeAction(): UTF-8 encoding not supported!");
    } catch (IOException e) {
    // Report communication problems.
    throw new java.lang.AssertionError(
    "ITunesU.invokeAction(): I/O Exception " + e);
    // Return the response received from iTunes U.
    return response.toString();
    * iTunes U credential and identity transmission sample. When your
    * itunes U site is initially created, Apple will send your institution's
    * technical contact a welcome email with a link to an iTunes U page
    * containing the following information, which you will need to customize
    * this method's code for your site:
    <DD><DL><DT>
    * Information:<DD><CODE>
    * Site URL</CODE> - The URL to your site in iTunes U. The last
    * component of that URL, after the last slash,
    * is a domain name that uniquely identifies your
    * site within iTunes U.<DD><CODE>
    * shared secret</CODE> - A secret key known only to you and Apple that
    * allows you to control who has access to your
    * site and what access they have to it.<DD><CODE>
    * debug suffix</CODE> - A suffix you can append to your site URL
    * to obtain debugging information about the
    * transmission of credentials and identity
    * information from your institution's
    * authentication and authorization services
    * to iTunes U.<DD><CODE>
    * administrator credential</CODE> - The credential string to assign
    * to users who should have the
    * permission to administer your
    * iTunes U site.</DL></DD>
    <DD>
    * Once you have substitute the information above in this method's code
    * as indicated in the code's comments, this method will connect
    * to iTunes U and obtain from it the HTML that needs to be returned to a
    * user's web browser to have a particular page or item in your iTunes U
    * site displayed to that user in iTunes. You can modify this method to
    * instead output the URL that would need to be opened to have that page
    * or item displayed in iTunes.</DD>
    public static void main(String argv[]) {
    // Define your site's information. Replace these
    // values with ones appropriate for your site.
    String siteURL =
    "https://deimos.apple.com/WebObjects/Core.woa/Browse/xxx.edu" ;
    String debugSuffix = "/abc123";
    String sharedSecret = "some key";
    String administratorCredential =
    "Administrator@urn:mace:itunesu.com:sites:xxx.edu";
    // Define the user information. Replace the credentials with the
    // credentials you want to grant to the current user, and the
    // optional identity information with the identity of that user.
    // For initial testing and site setup, use the singe administrator
    // credential defined when your iTunes U site was created. Once
    // you have access to your iTunes U site, you will be able to define
    // additional credentials and the iTunes U access they provide.
    String[] credentialsArray = { administratorCredential };
    String displayName = "my name";
    String emailAddress = "my [email protected]";
    String username = "mylogin";
    String userIdentifier = "1243";
    // Define the iTunes U page to browse. Use the domain name that
    // uniquely identifies your site in iTunes U to browse to that site's
    // root page; use a destination string extracted from an iTunes U URL
    // to browse to another iTunes U page; or use a destination string
    // supplied as the "destination" parameter if this program is being
    // invoked as a part of the login web service for your iTunes U site.
    String siteDomain = siteURL.substring(siteURL.lastIndexOf('/') + 1);
    String destination = siteDomain;
    // Append your site's debug suffix to the destination if you want
    // to receive an HTML page providing information about the
    // transmission of credentials and identity between this program
    // and iTunes U. Uncomment the following line for testing only.
    //destination = destination + debugSuffix;
    // Use an ITunesU instance to format the credentials and identity
    // strings and to generate an authorization token for them.
    ITunesU iTunesU = new ITunesU();
    String identity = iTunesU.getIdentityString(displayName, emailAddress,
    username, userIdentifier);
    String credentials = iTunesU.getCredentialsString(credentialsArray);
    Date now = new Date();
    byte[] key = null;
    try {
    key = sharedSecret.getBytes("US-ASCII");
    } catch (UnsupportedEncodingException e) {
    throw new java.lang.AssertionError(
    "ITunesU.hmacSH256(): US-ASCII encoding not supported!");
    String token = iTunesU.getAuthorizationToken(credentials, identity,
    now, key);
    // Use the authorization token to connect to iTunes U and obtain
    // from it the HTML that needs to be returned to a user's web
    // browser to have a particular page or item in your iTunes U
    // site displayed to that user in iTunes. Replace "/Browse/" in
    // the code below with "/API/GetBrowseURL/" if you instead want
    // to return the URL that would need to be opened to have that
    // page or item displayed in iTunes.
    String prefix = siteURL.substring(0, siteURL.indexOf(".woa/") + 4);
    String url = prefix + "/Browse/" + destination;
    String results = iTunesU.invokeAction(url, token);
    System.out.println(results);
    The itunes file from Shell folder has been modified as follows
    DISPLAY_NAME= "myname"
    EMAIL_ADDRESS="[email protected]"
    USERNAME="mylogin"
    USER_IDENTIFIER="1243"
    all the other things in that file have been untouched.
    I also generated the debug which looks like this
    iTunes U Access Debugging
    Received
    Destination xxx.edu
    Identity "my name" <[email protected]> (mylogin) [1243]
    Credentials Administrator@urn:mace:itunesu.com:sites:xxx.edu
    Time 1196706873
    Signature 533870b8jshdidk333lfsf6a3143a55c132ec548a4d545bd79322402e8e2596e4
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is valid and provides the following information:
    Display Name my name
    Email Address [email protected]
    Username mylogin
    User Identifier 1243
    The credential string is valid and contains the following recognized credential:
    1. Administrator@urn:mace:itunesu.com:sites:xxx.edu
    The time string is valid and corresponds to 2007-12-03 18:34:33Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    1. All@urn:mace:itunesu.com:sites:xxx.edu
    2. Authenticated@urn:mace:itunesu.com:sites:xxx.edu
    With these credentials, you have browsing, downloading, uploading, and editing access to the requested destination.
    I am pretty new to this, and working on this for the first time.If someone could guide me through this would be pretty helpful.

    This is only going to work under IE !
    Go to your page template :
    Modify the definition, make sur you have this :
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>#TITLE#</title>
    #HEAD#
    <Script language = javascript>
    Browser = navigator.appName
    Net = Browser.indexOf("Netscape")
    Micro = Browser.indexOf("Microsoft")
    Netscape = false
    IE = false
    if(Net >= 0) {Netscape = true}
    if(Micro >= 0) {IE = true}
    function XYpos() {
    if (IE == true) {
    xPos = event.screenX
    yPos = event.screenY
    alert(xPos + " left " + yPos + " down")
    else if (Netscape == true) {alert("Script won't work: " + "\n" + "You're using Netscape")}
    </script>
    Modify the body definition, make sure you have this :
    <body #ONLOAD# onMouseDown = XYpos()>
    I didnt try it but it make sens to me... tell me if it works!
    Flex
    Homepage : http://www.insum.ca
    InSum Solutions' blog : http://insum-apex.blogspot.com

  • System sounds do not work since upgrade to ML 10.8/10.8.1

    Hello.  Since I upgraded to Mountain Lion, I have the persistent problem of my system sounds not working, after my laptop sleeps.  Fresh after a restart, they will work..then, after screen saver or sleep, they will not. 
    Here's what doesn't sound:
    - Apple mail sounds (sending, receiving)
    - alert sounds
    - Sys Pref -> Sound -> any/all sound effect selection
    - screen capture click
    Here's what always works fine:
    - the pop-pop-pop sound when I increase/decrease the volume
    - iTunes
    - any sound from audio/visual embedded in browsers
    - sound from all 3rd party apps
    Internal speakers are selected
    No problem throwing out sound to airplay, etc.
    No problem with non-system non-Mail sounds
    All sounds work fine after a restart...but after a sleep or a screen saver, they will cease working until the next restart.
    MacBook Air, 10.8.1 (also was noticed under 10.8)
    1.7 GHz, 4 GB
    I do see posts where people are experiencing the same, but no real solutions.  I have found & trashed the prefs file (from other posting solution) but that did not solve this persistent issue.  The sounds always DO work fresh after restart...just after sleeping, they do not.  Thank you  :-)

    Yeah, just to keep everyone breathlessly updated: there has been no fix for me.
    Amusingly (mostly not..) on the plane yesterday, when I plugged in my headphones, I was greeted with about 3 weeks' worth of Sent Mail and Alert tones.   Good times. 
    The fix involving Audio MIDI Setup and momentarily changing the internal speakers integer dropdown list used to occasionally work for me...but lately it has not. I'm just making do with no mail sounds, like a chump.  How I wish GrowlMail worked with 10.8 because I could get my sounds that way. 

  • OAS 4 & Oracle 8i on RH 6

    Hi
    We've got the problem throw the installation of the OAS 4.0.7 on
    the same mashine where the Oracle 8.1.5 RDBMS (RedHat 6.0) is -
    the problem with ORACLE_HOME variable - how to set different
    value for the OAS? In case of the same value we got a problem
    with 8i products (overwriting of them).
    Did anybody else install the OAS with the Oracle8i?
    Andrew
    null

    Geert De Paep (guest) wrote:
    : Don't waste your time (I did enough). 4.0.7 will not run on
    : Redhat6, neither will 4.0.7.1. You should wait for 4.0.8.
    : In the mean while, you could use OAS 3.0.2, which works (using
    : compat packages and starting the wrb processes manually).
    : Geert
    : Andrew Yevsyevyev (guest) wrote:
    : : Hi
    : : We've got the problem throw the installation of the OAS 4.0.7
    : on
    : : the same mashine where the Oracle 8.1.5 RDBMS (RedHat 6.0) is
    : : the problem with ORACLE_HOME variable - how to set different
    : : value for the OAS? In case of the same value we got a problem
    : : with 8i products (overwriting of them).
    : : Did anybody else install the OAS with the Oracle8i?
    : : Andrew
    Does that mean OAS 3.0.2 will work on Oracle 8i with RH 6.0 ?
    What version of WebDB you suggest then ? Thanks.
    Joe
    null

  • How to Restore the portal desktop:

    Hi gurus,
    i am getting the following error while loging into portal.(previously it was working fine with every user).
    Error occurred while trying to access desktop: "portal_content/every_user/general/defaultDesktop". The object does not exist or you are not authorized to access it. If this problem persists, contact your system administrator.
      Log Off
    i have found some threads in SDN but these are not solving my issue.
    i have tried to apply SAP Note 869690.
    when i have enterd the following url replacing portal hostname and port
    http://<Host Name>:<Host Port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fevery_user!2fgeneral!2fcom.sap.portal.frameworkpage
    i am getting the following error.
                      Portal Runtime Error
                      An exception occurred while processing your request
                      Exception id: 03:08_22/03/11_0021_6348050
                      See the details for the exception ID in the log file.
    Note:- same thing is happening with Administrator user, user is assigned to everyone group.
    what would be the problem , throw some light on this...
    Regards
    K Naveen Kishore.

    when i am tring with this link
    http://<portal host>:<portal port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fadministrator!2fsystem_admin!2fsystem_admin_role!2fcom.sap.portal.system_admin_ws!2fcom.sap.portal.themes!2fcom.sap.portal.portalDisplayRules
    Portal Runtime Error
    An exception occurred while processing your request
    Exception id: 03:55_22/03/11_0022_6348050
    See the details for the exception ID in the log file
    1.5 #001A641EE980007400000073000E800200049F0FA9C63258#1300789528506#com.sap.portal.prt.runtime#sap.com/irj#com.sap.portal.prt.runtime#Administrator#12744##n/a##9541ad40546e11e09d16001a641ee980#SAPEngine_Application_Thread[impl:3]_14##0#0#Error##Java###03:55_22/03/11_0022_6348050
    [EXCEPTION]
    #1#com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: pcd:portal_content/administrator/system_admin/system_admin_role/com.sap.portal.system_admin_ws/com.sap.portal.themes/com.sap.portal.portalDisplayRules
         at com.sapportals.portal.prt.deployment.DeploymentManager.getPropertyContentProvider(DeploymentManager.java:1937)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:234)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
         at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)
         at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:488)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
         at java.security.AccessController.doPrivileged(AccessController.java:246)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:219)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)

  • Abandoned Lightroom 1.0 - my list of critical showstoppers

    I have seen several recent examples of users venting on this forum but sadly, I have to symphatise as in my own experience the quality of the Lightroom 1.0 release, specifically the library module does in fact justify this level of frustration.
    I was looking forward to Lightroom becoming the new gold standard and the app that I would spend days and nights in when I was not out shooting. As it is I have abandoned my trial with Lightroom after three days. I never got past the Library module (and since Ligthroom can't function without a library that sealed it's fate).
    The stability showstoppers:
    - Importing with generating previews always crashed after few thousand images, no option to generate 1:1 previews during import completely baffling*
    - Importing without generating previews would randomly not import some of the images, deleting the library and starting again would cause a DIFFERENT set of images to be randomly not imported - no reason given, the images that could not be imported could be opened just fine in Camera Raw and Bridge would happily generate previews for them
    - Generating previews after importing always crashed after a few thousand images
    - Frequent out of memory errors
    That's just the MAJOR stability issues. Then there is performance (I have about 30,000 images, not that I could ever import all of them into Lightroom...)
    And then there are the functional showstoppers:
    - I will absolutely NOT trust Adobe with my images or my metadata (not after the fiasco with Bridge corruping it's caches in EVERY release to date or the issues with files that were renamed on import getting corrupted, and an application that comes with a built in tool to check for library corruption doesn't exactly inspire confidence either) so I import in place and want all of my metadata to be stored in *.xmp files. BUT WHY OH WHY does generating previews cause Lightroom to write out an *.xmp file for every file it generated a preview for!?! Even Bridge was smart enough to only write out *.xmp files when I actually did something to the image!
    - Since there is no way to disable 'folder aggregation', the folders view is usessless for trying to organize images. Try this, take a folder with 1000 images, create three subfolders and try to organize the images into subfolders. Every time you click on the parent folder you see all 1000 images. You have no idea which ones you've already moved and which are still in the parent.
    - Why can't renaming 'files' just rename the files in the file system!?! Since Lightroom is NOT a browser it MUST NOT force me to organize / rename my images outside of it since it then looses track of the files.
    Yes, I have logged all of these issues with Adobe. Have I heard anything from Adobe? No. Lightroom has been out for FOUR months. Given all of the stability problems that have been widely reported you would expect that a company that is in touch with it's users would in fact react and put out a couple dot-dot releases (1.0.1, 1.0.2) to address the stability showstoppers. That would at least enable them to get a feel if they're in fact addressing the most severe issues that their user base is experiencing. But no they chose to put their heads in the sand and pretend the users are happy and continue working on adding new functionality. Here is what's going to happen. They'll release 1.1 and half my showstoppers will still be there. And who knows how long we'll have to wait before the next release comes out.
    *Yes, I am aware how much disk space 1:1 previews would use but I don't care, I have a 30" screen and I have no problem throwing disk space, cpu power or machine time at the problem but I ABSOLUTELY REFUSE to waste my own time waiting for Lightroom to perform processing 'on the fly' that could have been performed in bulk while I sleep.
    Yours Extremely Frustrated,
    Cezary

    Lee,
    With all due respect, I think that you're still missing my point and in doing so I believe you're making my case stronger! The disclaimer is that I don't apply any metadata to the image during importing (my camera already embedded my name in every raw file and keywording at this point doesn't make sense in my workflow).
    The application of defaults is EXACTLY why I don't want the *.xmp files written out until 'I' have manually modified the image in some way. Applying the tone curve is great example. So today Lightroom applies a medium curve. Maybe tomorrow version 1.1 is going to get smarter and apply different curves depending on the contrast of the image (or some other default behavior will change, like what happend to the Shadows slider in Bridge 1.x, it used to default to 0, now it defaults to 5). But then we have the question of compatibility! Which images should it apply the new smarter defaults to? The natural choice is: images that the user modified should stay the same, new images and those that have not been modified in any way should automatically benefit from the new defaults. Comitting to defaults at the time of importing seems completely unnecessary. If they're defaults, why write them out at ALL? I wouldn't mind as much if the *.xmp files were 'empty' so to speak. But if I recall correctly, the're not, they include all the ACR settings at 'current' default level as if I manually set them.
    As for 'What's the point of importing your images into the LR database if this is the case?'. I never said I like it using a database but I appreciate the pros and cons of this approach. I would use Bridge instead but it has a different showstopper: the generated previews are too low quality to judge image sharpness (see BreezeBrowser in High Quality mode for what a preview should look like, I posted about this in the Bridge forum recently). The low quality previews are THE reason I am looking at Lightroom but of course it also promises to be 'so much more' than Bridge.
    Of all the issues that I consider to be showstoppers in the library module of Lightroom 1.0 this is the least important and I will agree to disagree with you. If 1.1 fixes the stability issues, improves performance and delivers a usable interface for managing files and folders that keeps them consistent with the file system I'll be happy to give Lightroom another shot even if it means *.xmp files being generated for every image as it's imported.
    Cezary

  • Preserving Aspect Ratio

    I have a problem that is somewhat two-fold. I'm trying to play a video on a digital frame. It only plays MPEG1, 2, and 4 with a resolution of 1024x768 (my video is 720x480). Whenever I play my video it distorts the aspect ratio slightly, but noticeably. I've dragged the file into FCP several times, trying to export it and then converting it back to an MPEG with ffmpeg. The problem is EVERY time I export with FCP (no matter what settings I'm using), the quality is crap. I get lines everytime there is movement in the video (this is BEFORE I convert with ffmpeg, so I know thats not the issue). I finally found a solution to my problem (throwing in a black jpeg file to surround the video is preventing it from changing the ratio), but like I said I'm getting lines. The only video that looks good is the original, but it keeps changing the ratio. Any ideas would be greatly appreciated!

    Export a self-contained or reference movie from FCP (File->Export->QuickTime Movie).  Do NOT use QuickTime Conversion.
    Use the resulting file in Compressor to create an MPEG-2 Program Stream (.mpg) file.
    -DH

  • Fan doesn't come on at all but no error messages

    I previously had a HP laptop that kept getting a cooling fan error message on startup. I updated the BIOS and tried a few other things suggested by HP support but nothing worked. I ended up ignoring the message, pressing to continue and usually after a couple of minutes the fan would kick in and it would be all good.
    For Xmas, my hubby bought me a new laptop rather than pay $$$$ to get old one serviced and I just realised that I have never heard the cooling fan on at all with this one (15-r038TU). This new laptop gets very hot but I have NEVER had an error message about the fan - but it's very obvious that the fan is not turning on... ever.
    I have updated the BIOS today but there has been no difference. Any recommendations? From searching these forums I can only find people who DO get the error message. I'm not getting any error even though my computer gets really hot and the fan is definitely not running at all. Obviously cooling fans are a big problem with HP. Think I'll be going with a different brand next time!

    n4056175
    Welcome to the HP Community Forum.
    I am sorry you are having issues -- it is particularly tough when the computer is unaware it has a problem.
    If the fan is not running and you continue to use the computer, then it is only likely to damage the computer and things will get worse instead of better.
    You should contact HP and talk to a Technician.  This is the course of action when the computer indicates a hardware problem -- throwing software at it won't make the fan spin.
    If you MUST continue to use the computer for business reasons, then by all means, protect your data and stick a notebook cooler under that notebook right away. 
    Please back up any critical, personal data to an external source -- that is, somewhere other than on the computer so that you can get to it.  USB Drive, Cloud, somewhere...
    The notebook is covered by hardware Warranty -- call for help:
    Contact HP – USA - Phone Assistance
    List of
    HP tech support/ Customer Service Phone Numbers – Some English Speaking Countries
    Including UK and Europe
    HP World Support Telephone Numbers - 2010
    Warranty Required – USA and Canada
    USA – Contact HP // Self-Help – Email - Chat
    ===================================================================
    Click the Kudos Thumbs-Up to say Thank You!
    And...Click Accept as Solution when my Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • XML TO PDF printing

    Hi,
    I managed to create a pdf File, from a XML document, using XSLT and XSL-FO.
    I'd like now to print this pdf File from my Java application. Is there a simple way of doing this ?
    Thank you in advance for any help.
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.sax.*;
    import org.apache.avalon.framework.*;
    import org.apache.avalon.framework.logger.*;
    import org.apache.fop.apps.*;
    * This class converts an XML file to PDF using JAXP (XSLT) and FOP (XSL-FO).
    * @author
    public class XmlToPdf {
    private static final String BASE_DIR = "./test/";
    private static final String FILE = "test";
    * Converts an XML file to a PDF file using JAXP and FOP.
    * @param xmlFile The XML file
    * @param xslFile The XSLT stylesheet file
    * @param pdfFile The output PDF file
    * @throws IOException In case of an I/O problem
    * @throws FOPException In case of a FOP problem
    * @throws TransformerException In case of a XSL transformation problem
    public void convertXML2PDF(File xmlFile, File xsltFile, File pdfFile)
    throws IOException, FOPException, TransformerException {
    //Construct driver
    Driver driver = new Driver();
    //Setup logger
    Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
    driver.setLogger(logger);
    //Setup Renderer (output format)
    driver.setRenderer(Driver.RENDER_PDF);
    //Setup output
    OutputStream out = new FileOutputStream(pdfFile);
    out = new BufferedOutputStream(out);
    try {
    driver.setOutputStream(out);
    //Setup XSLT
    TransformerFactory myFactory = TransformerFactory.newInstance();
    Transformer myTransformer = myFactory.newTransformer(new StreamSource(xsltFile));
    //Setup input for XSLT transformation
    Source src = new StreamSource(xmlFile);
    //The generated FO (resulting SAX events) must be sent to FOP
    Result res = new SAXResult(driver.getContentHandler());
    //Start XSLT transformation and FOP processing
    myTransformer.transform(src, res);
    } finally {
    out.flush();
    out.close();
    * Main method.
    * @param args command-line arguments
    public static void main(String[] args) {
    try {
    System.out.println("Starting XML TO PDF Transformation...\n");
    //Base Directory...
    File baseDir = new File(BASE_DIR);
    //Input and output files...
    File xmlFile = new File(baseDir, FILE+".xml");
    File xsltFile = new File(baseDir, FILE+".xsl");
    File pdfFile = new File(baseDir, FILE+".pdf");
    System.out.println("Input: XML (" + xmlFile + ")");
    System.out.println("XSL Stylesheet: " + xsltFile);
    System.out.println("Output: PDF (" + pdfFile + ")");
    System.out.println();
    System.out.println("Transforming...");
    XmlToPdf app = new XmlToPdf();
    // Do the transformation...
    app.convertXML2PDF(xmlFile, xsltFile, pdfFile);
    System.out.println();
    System.out.println("The pdf was created succesfully !\n");
    } catch (Exception e) {
    System.err.println(e.getMessage());
    e.printStackTrace();
    System.exit(-1);

    hi everybody
    i use the code of the class XmlToPdf but i have a problem when i run it
    [ERROR] Unsupported element encountered: html (Namespace: default). Source context: unavailable
    [ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.) or elements from another supported language.
    java.lang.NullPointerException
    javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1226)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:638)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
         at com.clear2pay.toolbox.reports.fop.XmlToPdf .convertXML2PDF(XmlToPdf java:526)
         at com.clear2pay.toolbox.reports.fop.XmlToPdf .main(XmlToPdf .java:557)
    i don't see where is the problem.
    this is the XML File that i use
    <?xml version="1.0" encoding="UTF-8"?>
    <changelog>
         <entry>
              <date>2002-12-09</date>
              <time>14:21</time>
              <author><![CDATA[jmc]]></author>
              <file>
                   <name>develop/web/vds-rel1/c/su_rgd0_c.jsp</name>
                   <revision>1.9</revision>
                   <prevrevision>1.4</prevrevision>
              </file>
              <msg><![CDATA[moved cancel button into seperate for so it doesn't invoke js validation]]></msg>
         </entry>
         <entry>
              <date>2002-12-09</date>
              <time>13:41</time>
              <author><![CDATA[jmc]]></author>
              <file>
                   <name>develop/web/vds-rel1/c/su_pm0_c.jsp</name>
                   <revision>1.18</revision>
                   <prevrevision>1.124</prevrevision>
              </file>
              <msg><![CDATA[moved << and >> to the correct column]]></msg>
         </entry>     
    </changelog>
    and this is the XSL that i use
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet
    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
    version='1.0'>
    <xsl:param name="title"/>
    <xsl:param name="module"/>
    <xsl:param name="cvsweb"/>
    <xsl:output method="html" indent="yes" encoding="US-ASCII"
    doctype-public="-//W3C//DTD HTML 4.01//EN"
    doctype-system="http://www.w3.org/TR/html401/strict.dtd"/>
    <xsl:template match="*">
    <xsl:copy>
    <xsl:copy-of select="attribute::*[. != '']"/>
    <xsl:apply-templates/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="changelog">
    <html>
    <head>
    <title><xsl:value-of select="$title"/></title>
    <style type="text/css">
    body, p {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 80%;
    color: #000000;
    background-color: #ffffff;
    tr, td {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    background: #eeeee0;
    td {
    padding-left: 20px;
    .dateAndAuthor {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: left;
    background: #a6caf0;
    padding-left: 3px;
    a {
    color: #000000;
    pre {
    font-weight: bold;
    </style>
    </head>
    <body>
    <h1>
    <a name="top"><xsl:value-of select="$title"/></a>
    </h1>
    <p style="text-align: right">Designed for use with Ant.</p>
    <hr/>
    <table border="0" width="100%" cellspacing="1">
    <xsl:apply-templates select=".//entry">
    <xsl:sort select="date" data-type="text" order="descending"/>
    <xsl:sort select="time" data-type="text" order="descending"/>
    </xsl:apply-templates>
    </table>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="entry">
    <tr>
    <td class="dateAndAuthor">
    <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
    </td>
    </tr>
    <tr>
    <td>
    <pre>
    <xsl:apply-templates select="msg"/></pre>
    <ul>
    <xsl:apply-templates select="file"/>
    </ul>
    </td>
    </tr>
    </xsl:template>
    <xsl:template match="date">
    <i><xsl:value-of select="."/></i>
    </xsl:template>
    <xsl:template match="time">
    <i><xsl:value-of select="."/></i>
    </xsl:template>
    <xsl:template match="author">
    <i>
    <a>
    <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
    <xsl:value-of select="."/></a>
    </i>
    </xsl:template>
    <xsl:template match="file">
    <li>
    <a>
    <xsl:choose>
    <xsl:when test="string-length(prevrevision) = 0 ">
    <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
    <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/></xsl:attribute>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a>
    </li>
    </xsl:template>
    <!-- Any elements within a msg are processed,
    so that we can preserve HTML tags. -->
    <xsl:template match="msg">
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>
    Thank you in advance for any help.

  • What is actually happening with getMoreTLAMemory() and native_blocked

    I have an application that seems to periodically lock up and become unresponsive, which we end up killing and restarting. A thread-dump consistently reveals the following scenario:
    1) There are many threads (18 or so) with a thread-dump like:
    "a0-141" prio=5 id=0x7000 pid=5206 active, native_blocked
    at jrockit/vm/MemSystem.getMoreTLAMemory(Native Method)@0xb6783d10
    2) One of these threads is holding a lock that many (many!) other threads is trying to acquire. This lock is released quickly in the normal running of things, but obviously the lock-holder is blocked in some sort of memory-allocation activity.
    We are currently running jrockit-j2sdk1.4.2_08, with -Xmx512m -Xms192m. We intend to run the app under jrockit-R26.0.0-jdk1.5.0_04 on the next restart.
    Any hints on the nature of this getMoreTLAMemory() call, and its native_blocked state? Is the JVM in some sort of GC activity that happens to be taking a long time?
    =Matt

    Hi,
    It seems that your system is Throwing a lot of OutOfMemoryError, which you
    are catching in your application. If you catch a such exception, your
    application should never ignore it (catch it silently), because you can not
    recover from a such exception.So you should terminate your application with
    a proper message.
    If you know that 512m is enough for your application, then it means that you
    have memory leak in your app, and for that I suggest you use Memleak to
    track it down, otherwise I suggest you increase the heap to accomodate your
    application needs.
    Regards,
    Tiberiu Covaci
    JRockit Team
    <Biswo jit> wrote in message news:[email protected]...
    Hi
    We are also getting a similar sort of problem "Throwing OutOfMemory:
    nativeGetNewTLA". Currently we are running
    jrockit-R27.1.0-jre1.5.0_08-linux-ia32 with -Xmx512m -Xms512m.
    We are getting this log after we used -Xverbose:memory
    [INFO ][memory ] 1551.301-1551.586: GC 524288K->524288K (524288K), 285.181
    ms
    [INFO ][memory ] 1551.601-1552.419: GC 524288K->524288K (524288K), 818.366
    ms
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] 1552.477-1552.716: GC 524288K->524288K (524288K), 239.779
    ms
    [INFO ][memory ] 1552.723-1552.958: GC 524288K->524288K (524288K), 235.828
    ms
    [INFO ][memory ] 1553.016-1553.789: GC 524288K->479738K (524288K), 772.022
    ms
    [INFO ][memory ] 1553.849-1554.075: GC 524288K->524288K (524288K), 226.385
    ms
    [INFO ][memory ] 1554.081-1554.309: GC 524288K->524288K (524288K), 228.326
    ms
    [INFO ][memory ] 1554.377-1555.323: GC 524288K->353358K (524288K), 946.352
    ms
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] 1555.381-1555.611: GC 524288K->524288K (524288K), 230.352
    ms
    [INFO ][memory ] 1555.618-1555.937: GC 524288K->524288K (524288K), 319.087
    ms
    [INFO ][memory ] 1555.944-1556.773: GC 524288K->354232K (524288K), 828.970
    ms
    [INFO ][memory ] 1556.833-1557.167: GC 524288K->524288K (524288K), 334.113
    ms
    [INFO ][memory ] 1557.173-1557.408: GC 524288K->524288K (524288K), 234.490
    ms
    [INFO ][memory ] 1557.415-1558.300: GC 524288K->524288K (524288K), 884.986
    ms
    [INFO ][memory ] 1558.362-1558.598: GC 524288K->524288K (524288K), 235.418
    ms
    [INFO ][memory ] 1558.657-1558.957: GC 524288K->524288K (524288K), 299.905
    ms
    [INFO ][memory ] 1559.013-1559.908: GC 524288K->524288K (524288K), 895.066
    ms
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] 1559.970-1560.222: GC 524288K->524288K (524288K), 252.018
    ms
    [INFO ][memory ] 1560.228-1560.462: GC 524288K->524288K (524288K), 234.402
    ms
    [INFO ][memory ] 1560.470-1561.293: GC 524288K->524288K (524288K), 822.836
    ms
    [INFO ][memory ] 1561.302-1561.532: GC 524288K->524288K (524288K), 230.341
    ms
    [INFO ][memory ] 1561.538-1561.772: GC 524288K->524288K (524288K), 233.728
    ms
    [INFO ][memory ] 1561.785-1562.630: GC 524288K->461707K (524288K), 844.261
    ms
    [INFO ][memory ] 1562.689-1562.999: GC 524288K->524288K (524288K), 309.380
    ms
    [INFO ][memory ] 1563.007-1563.370: GC 524288K->524288K (524288K), 362.903
    ms
    [INFO ][memory ] 1563.377-1564.171: GC 524288K->524288K (524288K), 793.895
    ms
    [INFO ][memory ] Throwing OutOfMemory: nativeGetNewTLA
    [INFO ][memory ] 1564.189-1564.425: GC 524288K->524288K (524288K), 236.357
    ms
    Any help will be highly appreciated.

Maybe you are looking for

  • IDOC-XI-EDI : Sender Party in IDOC with LS Partner Type

    Hi Does anyone know of a way to have IDOCs sent from SAP to XI to arrive with a sender party. <b>Note</b> The Partner Type of the original IDOC is LS. [I know how to do this with e.g. KU Partner Type.] Thx, Duncan

  • Problem sync with iphone could not transfer music because of unknown error -5000

    windows Itunes will not sync my music with Iphone 4s because of unknown error (-5000)    ?????

  • SQL statement Advice Please

    Hi - Nice to see the forums back :-) Ok i have quite a complex question here, but hope some clever peep can help me out. I have a search page with four methods of searching the database. The code used on the results page is below. I've created a thre

  • Custom Fields in F-28

    Hi Gurus, Wish everyone a happy new year! We have a requirement where client want to add a new field 'Branch Account Name' on the 'Post Incoming Payments Process Open Items' screen (second screen on F-28). This new field would display the name of the

  • Found rust on macbook pro component, can this be removed?

    Hi, this is my first time having to post here - thanks in advance for any help. I have noticed a small amount of rust inside my computer directly on top of the component as pictured I purchased the macbook pro 13" refurbished at the end of 2010. This