Javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB

Hi there,
I'm facing this exception.
My code:
final ReportTemplateAttachment rta = new ReportTemplateAttachment();
FileBlob fb = new FileBlob();
fb.setContentType(attachmentDto.getContentType().getValue());
fb.setCreationDate(sysDate);
fb.setCreationUser(userId);
final SerialBlob blob = new SerialBlob(attachmentDto.getFileVal());//it's a  byte[]
//SerialBlob is of type javax.sql.rowset.serial.SerialBlob
fb.setFileData(blob);
fb.setName(attachmentDto.getFileName());
fb.setLastUpdateDate(sysDate);
fb.setLastUpdateUser(userId);
fb.setLength(blob.length());
rta.setFileBlob(fb);and the object rta will be inserted into another object.
The variable of interest in FileBlob hbm is defined as follows:
<property name="fileData" type="blob">
            <column name="FILE_DATA" />
</property>where the type blob is oracle.sql.BLOB
If I change the oracle.sql.BLOB to javax.sql.rowset.serial.SerialBlob in the hbm, I can insert but when I try to get the blob back I get a deserialize exception so this change is not an option.
but when I save the main Object (a cascade operation) I get the following exception:
org.springframework.jdbc.UncategorizedSQLException:
Hibernate flushing: could not insert: [pt.sc.data.entities.FileBlob];
uncategorized SQLException for SQL
[insert into WP_ADMIN.file_blob (name, content_type, length, file_data, status, creation_user, creation_date, last_update_user, last_update_date, id)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)];
SQL state [null];
error code [0];
An SQLException was provoked by the following failure: java.lang.ClassCastException:
javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB;
nested exception is java.sql.SQLException: An SQLException was provoked by the following failure:
java.lang.ClassCastException: javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOBAny light on the subject?
Thanks in advance,
mleiria

