Urgent help on java mail

Hi,
I have one prob with java mail .. How do i display file content in email ...
When i pass content as String(suppose hello) it displays hello in email ....How do i display file content in html form when user opens his email .....
Any help on this i will appriciate ..........
Thanks.

Hi,
I have one jsp file and this file includes some include files ......
How do i send this jsp file as body of email using java mail ................
I did this by hot coding the tags and content ... i have to read from jps file and this file include some images ...........
Here is my code ... Please can any one help me ....
import java.io.*;
import java.util.Properties;
import java.util.Date;
import javax.mail.*;
import javax.activation.*;
import javax.mail.internet.*;
public class sendhtml {
public static void sendMess(String[] argv) {
String to, subject = "hello", from = null,
cc = null, bcc = null, url = null;
String mailhost = "xx.xxx.xx.xx";
String mailer = "sendhtml";
String protocol = null, host = null, user = null, password = null;
String record = null; // name of folder in which to record mail
boolean debug = false;
try {  
to="[email protected]";
Properties props = System.getProperties();
// could use Session.getTransport() and Transport.connect()
// assume we're using SMTP
if (mailhost != null)
props.put("mail.smtp.host", mailhost);
// Get a Session object
Session session = Session.getDefaultInstance(props, null);
if (debug)
session.setDebug(true);
// construct the message
Message msg = new MimeMessage(session);
if (from != null)
msg.setFrom(new InternetAddress(from));
else
msg.setFrom();
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(to, false));
if (cc != null)
msg.setRecipients(Message.RecipientType.CC,
InternetAddress.parse(cc, false));
if (bcc != null)
msg.setRecipients(Message.RecipientType.BCC,
InternetAddress.parse(bcc, false));
msg.setSubject(subject);
MimeMultipart mp = new MimeMultipart();
mp.setSubType("related");
MimeBodyPart mbp1= new MimeBodyPart();
String html =
"<html>"+
"<head><title></title></head>"+
"<body>"+
"<b> see the following jpg : it is a car! !!!!!</b><br>"+
"<a href=a.jsp>hello</a><br>"+
"<img src=cid:123 >"+
"<IMG SRC=cid:23 ><br>"+
"<b> end of jpg</b>"+
"<table><tr><td>"+
"Every couple days for the next four weeks, we will send you new"+
"can successfully sell your home.<br><br></td></tr>"+
"<tr><td>"+
"<p class=\"letter\">"+
     "saleMail Topics are: <br><br>"+
     "<ol class=\"letter\">"+
"<li><b>Advertising Your Home: Part 2</b></li>"+
"<li><b> Possibilities</b></li>"+
     "<li><b>Where Do You Go From Here?</b></li>"+
"</ol>"+
"<br><br></p></td></tr></table>"+
"</body>"+
"</html>";
mbp1.setContent(html,"text/html");
MimeBodyPart mbp2 = new MimeBodyPart();
FileDataSource fds = new FileDataSource("/usr/local/images/dualsign.gif");
mbp2.setFileName(fds.getName());
mbp2.setText("This is a beautiful car !");
mbp2.setDataHandler(new DataHandler(fds));
mbp2.setHeader("Content-ID","23");
FileDataSource fds1 = new FileDataSource("/usr/local/images/logo.gif");
mbp2.setFileName(fds1.getName());
mbp2.setText("This is a beautiful car !");
mbp2.setDataHandler(new DataHandler(fds1));
mbp2.setHeader("Content-ID","123");
mp.addBodyPart(mbp1);
mp.addBodyPart(mbp2);
msg.setContent(mp);
msg.setSentDate(new Date());
Transport.send(msg);
System.out.println(mp.getCount());
System.out.println("\nMail was sent successfully.");
} catch (Exception e) {
e.printStackTrace();

Similar Messages

  • Urgent  help needed(java frames)

    Hi,
    I need urgent help for correcting a piece of code.
    I have written a piece of code for building a gui with some buttons, drawing some geometric shapes.The code consists of two files called Graph and Frame.
    The problem I suppose in the last part of the Graph file, which Rectangle and Circle are called together, the only shape that the program draws is rectangle.Here is the code:
    //Graph
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.util.*;
    public class Graph extends JPanel {
    LinkedList color;
    LinkedList figures;
    public Graph() {
    setBackground(Color.white);
    figures = new LinkedList();
    color = new LinkedList();
    int z;
    class Point {
    int x;
    int y;
    public Point(int x, int y) {
    this.x = x;
    this.y = y;
    public Point(Point p) {
    x = p.x;
    y = p.y;
    public String toString() {
    return "(" + x + ", " + y + ")";
    public void move(Point dist) {
    x += dist.x;
    y += dist.y;
    abstract class GeomFigur {
    public abstract void move(Point p);
    class Line extends GeomFigur {
    Point p1, p2;
    public Line(Point p1, Point p2) {
    this.p1 = new Point(p1);
    this.p2 = new Point(p2);
    public String toString() { return "Line from " + p1 + " to " + p2;  }
    public void move(Point dist) {
    p1.move(dist);
    p2.move(dist);
    class Rectangle extends Line {
    public Rectangle(Point p1, Point p2) {
    super(p1, p2);
    public String toString() { return "Rectangle from " + p1 + " to " + p2; }
    class Circle extends GeomFigur{
    Point centre;
    int radius;
    public Circle(Point centre, int radius) {
    this.centre = new Point(centre);
    this.radius = radius;
    public String toString() {
    return "Circle, centre " + centre + ", radius " + radius;
    public void move(Point dist) { centre.move(dist); }
    public void addRectangle(int x, int y, Color col) {
    Rectangle r =new Rectangle(new Point(x,y),new Point(x+20,y+20));
    figures.addLast(r);
    color.addLast(col);
    repaint();
    public void addCircle(int x, int y, Color col) {
    Circle c =new Circle(new Point(x,y), 1 );
    figures.addLast(c);
    color.addLast(col);
    repaint();
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    for (int i=0;i < figures.size();i++) {
    Rectangle rect = (Rectangle)figures.get(i);
    //Circle circ = (Circle)figures.get(i);
    g.setColor(Color.black);
    g.drawRect(rect.p1.x,rect.p1.y,20,20);
    g.setColor((Color)color.get(i));
    g.fillRect(rect.p1.x,rect.p1.y,20,20);
    //g.setColor(Color.black);
    // g.drawOval(circ.centre.x,circ.centre.y,20,20);
    // g.setColor((Color)color.get(i));
    // g.fillOval(circ.centre.x, circ.centre.y, 20, 20);
    //Frame
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class Frame extends JFrame implements ActionListener {
    JButton button1, button2, button3, button4, button5 ;
    Graph gr;
    JComboBox cbx;
    JComboBox cby;
    JComboBox col;
    JMenu filemenu;
    JMenuItem quit;
    JMenuBar menubar;
    int x=10;
    int y=10;
    Color color=Color.red;
    public Frame() {
    menubar = new JMenuBar();
    filemenu = new JMenu("File");
    filemenu.setMnemonic('F');
    quit = new JMenuItem("Quit");
    quit.addActionListener(this);
    quit.setMnemonic('Q');
    quit.setAccelerator(KeyStroke.getKeyStroke('Q',Event.CTRL_MASK,false));
    filemenu.add(quit);
    menubar.add(filemenu);
    setJMenuBar(menubar);
    button1 = new JButton("Rectangle");
    button1.addActionListener(this);
    button2 = new JButton("Circle");
    button2.addActionListener(this);
    button4 = new JButton("Ellipse");
    button4.addActionListener(this);
    button5 = new JButton("Triangle");
    button5.addActionListener(this);
    button3 = new JButton("Reset");
    button3.addActionListener(this);
    String[] elements_x= {"10","20","30","40","50","60","70"};
    cbx = new JComboBox(elements_x);
    cbx.addActionListener(this);
    cbx.setActionCommand("cbx");
    String[] elements_y= {"10","20","30","40","50","60","70"};
    cby = new JComboBox(elements_y);
    cby.addActionListener(this);
    cby.setActionCommand("cby");
    String[] elements_color = {"Red","Blue","Green","Orange","Yellow" };
    col = new JComboBox(elements_color);
    col.addActionListener(this);
    col.setActionCommand("col");
    gr = new Graph();
    JPanel top = new JPanel(new BorderLayout());
    JPanel inputs = new JPanel(new GridLayout(6,1));
    inputs.add(button1);
    inputs.add(button2);
    inputs.add(button3);
    inputs.add(button4);
    inputs.add(button5);
    inputs.add(cbx);
    inputs.add(cby);
    inputs.add(col);
    top.add(gr,BorderLayout.CENTER);
    top.add(inputs,BorderLayout.WEST);
    getContentPane().add(BorderLayout.CENTER, top);
    setSize(500,300);//set window size
    //take care of actions
    public void actionPerformed(ActionEvent e) {
    String command = e.getActionCommand();
    if (command.equals("Quit")){
    System.exit(0);//terminate program
    else if (command.equals("Rectangle")){
    //add Rectangle to graph at
    //position x,y and with certain color
    gr.addRectangle(x,y,color);
    else if (command.equals("Circle")){
    gr.addCircle(x,y,color);
    else if (command.equals("Reset")){
    else if (command.equals("Triangle")){
    else if (command.equals("Ellipse")){
    else if (command.equals("cbx")){
    x=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("cby")){
    y=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("col")){
    String temp=(String)((JComboBox)e.getSource()).getSelectedItem();
    if (temp=="Red") color=Color.red;
    else if (temp=="Blue") color=Color.blue;
    else if (temp=="Green") color=Color.green;
    else if (temp=="pink") color=Color.pink;
    else if (temp=="lightGray") color=Color.lightGray;
    //main program
    public static void main(String [] args) {
    Frame appl = new Frame();
    appl.setVisible(true);
    Thanks in advance
    Marina

    Hi,
    You are very lucky that I'm currently boored. You should never tag a question as urgent. It might be urgent to you, but not to us who answer. And you should also use code formatting when you post code (see the formatting tips, or use the code-button).
    I made some changes to your Graph class. The most important thing is the abstract draw method that I added to the GeomFigur class.
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    public class Graph extends JPanel {
        LinkedList figures;
        public Graph() {
            setBackground(Color.white);
            figures = new LinkedList();
        int z;
        abstract class GeomFigur {
            protected Color color;
            public GeomFigur(Color color) {
                this.color = color;
            public abstract void move(Point p);
            public abstract void draw(Graphics g);
        abstract class Line extends GeomFigur {
            Point p1, p2;
            public Line(Color c, Point p1, Point p2) {
                super(c);
                this.p1 = new Point(p1);
                this.p2 = new Point(p2);
            public String toString() {
                return "Line from " + p1 + " to " + p2;
            public void move(Point dist) {
                p1.move(dist.x, dist.y);
                p2.move(dist.x, dist.y);
        class Rectangle extends Line {
            public Rectangle(Color c, Point p1, Point p2) {
                super(c, p1, p2);
            public String toString() {
                return "Rectangle from " + p1 + " to " + p2;
            public void draw(Graphics g) {
                System.out.println("Draw rectangle at " + p1 + " with color " + color);
                g.setColor(Color.black);
                g.drawRect(p1.x, p1.y, 20, 20);
                g.setColor(color);
                g.fillRect(p1.x, p1.y, 20, 20);
        class Circle extends GeomFigur {
            Point centre;
            int radius;
            public Circle(Color c, Point centre, int radius) {
                super(c);
                this.centre = new Point(centre);
                this.radius = radius;
            public String toString() {
                return "Circle, centre " + centre + ", radius " + radius;
            public void move(Point dist) {
                centre.move(dist.x, dist.y);
            public void draw(Graphics g) {
                System.out.println("Draw circle at " + centre + " with color " + color);
                g.setColor(Color.black);
                g.drawOval(centre.x, centre.y, 20, 20);
                g.setColor(color);
                g.fillOval(centre.x, centre.y, 20, 20);
        public void addRectangle(int x, int y, Color col) {
            System.out.println("x,y,col " + x + ":" + y + ":" + col);
            Rectangle r = new Rectangle(col, new Point(x, y), new Point(x + 20, y + 20));
            figures.addLast(r);
            repaint();
        public void addCircle(int x, int y, Color col) {
            System.out.println("x,y,col" + x + ":" + y + ":" + col);
            Circle c = new Circle(col, new Point(x, y), 1);
            figures.addLast(c);
            repaint();
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            for (int i = 0; i < figures.size(); i++) {
                GeomFigur drawable = (GeomFigur)figures.get(i);
                drawable.draw(g);
    }/Kaj

  • Urgent help needed reg mail

    hi all,
    i am using jes 2005Q4 and msg server 6.0.
    in detail---
    Sun Java(tm) System Messaging Server 6.2-3.04 (built Jul 15 2005)
    libimta.so 6.2-3.04 (built 01:43:03, Jul 15 2005)
    SunOS sunt2000 5.10 Generic_118833-17 sun4v sparc SUNW,Sun-Fire-T200
    i am using a domain demo.admin.com which is the child of admin.com.my exact problem is i can send mails to all domains like gmail,
    yahoo but not to admin.com.And again,i am receiving mails only from my domain(only from demo.admin.com),not from any external domains.
    i am getting smtp error 550 5.1.1---user unknown from the relevant domains
    i am getting struck with this issue.please help me.thanks in advance.
    regards,
    Madhavi

    Hey, I know how to use that(JDBC thing).
    My question is how does one retrieve data (email messages) from a mail server ( I have downloaded Java Mail Server)? What is the interface and how is it done?
    How is it done actually in practice?
    Please help.
    Vivek

  • Help for java mail

    i want devloped java mail , what should i do

    Everything you need is on the JavaMail web page, which was referred to
    in the header to this forum. Did you see it?
    http://java.sun.com/products/javamail

  • *URGENT HELP REQUIRED* java.sql.SQLException: Invalid Oracle URL specifed

    Hi all,
    In the middle of the last week for my final year project and having to convert to an Oracle database due to compatibility problems with university Tomcat Server and MS Access. I'm having trouble connecting to the Oracle database and would appreciate some help please.
    Running on Windows 98 in the lab here, and the Oracle 9i, release 9.2.0.2.0, J2SDK1.4.0, Classes12.zip installed OK.
    Code for connection looks like this inside the constructor of my class:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    cardSaleConnexion = DriverManager.getConnection("jdbc:oracle:[email protected]:1521:sid","user_name","pwdt");
    System.out.println("Connection Successful ");
    And I'm getting the following error when calling the constructor in a driver program:
    java.sql.SQLException: Invalid Oracle URL specified
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at CardSale.<init>(CardSale.java:30)
         at Driver.main(Driver.java:11)
    Exception in thread "main"
    Please reply on a very urgent basis.
    Kind regards,
    Peter

    Try ojdbc14.jar as the JDBC driver instead of classes12.zip.
    Refer:
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    http://docs.sun.com/source/817-5603-10/index.html
    Database Driver
    This section describes the known database driver issues and associated solutions.
    ID      Summary
    4700531      On Solaris, an ORACLE JDBC driver error occurs.
         This new Java Database Connectivity (JDBC) driver is for Oracle (R) working with JDK1.4. The problem is caused by a combination of the Oracle 9.1 database and ojdbc14.jar. Applying the patch will fix the problem on Solaris 32-bit machine, running an Oracle 9.0.1.3 database.
         Solution
         Obtain and apply the patch to your server from the Oracle Web site for Bug 2199718. Perform the following steps:
         1.��Go to the Oracle web site.
         2.��Click the 'patches' button.
         3.��Type 2199718 in the patch number field.
         4.��Click the 32-bit Solaris OS patch.Go to Metalink.oracle.com.
         5.��Click patches.
         6.��Under patch number, enter 2199718.
         7.��Click the 32 bit Solaris OS patch.
    4707531      On Solaris, accessing an Oracle 9.1 database with an Oracle 9.2 Client may cause data corruption.
         If you use an Oracle (R) 9.2 client to access an Oracle 9.1 database, data corruption might occur when a number column follows a timestamp column.
         The problem might be caused by using the ojdbc14.jar file with an Oracle 9.1 database. Applying the patch might assist in addressing the situation on Solaris 32-bit machines, running an Oracle 9.1 database. This JDBC driver is for Oracle working with JDK1.4.
         Solution
         Obtain the patch that Oracle might make available from the Oracle web site for Bug 2199718 and apply it to your server.
    Regards,
    Pankaj D.

  • Urgent help required "java.lang.Exception: Connection reset"

    Hi Everyone,
    I am getting error message when I access cluster database from grid console.
    Error      java.lang.Exception: Connection reset
    I am unable to create jobs or do other admin stuff on the database, I have searched alot , restarted the repository database, restarted the emgc components, even the agents but of no use. The agent status showing OK as under.
    Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.3.0
    OMS Version : 10.2.0.3.0
    Protocol Version : 10.2.0.2.0
    Agent Home : /app/oracle/agent/agent10g/rac2.tawaf
    Agent binaries : /app/oracle/agent/agent10g
    Agent Process ID : 19646
    Parent Process ID : 19629
    Agent URL : https://rac2.tawaf:3872/emd/main
    Repository URL : https://tawafapp.tawaf:1159/em/upload
    Started at : 2009-04-02 11:26:10
    Started by user : oracle
    Last Reload : 2009-04-02 11:26:10
    Last successful upload : 2009-04-02 12:27:42
    Total Megabytes of XML files uploaded so far : 3.48
    Number of XML files pending upload : 0
    Size of XML files pending upload(MB) : 0.00
    Available disk space on upload filesystem : 86.22%
    Last successful heartbeat to OMS : 2009-04-02 12:30:20
    Agent is Running and Ready
    The error reported in emoms.log is as under.
    2009-04-02 12:37:25,073 [MetricCollector:RACHOMETAB_THREAD600:60] ERROR rt.RacMetricCollectorTarget _getAllData.184 - oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1543)
    at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:915)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab._getAllData(RacHomeTab.java:180)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab.getData(RacHomeTab.java:91)
    at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:404)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:596)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:320)
    at java.lang.Thread.run(Thread.java:534)
    can anyone help me as its very urgent for me to clear this error.
    thanks

    this error is also reported against the cluster database.
         Thread: SeverityLoad https://rac2.tawaf:3872/emd/main java.sql.SQLException: ORA-20613: Severity for unknown target. (target guid = 1938FC9C72DDAC01E0C0F268FFC5F6AD) ORA-06512: at "SYSMAN.EM_VIOLATION_CHECKS", line 174 ORA-04088: error during execution of trigger 'SYSMAN.EM_VIOLATION_CHECKS' Error occured at line : 43, File name:Severity

  • Need urgent help on Java Bean

    Can some one help me to find a place for step by step documentation on how to create java bean and load an image thru java Bean on a form. I'm not loading from the same server it must be loaded from a different server.
    Very urgent please. I really appreciate any help.
    Thanks in advance.

    Hi,
    for the first part of your question: start Forms Builder, press F1 and the seach for Bean Area. The online help also comes with code examples
    for the second part, this URL will give you a head start: http://www.particle.kth.se/~lindsey/JavaCourse/Book/Java/Chapter11/loadingImages.html
    Frank

  • Urgent Help in java accross the UNIX platform

    If I develop an application using Java in SCO Unix, Is it possible to port the same application to HP Unix or AT & T Unix. Please kindly give me the infomation/details where it is available or how to do it. Need urgent
    Thanks in Advance
    Jyothi

    If I develop an application using Java in SCO Unix, Is
    it possible to port the same application to HP Unix or
    AT & T Unix.Should port with no changes.

  • Need some urgent help with Java code...

    Hello
    i am taking a java class..beginner..and i am a dud at programming...
    had a couple of questions ..how do make a program ignore negative
    integer values,make it terminate when zero is entered instead of a number ,how should i calculate maximum minimum of integers..please help me..
    thanks
    damini

    You got some good advice from Java_Jay.
    Here is a snippet I keep handy for console input and output. It doesn't do your home work but gives you a working example of getting numbers from stdin:
    import java.io.*;
    public class DemoKeyboardInput {
         public static void main(String[] args) throws IOException {
              // open keyboard for input (call it 'stdin')
              BufferedReader stdin = new BufferedReader(new InputStreamReader(
                        System.in), 1);
              // get input from the keyboard
              System.out.print("Please enter your name: ");
              String name = stdin.readLine();
              System.out.print("Please enter your age: ");
              String s1 = stdin.readLine();
              System.out.print("Please enter the radius of a circle: ");
              String s2 = stdin.readLine();
              // perform conversions on input strings
              int age = Integer.parseInt(s1); // string to int
              double radius = Double.parseDouble(s2); // string to double
              // operate on data
              age++; // increment age
              double area = Math.PI * radius * radius; // compute circle area
              // output results
              System.out.println("Hello " + name);
              System.out.println("On your next birthday, you will be " + age
                        + " years old");
              System.out.println("Area of circle is " + area);
    }

  • Urgent Help with Java!

    How do you open this program on Command Prompt??
    okie here i go
    I saved on dive C: (java) folder
    and then i put javac GradeReport.java on command pro.
    but nuttin came up...
    why is that?
    I'll really appriciate if anyone can help me out.
    Thank you!
    import java.util.Scanner;
    public class GradeReport
    // Reads a grade from the user and prints comments accordingly.
    public static void main (String[] args)
    int grade, category;
    Scanner scan = new Scanner (System.in);
    System.out.print ("Enter a numeric grade (0 to 100): ");
    grade = scan.nextInt();
    category = grade / 10;
    System.out.print ("That grade is ");
    switch (category)
    case 10:
    System.out.println ("a perfect score. Well done.");
    break;
    case 9:
    System.out.println ("well above average. Excellent.");
    break;
    case 8:
    System.out.println ("above average. Nice job.");
    break;
    case 7:
    System.out.println ("average.");
    break;
    case 6:
    System.out.println ("below average. You should see the");
    System.out.println ("instructor to clarify the material "
    + "presented in class.");
    break;
    default:
    System.out.println ("not passing.");
    }

    Kbp1 wrote:
    Yeah! it Works!
    Thank you So much!!For reference, you really should have started with the standard tutorials instead of looking to be spoon-fed here.
    Here is the URL to the tutorial:
    http://java.sun.com/docs/books/tutorial/

  • URGENT Help: Converting JAVA ALE API (9.3)  to MDX API (11.1.1)

    Hi All,
    currnetly I am in the process of converting ALE to MDX API as ALE is no more used
    com.hyperion.ap.IAPMdMember in ALE Api gives the member details like Alias, level, Gen etc
    Equivalent to IAPMdMember , In MDX there are two
    1.com.essbase.api.metadata.IEssMember -> It gives all the member details like Alias, level, Gen etc
    IEssMember metatdata extraction is very slow. need to increase maxport user as Goodwin said.Even then for 10 lakhs metadata it fails at one point or other (Using outline or member selection every thing fails)
    SEVERE: Cannot get members. Essbase Error(1007165): Cannot obtain new member handle.  The maximum number of open member handles for this outline has been reached.  You must save and close the outline to continue
    2. com.essbase.api.dataquery.IEssMdMember - It gives members Name/alias based on Query setting and some properties like readonly etc.
    This IEssMdMember metadata extraction is very fast. Even 10 lakhs data is retrieved ina minute, but I am in need of Alias, level and Gen to frame the metadat as Nodes (or in bean object with same hierarchy)
    can some Java MDX experts help me.Is there any to access member details like geb, level, alias using IEssMdMember? I searched in API i couldnt find any clue. converting IEssMdMember to IEssMember using outline findmember also time consuming and it taking 2 to 3 days to fetch the 10 lakhs record.
    If there is no way to get details , then give me some tips how it can be managed, by cache technology or threading or is there any fastest collection object available

    Add the below DIMENSION properties in MDX query will provide the Gen_Number, level and alias
    DIMENSION PROPERTIES MEMBER_ALIAS ,GEN_NUMBER ,LEVEL_NUMBER,MEMBER_NAME on columns
    Thanks for http://www.network54.com/Forum/58296/

  • URGENT HELP about java.util.zip.ZipException: invalid entry CRC

    I have a program (JAVA of course) packet on JAR with fat-jar eclipse plugin. This program work well in all my computers except two. On these two computers I receive a java.util.zip.ZipException: invalid entry CRC.
    Both computers have the last version of java, but one is Windows and the other is Linux.
    Any help to find the source of this problem??
    Thanks in advance.

    Sorry, I give poor information about this problem.
    This is the full error showed when I execute this command: java -jar app.jar
    Unable to load resource: java.util.zip.ZipException: invalid entry CRC (expected 0x358054d7 but got 0x7dc370ba)
    java.util.zip.ZipException: invalid entry CRC (expected 0x358054d7 but got 0x7dc370ba)
    at java.util.zip.ZipInputStream.read(Unknown Source)
    at java.util.jar.JarInputStream.read(Unknown Source)
    at java.io.FilterInputStream.read(Unknown Source)
    at com.simontuffs.onejar.JarClassLoader.copy(JarClassLoader.java:818)
    at com.simontuffs.onejar.JarClassLoader.loadBytes(JarClassLoader.java:383)
    at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:371)
    at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:362)
    at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:305)
    at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:224)
    at com.simontuffs.onejar.Boot.run(Boot.java:224)
    at com.simontuffs.onejar.Boot.main(Boot.java:89)
    Exception in thread "main" java.lang.ClassNotFoundException: com.intarex.wizard.IWizard
    at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.simontuffs.onejar.Boot.run(Boot.java:240)
    at com.simontuffs.onejar.Boot.main(Boot.java:89)
    app.jar is a JAR file created with fat-jar eclipse plugin, to make easier to generate a JAR file with all dependencies.
    I think that is not a code related problem, because this program is executed in several computers without errors.
    I trasport this JAR to the client computer via HTTP.
    I'm trying to find clues to find the origin of this problem.
    Thanks.

  • Need urgent help sending mass mail!

    I use the program "Mail" and have a specific email address for a certain project, and now I need to send all the people who I have coordinated with through that address a very important message.
    I tried selecting all from my inbox, and adding to address book, but it didn't work.
    Is there any way to email everyone that has contacted this particular address all at once? Would be even better if I can put them all into a special address book.
    Thank you so much for your help!

    Hi
    In address book, create a group, add desired users to that group. In Mail create an email and add that group.
    Tony

  • Seeking Urgent Help for Java-MySQL

    Hi fellows,
    I got one text file of 9816 records (9816 lines) seprated by commas and enclosed by the inverted quotes and seprated by the end of lines. But when I import the file, it only gets half of records in the table using below mentioned command;
    LOAD DATA INFILE 'user.txt' INTO TABLE userdata
                        FIELDS TERMINATED BY ',' ENCLOSED BY '"'
                        LINES TERMINATED BY '\n'
                             (category, fname, lname, adresse, zip, city, telephone, email, homepage);
    I get the below mentoned message;
    Query OK, 4908 rows affected (0.91 sec)
    Records: 4908 Deleted: 0 Skipped: 0 Warnings: 4913Few records are as follow from the text file;
    "1","Peter","John","512 Rennes Road","19810","Wilmington","","mailto:[email protected]","http://www.mobilink.com"
    "1","Sandra","Bridget","12th Aveneue No. 301","12548","Broklyn","(212)780 101 10","mailto:[email protected]",""
    Note: "" fields are empty(missing data) i.e.(in some records, one is missing faxnumber and in some records one is missing homepage and in some one is missing telephone as well. That's why I have to use the empty quotes for representing that field.
    The table structure is as follow;
    CREATE TABLE userdata (
    accno int(10) unsigned NOT NULL auto_increment,
    category mediumint(6) unsigned zerofill NOT NULL default '0',
    fname varchar(128) NOT NULL default '',
    lname varchar(128) NOT NULL default '',
    add(128) NOT NULL default '',
    zip varchar(6) NOT NULL default '',
    city varchar(64) NOT NULL default '',
    telefone varchar(16) NOT NULL default '',
    homepage varchar(128) NOT NULL default '',
    email varchar(128) NOT NULL default '',
    telefax varchar(16) NOT NULL default '',
    PRIMARY KEY (accno),
    KEY category (category),
    KEY fname (fname),
    KEY telefone (telefone),
    KEY zip (zip),
    KEY city (city),
    KEY telefax (telefax)
    ) TYPE=MyISAM;
    Please advise me that whey I am not getting the whole records in the table from the text file.
    Your help will be highly appreciated...
    With Best Regards...
    Nasir

    Please advise me that whey I am not getting the whole records in the table from the text file.Those 4,913 warnings might have something to do with it. Do they come with warning messages? If so what do those messages say?

  • Urgent help(xml, java and  asp)

    Hi all,
    I,m new with XML and i have to convert a VB application that connects to an ASP using Microsoft XML and I need to know if I can connect from a java application to an ASP using XML for transfering the infornation.
    In the ASP side it uses DOM, and I would like not to touch the ASP and create a new application with java and get rid of the VB application

    DrClap what I have in the VB side is this:
    Private Function SetBalanceForReal(Amount As Currency, Action As String) As Boolean
    On Error GoTo ehSetBalance
    Dim ohttp As New MSXML.XMLHTTPRequest
    Dim oResponseXML As New MSXML.DOMDocument
    Dim oDoc As New MSXML.XMLDSOControl
    Dim oElement As MSXML.IXMLDOMElement
    Dim oNode As MSXML.IXMLDOMNode
    ohttp.open "POST", ServerUrl & "ActualizaBalance.asp", False
    Set oElement = oDoc.XMLDocument.createElement("ActualizaBalance")
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Client", ""))
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Action", ""))
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Amount", ""))
    oElement.childNodes.Item(0).Text = Trim(ClientLogin)
    oElement.childNodes.Item(1).Text = Action
    oElement.childNodes.Item(2).Text = Amount
    ohttp.send (oElement.xml)
    oResponseXML.loadXML (ohttp.responseText)
    If oResponseXML.documentElement.childNodes.Item(1).Text = "OK" Then
    Available = oResponseXML.documentElement.childNodes.Item(0).Text
    Else
    Available = 0
    End If
    Set ohttp = Nothing
    Set oResponseXML = Nothing
    Set oDoc = Nothing
    Set oElement = Nothing
    Set oNode = Nothing
    SetBalanceForReal = True
    Exit Function
    ehSetBalance:
    Set oNode = Nothing
    Set oElement = Nothing
    Set oDoc = Nothing
    Set oResponseXML = Nothing
    Set ohttp = Nothing
    Available = 0
    SetBalanceForReal = False
    End Function
    Public Function GetConsecutive(Game As String) As Boolean
    On Error GoTo ehGetConsecutive
    Dim ohttp As New MSXML.XMLHTTPRequest
    Dim oResponseXML As New MSXML.DOMDocument
    Dim oDoc As New MSXML.XMLDSOControl
    Dim oElement As MSXML.IXMLDOMElement
    Dim oNode As MSXML.IXMLDOMNode
    ohttp.open "POST", ServerUrl & "ObtieneConsecutivo.asp", False
    Set oElement = oDoc.XMLDocument.createElement("ObtieneConsecutivo")
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Game", ""))
    oElement.childNodes.Item(0).Text = Game
    ohttp.send (oElement.xml)
    oResponseXML.loadXML (ohttp.responseText)
    Consecutive = oResponseXML.documentElement.childNodes.Item(0).Text
    Set ohttp = Nothing
    Set oResponseXML = Nothing
    Set oDoc = Nothing
    Set oElement = Nothing
    Set oNode = Nothing
    GetConsecutive = True
    Exit Function
    ehGetConsecutive:
    Set oNode = Nothing
    Set oElement = Nothing
    Set oDoc = Nothing
    Set oResponseXML = Nothing
    Set ohttp = Nothing
    Consecutive = 0
    GetConsecutive = False
    End Function
    and the ASP code is this:
    <%@LANGUAGE=VBScript%>
    <%
         'Variables Simples
         Dim Cliente
         Dim Accion
         Dim Monto
         'Variables Complejas
         Dim oClienteBD
         Dim oClienteInfoXML
         Dim oDoc
         Dim oElemento
         Dim oNode
         'Inicializacion de Variables Complejas
         Set oClienteBD = Server.CreateObject("Casino_Clases.CClient")
         Set oClientInfoXML = Server.CreateObject("MSXML.DOMDocument")
         Set oDoc          = Server.CreateObject("MSXML2.DSOControl")
         oClientInfoXML.async=false     
         oClientInfoXML.load(Request)
         Cliente = oClientInfoXML.documentElement.childNodes.item(0).text
         Accion = oClientInfoXML.documentElement.childNodes.item(1).text
         Monto = oClientInfoXML.documentElement.childNodes.item(2).text
         Set oElemento = oDoc.XMLDocument.createElement("Resultado")
         Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "AVAILABLE",""))     
         Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "ESTADO",""))
         If oClienteBD.UpdateBalance(Cliente, Accion, Monto) = True Then
              If oClienteBD.GetClientBalance(Cliente) = True Then
                   oElemento.childNodes.Item(0).Text = oClienteBD.Available
                   oElemento.childNodes.Item(1).Text = "OK"
              else
                   oElemento.childNodes.Item(0).Text = 0
                   oElemento.childNodes.Item(1).Text = "BAD"
              end If
         else
              oElemento.childNodes.Item(0).Text = 0
              oElemento.childNodes.Item(1).Text = "BAD"
         end If
         Response.Write(oElemento.xml)
         Set oClientInfoXML = Nothing
         Set oDoc = Nothing
         Set oClienteBD = Nothing
         Set oNode          = Nothing
         Set oElemento     = Nothing
    %>
    What I need to do is to change the VB part for a Java application and basicly, I don't know what Class of Java I have to use to connect to the ASP.
    If you were so kind of giving me an example to do this I will appreciate it.
    Ocorella

Maybe you are looking for

  • Connecting ipod to tv

    i have a cable that is has a black and yellow plug, it was from my video camera, when i had the mini i could use that cable and it would play music on the tv, but now i tried using the video thru that cable but i dont get sound or music? can any one

  • TS1398 Can't connect to my Network

    Hooked up my modem to my airport router and went through the steps on my iPad to get the router going. All worked fine, green light on router, and I can see my network but can't connect to it from anything. Cable company doesn't know either, they can

  • Export from iStopMotion Pro to edit in iMovie 09

    Hi, I'd like to export a time-lapse movie I created in iStopMotion Pro (I started from very high quality JPG's, shot with a Nikon D700), so I can edit it in iMovie 09. Apparantly, iMovie does not import .mov files, so I tried "DV-PAL 16-9". Now, I do

  • Variance analysis with InfoSource 2LIS_04_ARBPL - Target fields empty

    Hi Experts, I want to run a variance analysis for production orders in BW. The Confirmed activites (ISM01-3) are filled in the DataSource 2LIS_04_ARBPL , but all the fields "Target qty/act.typ (ZMNG1-3)" are empty. Do anyone know, how to these fields

  • Trad. Chinese in mail

    This is kind of a question with a small audience (on this forum at least), so I'm not too optimistic about the results, but here goes: I've discovered that when I use the Mail app to write traditional Chinese emails, all traditional Chinese character