Accessing XMLType and CLOB from Enterprise Java Beans

When trying to create a temporary CLOB within the application server the following exception
occurs (connection from Jndi):
Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
AccessEJBBean.meld: ex=java.lang.NullPointerException java.lang.NullPointerException      
at oracle.sql.LobPlsqlUtil.plsql_createTemporaryLob(LobPlsqlUtil.java:1352)      
at oracle.jdbc.dbaccess.DBAccess.createTemporaryLob(DBAccess.java:997)      
at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:240)      
at oracle.sql.CLOB.createTemporary(CLOB.java:527)      
at com.access.impl.AccessEJBBean.meld(AccessEJBBean.java:67)      
(email: [email protected] )

When trying to create a temporary CLOB within the application server the following exception
occurs (connection from Jndi):
Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
AccessEJBBean.meld: ex=java.lang.NullPointerException java.lang.NullPointerException      
at oracle.sql.LobPlsqlUtil.plsql_createTemporaryLob(LobPlsqlUtil.java:1352)      
at oracle.jdbc.dbaccess.DBAccess.createTemporaryLob(DBAccess.java:997)      
at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:240)      
at oracle.sql.CLOB.createTemporary(CLOB.java:527)      
at com.access.impl.AccessEJBBean.meld(AccessEJBBean.java:67)      
(email: [email protected] )

