Recursivity in Oracle Java Class Generator from XML

I am about to start using Oracle XDK for marshalling/unmarshaling XML documents but
I need to know if the generator will be able to create correctly the java classes
from a DTD that is recursive :
<!-- #[START] -->
<!ELEMENT node ( date, symbol, node* ) >
<!ATTLIST node
name ID #REQUIRED
ref IDREF #IMPLIED >
<!ELEMENT date (#PCDATA) >
<!ELEMENT symbol (#PCDATA) >
<!-- #[END] -->
and also, if given a recursive XML (e.g. one compliant with the DTD presented above)
it will be able to parse correctly the XML into the java classes.
cheers
francesc

well, after having had to try out myself this specific functionality of the
product, I'm happy to say that YES it works and unlike JAXB
(maybe I didn't try hard enough with SUN JAXB) it allows recursivity of complex types.
However, I'm not so happy with the lack of replies in this unattended (or so it seems!) forum
cheers

Similar Messages

  • Java stored proc from proxy Java classes generated from a web service?

    Hi gurus,
    I have searched "Java Stored Procedure" on this forum but could not find what I am looking for, so I have to post again.
    I need to use a web service and my client app is written in PowerBuilder 11 (Sybase), which claims that it will create a datawindow from a web service. Well, it turned out that PB can only handle simple stuff (it works with a very simple wsdl from the internet) but can't handle more complex ones that we need to use. So I am thinking about using Oracle JDeveloper(JDev) to create the web service proxy for the web service and then load it into Oracle as a Java stored procedure so that PowerBuilder can call the procedure. JDev succsfully generated the proxy and a few Java classes. My question is, do I need to load all the classes into the database? If yes, will the reference to the package work? For example, in a JDev generated class (the soap client class), it has package MyJdev.proxy; at the top. Or, will it work if I load all the classes included in package /MyJdev/proxy into the database?
    Thank you very much for any help.
    Ben

    For the java stored proc called from pl/sql, the example above that uses dynamic sql should word :
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE Ref_Cursor_t IS REF CURSOR;
    FUNCTION get_good_ids RETURN VARCHAR2 ;
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t;
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    FUNCTION get_good_ids RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'MyServer.getGoodIds() return java.lang.String';
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t
    IS table_cursor Ref_Cursor_t;
    good_ids VARCHAR2(100);
    BEGIN
    good_ids := get_good_ids();
    OPEN table_cursor FOR 'SELECT id, name FROM TableA WHERE id IN ( ' &#0124; &#0124; good_ids &#0124; &#0124; ')';
    RETURN table_cursor;
    END;
    END MyPackage;
    public class MyServer{
    public static String getGoodIds() throws SQLException {
    return "1, 3, 6 ";
    null

  • Importing java class in to xml

    is there any way to import a java class into an xml file.suppose if I have a class containing all static constants .Anfd if I want this constant vlaues in xml how to do that

    Hi Santha,
    your statement is bit confused,
    This is my understanding
    1. You have one java class file, which is contains the constant values
    2. and you have one more file which is xml, written in Java,
    now you want to take the value from Java class file and put into Xml file.
    If this is ur need, I can help you,
    else let me know clearly,
    With Cheers,
    PrasannA

  • Error editing task sequence: Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" From XML into WMI

    I've started getting an intermittent error editing my Windows 7 OSD task sequence.  Sometimes I can open the TS to edit, but when I try to apply changes I get the error.  Other times I get the error when trying to open the TS.  If I try again
    right away, I still get the error, but if I wait a few minutes and try again sometimes it will open the TS. 
    The error reads:
    ConfigMgr Error Object:instance of SMS_Extended Status{Description = "Failed to load dynamic properties for class \"SMS_TaskSequence_ApplyWindowsSettingsAction\" from XML into WMI";Error Code = 2147943746;File = "e:\\qfe\\nts\\sms\\siteserver\\sdk_provider\\smsprov\\ssptspackage.cpp";Line = 3454;Operation = "ExecMethod";ParameterInfo = "SMS_TaskSequencePackage";ProviderName = "WinMgmt";StatusCode = 2147749889;}
    Coinciding with this error, I show the following entries in the TaskSequenceProvider.log file: 
    [PID: 7608] Invoking method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Failed to protect memory buffer, hr=0x80070542
    TaskSequenceProvider
    Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load node Apply Windows Settings from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "PostInstall" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "Execute Task Sequence" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load XML for the task sequence into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    [PID: 7608] Done with method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Setting status complete:  status code = 0x80070542; Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI
    TaskSequenceProvider
    I exported the task sequence and checked in "object.xml" for the "ApplyWindowsSettingsAction", to see if there was something odd in the xml, but I don't find anything that jumps out as being wrong.  Here's the section of XML for
    that step.  I've removed identifying info, and replaced it with a generic term in bold.
    <step type="SMS_TaskSequence_ApplyWindowsSettingsAction" name="Apply Windows Settings" description="" runIn="WinPE" successCodeList="0" runFromNet="false"><action>osdwinsettings.exe /config</action><defaultVarList><variable name="OSDLocalAdminPassword" property="AdminPassword"></variable><variable name="OSDComputerName" property="ComputerName">%_SMSTSMachineName%</variable><variable name="OSDProductKey" property="ProductKey"></variable><variable name="OSDRandomAdminPassword" property="RandomAdminPassword">false</variable><variable name="OSDRegisteredOrgName" property="RegisteredOrgName">COMPANY NAME</variable><variable name="OSDRegisteredUserName" property="RegisteredUserName">COMPANY NAME</variable><variable name="OSDServerLicenseConnectionLimit" property="ServerLicenseConnectionLimit">5</variable><variable name="OSDTimeZone" property="TimeZone">Central Standard Time</variable></defaultVarList></step><step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="Apply Network Settings" description="" runIn="WinPEandFullOS" successCodeList="0" runFromNet="false"><action>osdnetsettings.exe configure</action><defaultVarList><variable name="OSDDomainName" property="DomainName">DOMAIN.COM</variable><variable name="OSDJoinPassword" property="DomainPassword"></variable><variable name="OSDJoinAccount" property="DomainUsername">DOMAIN ACCOUNT</variable><variable name="OSDEnableTCPIPFiltering" property="EnableTCPIPFiltering" hidden="true">false</variable><variable name="OSDNetworkJoinType" property="NetworkJoinType">0</variable><variable name="OSDAdapterCount" property="NumAdapters" hidden="true">0</variable></defaultVarList></step>
    Is there any other log I should check for a clue on this issue?  What could be causing this error?

    Thanks for sharing that!  I tend to save contacting MS support until after I've exhausted other options.  I'm always afraid that I'll spend the $500 to open a case and then it turns out to be something simple that I would have found if I had just
    kept working on it myself a little longer.
    It looks like that link is for an update released in February as KB3023562.  I downloaded and installed it. I'll try opening/editing/saving the task sequence a few times today to see if the issue is resolved.  
    After I had already installed it, I thought to look up that update in configmgr.  The update is listed as superseded by 2 other updates.  The newest of those is KB3046049, which just installed last night with the other March patches, so it's possible
    that I didn't need to install KB3023562 after all.  

  • Debug java class called from CF?

    I'm experiencing different behaviour with a Java class called from a CF page to the same class called directly from Java code.
    Is it possible for me to step into the Java class and debug it in CF builder if I attach the correct Java source?
    Pressing F5 (step-in) on the line that the method is called just skips straight over.
    Regards,
    Andy

    P5music wrote:
    I would like to be able to make a java application that has a GUI that is a rich web page.That's what applets are for.
    In this case, this page exists on my system and I can open it with my browser.
    This page does many things that are typical of a web page like displaying information and presenting rich and graphical controls
    but some of this controls are connected to a java application, launched from the web page or viceversa.I don't get this "launched from the web page" business. Is that a requirement or are you describing an existing system? Or are you describing somebody else's system whose architecture you want to imitate? Or are you using the word "launched" simply to describe the action of starting an applet?
    It still isn't clear to me what you are trying to describe. But at any rate if you want a Java program to run in your browser, that's an applet. Note that applets can interact with Javascript code in the page they are embedded in. Or if you want to download a Java application which acts as a separate application, i.e. it still runs when the browser is closed, you can use Web Start for that.

  • What is Oracle Java Class Type?

    Hi,
    I read a oaf coding stand document.it said that "Can not use database Java(Oracle Java Class Type)".do anyone know what is Oracle Java Class Type?
    Thanks & Regards
    binghao

    Are you using the internal converer?
    <af:inputText value="#{bindings.MyClobContent.inputValue}"
    label="#{bindings.MyClobContent.hints.label}"
    converter="oracle.genericDomain"
    required="#{bindings.MyClobContent.hints.mandatory}"
    columns="#{bindings.MyClobContent.hints.displayWidth}"
    maximumLength="#{bindings.MyClobContent.hints.precision}"
    shortDesc="#{bindings.MyClobContent.hints.tooltip}"
    id="it2" rows="10">
    <f:validator binding="#{bindings.MyClobContent.validator}"/>
    </af:inputText>
    If it does not work, create & use custom converters as mentioned in the above thread.
    Thanks,
    Navaneeth

  • Custom Java class called from RTF template generates error

    We are running a report in BI Publisher and the report calls a custom developed Java class that is used to bind PDFs together and sent the result to another application.
    On the RTF template we have some XSLT that reads the input XML and sets a variable which is then passed to the Java class. We are however getting the following error when the report is called simultaneously 2 or more times:
    XML-22044: (Error) Extension function error: Error invoking 'JavaClassName': 'java.lang.Error: Cannot interweave overlay template with pdf input, combined number of pages is odd!
    I read this as the real cause of the error is the Java code but I'm not 100% sure. Also I don't understand what the error message means.
    Could someone help out please?
    Many thanks

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • Generic Populating the XML document using Java Class Generator and Reflection

    I am looking for a generic source code in order to convert the data parsed from any tabular text form ( tab delimited for example that maps certain XML Schema created form Database Schema for Oracle.
    I know it is possible to generate XML DTD or XSD from Oracle database table schema by XSU utility from XDK. And also it is possible to create Java source files from an XML DTD or XSD by using XML Clas Generator.
    I believe there must be some generic code that parses tabular text data and converts them to XML format using above mentioned generated Java source files and may be Java reflection mechanism.
    If anyone has any tool or knows any free ware that helps me, I would like to know about it, and I would really appreciate it.

    1. Read the XML file into a DMO object, walk the DOM to find the list, insert your new entry as a child, write the DOM back to a file.
    2. If the XML is not in a file, but in a string, then you can do the same with string input and output.

  • Can I  load Java classes generated by the Web Service Proxy Wizard?

    Hi gurus,
    I am very new to Oracle JDeveloper and I have mainly used it to create and debug PL/SQL procedures. My client app is written in PowerBuilder 11 (Sybase), which claims that it will create a datawindow from a web service. Well, it turned out that PB can only handle simple stuff (it works with a very simple wsdl from the internet) but can't handle more complex ones that we need to use. So I am thinking about using JDev to create the web service proxy for the web service and then load it into Oracle as a Java stored procedure so that PowerBuilder can call the procedure. JDev succsfully generated the proxy and a few Java classes. My question is, do I need to load all the classes into the database? If yes, will the reference to the package work? For example, in a JDev generated class (the soap client class), it has package MyJdev.proxy; at the top. Or, will it work if I load all the classes included in package /MyJdev/proxy into the database?
    Thank you very much for any help.
    Ben

    Thanks again, Bruce.
    What I meant by SOAPElement is that one genereated Java class has this and this class also has the setter for this like this,
    public void setSelection(javax.xml.soap.SOAPElement selection) {
    this.selection = selection;
    And here is the whole class,
    public class CaseSearchByPartyRequest implements java.io.Serializable {
    protected java.lang.String schemaVersion;
    protected java.util.Calendar messageProducedDateTime;
    protected javax.xml.soap.SOAPElement selection;
    protected Restriction restriction;
    public CaseSearchByPartyRequest() {
    public java.lang.String getSchemaVersion() {
    return schemaVersion;
    public void setSchemaVersion(java.lang.String schemaVersion) {
    this.schemaVersion = schemaVersion;
    public java.util.Calendar getMessageProducedDateTime() {
    return messageProducedDateTime;
    public void setMessageProducedDateTime(java.util.Calendar messageProducedDateTime) {
    this.messageProducedDateTime = messageProducedDateTime;
    public javax.xml.soap.SOAPElement getSelection() {
    return selection;
    public void setSelection(javax.xml.soap.SOAPElement selection) {
    this.selection = selection;
    public Restriction getRestriction() {
    return restriction;
    public void setRestriction(Restriction restriction) {
    this.restriction = restriction;
    this.selection is the request that I think I need. And here is the static main method of the soap client class genereated.
    public static void main(String[] args) {
    try {
    MyJdev.proxy.SoapClient myPort = new MyJdev.proxy.SoapClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    } catch (Exception ex) {
    ex.printStackTrace();
    So, if I need to send the request to the web service, do I need to create the request, correct? I have done it through AQ and Messaging Gateway and works fine by manually creating the request xml in PL/SQL, but now I need to get it to work sychronously from the UI. I believe that I need the request (SOAPElement) because that is the only way that I can supply the parameters. I have not see any setters for the parameters other than some setters for user name and password.
    Did I get something wrong here? If I don't supply the "selection", will JDev do it?
    Thanks.
    Ben

  • How to compile the Java classes generated in JAXB

    I am using Windows 2000 Operating System. I found a xjc
    batch file on the sun's java forum.
    I used that to generate classes from XML. After generating
    the classes I could not compile
    the classes each depends on other AND THEY REQUIRE BOTH
    CLASS FILES.
    I will attach the schema file and dtd . Can you explaine me the problem.
    #<transactions.dtd>
    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT transactions (cardtocard*)>
    <!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
    >
    <!ELEMENT tocard (#PCDATA)>
    <!ELEMENT fromcard (#PCDATA)>
    <!ELEMENT fromcardver (#PCDATA)>
    <!ELEMENT amount (#PCDATA)>
    <!ELEMENT transdate (#PCDATA)>
    <!ELEMENT transid (#PCDATA)>
    transactions.xjs
    <xml-java-binding-schema>
    <element name="transactions" type="class" root="true"/>
    <element name="cardtocard" type="class"/>
    </xml-java-binding-schema>
    XML file
    ?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
    <cardtocard>
    <tocard>1111222233334444</tocard>
    <fromcard>6666777788889999</fromcard>
    <fromcardver>567</fromcardver>
    <amount>100.00</amount>
    <transdate>2002-06-04 00:00:00.000</transdate>
    <transid>1111222202</transid>
    </cardtocard>
    </transactions>
    the XJC compiler for windows is
    @echo off
    echo JAXB Schema Compiler
    echo --------------------
    if "%JAVA_HOME%" == "" goto errorJVM
    if "%JAXB_HOME%" == "" goto errorJAXB
    set JAXB_LIB=%JAXB_HOME%\lib
    set JAXB_CLASSES=%JAXB_HOME%\classes
    echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    goto end
    :errorJVM
    echo ERROR: JAVA_HOME not found in your environment.
    echo Please, set the JAVA_HOME variable in your environment to match the
    echo location of the Java Virtual Machine you want to use.
    echo For example:
    echo set JAVA_HOME=c:\jdk1.4.0_01
    goto end
    :errorJAXB
    echo ERROR: JAXB_HOME not found in your environment.
    echo Please, set the JAXB_HOME variable in your environment to match the
    echo location of the JAXB installation directory.
    echo For example:
    echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
    :end

    When you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!

  • Java Class Generator

    Hi
    I found an example code for generating Java class based on the xml file.
    i just want to know which package the following classes belongs to.Here the the classes
    1. DTD
    2.ClassGenarator
    Thanks in advance
    Balaji

    Hi !
    I am facing a similar problem
    I am using classgen version 1.0.1.0.0
    and xmlparser version 2.0.0.1.0....
    everythings in the CLASSPATH...
    I could compile the SampleMain.java in the classgen/samples directory .
    But when i run it with any dtd or the provided widl.dtd i get the following error
    XML Class Generator: Error Attribute Value should start with quote
    Attribute Value should start with quote
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:191)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:97)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:135)
    at oracle.xml.parser.v2.NonValidatingParser.parseAttrValue(Compiled Code
    at oracle.xml.parser.v2.ValidatingParser.parseAttr(ValidatingParser.java
    :418)
    at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(Compiled Cod
    e)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(Compiled Code)
    at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingPars
    er.java:89)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
    arser.java:181)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:142)
    at SampleMain.main(SampleMain.java:45)
    please help !
    thanks
    amit
    null

  • Accessing a java class method from the jsp page.

    Hi im a beginner with jsp and im trying to find a way to access a method of my java class file in jsp page. After searching through the forums i tried to use the usebean tag. Im using apache to host the jsp file.Below is an excerpt of my code and the error message i got. What am i doing wrong? anyone know?
    <%@ page language="java" %>
    <jsp:useBean id="movies" class="movie.Movie" />
    <jsp:setProperty name="movies" property="*"/>
    <%
    movies.getStart("file:///C:/Video/Applications2/sun.mpg");
    response.setContentType("text/xml");
    %>
    exception
    org.apache.jasper.JasperException: Exception in JSP: /View.jsp:7
    4: <jsp:setProperty name="movies" property="*"/>
    5: <%
    6:
    7: movies.getStart("file:///C:/Video/Applications2/sun.mpg");
    8: response.setContentType("text/xml");
    9: %>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: javax/media/ControllerListener

    Hi thanks for responding. Ok i did look through and it was opening some gui. I still need the program to do server side processes so cant use an applet.but i dont need the gui so i revised it and removed the gui. also im using a servlet to call the class now yet i still have the same error. Any ideas?
    Below is the vid2jpg code minus the gui.
    import java.io.*;
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class vid2jpg implements ControllerListener
         Processor p;
         Object waitObj = new Object();
         boolean stateOK = true;
         DataSourceHandler handler;
    int imgWidth;int imgHeight;
         Image outputImage;
         String sep = System.getProperty("file.separator");
         int[] outvid;
         int startFr = 1;int endFr = 1000;int countFr = 0;
         boolean sunjava=true;
         * Static main method
         public static void main(String[] args)
              if(args.length == 0)
                   System.out.println("No media address.");
                   new vid2jpg("file:///C:/Video/applications2/sun.mpg");     // or alternative "vfw://0" if webcam
              else
                   String path = args[0].trim();
                   System.out.println(path);
                   new vid2jpg(path);
         * Constructor
         public vid2jpg(String path)
              MediaLocator ml;String args = path;
              if((ml = new MediaLocator(args)) == null)
                   System.out.println("Cannot build media locator from: " + args);
              if(!open(ml))
                   System.out.println("Failed to open media source");
         * Given a MediaLocator, create a processor and start
         private boolean open(MediaLocator ml)
              System.out.println("Create processor for: " + ml);
              try
                   p = Manager.createProcessor(ml);
              catch (Exception e)
                   System.out.println("Failed to create a processor from the given media source: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if(!waitForState(p.Configured))
                   System.out.println("Failed to configure the processor.");
                   return false;
              // Get the raw output from the Processor.
              p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
              TrackControl tc[] = p.getTrackControls();
              if(tc == null)
                   System.out.println("Failed to obtain track controls from the processor.");
                   return false;
              TrackControl videoTrack = null;
              for(int i = 0; i < tc.length; i++)
                   if(tc.getFormat() instanceof VideoFormat)
                        tc[i].setFormat(new RGBFormat(null, -1, Format.byteArray, -1.0F, 24, 3, 2, 1));
                        videoTrack = tc[i];
                   else
                   tc[i].setEnabled(false);
              if(videoTrack == null)
                   System.out.println("The input media does not contain a video track.");
                   return false;
              System.out.println("Video format: " + videoTrack.getFormat());
              p.realize();
              if(!waitForState(p.Realized))
                   System.out.println("Failed to realize the processor.");
                   return false;
              // Get the output DataSource from the processor and set it to the DataSourceHandler.
              DataSource ods = p.getDataOutput();
              handler = new DataSourceHandler();
              try
                   handler.setSource(ods);     // also determines image size
              catch(IncompatibleSourceException e)
                   System.out.println("Cannot handle the output DataSource from the processor: " + ods);
                   return false;
         //     setLayout(new FlowLayout(FlowLayout.LEFT));
    //          currPanel = new imgPanel(new Dimension(imgWidth,imgHeight));
         //     add(currPanel);
         //     pack();
              //setLocation(100,100);
         //     setVisible(true);
              handler.start();
              // Prefetch the processor.
              p.prefetch();
              if(!waitForState(p.Prefetched))
                   System.out.println("Failed to prefetch the processor.");
                   return false;
              // Start the processor
              //p.setStopTime(new Time(20.00));
              p.start();
              return true;
         * Sets image size
         private void imageProfile(VideoFormat vidFormat)
              System.out.println("Push Format "+vidFormat);
              Dimension d = (vidFormat).getSize();
              System.out.println("Video frame size: "+ d.width+"x"+d.height);
              imgWidth=d.width;
              imgHeight=d.height;
         * Called on each new frame buffer
         int nextframetime = 0;
    private void useFrameData(Buffer inBuffer)
    try
    if(inBuffer.getData()!=null) // vfw://0 can deliver nulls
    if(sunjava) // and with import javax.imageio.*;
    int frametimesecs = (int)(inBuffer.getTimeStamp()/1000000000);
    if(frametimesecs%10 == 0 && frametimesecs==nextframetime)
    nextframetime+=10;
    BufferedImage bi = new BufferedImage(outputImage.getWidth(null), outputImage.getHeight(null), BufferedImage.TYPE_INT_RGB);
    Graphics g = bi.getGraphics();
    ImageIO.write(bi, "png", new File("images"+sep+"image_"+(inBuffer.getTimeStamp()/1000000000)+".png"));
    catch(Exception e){}
         * Tidy on finish
         public void tidyClose()
              handler.close();
              p.close();
         * Block until the processor has transitioned to the given state
         private boolean waitForState(int state)
              synchronized(waitObj)
                   try
                        while(p.getState() < state && stateOK)
                        waitObj.wait();
                   catch (Exception e)
              return stateOK;
         * Controller Listener.
         public void controllerUpdate(ControllerEvent evt)
              if(evt instanceof ConfigureCompleteEvent ||     evt instanceof RealizeCompleteEvent || evt instanceof PrefetchCompleteEvent)
                   synchronized(waitObj)
                        stateOK = true;
                        waitObj.notifyAll();
              else
              if(evt instanceof ResourceUnavailableEvent)
                   synchronized(waitObj)
                        stateOK = false;
                        waitObj.notifyAll();
              else
              if(evt instanceof EndOfMediaEvent || evt instanceof StopAtTimeEvent)
                   tidyClose();
         * Inner classes
         * A DataSourceHandler class to read from a DataSource and displays
         * information of each frame of data received.
         class DataSourceHandler implements BufferTransferHandler
              DataSource source;
              PullBufferStream pullStrms[] = null;
              PushBufferStream pushStrms[] = null;
              Buffer readBuffer;
              * Sets the media source this MediaHandler should use to obtain content.
              private void setSource(DataSource source) throws IncompatibleSourceException
                   // Different types of DataSources need to handled differently.
                   if(source instanceof PushBufferDataSource)
                        pushStrms = ((PushBufferDataSource) source).getStreams();
                        // Set the transfer handler to receive pushed data from the push DataSource.
                        pushStrms[0].setTransferHandler(this);
                        // Set image size
                        imageProfile((VideoFormat)pushStrms[0].getFormat());
                   else
                   if(source instanceof PullBufferDataSource)
                        System.out.println("PullBufferDataSource!");
                        // This handler only handles push buffer datasource.
                        throw new IncompatibleSourceException();
                   this.source = source;
                   readBuffer = new Buffer();
              * This will get called when there's data pushed from the PushBufferDataSource.
              public void transferData(PushBufferStream stream)
                   try
                        stream.read(readBuffer);
                   catch(Exception e)
                        System.out.println(e);
                        return;
                   // Just in case contents of data object changed by some other thread
                   Buffer inBuffer = (Buffer)(readBuffer.clone());
                   // Check for end of stream
                   if(readBuffer.isEOM())
                        System.out.println("End of stream");
                        return;
                   // Do useful stuff or wait
                   useFrameData(inBuffer);
              public void start()
                   try{source.start();}catch(Exception e){System.out.println(e);}
              public void stop()
                   try{source.stop();}catch(Exception e){System.out.println(e);}
              public void close(){stop();}
              public Object[] getControls()
                   return new Object[0];
              public Object getControl(String name)
                   return null;
    below is the servlet code.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class ShowMovie extends HttpServlet {
    String rootURL="http://127.0.0.1:8080/Video/";
    public void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
         //String movie=request.getParameter("movie");
         String movie ="son";
         getStart(movie);
              response.sendRedirect(rootURL+"View.jsp");
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
         public void getStart(String url){
              new vid2jpg(url);
    this is the error from the server. Im using tomkat 5
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(Unknown Source)
         java.security.SecureClassLoader.defineClass(Unknown Source)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         java.lang.ClassLoader.loadClassInternal(Unknown Source)
         ShowMovie.getStart(ShowMovie.java:31)
         ShowMovie.processRequest(ShowMovie.java:14)
         ShowMovie.doGet(ShowMovie.java:22)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

  • Java class call from form

    Hi
    I'm doing single sign on via cookie and I able to get the cookie value and for decrypting I loaded java classes on the back end, When I called via form the jvm is crashing with some frm-92101 error.
    First I want if anybody can help if I have to run any packages to execute java class from forms, I already created pl/sql wrapper class.
    When I execute the function on the backend and got the decrypted value via pl/sql wrapper package but from forms the web servver is crashing, Can any body help.
    Also where do I see the log file location.
    Thanks in advance for the pro's for helping me
    Thanks
    Murthy

    Dump from the application file.
    08/06/23 14:21:58 formsweb: Forms session <10> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 14:52:17 formsweb: Forms session <11> aborted: unable to communicate with runtime process.
    08/06/23 14:52:17 formsweb: Forms session <11> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 15:03:21 formsweb: Forms session <12> aborted: unable to communicate with runtime process.
    08/06/23 15:03:21 formsweb: Forms session <12> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 15:08:21 formsweb: lservlet: destroy
    08/06/23 15:08:21 formsweb: Stopped
    08/06/23 15:08:21 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost))

  • Java class call from Stored Proc or trigger

    Hi Experts!
    I have windows 2K server with Oracle 8i Enterprise Edition installed. Please let me know if I can call a java class from Stored Procedure or Trigger. If there is a way, then help me out with code sample or description.
    Regards,
    Atul
    [email protected]

    Atul,
    Couple of questions to you, off the subject,
    * Why NULL NULL registration?(You already revealed your name at the bottom)
    * Why email at the bottom? This is already a discussion forum.
    To your qn, it is very much possible. It is not something that one can explain in a single thread. It takes your machine setup for JVM, your knowledgebase on JAVA and other things. Please find notes on External Procedure Calls, which should give you a start. If you are running into problems, please come back with specifics.
    Thx,
    SriDHAR

  • Create java class/resource from binary blob in SQL statement

    Is there a way of creating a java class or resource from a binary blob in the CREATE JAVA CLASS statement? Something like:
    CREATE OR REPLACE JAVA CLASS
    USING BLOB 'CAFEBABE0000003100120A0004000D08000E07000F0700100100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000372756E01001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501001152657475726E537472696E672E6A6176610C0005000601001F546869732069732061206E657720737472696E67207269676874206865726501000C52657475726E537472696E670100106A6176612F6C616E672F4F626A65637401000F6175726F72615F6F70745F696E666F002100030004000000000002000100050006000100070000001D00010001000000052AB70001B10000000100080000000600010000000100090009000A000100070000001B00010000000000031202B0000000010008000000060001000000030002000B00000002000C00110000004C00000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009705070397050703';
    I've tried various combinations of casting & convert functions, all of them give an ORA-29506 error 'Invalid query derived from USING clause', and nothing useful is gained from google about this. Is there a way of specifying the class binary in this way?

    You can load Java classes into the database, then create a PL/SQL procedure or function in the database that calls that Java class.
    This leaves you with a standard PL/SQL procedure/function which you can call from Oracle Forms.
    Have a look at the database documentation on how to load a Java class: http://download.oracle.com/docs/cd/A91202_01/901_doc/java.901/a90210/toc.htm

Maybe you are looking for

  • A problem with HttpClusterServlet

              Hi all.           I have a cluster of two wls instances (working ok) and now I wish to put a third one in front of them.           I've registered the HttpClusterServlet as the default servlet:           weblogic.allow.execute.weblogic.serv

  • Drive reading DVDs but not CDs

    My disc drive does not read ANY CDs but does read DVDs. I dont feel that it is 'broken' in the normal sense as it still instantly recognizes my DVDs but for CDs it eats it, spins it three times, and spits it back out. is this a problem I can fix with

  • Bdc rec problem

    please help!! suppose the requirement is to create a bdc rec in devlopment server. but after the rec when i try to see the source code by creating a program as the process is.it is asking me for access key. is there any way to get the source code. Mo

  • Some blank photos in ilibrary

    On good advise i had to rebuild my ilibrary which i dis and it restored my pictures in ilibrary, but a few are coming up completely blank. Just wondering what is causing this

  • Does JNLP Sync up the software from the code base only at the startup?

    Does JNLP Sync up the software from the code base only at the startup? There appears a Source sync every time i startup the jnlp app from shortcut. The users of JNLP application may enable the Internet mid of the application session and fail to get t