How to get connection of the db lite from java stored procedure?

Hello! All.,
I have a written java stored procedures to assign sequence keys, and update some tables. The procedure is working as per our need by using the following connection information.
try {
int rowFetched = 0;
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
// connect to the database
Connection conn = DriverManager.getConnection("jdbc:polite:polite",
"system", "manager");
My question is, It is possible in db lite to get a default connections like we use in the enterprise database
conn = new OracleDriver().defaultConnection();
Could anybody please shed some light on this.
Thanks in advance.
Kathir

Hello Upi! out of curiosity if you happen to know the answer for the following, I do appreciate it.
Hello! We are using BC/ADF JClient to select and for any DML operation against Oracle Lite database. We may have more than one user(s) log on to our application, so we requires to authenticate oracle lite user credential using JDBC dynamically.
I am utilizing the features of JCLoginDialog.java and manipulation bc4j.xcfg file. This work real good for accepting username/password credentials dynamically, since we have multiple database in one computer I have to accept DSN name and if possible built my own configuration file.

Similar Messages

  • HT3702 i want to change my region and i don't know how to get rid of the remaing amout from my gift card ($0.48)

    i want to change my region and i don't know how to get rid of the remaing amout from my gift card ($0.48)

    Request that iTunes Support zreo balance your account.
    iTunes Support -
    http://www.apple.com/support/itunes/

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to call EJB deployed on OC4J from java stored procedure?

    Hello,
    I'd like to call EJB from java stored procedure. My example works fine from command line, but the problem seems to be with deployment of this code into database. Especialy I'm wondering how to reference jars like oc4jclient.jar, ejb.jar, ... from java stored procedure.
    Is there some example how to do that ?
    Can You help me please ?
    Many thanks,
    Radim Kolek,
    Eurotel Prague.

    Hi,
    You may want to check up this thread
    Calling JBoss EJBs from Java stored procedure
    Hope this helps,
    Sujatha.
    OTN Group.

  • How to get rid of the old songs from iPhone that do not show up in iTunes?

    Every time I delete my entire iTunes library and sync iPhone with it, my music is still loaded with old songs but do not appear on my iTunes. And when I add new songs to my library, the new songs get mixed with old songs.
    How to get rid of the old songs?

    hey buddy....u have to delete the songs from ur iphone....i have got the same issue.....songs are not showing in itunes!!!!!

  • How to get group when the data source from system instead of UME database

    Hig guys,
    How to get group when the data source comes from backend system instead of UME database?
    I tried to use
    IUMPrincipal RefGroup = WPUMFactory.getGroupFactory().getGroup(groupName);
    But I was not able to get the group. But in "UserAdministrator", I can find this groupName.
    Which kind of API can I use?
    Thanks in advance!
    Regards,
    Liying
    Message was edited by:
            Liying Wang

    Ok,
    try this:
    com.sapportals.portal.security.usermanagement.IGroupFactory ep5GroupFactory = userManagementService.getGroupFactory();
    IGroupFactory groupFactory = UMFactory.getGroupFactory();
    com.sap.security.api.IGroup group = groupFactory.getGroupByUniqueName(groupName);
    IUMPrincipal ep5Principal = ep5GroupFactory.getEP5Group(group);
    This should do the trick,
    Romano
    PS: and thanks for the stars!

  • Help-how can i connect to the XE through my java application?

    Hi, i am trying to connect to the XE through my java application. I have downloaded the jdbc driver tho. but the error occured: cant find the symbol (class oracledatasource not found) . could anyone here tell me what else should i try to fix it? where should i put the jdbc packages ? anyone's prompt reply would be much appreciated! thanks a lot.

    Hi ,thank you very much for your guide.
    i am actually trying to connect to the XE server through my JSP files.
    i download the Oracle jdbc driver packages and put them in the same folder with JSP files. but i did not set the class path tho.
    do i have to set the enviroment variables for the classpath of Oracledatasource class? thanks a lot.
    another problem i got is installing the JDeveloper, it seemed my computer just got stuck there when installing JDeveloper. my laptop is with 256MB memory tho.
    the code i used to connect to the XE server in my jsp file is as below:
    <%@ page language="java" contentType="text/html"%>
    <%@ page import="java.sql.*" %>
    <%@ page import java.sql.Connection%>;
    <%@page import java.sql.SQLException%>;
    <%@page import oracle.jdbc.pool.OracleDataSource%>;
    <%@ page import="java.io.*" %>
    <% String jdbcUrl = "jdbc:oracle:thin:@localhost";
    Connection conn;
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(jdbcUrl);
    %>
    dose it have some problems there?
    thanks a lot.
    Message was edited by:
    Novice

  • How to execute a procedure or function from Java Stored procedure

    Hi,
    I am new to Java Stored Procedures. I am working on Oracle 8i and JVM 1.3.1. I want to call a PL/SQL procedure from within Java. I have tried looking at severa; cources but they are quite high level for me. Can someone provide a simple example including the Source Code for .java file and also the calling function's code?
    Heres a sample of what I have been working on: I an including Java code, and Function code and how I call the function. Instead of doing "select sysdate from dual" I want to do like "create table temp1(var1 varchar2(10))" or similar... like "exec procname(var1)" etc.
    Thanks in advance.
    PS. The variable passed in function is just a dummy variable.
    -----Begin Java code-------
    import java.sql.SQLException;
    import java.sql.PreparedStatement;
    import java.sql.Statement;
    import java.sql.Connection;
    import java.sql.ResultSet;
    //Oracle Extensions to JDBC
    import oracle.jdbc.driver.OracleDriver;
    public class Test2{
    public static String Testing(String d) {
    Connection connection = null; // Database connection object
    try {
    // Get a Default Database Connection using Server Side JDBC Driver.
    // Note : This class will be loaded on the Database Server and hence use a
    // Se[i]Long postings are being truncated to ~1 kB at this time.

    what your after is
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci:@<hoststring>", "scott", "tiger");
    CallableStatement cs = conn.prepareCall ("begin ? := foo(?); end;");
    cs.registerOutParameter(1,Types.CHAR);
    cs.setString(2, "aa");
    cs.executeUpdate();
    String result = cs.getString(1);
    a more complete description can be found in the documentation at
    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/basic.htm#1001934
    Dom

  • How to debug noclassdeferror from java stored procedure.

    Hi,
    I am making use of OracleSoapHttpConnection class to call a webservice from a java stored procedure. I used loadjava to load the soap.jar, everything loaded without any error. We can see the "OracleSoapHTTPConnection" class loaded in the all_objects table, still during runtime we get noclassdeferror. I am not sure on how to set classpath for oracle database jvm.
    Many Thanks.
    Chandana

    Please don't post duplicate messages in the forum. You're just cluttering up the place. How to resolve a noclassdeferror for OracleSoapHttpConnection class
    Cheers, APC

  • How to retrieve 'long' column with 32K length in Java stored procedure

    For some reasons, we are not using CLOB, BLOB, or BFILE to store large objects and I have to live with LONG. So I wrote a Java stored procedure to insert, select and manipulate a LONG column by retrieving the LONG into a java.lang.String class (which happens to be the Java class mapped to the LONG SQL datatype). It all works fine as long as the length of the value being retrieved is less than the magic figure of 32767 bytes (which is the restriction on LONG and VARCHAR2 datatype in PL/SQL as well). So looks like Oracle's implementation of the JVM limits String values to a max of 32767 bytes. Suggestions on how to overcome this limitation (other classes that you suggest or do I have to move to files)?
    Thanks,
    Jeet
    null

    the jvm has nothing to do with it ...
    this is a pol/sql limitation on parameters in stored procedures.
    and java stored procedures require a clal spec that makes the j-s-p look like a pl/qsl stored proc.

  • 8i Lite and Java Stored Procedure

    Has anyone had success running the Java
    Stored Procedure examples with 8i LIte.
    My SQLPLus window alwways dies when the demo sql script triest to attach the stored procedure to the table.
    The line causing error is:
    ++++++++++++++++++++++++++++++++++++++++++
    alter table inventory attach java source "Oracle.lite.INVENTORY" in '.'
    with constructor args(PID,QTY,THRESHOLD);
    +++++++++++++++++++++++++++++++++++++++++++
    I am using Sun JDK1.3 on Windows2000.
    Any help will be highly appreciated.
    null

    Found the issue. jvm.dll was not in the path.
    Bhaven
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Bhaven Avalani ([email protected]):
    Has anyone had success running the Java
    Stored Procedure examples with 8i LIte.
    My SQLPLus window alwways dies when the demo sql script triest to attach the stored procedure to the table.
    The line causing error is:
    ++++++++++++++++++++++++++++++++++++++++++
    alter table inventory attach java source "Oracle.lite.INVENTORY" in '.'
    with constructor args(PID,QTY,THRESHOLD);
    +++++++++++++++++++++++++++++++++++++++++++
    I am using Sun JDK1.3 on Windows2000.
    Any help will be highly appreciated.
    <HR></BLOCKQUOTE>
    null

  • How do I get the returned cursor from a stored procedure to an asp.

    Sorry if this topic has been answered before but I am new to Oracle and ASP. I have been asked to create some stored procedures and access the results from the ASP. I will be passing one variable in and could be getting upto 200 rows returned.
    I have no trouble with the stored procedure but have no clue how to retrieve the data returned by it.

    Assuming that the stored procedure has a single argument, an OUT cursor, you should be able to do
    SQLExecDirect
    {call <stored_proc>() }
    SQLFetch
    SQLGetData
    We'll handle all the 'magic' underneath.
    Justin Cave
    ODBC Development

  • Help:  How to get rid of the default None from Radio buttons?

    Hi, I searched the forum and found a work around for inputSelect. It seemed it does not work for Radio buttons, i.e., inputSelectGroup with multiple=false.
    Please anyone help us to get rid of the none choice for gender among female and male. Thank you very much in advance.
    ZD

    The 'none' choice is automatically displayed for fields that allow nulls.

  • How to get rid of the DC-offset from a signal?

    Hello
    i have a speech signal which i need to process. I have estimated its DC-offset (using the AC-DC estimate vi) to be approximately 126 V. I have read some posts here that some reccomend to just subtract this value from the array of data or use a filter to do it. What is the difference, which one should perform better? I have also broke down my initial array of 50000 samples into sub-arrays of 512. Where should be the best place to get rid of the DC? Once and out from the initial array or later on from the subarrays?
    When someone says subtact that value (DC value) from the signal, what exactly has to be done?
    When using a filter, what shall i be looking for to do?Specifications of it?
    Any help is appreciated

    Hello Lynn
    So you are just saying, get the DC offset since it stays almost constant, from the AC/DC Estimate VI and just subtract it from my initial array at the beginning once and out and further on move with the rest of my process? That's it as it shows in the pic below?
    Attachments:
    untitled.PNG ‏14 KB

  • Getting while running the BPEL process from java

    Hi All,
    We are using the following java code to run the BPM process.
    package callBPMProcess;
    import java.util.Hashtable;
    import java.util.UUID;
    import java.util.List;
    import javax.naming.Context;
    import oracle.soa.management.facade.Locator;
    import oracle.soa.management.facade.LocatorFactory;
    import oracle.soa.management.facade.Composite;
    import oracle.soa.management.facade.Service;
    import oracle.soa.management.facade.CompositeInstance;
    import oracle.soa.management.facade.ComponentInstance;
    import oracle.fabric.common.NormalizedMessage;
    import oracle.fabric.common.NormalizedMessageImpl;
    import oracle.soa.management.util.CompositeInstanceFilter;
    import oracle.soa.management.util.ComponentInstanceFilter;
    import java.util.Map;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.Element;
    import java.io.*;
    public class StartProcess { 
    public StartProcess() { 
    super();
    Hashtable jndiProps = new Hashtable();
    jndiProps.put(Context.PROVIDER_URL, "http://ytytry.4234434.com:7001/soa-infra");
    jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");
    jndiProps.put(Context.SECURITY_CREDENTIALS, "funnyj0ke");
    jndiProps.put("dedicated.connection", "true");
    String inputPayload =
    "<process xmlns=\"http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1\">\n" +
    " <input>hello</input>\n" +
    "</process>\n" ;
    Locator locator = null;
    try { 
    // connect to the soa server
    locator = LocatorFactory.createLocator(jndiProps);
    String compositeDN = "default/Helloworld!1.0";
    // find composite
    Composite composite = locator.lookupComposite("default/Helloworld!1.0");
    System.out.println("Got Composite : "+ composite.toString());
    // find exposed service of the composite
    Service service = composite.getService("bpelprocess1_client_ep2");
    System.out.println("Got serviceName : "+ service.toString());
    // make the input request and add this to a operation of the service
    NormalizedMessage input = new NormalizedMessageImpl();
    String uuid = "uuid:" + UUID.randomUUID();
    input.addProperty(NormalizedMessage.PROPERTY_CONVERSATION_ID,uuid);
    // payload is the partname of the process operation
    input.getPayload().put("payload",inputPayload);
    // process is the operation of the employee service
    NormalizedMessage res = null;
    try { 
    res = service.request("process", input);
    } catch(Exception e) { 
    e.printStackTrace();
    Map payload = res.getPayload();
    Element element = (Element)payload.get("payload");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer();
    transformer.setOutputProperty("indent", "yes");
    StringWriter sw = new StringWriter();
    StreamResult result = new StreamResult(sw);
    DOMSource source = new DOMSource(element);
    transformer.transform(source, result);
    System.out.println("Result\n"+sw.toString());
    System.out.println("instances");
    CompositeInstanceFilter filter = new CompositeInstanceFilter();
    filter.setMinCreationDate(new java.util.Date((System.currentTimeMillis() - 2000000)));
    // get composite instances by filter ..
    List<CompositeInstance> obInstances = composite.getInstances(filter);
    // for each of the returned composite instances..
    for (CompositeInstance instance : obInstances) { 
    System.out.println(" DN: " + instance.getCompositeDN() +
    " Instance: " + instance.getId() +
    " creation-date: " + instance.getCreationDate() +
    " state (" + instance.getState() + "): " + getStateAsString(instance.getState())
    // setup a component filter
    ComponentInstanceFilter cInstanceFilter = new ComponentInstanceFilter();
    // get child component instances ..
    List<ComponentInstance> childComponentInstances = instance.getChildComponentInstances(cInstanceFilter);
    // for each child component instance (e.g. a bpel process)
    for (ComponentInstance cInstance : childComponentInstances) { 
    System.out.println(" -> componentinstance: " + cInstance.getComponentName() +
    " type: " + cInstance.getServiceEngine().getEngineType() +
    " state: " +getStateAsString(cInstance.getState()) 
    System.out.println("State: "+cInstance.getNormalizedStateAsString() );
    } catch (Exception e) { 
    e.printStackTrace();
    private String getStateAsString(int state)
    // note that this is dependent on wheter the composite state is captured or not
    if (state == CompositeInstance.STATE_COMPLETED_SUCCESSFULLY)
    return ("success");
    else if (state == CompositeInstance.STATE_FAULTED)
    return ("faulted");
    else if (state == CompositeInstance.STATE_RECOVERY_REQUIRED)
    return ("recovery required");
    else if (state == CompositeInstance.STATE_RUNNING)
    return ("running");
    else if (state == CompositeInstance.STATE_STALE)
    return ("stale");
    else
    return ("unknown");
    public static void main(String[] args) { 
    StartProcess startUnitProcess = new StartProcess();
    But we getting the fallowing error.Can some body help out us.
    SEVERE: Failed to create a DirectConnectionFactory instance (oracle.soa.api.JNDIDirectConnectionFactory): oracle.soa.api.JNDIDirectConnectionFactory
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at oracle.soa.management.internal.ejb.EJBLocatorImpl.<init>(EJBLocatorImpl.java:166)
         at oracle.soa.management.facade.LocatorFactory.createLocator(LocatorFactory.java:35)
         at callBPMProcess.StartProcess.<init>(StartProcess.java:53)
         at callBPMProcess.StartProcess.main(StartProcess.java:152)
    Caused by: java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
         ... 7 more
    Process exited with exit code 0.
    Thanks in advanced,
    Narasimha.
    Edited by: parker on Mar 27, 2011 11:55 PM

    Looks like you don't have WebLogic classes on the classpath:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
    Other options for creating an instance are to use a web service call or one of the other adapters (e.g. JMS). If you need to directly start a process you might also look at this blog from the ATeam:
    http://redstack.wordpress.com/worklist/
    The specific example for getting the tasks is at: http://redstack.wordpress.com/2011/03/09/implementing-task-initiation/
    Then the real work of creating an instance from the initiator tasks is at: http://redstack.wordpress.com/2011/03/09/creating-the-domain-layer-for-the-worklist/

Maybe you are looking for

  • How can I backup an external hard drive connected to my mac with time capsule?

    The hard drive on my IMac is 500GBytes.  It is just about full.  I have purchased an additional drive to attach to it permanently through the Firewire 800 interface.  My plan is to move my photographs and iTunes to the attached drive.  I currently us

  • Creation of infotype with lengthy fields?

    Hello All, I am trying to create a custom infotype which has fields of length 200 characters. But when I try to create infotype I am getting the following message: 'Field PXXXX-field1 is too long(it has been shortened to 132 bytes)' And one of the fi

  • How to view PDF in web site?

    Hi, I build a web page that has a embedded PDF form.My question is following:      1 If The client have to install adobe reader when the client want to see the PDF form.      2 If the client can get a popup to ask him install Adobe reader when the cl

  • Extracting transaction data using flat files in nw2004s

    Hi BW Gurus, I am trying to load the Infocube from flat file.  flat file is in csv format with comma diliminator,  when i am loading the datasource with the flat file.  flat file is actually consist of 20 columns with column headings, 5 columns has n

  • DATALOAD with EIS from Oracle database - long time

    Hi, We are using EIS 6.2 and an Oracle database with Star Schema. Financial system is the Essbase application.Actually, the dataload takes more then 1:30 hours... That's not acceptable for us.Each month, we have more than 40 millions rows in the fact