Unicode problem while storing properties

Hi,
I need to store the java.util.Properties object to a file.
I'm using the store(OutputStream out, String header) method. and am using FileOutputStream.
The values in Properties object contain unicode characters.
In the output file, they are stored as \u00E4
Please help me in handling this.
Thanks and Regards,
Janardan

Thanks for the reply.
But I want the output file to be with unicode characters.
Can't i acheive it without using other tools like native2ascii etc.
or, is there any other way to store these key value pairs to a file?

Similar Messages

  • JNDI : connection problem while storing data more than one records

    I am persisting data into the MSSQL Server 2005 database using the JNDI lookup. I can insert the single record at a time, but when I ran the test program for 10 or 20 records i am getting the following exception on Jboss
    Configuration details : JBoss, Spring, MSSQL server 2005, Jdk 5
    JNDI mapping from JBOSS
    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
    <local-tx-datasource>
    <jndi-name>jdbc/myjndi</jndi-name>
    <!-- allows DS to be accessed remotely -->
    <use-java-context>false</use-java-context>
         <connection-url>jdbc:inetdae7:localhost:1434?database=myDB&secureLevel=0</connection-url>
         <driver-class>com.inet.tds.TdsDriver</driver-class>
         <user-name>sa</user-name>
         <password>admin123</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>50</max-pool-size>
    <metadata>
         <type-mapping>MS SQLSERVER2000</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>
    Exception :
    14:07:06,812 INFO [myMDB] Exception while Storing Event in Database : Could not get JDBC Connection; nested exception is org.jboss.util.Neste
    dSQLException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset); - neste
    d throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava.net.S
    ocketException: Connection reset))
    14:07:06,812 INFO [STDOUT] org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava
    .net.SocketException: Connection reset); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (co
    m.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset))
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:107)
    14:07:06,812 INFO [STDOUT] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
    14:07:06,812 INFO [STDOUT] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
    14:07:06,812 INFO [STDOUT] at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:177)
    14:07:06,812 INFO [STDOUT] at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:356)
    14:07:06,812 INFO [STDOUT] at com.org.project.gen.MyDAOImpl.insert(MyDAOImpl.java:25)
    14:07:06,812 INFO [STDOUT] at com.org.project.geo.MyTabletDAO.addEvent(MyTabletDAO.java:137)
    14:07:06,812 INFO [STDOUT] at com.org.project.mdb.myMDB.onMessage(myMDB.java:72)
    14:07:06,812 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    14:07:06,812 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    14:07:06,812 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
    14:07:06,812 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1090)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
    14:07:06,812 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._submit(TibjmsSession.java:3567)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._dispatchAsyncMessage(TibjmsSession.java:1963)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._run(TibjmsSession.java:3054)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession.run(TibjmsSession.java:4204)
    14:07:06,812 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    14:07:06,812 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
    14:07:06,812 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
    14:07:06,812 INFO [STDOUT] Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.
    SocketExceptionjava.net.SocketException: Connection reset)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.
    java:161)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnection
    Pool.java:508)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:395)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:297)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:447)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManage
    r2.java:874)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
    14:07:06,812 INFO [STDOUT] ... 33 more
    14:07:06,812 INFO [STDOUT] Caused by: com.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset
    14:07:06,812 INFO [STDOUT] at com.inet.tds.k.createSQLException(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.a(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.a(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.<init>(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.q.<init>(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.k.createConnection(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsDriver.connect(Unknown Source)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.
    java:151)
    14:07:06,812 INFO [STDOUT] ... 41 more

    Hi Subin,
    You can try couple of things.
    If your data is less than 32767, you can pass it to stored procedure and change it to clob type like
    PROCEDURE CLOBQUERY
         Param     IN     CLOB,
    and you can call Procedure
    EXECUTE CLOBQUERY '[Param.1]'
    If your data is around than 1000000(32767*32), you can break the data in length of 32767 and pass it to param 1 to 32 like
    EXECUTE CLOBQUERY '[Param.1][Param.2][Param.3]..[Param.32]'
    Finally you can try to update jdbc drive.
    check the link Link: [JDBC Limitation|http://confluence.atlassian.com/display/JIRA/UsingOracle10gdriverstosolvethe4000character+limitation]

  • Problems while storing Timestamp into Max db

    Hai All,
         I am getting problem while inserting Timestamp into Maxdb
    Here iam giving Timestamp as input to the entityBean , and in database also i was taken that field as timestamp.
    the following is the code snippert,
    Date dte=new Date();
              Calendar c = Calendar.getInstance();
              java.sql.Timestamp t=new Timestamp(c.getTimeInMillis());
              try {
                   objTestingEntityLocalHome.create(strArg1,intarg2,dblDouble,t);
              } catch (CreateException e) {
                   return "Ex" +e;
              }catch (Exception e) {
                        return "Ex: "+e;
    whenever I run this program it is insering date correctly, but time stamp is  inserting incurrectly,it is not inserting current time stamp of the server
    anybody please help me inthis regard
    thanks
    somu

    Hi,
    try this:
    GregorianCalendar c = new GregorianCalendar();
    java.sql.Timestamp t=new Timestamp(c.getTimeInMillis());
    Good luck,
    Roelof

  • Problems while storing a BLOB

    Hi
    I need to store a blob in a MS Access db while receiving a mail, but I can't arrive!
    This is my code, could anyone help me?
    Many thanks in advance.
                             Blob blob = null;
                             PreparedStatement pst2 = con.prepareStatement("INSERT INTO TMail (Allegato, NomeAllegato) VALUES (?, ?)");
                             pst2.setBlob(1, blob);
                             pst2.setString(2, "prova");
                             pst2.executeUpdate();
                             con.commit();
                             PreparedStatement dbQuery = con.prepareStatement("SELECT Allegato " +
                                       "FROM TMail WHERE NomeAllegato = " + "'prova'"); //primaryKey);
                   ResultSet rs = dbQuery.executeQuery();
                   rs.next();
                   blob = rs.getBlob("Allegato");
                   OutputStream outstream = blob.setBinaryStream(1L);
                    long size = blob.length(); // sarebbe getBufferSize()
                    byte[] buffer1 = new byte[(int)size]; // occhio al cast!
                    int length = -1;
                    while((length = in.read(buffer1)) != -1)
                             outstream.write(buffer1, 0, length);
                    outstream.close();
                    PreparedStatement pst1 = con.prepareStatement("INSERT INTO TMail (Allegato) VALUES (?)");
                     pst1.setBlob(1, blob);
                     pst1.executeUpdate();
                     con.commit();
                     ... then I'm uploading the others fileds into a db.Maybe is possible to store the blob withut to reserve an empty space while uploading the others fields?

    This post will not solve your problem.
    However, MS Access IS NOT a database, it is an
    application that mimics relational databasebehavior,
    but a database it is not. There are formal definitions of databases and at
    least to some extent MS Access meets the definition.I believe at to be a true database, you must provide for multiple users to access the db via network protocols, independent of the OS. Access doesnt do that. JMO.
    >
    Secondly, whenever I tried
    to use MS Access and Java via the JDBC-ODBC Bridge
    during my college career, I had nothing butproblems.
    And which of the following did you have problems
    with?
    1. The ODBC driver itself?
    2. Understanding what the bridge, the MS Access ODBC
    driver and what MS Access allows?
    3. Something else that has nothing to with MS Access
    but instead might apply to any database?
    Most of our problems were related to the JDBC-ODBC bridge and the underlying system DSN. We also had numerous problems after executing even the simplest of select querries, we would end up with empty result sets. Once we switched to MySQL and the Connector/J, the problems went away.
    Another problem was the schools policy of not allowing us to save data on any computer. We could install software and save files, but as soon as the 'puter was turned off, the HDD was restored to the original image 'approved' by the school. For our senior capstone courses we were susposed to design, develop, and deploy a system to solve some problem. We were free to choose the topic. Given the computer policy it was a waste of time unless you used Microsoft Access. We couldnt even save DSN's on the schools puters nor change the time of the system.
    Further, I did some research on the web and the
    prevailing view I discovered was not to use MS
    Access.I believe you will find many more opinions that you
    shouldn't be using java but instead should be using
    C# or C++.
    So what language do you program in?Java 2 SE
    >
    hope you find a solution to your problem. In
    addition, a small piece of advice for you in the
    future would be to use MySQL (you can downloadfree)
    and or Oracle 10g (also a free download). Presumably you are addressing the needs of a student,
    because a business can not use Oracle for free. Even
    a minimal install is quite expensive.Yes, I assumed this was a student project as the OP mentioned something about a test/project.
    I am also guessing the OP's school is heavily vested with Microsoft's products such as the Office suite, Visual Studio, and even the class registration web sit did not function correctly without IE5 or better. I normally use Firefox and I always had to register using IE.
    >
    And I haven't checked recently but at one time that
    was potentially true for MySQL as well.I believe MySQL uses a dual licensing model. If you develop a GPL open source application, its free. If you release some comercial product that uses MySQL, you must buy a license.
    Most of the time I am using the DB's at home for educational / proof of concept type stuff. For school projects. I do not believe there is any problem. However, if the project is soo good that it can be comercially used, then by all means buy a license.
    >
    Both also require installs (of the database itself)
    into the production environment. MS Access on a
    windows box does not require that.
    I dont understand what you are saying. MySQL runs fine on my laptop. Also whats to prevent a company from deploying to a test / development environment prior to roll out? Other than money that is.
    Those are
    both true databases. Please before anyone screams
    at me about database X or Y... I know there are a
    myriad of others out there but Oracle and MySQLare
    the 2 biggest dogs out there competing with
    Microsoft.
    >
    The competition with those would be MS SQL Server and
    not MS Access. And MS SQL Server also is "free" at
    least in the same way that Oracle is.Thats cool. The last time I had looked all the SQL server downloads were time limited to like 90 days. But that was several years ago.

  • Problem while storing items from trailing list  to database

    hi all,
    can anyone help me out. i have scenario where i have to store items from trailing list into database. suppose if there are 3 items in the list, 3 rows should be inserted into database with all the remaining fields same like
    A ,1 , c
    A, 2, c
    A , 3, c where 1,2,3 are items from trailing list. Am iterating the loop.
    What am doing is before saving am checking for duplicates i.e are there any records with the same combination. If yes am doing nothing else am committing the changes..
    As am not doing anything if any duplicte record is present, the changes made to the fields persists and once if any commit happens all the values are getting saved. which is voilating my condition..
    Thanks

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • Exception while loading properties from an xml file

    Hi all,
    I've got a problem while loading properties from an XML file:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
    ERROR - Cannot load properties from the specified file <./conf/login.prop> java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
         at java.util.XMLUtils.importProperties(XMLUtils.java:97)
         at java.util.XMLUtils.load(XMLUtils.java:69)
         at java.util.Properties.loadFromXML(Properties.java:852)
         at g2.utility.HRPMProperties.<init>(HRPMProperties.java:78)
         at g2.utility.HRPMProperties.getInstance(HRPMProperties.java:94)
         at g2.gui.workers.ApplicationSwingWorker.<init>(ApplicationSwingWorker.java:36)
         at g2.main.Main.main(Main.java:37)but this code worked before, and I've got the xerces and xercesImpl packages in the classpath, anyone can give me an hint on how to fix the problem?

    Here there's the code that instantiates the HRPMProperties object loading the property file:
    public class HRPMProperties extends Properties {
         * A reference to myself.
        protected static HRPMProperties mySelf = null;
         * The property file to which load the configuration.
        protected static String propertyFile = "./conf/login.prop";
          * A set of static strings used as keys in the properties file.
         public final static String DATABASE_URL = "database_url";
         public final static String DATABASE_USERNAME = "database_username";
         public final static String DATABASE_PASSWORD = "database_password";
         public final static String REAL_USERNAME = "real_username";
         public final static String REAL_PASSWORD = "real_password";
         public final static String PHANTOM_LOGIN = "login_thru_phantom_user";
         public final static String AUTOCONNECT = "autoconnect";
         public final static String TRANSLATION_FILE = "translation_file";
         * Builds up an empty properties map.
        protected HRPMProperties(){
         super();
         this.reload();
         * Builds up the property map from the specified input file. <B> The file must be in XML format</B>.
         * In case of exception and/or problems reading from the specified file, an empty property map is returned.
         * @param fileName the path and the name of the file with the XML representation of the properties.
        protected HRPMProperties(String fileName){
         super();
         try{
             this.loadFromXML(new FileInputStream(fileName));        
         }catch(Exception e){
             Logger.error("Cannot load properties from the specified file <"+fileName+"> " + e);
             e.printStackTrace();
         * Provides an instance of the property class loaded from the default configuration file.
         * @return the property instance
        public static final HRPMProperties getInstance(){
         if( HRPMProperties.mySelf != null )
             return HRPMProperties.mySelf;
         else{
             HRPMProperties.mySelf = new HRPMProperties(HRPMProperties.propertyFile);
             return HRPMProperties.mySelf;
    }The constructor is the one triggering the exception, so there's a problem loading the XML property file.

  • Error while storing

    good day all i am facing problem while storing more then 4000 char in a table whose datatype is varchar2(4000)
    we use long datatype to solve this however while storing and retreiving we are facing the problem can any one assist ,
    appreciate your anticipation with your earliest
    Regards

    Obviously, you can't store more than 4000 characters in a varchar2(4000) column. Storing your data in a LONG column will solve this, though I'd highly recommend using CLOB rather than LONG. Oracle will probably drop the LONG type at some point since CLOB is so much nicer.
    Can you provide the precise error you're getting (including the ORA-xxxxx error number)? If you cuold post the code that's causing the error as well, that would be helpful.
    Justin

  • I am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    hi TimoHahn,
    i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
    Root cause of ServletException.
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
    at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    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.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.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)

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

  • Query designing problem while applying cell properties

    Hello Experts,
    I have a problem while designing query. Problem is as follow:
    I have a calculated field on key figure column. This key figure calculates variance between 2 columns.
    for E.g I have 2 columns Budget and Actual and third column is %Variance which should be          
    1. ((Actual - Budget)/Budget) *100 or
    2. ((Budget -Actual)/Budget)*100, depening on some values on the row i should use any of these 2 formulas but the result should be dispalyed in single column % Variance.
    how can i change the formula in key figures depending on these conditions. I can achieve this by applying cells but i dont want to do so as it is very complex way to desing these queries.
    also let me know applying cells on query affects its performance or not?
    Regards,
    Nirav

    Hi Nitin,
    Your reply may help me.
    But my exact requirement is not that. Requirement is as follow:
    I have created Char. Structure in row which contains few rows as revenue and few rows as expense.
    I created them by creating selections. Now in case of expense the variance should be                (Budget-Actual)/Budget *100.
    In case of revenue variance should be (Actual-Budget)/Budget *100.
    So, here i have to find out revenue & expense char. iresspective of which one is greater.
    Regards,
    Nirav

  • Problem while sending unicode (utf-8) xml to IE.

    Hi,
    I have encoding problem while sending utf-8 xml from servlet to IE (Client), where i am parsing the xml using Ajax.
    In the log I can see proper special characters that are being sent from the servlet. but when same is seen in the client end,, it is showing ? symbols instead of special charcters.
    This is the code that sends the xml from servlet.
    ByteArrayOutputStream stream = new ByteArrayOutputStream(2000);
    transformer.transform(new DOMSource(document), new StreamResult(new OutputStreamWriter(stream, "iso-8859-1")));
    _response.setContentType("text/xml; charset=UTF-8");
    _response.setHeader("Cache-Control", "no-cache");
    _response.getWriter().println(new String(stream.toByteArray(),  "UTF-8"));
    In the log i can see :
    <response status="success" value="1154081722531" hasNextPage="false" hasPreviousPage="false" ><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd �" mode="edit" column_en_US="asdasd �" column_de_DE="? xyz" column_fr_FR="" ></row></response>
    But in the Client side I am able to see
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <response status="success" value="1154082795061" hasNextPage="false" hasPreviousPage="false"><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd ?" mode="edit" column_en_US="asdasd ?" column_de_DE="? xyz" column_fr_FR=""/></response>
    I am getting ? instead of �.
    It will be greatful if somebody tell how to send utf xml from servlet, for ajax purpose.
    Thanks,
    Siva1

    This is the code that sends the xml from servlet.
    ByteArrayOutputStream stream = new
    ByteArrayOutputStream(2000);
    transformer.transform(new DOMSource(document), new
    StreamResult(new OutputStreamWriter(stream,
    "iso-8859-1")));Here you produce XML that's encoded in ISO-8859-1. (!!!)
    _response.setContentType("text/xml; charset=UTF-8");Here you tell the browser that it's encoded in UTF-8.
    _response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));Here you convert the XML to a String, assuming that it was encoded in UTF-8, which it wasn't.
    Besides shooting yourself in the foot by choosing ISO-8859-1 for no good reason, you're also doing a lot of translating from bytes to chars and back again. Not only is that a waste of time, it introduces errors if you don't do it right. Try this instead:_response.setContentType("text/xml; charset=UTF-8");
    _response.setHeader("Cache-Control", "no-cache");
    _transformer.transform(new DOMSource(document_),
                    new StreamResult(_response.getOutputStream()));

  • HT201210 how to solve the problem while re storing iphone 3gs. unknon erron occured(29)

    How to solve the problem while restoring iphone 3gs? (unknon error occured (29)

    Hello Musthafa K.O.M,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/ts3694#47
    Check for hardware issues
    Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the alert when you update or restore, contact Apple support.
    Common errors: 1, 10-47, 1002, 1011, 1012, 1014, 1000-1020.
    Have a nice day,
    Mario

  • Problem while generating hindi pdfs

    Hi,
    This is Dasaradh. I have one problem while generating pdfs in HIndi. Here i have used two properties files, one is English and another one is Hindhi. If the user selects English PDF is generates Suceesfully. But if the user selects hindhi then pdf is generated but in that pdf all the charcaters are in diferent format but not in hindi.Actually my hindhi properties file and that pdfgerneration jsp both are in UTF-8 format. Here i have used PDFWriter class for generating pdfs.
    Can any one pls help for generating the hindhi pdfs.
    Thanking You,
    Dasaradh.P

    Make sure that you use the correct and the same encoding thoroughout the complete process.
    1) Save the propertiesfile with in that encoding. Even the most simplest texteditor (notepad) offers you an option list of charset encodings to be used during 'Save As'.
    2) Read values from the propertiesfile with that encoding. Use a Reader where you specify the encoding in the constructor. Otherwise either the platform's default encoding (e.g. CP1252 in Windows) or the API's default encoding (e.g. ISO 8859-1 in java.util.Properties) will be used.
    3) Display the values with that encoding. Specify the charset encoding in a <meta> tag in the HTML head.
    A must-read: [http://www.joelonsoftware.com/articles/Unicode.html].

  • "Message from Webpage (error) There was an error in the browser while setting properties into the page HTML, possibly due to invalid URLs or other values. Please try again or use different property values."

    I created a site column at the root of my site and I have publishing turned on.  I selected the Hyperlink with formatting and constraints for publishing.
    I went to my subsite and added the column.  The request was to have "Open in new tab" for their hyperlinks.  I was able to get the column to be added and yesterday we added items without a problem. 
    The problem arose when, today, a user told me that he could not edit the hyperlink.  He has modify / delete permissions on this list.
    He would edit the item, in a custom list, and click on the address "click to add a new hyperlink" and then he would get the error below after succesfully putting in the Selected URL (http://www.xxxxxx.com), Open
    Link in New Window checkbox, the Display Text, and Tooltip:
    "Message from Webpage  There was an error in the browser while setting properties into the page HTML, possibly due to invalid URLs or other values. Please try again or use different property values."
    We are on IE 9.0.8.1112 x86, Windows 7 SP1 Enterprise Edition x64
    The farm is running SharePoint 2010 SP2 Enterprise Edition August 2013 CU Mark 2, 14.0.7106.5002
    and I saw in another post, below with someone who had a similar problem and the IISreset fixed it, as did this problem.  I wonder if this is resolved in the latest updated CU of SharePoint, the April 2014 CU?
    Summary from this link below: Comment out, below, in AssetPickers.js
    //callbackThis.VerifyAnchorElement(HtmlElement, Config);
    perform IISReset
    This is referenced in the item below:
    http://social.technet.microsoft.com/Forums/en-US/d51a3899-e8ea-475e-89e9-770db550c06e/message-from-webpage-error-there-was-an-error-in-the-browser-while-setting?forum=sharepointgeneralprevious
    TThThis is possibly the same information that I saw, possibly from the above link as reference.
    http://seanshares.com/post/69022029652/having-problems-with-sharepoint-publishing-links-after
    Again, if I update my SharePoint 2010 farm to April 2014 CU is this going to resolve the issue I have?
    I don't mind changing the JS file, however I'd like to know / see if there is anything official regarding this instead of my having to change files.
    Thank you!
    Matt

    We had the same issue after applying the SP2 & August CU. we open the case with MSFT and get the same resolution as you mentioned.
    I blog about this issue and having the office reference.
    Later MSFT release the Hotfix for this on December 10, 2013 which i am 100% positive should be part of future CUs.
    So if you apply the April CU then you will be fine.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Long text problem while uploading Inspection plan through BDC.

    Hi,
    I am facing some problem while uploading the inspection plan. There are few MICs for which we are having long text, while uploading the inspection plan through BDC - some other long text is getting copied into the MIC's long text. After checking I came to know that in function module, read_text - some text which is stored in ABAP memory is getting copied into the inspection plan.
    I am working in SAP release 4.7. I have checked with SAP notes: 97419, but it is also not satisfying.
    Waiting for quick solution.
    Thanks in advance.
    Fahié

    Hi a®s,
    Thanks a lot for your kind reply.
    My requirement is I want to maintain long text for few MICs (which are not having long texts at MIC level) in inspection plan (QP01).
    When I am trying to manually assign the MIC's to inspection plan (QP01), long text is copied whereas I am not clicking the long text icon in (QP01). Long text is not maintained in MIC level, still some long text is copied to this MIC. This was also happening while uploading the inspection plan thro' BDC.
    I believe what you have mentioned about function module SAVE_TEXT cannot be used here since long text is already copied before we pass the long text. Also if we pass some long text, still apart from the long text what we have passed there is some other long text copied (extra long text).
    Waiting for quick solution.
    Thanks in advance.
    Fahié

Maybe you are looking for

  • JHS: Export to Excel doesn't work when having leading zeros

    Oracle JHeadstart Release 11.1.1.2.29 We are using the Export to excel option, but when we have leading zeros it doesn't export it as text so the data is incorrect. Can any one please tell how doe we configure JHeadstart/ADF to have the leading zeros

  • FTP: File receiver cc error...Looks pretty simple...Can U solve this

    Hello all,    I have a simple scenario of sending the file from shared directory to FTP. When I execute the sceanrio..sender is picking up the file ..No issues in SXMB_MONI...but when I checked in the message monitoring...at adapter level for file re

  • Setting brake point in IDVD 6

    Can you manual pick the break point in IDVD when burning a DL?

  • IDVD won't open projects

    I was having some issues getting iDVD to start but I fixed that. Now after I select the project in the home menu, the project never opens. It just stops. I end up having to force quit iDVD and keep going through the same cycle. Any help would be grea

  • What's a good third party email app?

    I'm looking for new email app that has more functionality than the native app. I use gmail and yahoo email as well as exchange occasionally. II'd appreciate any suggestions.