Image Save from Java GUI

Hi,
I am currently working on project which is basically development is going on Java Spring and Oracle 10g
I have a problem when i am calling the procedure from Java GUI
I am created directory named IMAGE_DIR
CREATE OR REPLACE PROCEDURE u_rfnd_cnd_test
(ackno in varchar2, p_name IN u_rfnd_cnd_petition.URCP_IMAGE_NM%TYPE) IS
v_bfile BFILE;
v_blob BLOB;
BEGIN
INSERT INTO u_rfnd_cnd_petition (URCP_ACK_NO, URCP_IMAGE_NM, URCP_IMAGE)
VALUES ( ackno,p_name, empty_blob())
RETURN URCP_IMAGE INTO v_blob;
v_bfile := BFILENAME('IMAGE_DIR', p_name);
Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
Dbms_Lob.Fileclose(v_bfile);
COMMIT;
END;
When i m calling this procedure from Oracle itself its working fine
But when calling this procedure from Java GUI with same parameter then i am getting error
Error :java.sql.SQLException: ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the path specified.
ORA-06512: at "WBCOMTAX.U_RFND_CND_TEST", line 18
can anyone please help me out ?
thanks in advance

Generate the image from that html page.What would be the best way to generate an image of the
browser rendered page? This is another issue I have
struggled with.Ok, using a JEditorPane it is possible to render a HTML Page. Like all other Swing components it inherits the paintComponent method from JComponent. Simply generate an offscreen image and get its graphics context. Now you can pass this Graphics object the paintComponent and you get an image of your HTML page.
Just make sure your offscreen image has the correct size. I guess this information is available from the JEditorPane.
Use a PixelGrabber to get the image data and scan itfor the area the
default.gif is placed.How would you use the PixelGrabber to find, or scan,
for a 'default.gif' or multiple 'default.gif's? This
too is an issue I have tried to wrap my mind around.This is the tricky part of it. Using the PixelGrabber you should get an array of pixel values. If you iterate thru this array it should be possible to find the pixel values of the default.gif (at least, if you choose a colr for your default.gif that does not appear in your HTML page incliding the other images).
Now you have to replace those pixels with the pixels you have generated for your applets.
Jörg