Similar Messages

  • Accessing RFCs and BAPIs from enterprise java beans

    Hello folks,
         my question is concerning comunication between EJBs and RFCs. I want to develop a simple session bean that connects to a R/3 back-end, calls a RFC then returns some data, let's say, an example of this could be a list of employees from BAPI_EMPLOYEE_GETDATA.
         Ok, by using a web dynpro and adaptive RFC my works could be very very easy, but I'd like to test this way: session (stateless) EJB -> RFC. Can I:
    *     use JCO.ClientService with a non-portal SAP WAS?
    *     use embedded JRA (SAP Library stated "The SAP JRA is an add-on for the SAP JCo. If you use      the SAP Web AS, the SAP JRA is installed automatically with the SAP JCo.", but I found      nothing so in Connector Container Service ...)
    *     install and configure JRA by myself?
    I'm working on a SAP WAS 6.40 Sneak Preview (Java only), and finding a path for easily integrate SAP WAS developed ejbs and external business system. SAP Library suggest to "obtain the JCo connection through the connection framework": is it related to JRA, JCA and SAP Resource Adapter?
    Thank you
    Pasquale

    hello
    i´ve written a simple stand alone client to test jra connection to a sap system
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.Properties;
    import javax.resource.cci.Connection;
    import javax.resource.cci.ConnectionFactory;
    import javax.resource.cci.Interaction;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import javax.resource.cci.ResultSet;
    import javax.resource.spi.ManagedConnectionFactory;
    import com.sap.mw.jco.jra.*;
    public class Example
         public void exampleTest()
              Properties properties = new Properties();
              Connection   connection=null;
              try
                   properties.load(new FileInputStream ("props.txt"));
              catch(Exception e)
                   System.out.println("properties could not be loaded");
                   e.printStackTrace();
              try
                   ManagedConnectionFactory mf = new JRA.ManagedConnectionFactoryImpl(properties);
                   ConnectionFactory cf = (ConnectionFactory)mf.createConnectionFactory();
                   connection = cf.getConnection();
                   RecordFactory rf = cf.getRecordFactory();
                   Interaction interaction = connection.createInteraction();
                   MappedRecord request      = rf.createMappedRecord("STFC_STRUCTURE");
                   // Since the STFC_STRUCTURE does not create any new records
                   // in the data base, you do not need to start a trancation here.
                   // fill out a structure with dummy data
                   MappedRecord importstruct = (MappedRecord)request.get("IMPORTSTRUCT");
                   importstruct.put("RFCFLOAT","1.23456");
                   importstruct.put("RFCCHAR4","ABCD");
                   importstruct.put("RFCINT1", "11");
                   importstruct.put("RFCDATE", "2001-08-24");
                   // fill out a table with dummi data
                   ResultSet rfctable = (ResultSet)request.get("RFCTABLE");
                   for (int i = 0; i < 10; i++)
                        rfctable.moveToInsertRow();
                        rfctable.updateString("RFCCHAR4","EFGH");
                        rfctable.updateInt("RFCINT1", i);
                        rfctable.updateString("RFCDATE", "1961-08-24");
                        rfctable.updateDouble("RFCFLOAT",1.65432);
                        rfctable.insertRow();
                   // call defined RFC and cast the result to the optional ResultMap interface
                   ResultMap response = (ResultMap)interaction.execute(null,request);
                   // release resources
                   interaction.close();
                   // create an xml file from the output of the called RFC
                   // the optional interface ResultMap offers additional methods, like writeXML
                   FileOutputStream os = new FileOutputStream(response.getRecordName() + "_Structure_from_NotManaged_Example.xml");
                   response.writeXML(new java.io.OutputStreamWriter(os,"UTF-8"),true);
                   os.close();
                   ResultSet resultSet = (ResultSet)response.get("RFCTABLE");
                   System.out.println("Name of the table is: "+resultSet.getRecordName());
              catch (Exception ex)
                   ex.printStackTrace();
                   System.exit(1);
              finally
                   if (connection != null)
                        try
                             connection.close();
                        catch(Exception exception1)
         public static void main(String[] args)
              Example anExample = new Example();
              try
                   anExample.exampleTest();
              catch(Throwable t)
                   t.printStackTrace();
    the property file looks like this:
    jco.client.client=010
    jco.client.user=user
    jco.client.passwd=pass
    jco.client.ashost=your host
    jco.client.sysnr=00
    but this only an example for a standalone test client
    to use jra inside j2ee first deploy the connector with the settings you need and then get a connection to it using jndi
    i don´t have an example at hand for using it inside an ejb or servlet, but if you need one i'll have a look

  • Persisting Oracle BLOBs & CLOBs from a CMP Bean

    Can someone tell me how to persist Oracle BLOBs and CLOBs from a CMP Bean?
    Thanks,
    Abel

    A link to the answer might be helpful.
    Dave
    "Abel Rosnovski" <[email protected]> wrote in message
    news:[email protected]..
    >
    >

  • The differents between Java Beans and Enterprise Java Beans

    Please help me!
    What is the differents between JavaBeans and Enterprise Java Beans (EJB) ?
    Thank's for your answer

    Enterprise Java Beans are special type of java beans.
    EJBs invented to be used via remote VMs or remote computer
    systems.They must be deployed on server to become accesible for remote
    clients.

  • What is an enterprise java bean

    Hi,
    What is an enterprise java bean. How is it different from normal java means.
    Thanks a lot,
    Chamal.

    Well an EJB is a object components that lives in the server's container's guts, there are 3 kinds of EJB:
    * Session Beans: performs bussines operations
    * Entity Beans: represents a table from a relational database
    * Message Driven Beans: receives and controlls messages.
    more information about it can be found at: http://java.sun.com/products/ejb/reference/docs/index.html

  • Missing Enterprise Java Beans Node

    I downloaded the Studio Creator 30 day trial version.
    But In the server navigator pane there is no Enterprise Java Beans node listed.
    How can I enable the Enterprise Java Beans Node in Studio Creator? Or is it a limited version?
    Please reply asap.
    Thanks in advance

    Hi.
    Porduct version information was as follows....
    Java Studio Creator(Build 040903).
    Does this mean that I need to upgrade my IDE to update 7?
    Thanks a lot for the reply. I almost spent half a day trying to enable the Enterprise Java Beans Node using creator options.
    And can I deploy an ear file to creator which I have compiled using JDK1.5?
    Thanx again.
    Look forward to hearsing from u soon,
    Kevin

  • How to access AM/VO instance from a Java Service class

    Hi,
    I have a Java service class that is loaded by Java ServiceLoader (http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) at run time, and I need to access database tables inside that service class. So is there any way that I can access AM/VO instances from that Java class in order to read database table? Thanks.
    Regards,
    K Hein

    You can access an application module with the the two methods below:
        YOURAppModule mAM;
        public void setUpAM()
            throws NamingException
            try
                String AMDefName = "YOUR_APP_DEF_NAME";
                Hashtable env = new Hashtable(2);
                env.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
                env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
                ApplicationModule am = null;
                InitialContext ic = new InitialContext(env);
                ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(AMDefName);
                am = home.create();
                // Connect the AM to a database connection
                String jndiDB = "jdbc/HRDS";
                am.getTransaction().connectToDataSource(null, jndiDB, false);
                boolean connected = am.getTransaction().isConnected();
                mAM = (YOURAppModule) am;
            catch (NamingException nex)
                // do some error processing
                throw nex;
            catch (Exception eee)
                // do some error processing
                throw eee;
        public void tearDownAM()
            if (mAM != null)
                if (mAM .getTransaction().isConnected())
                    mAM .getTransaction().disconnect();
                    mAM .remove();
        }You find the YOUR_APP_DEF_NAME in your application module under 'Configurations' -> AppModuleJndiName.
    Make sure you tear down each AM you set up. Otherwise you are running out of resources pretty fast.
    Timo

  • Enterprise Java Beans

    Hi,
    I am a java programmer. I have worked with applets,
    servlets, jdbc, etc., but I have never worked with EJB's
    Is there a good tutorial of it? Does it depend on certain
    API's? Where can I find the classes? I would like to learn
    and to develop some applications with EJB's. I will appreciate a lot if someone give me the 1,2,3... of EJB's.
    Thanks in advance

    There are suspisiously many tutorials and materials on the Web about EJB.
    The principals ones are at Sun's J2EE site:
    http://java.sun.com/j2ee/tutorial/doc/J2eeTutorialTOC.html
    PetStore Demo
    http://java.sun.com/j2ee/download.html#blueprints
    JGuru Exercises:
    http://developer.java.sun.com/developer/onlineTraining/EJBIntro/exercises.html
    Also, look at TheServerSide.com
    http://theserverside.com/home/index.jsp
    Tutorial on Monson-Haefer "Enterprise Java Bean" book:
    http://www.techquestion.net/ejbs/cabinbean1.html
    Be careful, however, sometimes it is difficult to repeate
    what you have in tutorial.
    Good luck,
    Jacob Nikom

  • Using Enterprise Java Beans

    Hi Guys,
    Ive built a system which uses 8/9 servlets and connects to a postgres database, reads csv files and a few other things, now Ive been asked to implement this using java enterprise beans, how easy/difficult is this? how would I go about it and whats the advantages of using enterprise java beans?
    Thanks
    Tzaf

    Can anyone help?
    Thanks
    Tzaf

  • Accessing custom Portal service from a java application

    We have a custom portal service that connects to BW using xmla. How do you access this portal service from a java application. Not from web dynpro, jsp or servlet but from the java code.
    Can we use the INITIAL_CONTEXT_FACTORY to get access to the portal service.
    Thank You
    D.K

    Now I tried the following:
    I've added the prtapi.jar and the service's jar to the additional-lib folder and added the appropriate entries to library.txt and reference.txt.
    Now I can obtain now the PortalRuntime, but this is not initialized.
    Has anybody a solution for this problem? Help would be high appreciated!
    Regards,
    Matthias

  • How to call a .jar file from a java bean?

    any body knows how to call a .jar file from a java bean?

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=4349619

  • How do I access photoshop and illustrator  from the creative cloud on my i mac?

    how do I access photoshop and illustrator  from the creative cloud on my i mac?

    Log in to your Cloud account to be able to download and install
    Some general information
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    what is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud/topics/getting-started.html

  • Adding new enterprise java beans in STUDIO CREATOR

    I downloaded the 30 days trial version of Studio creator.
    In my server navigator pane there is no Enterprise Java Beans node. How can I enable this node

    Hi,
    Can we consider this a duplicate thread of :
    http://swforum.sun.com/jive/thread.jspa?threadID=53446&tstart=0
    Thanks,
    RK

  • Accessing a JSF element from a back bean method

    Hi,
    short question, can I access the JSF element from a back bean method?
    So, for example, if I have the following JSF code:
    <h:panelGroup id="test1" rendered="#{bean.someMethod}">...</h:panelGroup>
    <h:panelGroup id="test2" rendered="#{bean.someMethod}">...</h:panelGroup>
    <h:panelGroup id="test3" rendered="#{bean.someMethod}">...</h:panelGroup>
    Can I found out in some way, which element (esp. which ID) calls the someMethod-method?
    Kind regards
    Matthias

    There are more possibilities as well. If you depend it on for example the User's rights/groups, then you can also do for example:
    rendered="#{user.admin}" // getter = public boolean isAdmin()
    rendered="#{user.groupName == 'admin'}" // getter = public String getGroupName()
    rendered="#{user.groupId > 1}" // getter = public int getGroupId()
    rendered="#{fn:contains(user.groups, 'admin')}" // getter = public String[] getGroups() or public List<String> getGroups()
    etc..I think it's after all just a matter of learning about the capabilities of EL a bit more.

  • Code for using thin client over connection pool to access blob and clob

    Hi,
    Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to access blob
    and clob data. As the performance for concurrent users is very bad, I like to
    use the thin client over a connection pool to access the blob and clob instead.
    My question is whether this is possible and if so does anyone have a sample code?
    Thanks.
    This is urgent as the site has to roll out in 2 weeks..
    Rgd,
    Jason

    See http://e-docs.bea.com/wls/docs61/jdbc/thirdparty.html#1043705.
    "Jason" <[email protected]> wrote in message news:3eba851f$[email protected]..
    >
    Hi Stephen,
    Thanks for the reply. Can I confirm that what you are saying is that in release
    6.1 I am able to access blob/clob data via thin client over connection pool?
    Rgd.
    Jason
    "Stephen Felts" <[email protected]> wrote:
    Blob/clob support through the connection pool came in with release 6.1.
    "Jason" <[email protected]> wrote in message news:[email protected]..
    Hi,
    Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to accessblob
    and clob data. As the performance for concurrent users is very bad,I like to
    use the thin client over a connection pool to access the blob and clobinstead.
    My question is whether this is possible and if so does anyone havea sample code?
    Thanks.
    This is urgent as the site has to roll out in 2 weeks..
    Rgd,
    Jason

Maybe you are looking for

  • How to use Mobile VOIP on BB9300

    Please guide me how to use mobile VOIP to make call from BB9300. Please advise

  • MTS thumbnails not displaying in PrE9

    I have a thumbnail problem. I just bought PrE9 because I was unhappy with Studio V14's slow/jerky performance with AVCHD.  I have a Canon HF20 and used Windows to move the videos (MTS's) over to my harddrive.  They are all HD videos in MTS format.  M

  • Error : idoc xml data record : in segment attribute instead of SEGMENT

    hi all i am doing the file to idoc scenario. in that i am getting the error error : IDOC XML Data record : In segment attribute instead of SEGMENT i am doing this scenario since 4 days. can anyone help me thanks a lot Vasu

  • Size of macbook air case?

    I am designing a decal for a friend and i wanted to know if there was any good templates for photoshop to use to design the decal. i need a tmplate with the apple logo on it. if not can someone tell me the exact size of the back of the macbook air 13

  • Zip Code in cell

    When I typed a zip code into one of the cells in my spreadsheet, the zero at the beginning was deleted.  how do I get it back?