OC4J 904 and Unicode(AL16UTF16) in NVARCHAR2 column

I have:
OC4J 904 standalone runs on Windows2000 AdvancedServer.
Oracle 9i
JDBC thin driver shipped with OC4J
NLS_NCHAR_CHARSET = AL16UTF16
(NLS_CHARACTERSET = VN8VN3)
I have a table with a NVARCHAR2 column. I created a CMP EJB from the table but I can't use the EJB to retreive data from Database. I was success in using Oracle JDBC connection to connect manually to database and save/retreive Unicode data.
I read somewhere that EJB use thin driver, so the getter/setter of CMP-Fields should work normally.
I think that may be the problems is the function OraclePreparedStatement.setFormOfUse(1,OraclePreparedStatement.FORM_NCHAR);
was not called in the EJB Contenner or things like that - so it's a bug of OC4J, right?.
This is the Exception I received on the browser.
javax.ejb.NoSuchObjectLocalException: ? ?ÂY CÓ CH? HOA CÓ D?U!!!!!
     at TestLocal_EntityBeanWrapper0.reActivateNew(TestLocal_EntityBeanWrapper0.java:1668)
     at TestLocal_EntityBeanWrapper0.reActivateNewLocal(TestLocal_EntityBeanWrapper0.java:1636)
     at TestLocal_EntityBeanWrapper0.getUnicode(TestLocal_EntityBeanWrapper0.java:108)
     at test.showparam._jspService(_showparam.java:100)
     [SRC:/test/showparam.jsp:65]
     at com.orionserver[Oracle9iAS (9.0.4.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:348)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:602)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:308)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
     at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
     at java.lang.Thread.run(Thread.java:536)
Can anybody help or give me some information or workaround?
Thank you very much.

Hi Nghia,
Can anybody help or give me some information or
workaround? I suggest using BMP and a non-emulated data source. More details are available in the documentation which can be downloaded from here:
http://technet.oracle.com/tech/java/oc4j/904/documentation_preview.html
Good Luck,
Avi.