You don't seem to understand the difference between an object model and a database. Hibernate, being an ORM package, works on the object model and will, based on what you request it to do, generate proper SQL statements to get the database part going. But you shouldn't be thinking about databases when using Hibernate; your main focus is the object model. There is no blob, only binary data. Binary data in Java is generally handled through a byte array.
If you want to think in databases where blobs do exist, you should be using JDBC directly, not Hibernate.
(I'm far from being an expert in Hibernate)I would really suggest taking a few hours and reading through the manual. You don't need to be an expert but you should at least know what kind of tool you're working with.

Similar Messages

  • Oracle.sql.STRUCT cannot be cast to oracle.sql.STRUCT

    I met a problem,I use oracle spatial to store geometry,then get it like this:
    STRUCT dbObject = (oracle.sql.STRUCT)rs.getObject("shape");
    JGeometry geom = JGeometry.load(dbObject);
    tomcat 6 told me java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to oracle.sql.STRUCT
    does everyone knows this problem?thanks
    Edited by: 811014 on 2010-11-13 下午9:28
    Edited by: 811014 on 2010-11-13 下午9:28

    Hi, this is a known problem for most Spatial 10g Java APIs with WLS.
    WLS is only certified with 11g DB.
    Instead of using Weblogic JNDI Lookup for Datasource, try the following snippet to create your connection/datasource (with Oracle JDBC thin driver):
    String databaseUrl = jdbc:oracle:thin:@1.2.3.4:1521:yourdbname
    String databaseUser = dbusername
    String databasePassword = dbpassword
    DriverManager.registerDriver(new OracleDriver());
    Connection aConnection = DriverManager.getConnection(databaseUrl, databaseUser, databasePassword);
    For more information, see the following:
    Classcast Exception while using Oracle ARRAYs
    regards,
    jack

  • Exception:org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

    Hi All,
    i am using jdev version 11.1.1.5.0
    and deployed my Adf application on Apache Tomcat 6.0.
    in my use case i have created simple adf application using adf business component. create a vo based on eo and drag-drop on jspx page.
    i have created JNDI data source in Apache server using edit context.xml file and add following line-
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    3.using same data source in my adf applicatioin as -
      right click on AM --> Configuration-->edit-->select connection type jdbc datasource  -->java:/comp/env/jdbc/TestDB  
    4. after that i have deployed my application on apace server but when i have running application i have got following error-
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    i have goggling and find  following solution-
    oracle.jdbc.driver.OracleConnection delConn = (oracle.jdbc.driver.OracleConnection) ((org.apache.tomcat.dbcp.dbcp.DelegatingConnection)c_stmt.getConnection()).getDelegate();
    but my problem is that i'm using Adf Business Component so where i set following type casting.
    Is there any method on ADF BC which handle JNDI Data source setting or any other way to do this.
    thanks in Advance
    Manish

    Hi dvohra21,
    thanks for reply.
    i don't understand where i go to set accessToUnderlyingConnectionAllowed =true
    i have already set this property on context.xml file
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    any other place where i set this propery
    please elaborate this steps how to Configuree DBCP

  • Facing java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController while am using master detail relationship by af:table

    Hi friends,
         We are in to new development in Oracle ADF and newbie to this technology.
         Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and  entity based view).
        Below exception raised when navigating from one  to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
    java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
    at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
    at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi timo,
    Thanks for ur reply...
    we are using unbounded taskflow.
    In Controller class(page def file), we refered the class that implements PagePhaseListener
    The following override methods has created
      public void afterPhase(PagePhaseEvent pagePhaseEvent) {
    //In this area we used to read the session object file which is written and sent by another application(application to application navigate).
    If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
      public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    Is we used Controller class wrongly ???
    Is there any relationship with region controller???
    Mani
    [email protected]

  • Oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.

    HI ,
    I'm using ADF 11g,
    I'm working on individual work space. i have used oracle.adf.model.binding.DCControlBinding in my bean class and working fine .Now one day before i have taken svn version repository project and started working .I made simple jspx with adf table and tool bar button such as Add. When i fire add button i'm calling a method in bean class.
    public String createRecord() {
    // Add event code here... bank_add
    System.out.println("-- create record --");
    BindingContainer bindings2 = ADFUtils.getBindingContainer();
    DCControlBinding dcc = (DCControlBinding)bindings2.get("XbtBankSettlementVOIterator");
    return "banksettlement_add";
    surprisingly i got this error.when my fellow colleague is using same svn repository project and using oracle.adf.model.binding.DCControlBinding it is working fine.
    but why i'm getting this error below.i have followed the same steps to create View Object and Entity Object as previous .
    <ActionListenerImpl><processAction> java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
    javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
         at com.agile.xb.view.managed.BankSettlementDtlBean.createRecord(BankSettlementDtlBean.java:32)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 51 more
    thanks in advance

    Hi Frank,
    I know that JUIteratorBinding is taking ,but how can i change and where could i find . I have import operation binding in my bean and creation of VO and EO object time as i did noraml way .
    sorry can i get some more information.
    thanks in advance .

  • Java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf

    Hi,
    Please help me to understand why this error comes.
    I have deployed ear file into glass fish server.
    Using adf essential in Jdevelepor 11.1.2.3.0.
    [#|2012-12-04T19:17:51.658+0530|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=21;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():JspServlet error: Servlet unable to dispatch to the following requested page: The following exception occurred:java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf.view.rich.model.RegionModel|#]
    [#|2012-12-04T19:17:51.658+0530|INFO|glassfish3.1.2|oracle.j2ee.jsp|_ThreadID=21;_ThreadName=Thread-2;|unable to dispatch JSP page: The following exception occurred:.
    java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf.view.rich.model.RegionModel
         at oracle.adf.view.rich.component.fragment.UIXRegion.getValue(UIXRegion.java:1587)
         at oracle.adf.view.rich.component.fragment.UIXRegion.getRegionModel(UIXRegion.java:415)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:107)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
    Thanks for the help in advance..

    It seems you have used a taskflow on a page and one of the binding.
    It will be easy to point out if you paste the code of region tag *<af:region.......*.

  • Exception:cannot be cast to oracle.jbo.uicli.binding.JUCtrlValueBindingRef

    Hi all,
    Please help -
    I got this exception when try to retrieve a table row from my backing bean:
    Caused by: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding cannot be cast to oracle.jbo.uicli.binding.JUCtrlValueBindingRef
    The line of code in the backing bean caused the error:
    oracle.jbo.uicli.binding.JUCtrlValueBindingRef tableRowRef = (oracle.jbo.uicli.binding.JUCtrlValueBindingRef) this.getTable1().getRowData();
    What bugs me is that the same code works fine in another page's backing bean (see *1) and I can't find out the difference.
    My environment:
    I am using JDeveloper 11. The application I am working on was migrated from a JDeveloper 10g app, so the components are mostly Trinidad. We had to do a lot adjustment to get that app to work in 11g. The working page I mentioned above was done in 10g app (*1).
    I am now adding more things into this app. The app's setup is EJB session beans and Trinidad components now.
    In the jspx page, I have a table which was made up with a view from the database (NOT VO). I have a command link in a column in that table, and would like to get a Id from the row in the table. The line of code causes error above is in the command link's action method.
    Please help if you have any clue.
    Thanks a lot!
    Sophia
    Edited by: user12876081 on Jan 12, 2011 2:40 PM

    Thank you so much Frank! It's just that simple. This is my first post question, although I had always looked up the forum for answers before. I am a big fan of yours. This is such a great experience on my first post. I am having a much better day than yesterday. :-) Thanks again!

  • Oracle.sql.BLOB and oracle.sql.STRUCT

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

  • Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Transform</title>
    <link type="text/css" rel="stylesheet" href="css/CascadeMenu.css">
    </head>
    <body id="Bdy">
    Hello all, I've run into a perplexing problem with a new and unexptected error on a web application that resides in a JDeveloper 11g environment. I just run it from JDeveloper on my laptop. No deployement other than to the default server at run time Integratedweblogicserver. I am doing an XML transform using XSLT and it has been working fine until I tried to use the page yesterday. I get the following error. javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:417) at jsp_servlet.__transform._jspService(__transform.java:109) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at oracle.xml.jaxp.JXSAXTransformerFactory.reportConfigException(JXSAXTransformerFactory.java:759) at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:371) at oracle.xml.jaxp.JXSAXTransformerFactory.newTransformer(JXSAXTransformerFactory.java:272) at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.java:209) at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:145) at jsp_servlet.__transform._jsp__tag2(__transform.java:223) at jsp_servlet.__transform._jspService(__transform.java:102) ... 25 more Caused by: java.lang.ClassCastException: weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:357) ... 30 more ------------------------------------------------ I changed no code or moved any XML or XSLT file. I do see an error in the log regarding a bad URL ----------------------------------------------- XML-22108: (Error) Invalid Source - URL format is incorrect. XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). &lt;[ServletContext@10343785[app:QSBQAR module:QSBQAR-QSBQAR-context-root path:/QSBQAR-QSBQAR-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@699744[ GET /QSBQAR-QSBQAR-context-root/Transform.jsp?reqtype=1 HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; . ------------------------------ Here is the XML ------------------------------ <?xml version="1.0" encoding="windows-1252" standalone="no"?>
    ACME Bird Seed Co. Capture the Road Runner using a boulder, rope and bird seed. Quinn Brian 00 00 00 00 00 00 00 00 00 11 08 08 08 08 00 43 43 Hours have been approved. APPROVED Smart Jean 00 00 00 00 00 00 00 00 00 Hours approved. APPROVED --------------------------------------------------------------------------------------- Here is the XSL --------------------------------------------------------------------------------------- <?xml version="1.0" encoding="windows-1252"?>
    <!-- Root template -->
    <h2>Project Hours Worked</h2>
    ----------------------------------------------------------------------------------------- Here is the JSP with the transform ----------------------------------------------------------------------------------------
    <table>
    <tr>
    <td>Week Ending Date:--</td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Client</th>
    <td></td>
    <th>Project</th>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Last Name</th>
    <th>First Name</th>
    <th>Task</th>
    <th>---</th>
    <th>Sun</th>
    <th>Mon</th>
    <th>Tue</th>
    <th>Wed</th>
    <th>Thu</th>
    <th>Fri</th>
    <th>Sat</th>
    <th>---</th>
    <th>Ttl</th>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>---</td>
    <td>---</td>
    <td></td>
    <td>---</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td>---</td>
    <td></td>
    </tr>
    <tr>
    <td>Total Hours: </td>
    <td></td>
    <td></td>
    </tr>
    <%@ page contentType="text/html;charset=windows-1252"%><%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %></table>
    <script type="text/javascript" src="scripts/CascadeMenu.js">
    </script>
    <% int bad = 1; %>
    <div id="menuBar" class="menuBar">
    <div id="Bar1" class="Bar">Home</div>
    <div id="Bar3" class="Bar">Accounting</div>
    <div id="Bar4" class="Bar">Help</div>
    </div>
    <div style="background:#84ffff; color:Aqua; "><br>
    <br>
    <p style="color:Orange; font-size:x-large; font-style:italic; font-weight:bold;
    font-family:Arial, Helvetica, sans-serif; "><img src="images/logoqsq.jpg" style="border:1" height="120" width="120" alt="Q Squared">
    </p>
    </div>
    <div>
    <p style="color:Black; font-size:x-large; font-style:italic; font-weight:bold; font-family:Arial, Helvetica, sans-serif;"><img src="images/dilbert.gif" alt="Dilbert" height="100" width="100">
    ? ? Welcome to Q Squared-Brian Quinn Consulting - Manager Time Approval</p>
    </div>
    <div>
    <table width="100%" class="table1">
    <tr>
    <td style="width:15%; border-width:medium; background-color:silver ">
    <h3>Contractor Resources</h3>
    <ul style="list-style-type:circle; ">
    <li>Time Entry</li>
    <li>Profile</li>
    </ul>
    <h3>Manager Resources</h

    LOL - I didn't think about the forum message area having trouble displaying my XML XSLT problem
    It seemed to mix the code with the site XML.
    Oh brother
    The deal is this.
    The XML XSLT transform was working and now it is not and I think it has something to do with
    the HTTP links for either the Oracle core and/or XML TAGLIBs. Either that or the W3.org has
    outdated XSLT http links.
    Anyone know if changes have been made to any of these taglib links?
    This in the JSP
    <!--
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked3.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}" />
    -->
    This in the XSL
    <!--
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    -->
    And the other JSP having the same problem.
    <!--
    <%@ page contentType="text/html;charset=windows-1252"
    import="java.util.List, qsbqar.XMLHandler, org.w3c.dom.NodeList,
    javax.xml.transform.*, javax.xml.transform.stream.*,
    org.w3c.dom.Node, oracle.xml.parser.v2.*, java.io.File,
    java.io.FileReader " %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <xsl:param name="employeeID" value="2"/>
    <%session.setAttribute("employee_ID", request.getParameter("consultantID")); %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked4.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}">
    <x:param name="employeeID" value="${sessionScope.employee_ID }"/>
    </x:transform>
    -->
    Edited by: B of Carbon on Dec 19, 2010 12:25 AM

  • NullPointerException and cannot be cast when extended CO!

    Hello!
    Forms develop in to Brazil and I am now entering the area of customization in Oa Framework, forgive my English strange ...
    I have the need to extend the controller ExpSearchCO to include a new filter field search. Just extending ExpSearchCO and without any additional logic error occurs in the super class !!!!
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException return the inside super class
    the line of code is the line informed :oaquerybean.setSimpleSearchInstructionTexts(null);
    trying to deal with this error message appeared
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean cannot be cast to oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
    the snippet is:
    OAFormattedTextBean oaformattedtextbean = (OAFormattedTextBean)oawebbean.findIndexedChildRecursive("SearchInstruction");
    ((OAPageLayoutBean)oawebbean).prepareForRendering(oapagecontext);
    oaformattedtextbean.setText(oapagecontext.getMessage("ICX", s2, null));
    there is some initialization that should be within my custom control or dealings that errors do not occur in the super class?
    ================================================================================
    first error :
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAQueryHelper.processRequest(OAQueryHelper.java:673) at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at
    ## java.lang.NullPointerException at oracle.apps.icx.por.reqmgmt.webui.ExpSearchCO.processRequest(ExpSearchCO.java:56) at xmtd.oracle.apps.icx.por.reqmgmt.webui.XxExpSearchCO.processRequest(XxExpSearchCO.java:54) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAQueryHelper.processRequest(OAQueryHelper.java:673) at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at
    =====================================================================================
    second error
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean cannot be cast to oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at ...
    ## java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean cannot be cast to oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean at oracle.apps.icx.por.reqmgmt.webui.ExpSearchCO.processRequest(ExpSearchCO.java:79) at xmtd.oracle.apps.icx.por.reqmgmt.webui.XxExpSearchCO.processRequest(XxExpSearchCO.java:54) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAQueryHelper.processRequest(OAQueryHelper.java:673) at
    for details of the problem, link with Attach: http://www.4shared.com/file/132642195/f3340a3e/anexo.html
    Edited by: user2019065 on 14/09/2009 14:17

    The question is as follows:
    Within the page oracle /apps/icx/by/reqmgmt/webui/ExpSearchPG 115.27 in iproc.
    Is necessary to include a new filter for search.
    Analyzing the source code finds the need to extend the View Object AllReqsVO to include this new field.
    was necessary to extend the classes
    oracle.apps.icx.por.reqmgmt.webui.ExpSearchCO
    oracle.apps.icx.por.reqmgmt.ExpSearchCriteria
    oracle.apps.icx.por.reqmgmt.server.ExpSrchSvrCmd
    that perform the logic to filter the information.
    However, just extending the class oracle.apps.icx.por.reqmgmt.webui.ExpSearchCO , Not changed anything yet in this class ok !
    The application presents the errors mentioned above during the tests.
    the question is whether there is any procedure to follow when extending a control?
    ake two weeks since my first contact with OA Framework and Java ...
    think it is you are doing wrong, because it is a simple test. you have any tips or documentation about extending controls
    Edited by: EdgarOliveira on 15/09/2009 10:12

  • ClassCastException in oracle.sql.TRANSDUMP with parameterbinding

    We are facing with the following problem when we use Toplink DirectToFieldMapping on a field of java-type java.util.Calendar where the database-type is DATE.
    This exception ONLY occures if we use parameter-binding set to true in sessions.xml
    <should-bind-all-parameters>true</should-bind-all-parameters>
    trace:
    [java] java.lang.ClassCastException
    [java] at oracle.sql.TRANSDUMP.getTransitions(TRANSDUMP.java:41)
    [java] at oracle.sql.TIMEZONETAB.updateTable(TIMEZONETAB.java:456)
    [java] at oracle.sql.TIMESTAMPTZ.toBytes(TIMESTAMPTZ.java:1424)
    [java] at oracle.sql.TIMESTAMPTZ.toBytes(TIMESTAMPTZ.java:1614)
    [java] at oracle.sql.TIMESTAMPTZ.<init>(TIMESTAMPTZ.java:256)
    [java] at oracle.toplink.internal.platform.database.oracle.TIMESTAMPHelper.buildTIMESTAMPTZ(TIMESTAMPHelper.jav
    a:21)
    [java] at oracle.toplink.oraclespecific.Oracle9Platform.setParameterValueInDatabaseCall(Oracle9Platform.java:34
    5)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.prepareBatchStatements(P
    arameterizedSQLBatchWritingMechanism.java:171)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements
    (ParameterizedSQLBatchWritingMechanism.java:135)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.appendCall(Parameterized
    SQLBatchWritingMechanism.java:78)
    [java] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:621)
    [java] at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1400)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(CallQueryMechanism.java:264)
    [java] at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.j
    ava:171)
    [java] at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.j
    ava:188)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMecha
    nism.java:433)
    [java] at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:45)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMe
    chanism.java:596)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryM
    echanism.java:563)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(Datab
    aseQueryMechanism.java:465)
    [java] at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:119)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQuery
    Mechanism.java:258)
    [java] at oracle.toplink.queryframework.WriteObjectQuery.execute(WriteObjectQuery.java:51)
    [java] at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    [java] at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    [java] at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2255)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
    [java] at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:177)
    [java] at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3223)
    [java] at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1092)
    [java] at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1137)
    [java] at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2492)
    [java] at oracle.toplink.jts.oracle9i.Oracle9iJTSSynchronizationListener.beforeCompletion(Oracle9iJTSSynchroniz
    ationListener.java:75)
    [java] at com.evermind.server.ApplicationServerTransaction.callSynchronizationBeforeCompletion(ApplicationServe
    rTransaction.java:1404)
    [java] at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1
    256)
    [java] at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:680)
    [java] at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:1035)
    [java] at StandortFacade_StatelessSessionBeanWrapper28.create(StandortFacade_StatelessSessionBeanWrapper28.java
    :478)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java] at java.lang.reflect.Method.invoke(Method.java:324)
    [java] at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
    [java] at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :192)
    [java] at java.lang.Thread.run(Thread.java:534)
    [java] at connection to localhost/127.0.0.1
    [java] at com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
    [java] at com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1738)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:453)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:333)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :186)
    [java] at java.lang.Thread.run(Thread.java:534)
    [java] 2005-06-28 19:33:03,452 WARN de.dpag.move.stammdaten.cs.StandortDelegate - resetHome
    [java] 2005-06-28 19:33:03,452 ERROR de.dpag.move.client.stammdaten.model.standort.StandortEditDialogModel - Intern
    er Fehler auf dem Server!
    [java] de.dpag.move.infrastructure.exception.InternalException: com.evermind.server.rmi.OrionRemoteException: Trans
    action was rolled back: Error in transaction: java.lang.ClassCastException; nested exception is:
    [java] java.lang.ClassCastException
    [java] at de.dpag.move.stammdaten.cs.StandortDelegate.create(StandortDelegate.java:184)
    [java] at de.dpag.move.client.stammdaten.model.standort.StandortEditDialogModel.createDataAtServer(StandortEdit
    DialogModel.java:235)
    [java] at de.dpag.move.client.stammdaten.model.AbstractEditDialogModel.storeTO(AbstractEditDialogModel.java:124
    [java] at de.dpag.move.client.stammdaten.control.AbstractEditDialogController.okay(AbstractEditDialogController
    .java:127)
    [java] at de.dpag.move.client.common.AbstractDialogController.doApply(AbstractDialogController.java:714)
    [java] at de.dpag.move.client.common.AbstractDialogController$2.apply(AbstractDialogController.java:230)
    [java] at de.dpag.move.client.common.AbstractMDIDialog$4.actionPerformed(AbstractMDIDialog.java:326)
    [java] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    [java] at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    [java] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    [java] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    [java] at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    [java] at java.awt.Component.processMouseEvent(Component.java:5100)
    [java] at java.awt.Component.processEvent(Component.java:4897)
    [java] at java.awt.Container.processEvent(Container.java:1569)
    [java] at java.awt.Component.dispatchEventImpl(Component.java:3615)
    [java] at java.awt.Container.dispatchEventImpl(Container.java:1627)
    [java] at java.awt.Component.dispatchEvent(Component.java:3477)
    [java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    [java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    [java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    [java] at java.awt.Container.dispatchEventImpl(Container.java:1613)
    [java] at java.awt.Window.dispatchEventImpl(Window.java:1606)
    [java] at java.awt.Component.dispatchEvent(Component.java:3477)
    [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    [java] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    [java] Caused by: com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error in transaction:
    java.lang.ClassCastException; nested exception is:
    [java] java.lang.ClassCastException
    [java] at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:
    1602)
    [java] at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553)
    [java] at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
    [java] at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.
    java:22)
    [java] at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocati
    onHandler.java:50)
    [java] at __Proxy5.create(Unknown Source)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java] at java.lang.reflect.Method.invoke(Method.java:324)
    [java] at de.dpag.move.infrastructure.interceptor.MethodCallInterceptor.invoke(MethodCallInterceptor.java:31)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.DelegateAuthentifizierungInterceptor.invoke(DelegateAuthentif
    izierungInterceptor.java:70)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.DelegateExceptionHandlingInterceptor.invoke(DelegateException
    HandlingInterceptor.java:34)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.BadThreadInterceptor.invoke(BadThreadInterceptor.java:27)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.TraceInterceptor.invoke(TraceInterceptor.java:39)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.stammdaten.cs.StandortDelegate.create(StandortDelegate.java:178)
    [java] ... 29 more
    [java] Caused by: java.lang.ClassCastException
    [java] at com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
    [java] at com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1738)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:453)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:333)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :186)
    [java] at java.lang.Thread.run(Thread.java:534)
    we have made a debugging and can see that connection.prepareCall(...) answers an instance of com.evermind.sql.CallableStatementBCELProxy,
    which of course results in the ClassCastException showed above.
    the exception occurs at the class TRANSDUMP in the line where the explicit cast to OracleCallableStatement is done
    oracle.sql.TRANSDUMP is taken from ojdbc14.jar, the recommended one from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    public class TRANSDUMP
    public TRANSDUMP()
    public static byte[] getTransitions(Connection connection, int i)
    throws SQLException
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)connection.prepareCall("begin dbms_utility.get_tz_transitions(?,?); end;");
    NUMBER number = new NUMBER(i);
    oraclecallablestatement.setNUMBER(1, number);
    oraclecallablestatement.registerOutParameter(2, -2);
    oraclecallablestatement.execute();
    byte abyte0[] = oraclecallablestatement.getBytes(2);
    oraclecallablestatement.close();
    return abyte0;
    we use the following settings in our data-sources.xml
    <data-source
              name="FOODS"
              username="scott"
              password="tiger"
              location="jdbc/FOODS"          
              connection-driver="oracle.jdbc.driver.OracleDriver"
              class="com.evermind.sql.OrionCMTDataSource"
              url="jdbc:oracle:thin:@foo-db-1:1545:db1"
              inactivity-timeout="30"/>
    the used sessions.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink Sessions 9.0.4//EN" "sessions_9_0_4.dtd">
    <toplink-configuration>
    <session>
    <name>datenpool</name>
    <project-xml>datenpool.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>jdbc/FOODS</datasource>
    <platform-class>oracle.toplink.oraclespecific.Oracle9Platform</platform-class>
    <uses-native-sequencing>true</uses-native-sequencing>
    <should-bind-all-parameters>true</should-bind-all-parameters>
    <uses-streams-for-binding>true</uses-streams-for-binding>
    <should-force-field-names-to-uppercase>true</should-force-field-names-to-uppercase>
    <uses-batch-writing>true</uses-batch-writing>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-native-sql>true</uses-native-sql>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    <enable-logging>true</enable-logging>
    <logging-options/>
    </session>
    </toplink-configuration>
    environment:
    OC4J: 10.1.2
    Toplink: 9.0.4.5
    JDBC-Driver: ojdbc14.jar for Oracle9i (9.2.0.5) and the needed classes12dms.jar carried with the oc4j10.1.2.0 installation (jdbc\lib\classes12dms.jar.jar)
    Oracle9i: 9.2.0.5
    Is this a problem in our oc4j with toplink and datasource configuration or perhaps a real BUG ?
    Regards,
    Dirk

    Hi everyone, i'm developing an application based on Spring - TopLink combination, in a test enviroment using JDeveloper embedded OC4J, everything works fine, but when i try to deploy the application on OAS 10.1.3.1 (SOA suite), i get the next Exception
    07/12/13 18:13:39 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ToplinkSessionFactory' defined in class path resource [cu-generarprocesoseleccion-app-context.xml]: Initialization of bean failed; nested exception is java.lang.ClassCastException: oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController
    07/12/13 18:13:39 java.lang.ClassCastException: oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController
    07/12/13 18:13:39      at oracle.toplink.platform.server.ServerPlatformBase.initializeExternalTransactionController(ServerPlatformBase.java:194)
    07/12/13 18:13:39      at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:498)
    07/12/13 18:13:39      at org.springframework.orm.toplink.LocalSessionFactory.createSessionFactory(LocalSessionFactory.java:292)
    07/12/13 18:13:39      at org.springframework.orm.toplink.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:52)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
    07/12/13 18:13:39      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:57)
    07/12/13 18:13:39      at com.iqsoft.rrhh.cu_generarprocesoseleccion.business.ejb.GenerarProcesoSeleccionBean.ejbCreate(GenerarProcesoSeleccionBean.java:25)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:262)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:252)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.postConstruct(LifecycleManager.java:113)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionBeanPool.createContextImpl(StatelessSessionBeanPool.java:40)
    07/12/13 18:13:39      at com.evermind.server.ejb.BeanPool.createContext(BeanPool.java:418)
    07/12/13 18:13:39      at com.evermind.server.ejb.BeanPool.allocateContext(BeanPool.java:244)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:25)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    07/12/13 18:13:39      at GenerarProcesoSeleccionEJB_LocalProxy_1heg7kp.registrarProcesoSeleccion(Unknown Source)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:66)
    07/12/13 18:13:39      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    07/12/13 18:13:39      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
    07/12/13 18:13:39      at $Proxy0.registrarProcesoSeleccion(Unknown Source)
    07/12/13 18:13:39      at com.iqsoft.rrhh.cu_generarprocesoseleccion.web.bean.RegistrarProcesoJSFBean.registrarProcesoSeleccion(RegistrarProcesoJSFBean.java:129)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
    07/12/13 18:13:39      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
    07/12/13 18:13:39      at javax.faces.component.UICommand.broadcast(UICommand.java:109)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    07/12/13 18:13:39      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    07/12/13 18:13:39      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    07/12/13 18:13:39      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
    07/12/13 18:13:39      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
    07/12/13 18:13:39      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    07/12/13 18:13:39      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    07/12/13 18:13:39      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/12/13 18:13:39      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/12/13 18:13:39      at java.lang.Thread.run(Thread.java:595)
    As you can see, the problem seems to be the Oracle9iJTSExternalTransactionController class.
    hte sessions.xml, i'm using, is the next:
    <toplink-configuration>
    <session>
    <name>RRHHadmin</name>
    <project-xml>META-INF/IQSOFTDomain/rrhh-deployment-descriptor.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>jdbc/HrDS</datasource>
    <sequence-preallocation-size>50</sequence-preallocation-size>
    <sequence-table>SEQUENCE</sequence-table>
    <sequence-name-field>SEQ_NAME</sequence-name-field>
    <sequence-counter-field>SEQ_COUNT</sequence-counter-field>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    </session>
    </toplink-configuration>
    I'm using TopLink 10, any help would be appreciated

  • Oracle.sql.BLOB ClassCastException

    Hi everyone,
    I'm trying to put a serialized Java object into Oracle. I am following the example here: http://www.oracle.com/oramag/oracle/01-may/o31asktom.html
    Here is my code:
    String sql = "begin " +
          "insert into rdm_logs (datetime, id, machine, ip_addr, action_code, tablename, comments, " +
         "row_before, row_after)" +
          "values (sysdate, ?, ?, ?, ?, ?, ?, empty_blob(), empty_blob()) " +
          "return row_before into ?; " +
      "end;";
    CallableStatement stmt = connection.prepareCall(sql);
    stmt.setString(1, username);
    stmt.setString(2, machine);
    stmt.setString(3, ip);
    stmt.setString(4, action_code);
    stmt.setString(5, table);
    stmt.setString(6, comment);
    stmt.registerOutParameter(7, java.sql.Types.BLOB);               
    stmt.executeUpdate();               
    Object o = stmt.getBlob(7);
    // output class name here
    System.out.println(o.getClass().toString());
    // cast to oracle.sql.BLOB
    oracle.sql.BLOB blob = (BLOB) o;The system output is:
    class oracle.sql.BLOB
    java.lang.ClassCastException: oracle.sql.BLOB
    As you can see, the System.out gives oracle.sql.BLOB as the object class type, so why does it throw an exception when I cast it to be the same?
    Any help would be appreciated.

    As you can see, the System.out gives oracle.sql.BLOB as the object
    class type, so why does it throw an exception when I cast it to be the same?This can happen if the two BLOB classes have been loaded with two different unrelated class loaders. Even though the names of the classes are the same there are two separate classes.
    How to fix this depends... Somehow arrange the JDBC driver to be loaded by the system class loader before any other class loader has a chance to load it?

  • Obtaining an oracle.sql.STRUCT through a pooled JDBC connection

    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection defined in Weblogic. I need the vendor-specific object, rather than simply the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT. I can use reflection on this object to find and call the getVendorObj() method to obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is not a published API and is not guaranteed not to change in future versions.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct through a WebLogic connection pool in WebLogic Server 10?
    Thanks for any advice,
    -Dan Schwemlein

    dan schwemlein wrote:
    Joe,
    Thanks again. With your guidance, I have arrived at the following approach, which I'll post for the benefit of others, and which I'd be thankful if you would validate:
    1) Import the jar com.bea.core.datasource-1.0.0.0.jar from %BEA_HOME%\modules, which is the only location of the class WLConnection, which is the only class with the getVendorConnection() method you refer to.
    2) Get the logical connection from the pooled data source, cast it to a WLConnection, call getVendorConnection() to obtain an OracleConnection (from the ojdbc jar), and use this connection to obtain the required oracle.sql.STRUCT from an OracleResultSet.
    3) Be aware of the limitations and follow the guidelines in the document http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 regarding security, error handling, releasing resources (close only the logical connection), etc.
    Does this sound like the approach you had in mind?
    Thanks again,
    -Danyes.
    Joe
    >
    Re: Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
    Posted: Jul 16, 2007 3:21 PM
    dan schwemlein wrote:
    Thanks for the quick response!I was working today...
    Thank you for the information about the connection being closed.
    I will look into using this configuration setting.
    You say that you can describe a way to get a handle on an unwrapped
    pool object using some documented WLS-specific code. Are you referring
    here to the getVendorConnection() method?yes.
    This method does not help me
    get the oracle.sql.STRUCT object, because even the connection returned
    by getVendorConnection() returns a wrapped WL java.sql.Struct object
    from a call to getObject().I don't believe it. If you are running in WLS, with a local pool,
    the getVendorConnection() will give you the Oracle connection,
    which will give you an Oracle statement, etc, down to an oracle
    STRUCT object. Once you have a direct reference to the oracle connection,
    we're not in the picture when it returns something to you.
    It would be great if getVendorObj() were
    documented and could be counted on in future versions. To use this
    method, one would still have to access it via Java reflection, because
    the wrapper class and its getVendorObj() method would be exposed in an
    API, correct? Could this method be exposed in the API, so that reflection
    doesn't need to be used, or it is exposed somewhere that isn't documented?getVendorObj() is not yet exposed or therefore supported for the general
    wrapped object, so you would have to start from the connection and
    derive all subobjects from it.
    Thanks again,
    -Dan Schwemlein
    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a
    vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection
    defined in Weblogic. I need the vendor-specific object, rather than simply
    the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object
    which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT.
    I can use reflection on this object to find and call the getVendorObj() method to
    obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is
    not a published API and is not guaranteed not to change in future versions.Understood. We all benefit from sticking to the J2EE standards,
    but we could also wish Oracle had done so with it's driver objects.
    I will assume your code is running in the WebLogic server, because
    an external JVM can never access the real driver object, which will
    always really be in the WLS JVM. No active JDBC object is serializable.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct
    through a WebLogic connection pool in WebLogic Server 10?There is no way to get a handle on an unwrapped pool object without using some
    WLS-specific code, though I can describe a way with documented methods,
    and/or I can get our documentation altered to say we'll support the
    getVendorObj() method. We introspect every vendor object, and for those
    implementations that have done the wise thing, projecting any non-standard
    methods as an Interface, we are able to also project that Interface so
    the vndor example code should work. However, in some poorly-done
    cases, such as for some Oracle stuff, there is either no Interface,
    or the Oracle code has extensions that take java.sql objects as input,
    (at least that's the signature of the method) but two lines into the
    method, the Oracle code assumes and casts the java.sql object to a concrete
    Oracle object. In these use cases you need the direct unwrapped object.
    We provide and document Connection.getVendorConnection(), and intend
    getVendorObj() to serve the same for subobjects, but note the dangers
    and responsibilities: We rely on our wrappers to implement the security
    and thread-safety of our pooling system. Because user code can get
    unrestricted access to the actual connection from most JDBC objects,
    we can never trust that we have complete control once a vendor object
    is exposed. Therefore, by default we will close and replace every JDBC
    connection so exposed, as soon as the current thread is finished with
    the pool connection. This hurts performance. We also document a pool
    config setting that will tell us that you take responsibility for any such
    problems, and not to close connections just because they've been exposed.
    HTH,
    Joe
    Thanks for any advice,
    -Dan Schwemlein

  • Oracle.sql.BLOB.setBinaryStream() throws UnsupportedFeatureException

    Does anyone know why oracle.sql.BLOB.setBinaryStream(long pos) throws an UnsupportedFeatureException? It seesm to me that if the method were rewritten as:
    public OutputStream setBinaryStream(long pos) throws SQLException {
         return getDBAccess().newOutputStream(this, getBufferSize(), pos);
    ... then there would be no reason to throw an exception.
    Ideas?
    - David

    Hi Dave,
    I ran into this when I did rs.getBlob(1).setBinaryStream(0) using the ojdbc1_4 driver (without casting to oracle.sql.BLOB). Someone pointed out that I needed to select the BLOB column FOR UPDATE. I did this and now I am getting ORA-01002: fetch out of sequence.
    Not sure if I have helped you any...still digging around for the meaning of ORA-01002
    Raj

  • Error of passing of oracle.sql.ARRAY in PL/SQL function at work under OC4J

    Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    Error occured at working with DataSource based on com.evermind.sql.DriverManagerDataSource and oracle.jdbc.pool.OracleDataSource.
    Error:
    java.lang.AbstractMethodError: com.evermind.sql.OrclCMTConnection.physicalConnectionWithin()Loracle
    /jdbc/internal/OracleConnection;
    at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:660)
    at oracle.sql.TypeDescriptor.<init>(TypeDescriptor.java:212)
    at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:376)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:237)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:192)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:177)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:114)
    What to do?
    Thank you.

    The issue is resolved by change classes12dms.jar for OC4J. The jdbc driver was changed from version (read from manifest):
    Manifest-Version: 1.0
    Specification-Title: Oracle JDBC driver classes for use with JDK12
    Created-By: 1.4.2_08 (Sun Microsystems Inc.)
    Implementation-Title: classes12dms_g.jar
    Specification-Vendor: Oracle Corporation
    Specification-Version: Oracle JDBC Driver version - "10.2.0.1.0"
    Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"
    Implementation-Vendor: Oracle Corporation
    Implementation-Time: Wed Jun 22 19:11:35 2005
    to:
    Manifest-Version: 1.0
    Name: javax/sql/ConnectionEvent.class
    Digest-Algorithms: SHA MD5
    SHA-Digest: GQ5KFq39ybZzmgVThMOVSb6DDL8=
    MD5-Digest: uryrGtwsbgYBwoQDl0I85A==
    Name: javax/sql/ConnectionEventListener.class
    Digest-Algorithms: SHA MD5
    SHA-Digest: gh9/m94g05tRid8f4mhmEnJ5als=
    MD5-Digest: x63DZ5tPqdiCaLP0z1GHew==
    Probably the Oracle has compiled OC4J with other version of this library.

Maybe you are looking for