Similar Messages

  • Can I Open an HTMLHelp (*.CHM) File from Java GUI Application?

    I ussually use Delphi to develop my applications and I can open an HTMLHelp (*.CHM) file from my application. Can you show me the ways to do it from my Java GUI applications?
    Thanks for everyone.
    Budi Raharjo
    http://budiraharjo.blogspot.com

    http://www.google.com/search?q=java+chm
    Seems like there is some 3rd party software available for that.

  • Setting Theme's Max Whole Image Level from Java

    Hi,
    I'm using JDeveloper11g and I have problems with predefined themes.
    I have developed an application which shows a predefined theme through the <dvt:predefinedTheme> component.
    Because there too many FOIs , I want to set the "Max Whole Image Level" for the theme.
    I know it' is possible from Javascript with function "setMaxWholeImageLevel".
    Is it possible from Java too?
    In Java I have instances of classes UIGeoMap and ThemeFOI, but I don't find methods to set the "Max Whole Image Level" for the theme.
    How can I do it?
    I tried another method too. I put an <af:clientListener> component to listen to page loading. So when page load event fires, a javascript method calls the "setMaxWholeImageLevel" function. The problem is that when page load fires, the object MVThemeBasedFOI (returned from object MVMapView) is null.
    This is the javascript code:
    function test()
    var mapView = null;
    var theme = null;
    var geoMap = AdfPage.PAGE.findComponent('map1');
    mapView = geoMap.getMVMapView();
    if(mapView != null)
    theme = mapView.getThemeBasedFOI('predefinedTheme1');
    if(theme != null)
    theme.setMaxWholeImageLevel(11);
    theme.setMinClickableZoomLevel(11);
    What can I do?
    However, do you know if Java functions, setting "Max Whole Image Level" parameter, will be implemented?
    Thank you,
    Arturo

    Hi,
    I have found a solution for my problem.
    If I call Javascript from backing bean, it works well.
    I have inserted the calling to javascript function test() in method setMap1():
    public void setMap1(UIGeoMap map1)
    this.map1 = map1;
    if(map1 != null)
    ThemeFOI theme = map1.getThemeFOIById("predefinedTheme1");
    if(theme != null)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = (ExtendedRenderKitService)Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    service.addScript(facesContext, "test();");
    However I have these questions:
    1) What is the best method to work? Is this method better than using an <af:clientListener> component listening to page loading ?
    2) In the next release of JDeveloper, will it be possible to set a predefined theme as a "whole image" from Java ?
    Thank you,
    Arturo

  • I have problems with uploading images to my printing company have the images have been manipulated through CS6 i have saved images as jpeg but the printer company tell me they are not j peg, they will not upload images save from a camera are fine

    I have problems with uploading images to my internet printing company when  the images have been manipulated through CS6 and  i have saved images as jpeg  the printer company tell me they are not j peg,
    but images saved from my phone or camera images that have not been manipulated upload fine, What am i doing wrong?

    Save/Export them as JPG. Photoshop defaults to PSD, so make sure you select JPG and not just rename the file to .jpg.
    There are two ways to save them as JPG: Regular Save as option or Save for Web & Devices
    Take your pick.

  • Opening HTML file from java GUI

    Can someone please tell me how I can open a HTML file in Internet Explorer from a Java GUI,
    I have an asssignment I am doing for college and I was toying with the idea of putting in helpfiles, for the program, can anyone tell me the easiest way of apcomplishing this???
    Thanks in advance for your help,
    Kaspah

    Although this should answer your question, there are other (cross platform) ways to do what you want. As opposed to your "must have internet explorer" solution. Swing has a built in html viewer you might use, for example. I've been doing some reading on java/xml solutions. I don't consider myself knowledgeable enough (yet) to comment on that solution though. A delimited text file would be another solution. Useing that solution you could treat the file like a set of parrallel arrays on the hard drive and disply your text on pre-formated labels. Anyway, here is a link to you answer......
    http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    Ron_W

  • Cafeobj from Java GUI

    Dear friends, i am newbie in Java and i want some help.
    I need to create a GUI, for example using swing, that will call the interpreter of CafeOBJ (Algebraic Specification Language) to make some reductions and provide results.
    Is it easy and how can I do it?
    Thanks in advance.

    To answer that one would have to have a certain amount of knowledge about that product. I never heard of it before, so I found it on the Internet. Then I started reading the documentation. It looks like it takes input from the command line, so conceivably you could use Runtime.exec() to start it running in a Process, then communicate with that process via the input and output streams.

  • Insert Image file from java to ms access database

    Are there any ways to insert image file or any files into microsoft access database and retrieve the file from the database. Guild will be helpful.Thank you.
    regards
    Singaravelan

    The right answer? Don't do it. You should not be putting images in any database.
    Better to write the image to the server's file system and add the path/link to the database instead.
    %

  • Image Manipulation from Java to browser

    Let me start by saying that I rarely ever post. I try only to do it after I scouring the internet and coming up empty-handed. I have a task that I think should be easy, but of course it is not.
    I have an Applet with a JPopupMenu which contains a "Print" JMenuItem. When the item is clicked I use JavaScript via LiveConnect to open a new browser window. My intention is to screen scrape the original page (parse the HTML) and replace any "<OBJECT>" tag with an image of what the Applet is currently showing.
    Why?
    Well, printing from browsers is buggy at best. I have to support many different OSs and many different versions of Netscape and IE. Some systems can print the HTML page with Applets just fine. Others can do OK and some just crash at the thought.
    How?
    The idea is that if I recreate a snapshot of the page in a new browser window with images replacing the Applets then the broweser can print that page just fine.
    Problem?
    I create a BufferedImage in my Applet. The problem comes when I want to tell JavaScript to write the image to the new HTML file. I have seen examples of how this would be done in theory. Has anyone done this?
    Background:
    I want to use NO server side technologies (i.e. Servlet/JSP) and I do not want to have to sign any files or request any special permissions.
    Is there another way to accomplish this goal???
    Even if you don't have a good answer, I would appreciate any comments on the matter.
    Eric

    Generate the image from that html page.What would be the best way to generate an image of the
    browser rendered page? This is another issue I have
    struggled with.Ok, using a JEditorPane it is possible to render a HTML Page. Like all other Swing components it inherits the paintComponent method from JComponent. Simply generate an offscreen image and get its graphics context. Now you can pass this Graphics object the paintComponent and you get an image of your HTML page.
    Just make sure your offscreen image has the correct size. I guess this information is available from the JEditorPane.
    Use a PixelGrabber to get the image data and scan itfor the area the
    default.gif is placed.How would you use the PixelGrabber to find, or scan,
    for a 'default.gif' or multiple 'default.gif's? This
    too is an issue I have tried to wrap my mind around.This is the tricky part of it. Using the PixelGrabber you should get an array of pixel values. If you iterate thru this array it should be possible to find the pixel values of the default.gif (at least, if you choose a colr for your default.gif that does not appear in your HTML page incliding the other images).
    Now you have to replace those pixels with the pixels you have generated for your applets.
    J&ouml;rg

  • Problems with image field and java

    Hi, i´m a beginner user of Adobe LiveCycle Designer, i create a form and i fill the text fields with a Java code, but when i try to dinamically assign a image on the image field of my form it doesn´t work, someone have any idea of whats happening or how can i manipulate the image field from Java code? thanks

    Session data will only last as long as the servlet container allows. In most cases (eg Tomcat) this defaults to about 30 minutes, but can be changed. Check that the session timeout configuration in your servlet container hasn't been set to "never timeout".
    Even if it had, I would have expected OutOfMemory errors rather than degrading performance. Although if the max heap size of the JVM has been set to a level higher than the RAM on the machine you could be getting excess page file usage.
    This probably wouldn't put CPU utilization at 99% though.. I suspect this is a code related problem.
    My best guess is one of two reasons:
    1. Somewhere in your code, or someone elses, there is a loop that never ends.
    2. There is a bug in the servlet container.
    I don't know which servlet container you are using, but I have used Tomcat extensively and never seen this behaviour.
    In terms of solving this problem, that's a tough one. I would try running the entire application within a profiling tool to see which threads are clogging up the processor. The Eclipse java IDE has a plugin called Eclipse Profiler which will allow you to track the utilization of code right down to the method level.
    If it were me, I'd be running the entire web application with a profiler like Eclipse Profiler and waiting for it to start clogging, then see who the guilty code is.

  • SAP JAVA GUI 7.00rev5 and IXOS

    After upgrading to Java GUI 7 rev5  from Java GUI 630rev4 our IXOS viewer no longer works when called from within our R/3 system. This is also true when upgrading to any Java Gui 7 revision release.
    The above works using Windows GUI 7.10 with IXOS.
    Has archiving functionality been removed from Java 7?

    Hello Robert,
    please file a <a href="https://service.sap.com/message">bugreport</a> on component BC-FES-JAV and attache a trace file with following tracekeys (<a href="https://service.sap.com/sap/support/notes/683960">note 683960</a>) activated: CALL:EVENT:INFO:DESKTOP:GMUX:C_GMUX
    Best regards
    Rolf-Martin

  • Calling C prog. from Java prog.

    Hi.
    I have a java GUI program as a interface. User can enter data, then java prog calls a C program and at the end the java GUI shows the returned parameters of C prog. The question is: how can I call C prog from Java GUI?
    Thanks

    "Calling a program" is not standard terminology, so I'm not sure what you're asking.
    Do you want to call a function in a DLL (most likely written in C) inside your Java code? Yes, that's JNI.
    Or do you want to execute a program (which may happen to have been written in C, but the language doesn' matter) from inside you Java code? That's [Runtime.exec|http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html].

  • How to cache images retrieved from MDM on Java WebAS

    Hello Colleagues,
    We have a scenario where we are trying to retrieve image records from the MDM using Java APis. Instead of hitting the DB everytime, is there a way to implement caching? For instance, is it possible to cache the images on the java WebAS and return the path of the images instead of returning the byte stream everytime?
    Thanks and Regards,
    Nisha
    Edited by: Nisha NC on Sep 1, 2009 7:35 AM

    Hi Nisha,
    You can use the Class ObjectCache from the Java API.
    For more information please refer to:
    http://help.sap.com/javadocs/MDM71/current/API/index.html
    Hope this helps,
    Idan

  • Live view from java to flex - blinking image

    i am trying to simulate a live view using a canon Camera.
    I am interacting with the cam using the CanonSDK, i get an image every a short period in order to simulate a video frame by frame. This works fine, i am using java to do the backend and send the images trough BlazeDS to flex.
    The problem is not getting the image, the problem is that when i load a new image using something like:
    image.source=my_new_image;
    the new image is loaded but it produces a short white blink and it ruins the video...So i would like to know if there is a way to use channels of streaming or some way to pass the set of images in live view to flex and show them in the interface of flex from java.
    Thank you very much!
    Agustina

    I have this same problem in an SWF that I have an external image loading into. In another SWF, I don't have this problem. In one instance, the image is at the start of the movie clip and at the other it's on the last frame of the movie clip. My only suggestion would be to load as many of the images as you can off-screen and then put listeners on the images to know they are loaded before you show them. You can do that by:
    this.addElement(image);
    image.addEventListener(FlexEvent.UPDATE_COMPLETE, imageLoaded);
    private function imageLoaded(event:Event):void{
    //image is loaded...

  • Searching through a database table from a java GUI

    i've created a java GUI using Netbeans which connects to a derby database. a table from this database is placed in my GUI, containing some text in all its rows. Now, i want to create a search function that will look for a given string of text through this table and output the results somewhere. can anyone please give me some tips on how i might go about doing this?
    thanks,
    Karan

    You may put a radio button or check box next to the column name.
    You can also put a drop down list contains option "start by", "end by", "contains" matched to SQL like statement, '%XX', 'XX%' and '%XX' respectively.
    You may also make the column name as a button which user can selected the ordering preference - ascending, descending, default.

  • Troubles with launching Java GUI from C++

    Hi,
    I'm launching a Java program from my C++ program (in linux). For C++ I'm using the Xm library for the GUI. When I want to instantiate a new Java object, I get the following error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4015C475
    Function=XmRenderTableFree+0x15
    Library=/usr/X11R6/lib/libXm.so.2
    This is a backtrace (see #17):
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 1024 (LWP 19643)]
    0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    (gdb) backtrace
    #0 0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    #1 0x40153cd9 in XmFontListFree () from /usr/X11R6/lib/libXm.so.2
    #2 0x4c6ed4c4 in Java_sun_awt_motif_MComponentPeer_pSetFont () from
    /localhost/packages/java/j2sdk1.4.0/jre/lib/i386/libawt.so
    #3 0x423b6129 in ?? ()
    #4 0x423aef93 in ?? ()
    #5 0x423aef93 in ?? ()
    #6 0x423aef93 in ?? ()
    #7 0x423aef93 in ?? ()
    #8 0x423aeebc in ?? ()
    #9 0x423aef93 in ?? ()
    #10 0x423aef93 in ?? ()
    #11 0x423ac195 in ?? ()
    #12 0x404d6156 in JavaCalls::call_helper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #13 0x40570ccd in os::os_exception_wrapper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #14 0x404d62a4 in JavaCalls::call () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #15 0x404de12d in jni_invoke () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #16 0x404de94e in jni_NewObjectV () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #17 0x0804d27b in JNIEnv_::NewObject (this=0x819af2c, clazz=0x819b938,
    methodID=0x8293af8) at /localhost/packages/java/j2sdk1.4/include/jni.h:840
    #18 0x0804cb0a in AppletViewer::AppletViewer (this=0x81a5628,
    appletA=0x8193438) at AppletViewer.cc:227
    #19 0x0804e17b in Applet::move (this=0x8193438, drawX=18, drawY=25,
    drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at Applet.cc:329
    #20 0x0808b852 in PageAttrs::moveApplets (this=0x8192dd8, drawX=18,
    drawY=25, drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at
    Page.cc:321
    #21 0x080ae6ab in XPDFCore::moveApplets (this=0x81698d0) at Page.h:190
    #22 0x080ac87f in XPDFCore::displayPage (this=0x81698d0, pageA=2, zoomA=1,
    rotateA=0, scrollToTop=1, addToHist=1) at XPDFCore.cc:585
    #23 0x080acac3 in XPDFCore::gotoNextPage (this=0x81698d0, inc=1, top=1) at
    XPDFCore.cc:670
    #24 0x080b3901 in XPDFViewer::nextPageCbk (widget=0x8149ff0, ptr=0x81408e8,
    callData=0xbffff6d0) at XPDFViewer.cc:1229
    #25 0x401df59e in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6
    #26 0x400b5803 in ActivateCommon () from /usr/X11R6/lib/libXm.so.2
    #27 0x400b5689 in Activate () from /usr/X11R6/lib/libXm.so.2
    #28 0x4020c453 in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #29 0x4020cd3e in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #30 0x4020cdf4 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
    #31 0x401ea462 in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
    #32 0x401ead7e in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
    #33 0x401eafc8 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
    #34 0x401eb3d9 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
    #35 0x080ab04c in XPDFApp::run (this=0x81175b0) at XPDFApp.cc:299
    #36 0x080b8eef in main (argc=2, argv=0xbffffa84) at xpdf.cc:283
    Now here's the interesting thing: in the constructor of my Java class there's a call to pack() to initiate my Java GUI. When I remove that call everything works fine (but then I haven't got a GUI though). setVisible(true) in the Java code also gives that problem.
    Has C++ or the Xm library some troubles with the Java GUI? Or what the hell is going wrong?
    PS: On Solaris, the very same code works perfectly...

    I really need a solution.
    Is it possible it has something to do with threads?
    Do I have to do AttachCurrentThread or something like that? Is that necessary?
    Btw, I assigned 10 duke dollars to this topic.

Maybe you are looking for