BPM change help needed

Hello
I sent a mixdown of my tracks to a session musician to record his parts but instead of sending a bounce mp3 i sent an M4A by mistake,now his tracks have came back and they just out of sync with the original BPM and i cant seem to be able to match them.

Hi Sasi,
I tried to implement the multimapping. But I got confused.
I need to get Server number as response message from R3 to XI. At the same time I need to map the invoice number to one datatype declared in XI. I am not sure how i will implement this logic in BPM. What kind of mapping can i use for invoice number. So content server number and invoice number are need to be handled separately in XI and merge it and send back to R3. Is it possible in BPM?
Thanks,
Deno

Similar Messages

  • BPM Workflow Help Needed Urgently please

    Hi All,
    We are working on a BPM workflow
    User A submits the request which goes to User B for review if rejected by user B the process stops but if approved then the amount is calculated using a decision table and based on the amount it will be routed to the respective users.
    I did it till BPM part and created rules in the BRM part as well but dont know how to call this BRM in BPM.
    Please help me its very very urgent.
    Thanks in advance

    Refer step 25 of this document to see how to create a web-service for your BRM ruleset.
    Once the web service is ready, it can be imported anywhere for use.
    1. In your BPM, right-click on the 'WSDL' folder and select 'Import WSDL'. You can import your BRM web-service here.
    2. Then place an automated activity in your BPM process design and set the BRM service as the Service Reference property of the Automated activity.
    3. Once this is done, you will see the Condition and Action values of your BRM decision table in the Input and Output mapping of the Automated Activity.
    4. Map the values of BPM process context to the BRM condition values in the 'Input Mapping' and get the corresponding output in Output mapping (Action Values of decision table).
    Refer step 12 in this document to see how to import a WSDL in your BPM Process.
    Hope this helps.

  • BPM design help needed

    Hi,
    I have a scenario like this.
    Step1. Invoice idoc should be passed from R3 to XI using an asynchronous proxy.
    Step2. In XI, mapping should take place and message should be passed back to R3 using a synchronous proxy.
    Step3. Response message of the synchronous proxy should be a server number from R3. In the server, the invoice xml message would be stored.
    Step4. Get the server number and mapped with one message type declared in XI. At the same time, I need to map invoice number alone with an invoice number message type declared in XI. Need to combine server number and invoice number to R3 back using a synchronous proxy.
    Step5. The response message should be the invoice stored in the server in Step3.
    Step6. XI receives the response Invoice xml message and send out to MQ.
    I am doing the scenario using BPM. Step 4 is really confusing for me. The steps mentioned above are prepared by me. If any discrepancies, please mention that as well in the reply. I am going to do BPM for the first time. So please send me a detailed explanation.
    I tried to make the scenario as clear as possible. If any confusions, please let me know.
    Thanks,
    Deno

    Hi Sasi,
    I tried to implement the multimapping. But I got confused.
    I need to get Server number as response message from R3 to XI. At the same time I need to map the invoice number to one datatype declared in XI. I am not sure how i will implement this logic in BPM. What kind of mapping can i use for invoice number. So content server number and invoice number are need to be handled separately in XI and merge it and send back to R3. Is it possible in BPM?
    Thanks,
    Deno

  • OC4J error when posting changes - Help needed

    When i call postChanges() and later Commit() to the ApplicationModule's transaction I succed.
    The next time i call postChanges() on the ApplicationModule's transaction the following exception is thrown on the OC4J server:
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for Styles
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:841)
    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:3839)
    at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:2630)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.lock(StylesImpl.java:635)
    at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:1848)
    at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:1790)
    at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1570)
    at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:754)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setStyleName(StylesImpl.java:152)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setAttrInvokeAccessor(StylesImpl.java:446)
    at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:680)
    at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:903)
    at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:819)
    at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:948)
    at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:925)
    at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:717)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.updateRow(RuntimeViewRowSetIteratorInfo.java:311)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.readPiggyback(RuntimeViewRowSetIteratorInfo.java:193)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.readPiggyback(AbstractRemoteApplicationModuleImpl.java:2419)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.isTransactionDirty(AbstractRemoteApplicationModuleImpl.java:1788)
    at oracle.jbo.server.remote.ejb.EJBApplicationModuleImpl.riIsTransactionDirty(EJBApplicationModuleImpl.java:2454)
    at RemoteStylecardModule_StatefulSessionBeanWrapper6.riIsTransactionDirty(RemoteStylecardModule_StatefulSessionBeanWrapper6.java:12889)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01002: Fetch out of sequence
    Is there a solution to this problem?
    Client sample code:
    import javax.naming.*;
    import java.util.Hashtable;
    import oracle.jbo.*;
    //import oracle.job.client.*;
    ** Sample client code for connecting to an appmdoule deployed
    ** as an EJB session bean to Oracle9iAS server.
    public class SampleEJBClient
    public static void main(String[] args)
    ** Change the following String's to match your appmodule name and the
    ** name of the viewobject included in that appmodule.
    String amDefName = "dk.bestseller.bestinfoII.purchase.stylecard.StylecardModule";
    String voMemberName = "StylesView";
    ** Change the following to match the name of the J2EE application
    ** containing the deployed appmodule session bean.
    String applicationName = "BCStyleCardEJB";
    ** Change the following to point to the datasource name
    ** (defined in Oracle9iAS).
    ** to your database.
    String dataSourceName = "jdbc/BI2DS";
    ** Change the following to point to the hostname where the
    ** appmodule is deployed i.e. the host where Oracle9iAS application
    ** server is running.
    String applicationServerHost = "bsdk-bi2app2";
    ** Change the following username and password
    ** to be used for connecting to the Oracle9iAS server.
    String iasUserName = "****";
    String iasUserPasswd = "****";
    ApplicationModule am = null;
    try
    // Setup JNDI environment for looking up
    // the appmodule
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_EJB_IAS);
    env.put(JboContext.HOST_NAME, applicationServerHost);
    env.put(JboContext.SECURITY_PRINCIPAL, iasUserName);
    env.put(JboContext.SECURITY_CREDENTIALS, iasUserPasswd);
    env.put(JboContext.APPLICATION_PATH, applicationName);
    Context ctx = new InitialContext(env);
    // Lookup appmodule home
    ApplicationModuleHome amHome = (ApplicationModuleHome)ctx.lookup(amDefName);
    // Create an appmodule instance
    am = amHome.create();
    // Connect to the database using the datasource
    am.getTransaction().connectToDataSource(null, dataSourceName, false);
    // Find the viewobject included in the appmodule
    ViewObject vo = am.findViewObject(voMemberName);
    // Iterate over the viewobject to get the rows
    long l = System.currentTimeMillis();
    Row r = vo.first();
    r.setAttribute("StyleName", "My Change 1");
    am.getTransaction().postChanges();
    am.getTransaction().commit();
    r.setAttribute("StyleName", "My Change 2");
    //Here the exception is thrown when i call postChanges()
    am.getTransaction().postChanges();
    am.getTransaction().commit();
    System.out.println("vo.first(): "+(System.currentTimeMillis()-l));
    while (r != null)
    l = System.currentTimeMillis();
    // Iterate over the current row and get
    // all the attributes
    for (int i = 0; i < vo.getAttributeCount(); i++)
    String attrName = vo.getAttributeDef(i).getName();
    String attrVal = r.getAttribute(i).toString();
    System.out.println(attrName + " = " + attrVal);
    System.out.println("Row: "+(System.currentTimeMillis()-l));
    l = System.currentTimeMillis();
    r = vo.next();
    catch (NamingException ex)
    System.out.println("NamingException " + ex.getMessage());
    ex.printStackTrace();
    catch (ApplicationModuleCreateException ex)
    System.out.println("Unable to create application module: " + ex.getMessage());
    ex.printStackTrace();
    catch (JboException ex)
    System.out.println("JboException: " + ex.getMessage());
    ex.printStackTrace();
    catch (Exception ex)
    System.out.println("Exception: " + ex.getMessage());
    ex.printStackTrace();
    finally
    if (am != null)
    am.getTransaction().disconnect();
    am.remove();
    }

    I have inserted a rollback() just after the commit() that soules the problem.
    ViewObject vo = am.findViewObject(voMemberName);
    // Iterate over the viewobject to get the rows
    long l = System.currentTimeMillis();
    Row r = vo.first();
    r.setAttribute("StyleName", "My Change 1");
    am.getTransaction().postChanges();
    am.getTransaction().commit();
    //with out this line the server throws the exception (Is it a bug?)
    am.getTransaction().rollback();
    vo = am.findViewObject(voMemberName);
    r = vo.first();
    r.setAttribute("StyleName", "My Change 2");
    am.getTransaction().postChanges();
    am.getTransaction().commit();

  • How to add Two Interface Mappings to One Receiver(BPM) Help needed urgently

    I have a requirement where i get a flat file and split into multiple files and send to BPM.
    For each split file I created Interface Mapping using Java Mapping Program.
    In the Configuration how to add more Interface Mappings?
    Thanks for your help in advance.
    Regards
    Sudha

    You can use Enhanced Interface Determination to split one message to Multiple hence to multiple Interfaces.
    You have to change the Occurance of Messages in Message Mapping and their Corresponding Interfaces in Interface Mapping. That would create Multiple Files with Multiple Interfaces to Receiver (BPM)
    1) You need not to use Multilpe Interface Mapping
    2) You will use Extended Interface Determination for this.
    regards.
    Jeet.

  • Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verif

    Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verifying and repairing it but had no luck. I also tried mounting and unmounting it but still no solution. Anyone to help please?

    Looks bad. I would strongly advise backing up the stuff on the other two partitions as soon as possible in case the rest of the drive goes wrong.
    Beyond that, Disk Utility has limited abilities to repair disks, DiskWarrior uses a different approach and might, emphasis might be more successful. It has certainly done the job for me in the past when Disk Utility could not.
    See http://www.alsoft.com/diskwarrior/

  • I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    Have you guys been able to activate your iphone yet? I bought an iphone 4s from eBay and it worked fine, but the previous user had left some data on it, so last night I used the "erased all content and settings" to restore it to factory setting so I can start fresh and restore my backup. But now I'm stuck at the activation screen (I get the same "the activation server is temporarily unavailable")  and can't get it to activate, even if I use my old deactivated AT&T sim card (I'm on straighttalk now).
    I might try activating it with an active AT&T sim card from my fiancee's phone when she gets home, so I'll let you know how that works outs.
    If it's true that the server is down; anyone know when it will be back up again? Thanks in advance.
    iPhone 4s iOS 5.1.1 (9B206)
    Carrier AT&T 12.0
    Modem Firmware 2.0.12

  • Changing App Store Location - Help needed

    Hi, I have just been to USA and the App Store changed to the US and now I am back I am unable to update or download apps on my ipad as it says I have to switch to UK store.  I have tried the settings itunes and apps but I it states that it is UK store and to change i need to spend remaining £s from a gift card but unable to purchase anything as it is US store not UK, Any help will be appreciated.

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the region where you are located.
    9. Tap "Done".

  • Changing DataSource Configuration using ConfigTool - Help Needed.

    Hello Everyones,
    I have an EP 7 which I have installed on a WAS ABAP + JAVA. The Data Soruce configuraion is in dataSourceConfiguration_abap.xml because of this I cannot create any new users in the Portal, can someone tell me how I can change this Config file using the ConfigTool and what procedure is to be used.
    Thanks for your help,
    John.
    Message was edited by: John Bray

    See Changing DataSource Configuration using ConfigTool - Help Needed.

  • Help needed with Vista 64 Ultimate

    "Help needed with Vista 64 UltimateI I need some help in getting XFI Dolby digital to work
    Okay so i went out and I bought a yamaha 630BL reciever, a digital coaxial s/pdif, and a 3.5mm phono plug to fit perfectly to my XFI Extreme Music
    -The audio plays fine and reports as a PCM stream when I play it normally, but I can't get dolby digital or DTS to enable for some reason eventhough I bought the DDL & DTS Connect Pack for $4.72
    When I click dolby digital li've in DDL it jumps back up to off and has this [The operation was unsuccessful. Please try again or reinstall the application].
    Message Edited by Fuzion64 on 03-06-2009 05:33 AMS/PDIF I/O was enabled under speakers in control panel/sound, but S/PDIF Out function was totally disabled
    once I set this to enabled Dolby and DTS went acti've.
    I also have a question on 5. and Vista 64
    -When I game I normally use headphones in game mode or 2. with my headphones, the reason for this is if I set it on 5. I get sounds coming out of all of the wrong channels.
    Now when I watch movies or listen to music I switch to 5. sound in entertainment mode, but to make this work properly I have to open CMSS-3D. I then change it from xpand to stereo and put the slider at even center for 50%. If I use the default xpand mode the audio is way off coming out of all of the wrong channels.
    How do I make 5. render properly on vista

    We ended up getting iTunes cleanly uninstalled and were able to re-install without issue.  All is now mostly well.
    Peace...

  • Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank

    Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
    We like FusionFx Style but would like to keep the background white like blafp style.

    Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.

  • Help needed please.. how do I remove my credit card from itunes? just discovered over $450 of charges when I looked at my email... Kids had no clue they were using our money and not their gift cards

    Help needed please.... I just discovered over $450 charges to my credit card from Itunes. The kids had no idea they were using our credit card and not their itunes gift cards and 4 year old just clicks on anything! I didnt save my credit card details so am a bit miffed at this... I cant find anywhere in itunes to remove it. Edit.. but not remove. Editing does not remove it.. HELP

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918

  • Help need to switch Muse site to BC on a allready hosted plan

    Hi,  i also posted on BC forum...
    I have a client that was in a hurry to have his emails accounts before the entire website.
    So i went on and bought the email marketing plan (cos he will also need to do email campains) an pointed his domain everything is working fine, at this moment he has his accounts the domain is live.
    The site would be just a small 7-10 pages not to complicated.
    Has a graphic designer (who has venture into Business catalyst cos it had all the solutions i needed, well that's what the promotional videos said anyway) I made a site in Muse.
    First i did a temporary page thats says "comming soon", and then i made the entire site, all the design and menu but with blank pages cos the client didnt have all the content yet (and still dont have). I uploaded that site to a sub directory so he could see the evolution.
    He approved the design, yay!
    At the end of the process, he told me he needed to have full control with the editor. (style, images, bulleted list, need to put downloadable document like pdf etc.) i told him that he could only modify what was allready there with the Muse in Browser editing (that he saw when i made the pitch using another site) he was impress with the way it worked.
    so i told him i would have to remake "template".
    I thought of using a BC template, and modify the looks to adapt to my client image, Of course, use a responsive theme so he could make the change at one place only. (cos in Muse you need to make the changes on the 3 layouts).
    Now, i created a new temporary site using one of the new responsive template available.
    How can i import that new site onto his live domain? In other words, how can a switch from a theme made in Muse, to a BC template?
    cant i just delete everything in the root folder, and upload the entire new site via ftp?
    please help me find the solution. i am a bit in a panic here
    hope you could understand my lousy English.
    Sincerely,
    i.d.

    This would need to be transparent for m'y client...
    Y
    Envoyé de mon iPhone
    Le 2014-04-20 à 15:29, Sanjit_Das <[email protected]> a écrit :
    Re: help need to switch Muse site to BC on a allready hosted plan
    created by Sanjit_Das in Help with using Adobe Muse CC - View the full discussion
    Thanks for additional details.
    Unfortunately we cannot change site template of a live site in BC , but as a workaround Create a site from BC using the template you wish to use then publish the site from Muse to the site created from BC and transfer the contents stored from live site to trial site. Ater final transition is done , you can delete the already paid site and make live the new trial site which includes new site template.
    Thanks,
    Sanjit
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6314730#6314730
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6314730#6314730
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6314730#6314730. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Help with using Adobe Muse CC at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Help need my mac pro for school..it has Grey screen..spinning wheel...repaid disk ok...repair disk permission all repaired but one warning...

    Help need my mac pro for school..it has Grey screen..spinning wheel...
    I think I have  mountain lion OS X....I have done I think almost every suggestion I've seen in discussion boards.
    Boot in recovery repaired disk...ok...repair disk permission...all repaired but one warning...I've tried to reinstall lion (without losing data) and it Got all the way to one minute to be done and then the time change back two hours and kept doing this all night long.  I haven't done a back up due to no external for time machine.
    I hope someone can please help me I've been going crazy for a week now trying to figure this out.  I use my computer for school and I'm currently very behind from in my school work  thank you
    Also I've checked my available space  424.91 free of 750 gigs....disk is verified

    Welcome to the Apple Support Communities
    Try holding the Shift key while your Mac is starting to start into safe mode. Then, after starting in safe mode, open Finder, select Go menu (on the menu bar) > Go to Folder, and type /Library/StartupItems. Then, empty this folder and restart the Mac.
    If your Mac starts after doing this, it was a problem with a third-party app that starts automatically when you turn on the computer. It won't start automatically anymore after doing that

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

Maybe you are looking for