Similar Messages

  • Oracle OC4J 904 and JNDI environment variable lookup up

    Hi all, we are getting this when trying to run our app in Oracle 904:
    org.springframework.beans.factory.access.BootstrapException: Define an environment variable [java:comp/env/ejb/BeanFactoryPath] containing the class path locations of XML bean definition files; nested exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
    at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
    at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:71)
    at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:64)
    at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:117)
    at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63)
    at MethodInvokerHome_StatelessSessionHomeWrapper1.callCreate(MethodInvokerHome_StatelessSessionHomeWrapper1.java:115)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:275)
    at MethodInvokerRemote_StatelessSessionBeanWrapper0.invoke(MethodInvokerRemote_StatelessSessionBeanWrapper0.java:77)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
    at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor
    Basically the app server thinks there is no environment entry but I have it declared in ejb-jar.xml descriptor:
    <env-entry>
    <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>applicationContext.prod.xml</env-entry-value>
    </env-entry>
    Any ideas,
    J

    That depends of the shell that you use.
    If you use the bash than execute:
    EXPORT ORACLE_SID=<YOUR_SID>
    If you use csh:
    setenv ORACLE_SID <YOUR_SID>
    Bye, Aron

  • Cannot Store Greek Characters in NVARCHAR2 columns

    Can someone please help.
    I have a table TEST with one column A of type NVARCHAR2(20) and when I try to insert the greek character Ω(Omega) - it gets stored as O instead.
    I am inserting using SQL Developer using the 'N' prefix and my environment is as follows:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_LANG setting on client side is ENGLISH_UNITED KINGDOM.WE8MSWIN1252.
    Why can I not insert greek characters with the above setup and what do I need to do/change in order to be able to insert greek characters in a database using the national characterset for storing unicode data ?

    Result of running SELECT a, dump(a) FROM TEST after insert an 'O' and an 'Ω' is as follows:
    A DUMP(A)
    O     Typ=1 Len=2: 0,79
    O     Typ=1 Len=2: 0,79
    I added a VARCHAR column, column B, there is no difference in what is getting stored in the NVARCHAR column when inserting 'Ω', result is below:
    INSERT INTO TEST (A, B)
    VALUES(N'Ω', 'Ω');
    SELECT a, dump(a, 1016), b, dump(b, 1016) FROM TEST;
    A DUMP(A, 1016) B DUMP(B, 1016)
    O     Typ=1 Len=2 CharacterSet=AL16UTF16: 0,4f     O     Typ=1 Len=1 CharacterSet=WE8MSWIN1252: 4f
    I'm I missing something here, since my understanding is that NVARCHAR2 columns should be able to store Unicode data ?

  • JDBC program is inserting ¿ in NVARCHAR2 column.

    I have a 10.2.0.1 database on a windows XP machine.
    The value of NLS_CHARACTERSET is WE8MSWIN1252 and the value of NLS_NCHAR_CHARACTERSET     is AL16UTF16.
    I have a table with a NVARCHAR2 column. I am using JDBC thin driver to connect to the database. When I am to inserting a japanese character to this column, the value that is getting inserted is ¿ (inverted question mark) instead of the actual Japanese character. Following is the code snippet of my Java program
    Class.forName("oracle.jdbc.OracleDriver");
    props.put("user", "bcan");
    props.put("password","bcan2226");
    url = "jdbc:oracle:thin:@myserver:1521:eng";
    Connection conn = DriverManager.getConnection(url, props);
    String value = "abcdefghi\u7c73"; //\u7c73 is the japanese character
    String sql = "insert into I18N VALUES ('" + value + "')";
    Statement stmt = conn.createStatement();
    stmt.executeUpdate(sql);
    Can you please let me know why is ¿ getting inserted instead of the japanese character I am trying to insert?
    BTW I noticed that if I use PreparedStatement like the following then the proper character gets inserted.
    Class.forName("oracle.jdbc.OracleDriver");
    props.put("user", "bcan");
    props.put("password","bcan2226");
    props.put("oracle.jdbc.defaultNChar","true");
    url = "jdbc:oracle:thin:@myserver:1521:eng";
    Connection conn = DriverManager.getConnection(url, props);
    String value ="abcdefghi\u7c73";
    String sql = "insert into I18N VALUES (?)";
    PreparedStatement stmt = conn.prepareStatement(sql);
    stmt.setString(1,value);
    stmt.executeUpdate();
    Thanks
    Sudipta

    I do not think that you are hitting a "bug". Instead what you are seeing is expected behaviour since sql and literals (e.g. your string) are processed in the database character set unless you specify otherwise (e.g. explicit bind).
    Go through docs per links in my previous post.
    For the bug referenced, it seemed to be fixed according to jdbc driver Readme of 10.2.0.4.

  • Insert into NVARCHAR2 columns(ORA_01461, ORA-01026)

    Hi,
    Oracle8i Client 8.1.5 (OCI8)
    Oracle9i Client 9.0.1 (OCI9)
    Oracle8i/9i DB
    I want to insert strings into a table with two NVARCHAR2 columns with OCI.
    NLS_NCHAR_CHARACTERSET is UTF8 (DB). The provided String is encoded in Windows-1252.
    The supplied buffers in the OCIBindByPos have a size of 200bytes each.
    ->With OCI8 I'm getting the message:
    "ORA-01026 multiple buffers of size > 4000 in the bind list"
    If only one NVARCHAR2 column is involved (or if I use normal
    VARCHAR2 instead) it works fine.
    ->With OCI9 I get the message:
    "ORA-01461 can bind a LONG value only for insert into a LONG column"
    But only, if I set the OCI_ATTR_MAXDATA_SIZE attribute.
    If I do not set the OCI_ATTR_MAXDATA_SIZE attribute, it works, but if
    I supply a buffer bigger than 1333 bytes in the OCIBindByPos for the second
    NVARCHAR2 column, then ORA_01461 happens. The buffer for the first NVARCHAR2
    column can be set to a higher values
    ->The same behaviour occurs with NCHAR, NCLOB (->national character types)
    These are the main steps:
    OCIBindByPos((OCIStmt *) pStmtInsert, (OCIBind **) &pBind,
    (OCIError *) pError, (ub4) i, (dvoid *)pData,
    (sb4) bufferSize, //200bytes
    (ub2) dataTypeSQLT, //SQLT_STR
    (dvoid *) pIndicator, (ub2 *) 0, (ub2 *) 0, (ub4) 0,
              (ub4 *) 0, (ub4) OCI_DEFAULT);
    OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
    &Frm, //SQLCS_NCHAR
         0, OCI_ATTR_CHARSET_FORM, (OCIError *) pError);
    OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
    (dvoid *) &charSet, //WE8MSWIN1252
         0, OCI_ATTR_CHARSET_ID, (OCIError *) pError);
    OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
    (dvoid *) &maxDataSize, //->size of the column in bytes
    0, OCI_ATTR_MAXDATA_SIZE, (OCIError *) pError);
    OCIStmtExecute((OCISvcCtx *) pServiceContext, (OCIStmt *) pStmtInsert,(OCIError *) pError,
    (ub4) 1, (ub4) 0, (OCISnapshot *) 0, (OCISnapshot *) 0,
    OCI_COMMIT_ON_SUCCESS);
    Any ideas?
    Thanks,
    Axel

    I found this link referring to a similar problem that was apparently fixed in version 10.2.0.4 of the server: ORA-01461: can bind a LONG value only for insert into a LONG column Should I try to upgrade the server and see if that fixes things?

  • Help! can't store ja16sjis to nvarchar2 column.

    hi:
    I am using Oracle8.1.7.
    And NLS_CHARACTERSET=UTF8 ,
    NLS_NCHAR_CHARACTERSET=JA16SJIS ,
    I can store sjis code into varchar2 column,
    but when store into nvarchar2 column, all the code
    are converted into USASCII7. many '?' there.
    I use
    insert into test values('xxx')
    to insert into varchar2 column.
    and use
    insert into test values(N'xxx')
    to insert into nvarchar2 column.
    where's the problem?
    NLS_LANG=japanese_japan.ja16sjis
    NLS_NCHAR=japanese_japan.ja16sjis.
    Thanks inadvance.
    null

    Thanks for the suggestion.....
    But I am confused about what you mean by "starting over and using a new icon".
    BTW, I had not done anything w/ the icon in the first place.
    Still confused

  • ORA-1461 with multiple NVARCHAR2 columns

    Hi,
    I use version 10.2.0.1 version of ojdbc with an Oracle9i database and get ORA-1461 (can bind a LONG value only for insert into a LONG column) when updating multiple NVARCHAR2 columns in the same table.
    What is strange is:
    if I set column1=value1 and column2 null it works
    if I set column2=value2 and column1 null it works
    But if i set column1=value1 AND column2=value2 I have this exception.
    I assume that because using UTF8 I can have an exception for one column if less than 4000 because of nb bytes used by one character but can't understand why different columns sizes interact...
    Database parameters :
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET     UTF8
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE (don't know if usefull)
    Can anyone tell me out to make it work ?
    I tried with driver 10.2.0.3 and have the same issue.
    Thanks for your help.
    Message was edited by:
    user610168

    Hi,
    I use version 10.2.0.1 version of ojdbc with an Oracle9i database and get ORA-1461 (can bind a LONG value only for insert into a LONG column) when updating multiple NVARCHAR2 columns in the same table.
    What is strange is:
    if I set column1=value1 and column2 null it works
    if I set column2=value2 and column1 null it works
    But if i set column1=value1 AND column2=value2 I have this exception.
    I assume that because using UTF8 I can have an exception for one column if less than 4000 because of nb bytes used by one character but can't understand why different columns sizes interact...
    Database parameters :
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET     UTF8
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE (don't know if usefull)
    Can anyone tell me out to make it work ?
    I tried with driver 10.2.0.3 and have the same issue.
    Thanks for your help.
    Message was edited by:
    user610168

  • Framemaker10: can't cut and paste tables, rows, or columns

    When I select a table row, copy, and then try to paste it as a new row, only text pastes in. When I Edit>Paste Special, the only options provided are Text and Unicode Text.
    I used to be able to cut and paste rows but that is no longer an option. Has anyone experienced this? Know a fix?
    Editing my maker.ini files does not fix it.

    Exactly how are you attempting to copy/paste?
    For a whole table, I select the marker, copy, paste wherever.
    For a row, I'm able to position my cursor in a row, highlight the row, then paste either at the end of that table or separately.
    Haven't tried columns, but they probably work the same way.

  • OC4J 904 - Beans reload

    I want to disable beans reload when recompiling while OC4J is running.
    Have set the following in orion-web.xml :
    <orion-web-app
         deployment-version="9.0.4.0.0"
         jsp-cache-directory="./persistence"
         temporary-directory="./temp"
         development="false"
         autoreload-jsp-beans="false"
         autoreload-jsp-pages="true"
    >
    But OC4J is still trying to reload reompiled beans... unsuccessfully.
    Any clue ?

    Hi Nghia,
    Can anybody help or give me some information or
    workaround? I suggest using BMP and a non-emulated data source. More details are available in the documentation which can be downloaded from here:
    http://technet.oracle.com/tech/java/oc4j/904/documentation_preview.html
    Good Luck,
    Avi.

  • Search a text in a multiple tables and one table has BLOB column

    Hi,
    I couldn't find a solution/examples for below scenario in oracle text documentation or related forums.
    I need to search a text in a multiple tables,in that one table has blob column which is used to store the documnents(pdf,doc,jpg..etc) and other tables have varchar2 columns,These tables have realation each other.
    Please provide a sample examples for above scenario.
    Thanks in advance..

    Have a look at my blog entry here:
    https://blogs.oracle.com/searchtech/entry/indexing_data_from_multiple_tables
    That describes two methods of achieving what you are looking for.

  • I cannot change song order on playlist with highlight and drag. I have turned off shuffle and highlighted the far left column( up/down arrow) of playlist. My mac pro is running 10.5.8  and am using itunes 10.4.

    I cannot change song order on playlists (old or new) with highlight and drag. I have turned off shuffle and highlighted the far left column (up/down arrow) of playlist. My mac pro is running 10.5.8  and am using itunes 10.4. I can't drag and drop "music" to "playlist" but can right click and get the option to "add to playlist." No such option for moving song within playlist, only the up and down arrow which moves song from top to bottom list, so if it is #4 from top it will move to #4 from bottom. Stupid I know. I spent over an hour with Apple support, reinstalled itunes, restarted and rebooted computer. Networked with my laptop which is running 10.6.8 and itunes 10.4 and it can drag and drop. The final Apple support solution was to reinstall my operating system. I would prefer not to. Any other ideas?

    After looking at other people's posts, I think it's official: there is a bug. Itunes support said I should not have lost the drag/drop tool and I haven't on the laptop that is running itunes 10.4 and operating system 10.6.8. I chatted with someboby who lost both his drag/drop and side scroll and what we have in common is a wacom tablet for a mouse. My laptop is a wireless mouse. I reinstalled whatever updated driver that wacom has out there, shut the system down for night, hoping for magic, but alas none to be had. So if I want to change song order, I network the laptop and desktop, share the screen on the laptop, drag and drop to my heart's content and curse Apple for making me work this hard to find the tool that was once at my fingertips. Apple also let me know that if I want to share songs in household that the hundreds on songs that were purchased for .99 need to be repurchased for another .30. Maybe Apple is holding my drag/drop tool captive til I pay up the money or Maybe the next update will fix the problem, I for one give up for now.

  • HT5824 I've been using numbers for iPad and I accidentally deleted a column. And the auto-save feature saved that and now I can't undo it. Does iCloud storage have backups of saved files from like 10 minutes ago? I have number

    I've been using numbers for iPad and I accidentally deleted a column. And the auto-save feature saved that and now I can't undo it. Does iCloud storage have backups of saved files from like 10 minutes ago? I have numbers synced to iCloud.
    I tried to undo it but the app crashed.
    I am hoping there's like a previously saved version of my file in iCloud somewhere. 

    No, iOS does not do short term incremental back ups to iCloud such as you get with Time Capsule.It backs up when you do soo manually, or if set properly, when the device is plugged in and connected to WiFi. It will not have saved your changes as of 10 minutes prior.

  • Combined Upgrade and Unicode conversion of Sap 4.6C to ECC6.0

    Hello all,
    my project team intends to carry out a combined upgrade and unicode conversion of an SAP ERP 4.6C system with MDMP to ECC6.0 (no enhancement package). The system is running on Oracle 10.2.
    In preparation for this upgrade, I have gone through the SAP notes 928729, 54801.
    We need to get a rough estimate of the entire downtime so as to alert our end users. From the CU&UC documentation in 928729, I read up note 857081. However the program in this note cannot be used to estimate the downtime as my system is < SAP netweaver 6.20.
    Is there any other SAP note or tool or program that I can use to estimate the downtime for the entire CU&UC? Thanks a lot!

    Hi,
    Combined upgrade depend upon number of factors like database size, resources on the server and optimization. In order to get idea of how much downtime, it will take, I would suggest you to do combined upgrade and unicode conversion on sandbox system which should be the replica of your production system. And try to optimize it. From there you can get approx. downtime required.
    Also, please read combined upgrade and unicode conversion guides on  http://service.sap.com/unicode@sap
    Thanks
    Sunny

  • Need suggestion on Multi currency and Unicode character set use in ABAP

    Hi All,
    Need suggestion. In one of the requirement I saw 'multi-currency and Unicode character set experience in FICO'.
    Can you please elaborate me how ABAPers are invlolved in multi currency as I think this is FICO fuctional area.
    And also what is Unicode character set exp.? Please give me some document of you have any.
    Thanks
    Sreedevi
    Moderator message - This isn't the place to prepare for interviews - thread locked
    Edited by: Rob Burbank on Sep 17, 2009 4:45 PM

    Use the default parser.
    By default, WebLogic Server is configured to use the default parser and transformer to parse and transform XML documents. The default parser and transformer are those included in the JDK 5.0.
    The built-in WebLogic Server DOM factory implementation class is com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
    The DocumentBuilderFactory.newInstance method returns the built-in parser.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

  • How to find the Date and Time of Modification of Column in aTable?

    Hi all,
    Do  you know how to find the Date and Time of Addition of Column to a Particular Table?.
    I know however, How to find the modification time of the Table. Using the below Query :
    Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
    Object_Name
    Last_DDL
    Employee
    20-Aug-2013 09:23:03
    I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
    Regards,
    Bhaskar M

    I agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
    My whole purpose it to know whether we get the Column's Creation or Modification DateTime.

Maybe you are looking for

  • Ssrs 2008 r2 pass mutiple values to stored procedure that is being called

    In an SSRS 2008 r2 report, I am currently calling a stored procedure called spRoom. I obtain the results of the stored procedure by creating a  temptable called #roomReults The temp table that I am creating and using to obtain results looks like the

  • Help! InDesign CS6 tools not working

    Hello, I recently upgraded to CS6 on my PC and have run into some issues with InDesign. None of the tool buttons in the top ribbon or on my side menu function properly. For example, if I make a text box and wish to change the font, I can't select the

  • View from multiple tables

    Hi, I would like to create a view from 4 different tables. How do I do it?. Say for example, I need user_id from table A which has the trans_id in table B and C. and I need to get a admin_id from table D and show these related fields in one single ro

  • How come my text messages are not going through as iMessages?

    I've been having this problem for a few weeks now. When someone texts me from an iPhone with iMessage, I get their texts as a regular text message. Sometimes there text messages come in "s p a c e d o u t l i k e t h i s". I will also get multiple te

  • How do I select an alarm song without it playing?

    First off I live in a dorm with two other people. Occasionally when I go to set my morning alarm I find myself needing to choose a new song (once I've gotten used to a song I can sometimes sleep through it). However upon selecting the song my phone c