Oracle RDF / Joseki : issue with large literals

Hi,
I have been using Joseki to query an Oracle RDF model. There seems to be an issue with large literals (according to a few unreliable tests, I would say this concerns literals around and over 4000 chars).
Here are the two potential behaviours :
First case:
If the results contains several lines, one of which contains an overly large literal, there are NO exception on the server side, but the resulting xml is incomplete.
It misses the "line" containing the large literal, and the xml is stopped there (which means that it also misses the closing </results> and </sparql>. In my case, I am using the results through Jena's sparqlService, which means I get this message :
XMLStreamException: Unexpected EOF; was expecting a close tag for element <results>
+at [row,col {unknown-source}]: [31,0]+
Second case:
If the query only returns one line which contains an overly large literal, the client receives a simple *"HttpException: 500 Internal Server Error"*
Here is the error message from my server :
+INFO [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] (SPARQL.java:165) - Throwable: we+
blogic.jdbc.wrapper.Clob_oracle_sql_CLOB cannot be cast to oracle.sql.CLOB
java.lang.ClassCastException: weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB cannot be cast to oracle.sql.CLOB
at oracle.spatial.rdf.client.jena.OracleSemIterator.getNodesFromResultSet(OracleSemIterator.java:579)
at oracle.spatial.rdf.client.jena.OracleSemIterator.next(OracleSemIterator.java:445)
at oracle.spatial.rdf.client.jena.OracleLeanQueryIter.moveToNextBinding(OracleLeanQueryIter.java:135)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.moveToNextBinding(QueryIterConvert.java:56)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.moveToNextBinding(QueryIterRepeatApply.java:76)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterProcessBinding.hasNextBinding(QueryIterProcessBinding.java:54
+)+
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:50)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:30)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:30)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:62)
at org.joseki.processors.SPARQL.executeQuery(SPARQL.java:309)
at org.joseki.processors.SPARQL.execQueryWorker(SPARQL.java:288)
at org.joseki.processors.SPARQL.execQueryProtected(SPARQL.java:126)
at org.joseki.processors.SPARQL.execOperation(SPARQL.java:120)
at org.joseki.processors.ProcessorBase.exec(ProcessorBase.java:112)
at org.joseki.ServiceRequest.exec(ServiceRequest.java:36)
at org.joseki.Dispatcher.dispatch(Dispatcher.java:59)
at org.joseki.http.Servlet.doCommon(Servlet.java:177)
at org.joseki.http.Servlet.doGet(Servlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
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:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
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)
Would there be any fix / workaround ?
Please let me know if you need further information / tests.
Thanks,
Regards,
Julien

Thanks for your reply.
While trying to build up a small test case, I found out why there were discrepancies between the two cases I described.
Indeed, usually, the two cases return the same thing (no exception on the server side, but incomplete resulting XML).
The exception I described happened when I tried something else. Since I saw that issues were coming from long literals, I used fn:string-length (ARQ) to figure out how long they were.
The test case resulting in the CLOB-cast-exception is:
- too large literal
- only one result "line" containing this literal
- usage of fn:string-length (which does not change the behaviour in other cases (i.e. no long literals or/and several lines).
Anyway, you will receive the other test cases shortly.
Thanks,
Regards,
Julien

Similar Messages

  • Does SAP or Oracle have an issue with these type of processors?

    Does SAP or Oracle have an issue with these type of processors?
    Intel Xeon X5260 & E5450    vs    Intel Itanium       PROCESSORS
    I want a Sales / Marketing URL link or white papers that talks about processor recommendations.
    SAP GUI  7.20

    > Does SAP or Oracle have an issue with these type of processors?
    >
    > Intel Xeon X5260 & E5450    vs    Intel Itanium       PROCESSORS
    >
    > I want a Sales / Marketing URL link or white papers that talks about processor recommendations.
    SAP does neither "recommend" nor "deny" any processors.
    If you check http://service.sap.com/benchmarks then you get a lot of machines with different CPUs/operating ssytems and database combinations.
    Choose the one that suits best for you.
    Markus

  • Oracle 11g decode issue with null

    Hi,
    we want to migrate from Oracle 10g to Oracle 11g and have an issue with decode.
    The database has the following character set settings:
    NLS_CHARACTERSET = AL32UTF8 in Oracle 11g and UTF8 in Oracle 10g
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    If I try a select with decode which has null as first result argument I will get a wrong value.
    select decode(id, null, null, name) from tab1;
    ("name" is a NVARCHAR2 field. Table tab1 has only one entry and "id" is not null.)
    This select returns a value with characters which are splitted by 0 bytes.
    In Oracle 10g the value without 0 bytes is delivered.
    If I suround the decode with dump I get following results:
    select dump(decode(id, null, null, name), 1016) from tab1;
    Oracle 10g: Typ=1 Len=6 CharacterSet=AL32UTF8: 4d,61,72,74,69,6e
    Oracle 11g: Typ=1 Len=12 CharacterSet=US7ASCII: 0,4d,0,61,0,72,0,74,0,69,0,6e
    NLS_LANG has no effect on the character set of 'null' in Oracle 11g.
    Non null literals work:
    select dump(decode(id, null, 'T', name), 1016) from tab1;
    Oracle 10g: Typ=1 Len=6 CharacterSet=UTF8: 4d,61,72,74,69,6e
    Oracle 11g: Typ=1 Len=6 CharacterSet=AL32UTF8: 4d,61,72,74,69,6e
    select dump(decode(id, null, N'T', name), 1016) from tab1;
    Oracle 10g: Typ=1 Len=12 CharacterSet=AL16UTF16: 0,4d,0,61,0,72,0,74,0,69,0,6e
    Oracle 11g: Typ=1 Len=12 CharacterSet=AL16UTF16: 0,4d,0,61,0,72,0,74,0,69,0,6e
    Here the scripts for creating the table and the entry:
    create table tab1 (
    id NUMBER(3),
    name NVARCHAR2(10)
    insert into tab1 (id, name) values (1, N'Martin');
    commit;
    Is it possible to change the character set?
    Could you please help me?
    Regards
    Martin

    This doesn't have the problem.looks this doesn't solve the problem (of returning a value with characters which are splitted by 0 bytes):
    SQL> select * from v$version where rownum = 1
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production         
    1 row selected.
    SQL> select dump(decode(id, null, null, name), 1016) from tab1
    union all
    select dump(case id when null then null else name end, 1016) cs from tab1
    DUMP(DECODE(ID,NULL,NULL,NAME),1016)                                           
    Typ=1 Len=12 CharacterSet=US7ASCII: 0,4d,0,61,0,72,0,74,0,69,0,6e              
    Typ=1 Len=12 CharacterSet=AL16UTF16: 0,4d,0,61,0,72,0,74,0,69,0,6e             
    2 rows selected.You need to explicitly convert the third parameter to char:
    SQL> select dump(decode(id, null, to_char(null), name), 1016) from tab1
    DUMP(DECODE(ID,NULL,TO_CHAR(NULL),NAME),1016)                                  
    Typ=1 Len=6 CharacterSet=WE8MSWIN1252: 4d,61,72,74,69,6e                       
    1 row selected.

  • FR Layout issue with large number of columns

    Hi!
    I'm developing a report in FR 11.1.1.3 with over 30 columns.
    The issue is that when I run the report in web preview, the dropdown of dimension in page goes to the far right and disappears from the display.
    If I reduce the number of the columns I don't have this problem.
    I've already tried to maximize the workspace to the maximum without any result.
    Can anyone help me to deal with reports with large numbers of columns?
    Regards,
    Luís
    Edited by: luisguimaraes on 13-Mar-2012 06:48

    IE8 could be the reason. According to the supported platform matrices (http://www.oracle.com/technetwork/middleware/bi-foundation/oracle-hyperion-epm-system-certific-2-128342.xls), check tab EPM System Basic Platform, row 70, in order IE8 to work, FR and Workspace should be patched.
    FR Patch number: 9657652
    Workspace Patch number: 9314073
    Patches can be found on My Oracle Support. Just search for the patch number.
    Cheers,
    Mehmet

  • Is there an issue with large libraries on iPod Classic 160 GB?

    I got a new iPod Classic a week ago. Have already taken it back and exchanged it once. The issue is that it works fine when I load , say, 20,000 songs onto it, but when I try to sync my whole library of around 31,500 songs it no longer works. All I get after the 'OK to disconnect' message has come up is the Apple logo. Attempting to reset doesn't work; reconnecting to the computer I get the message (some of the time) that iTunes has detected an iPod in recovery mode.
    I can restore the iPod by putting into disk mode, but restoring doesn't solve the problem - it comes back again if I try to sync the full library.
    So, I currently have a new iPod Classic with a big hard drive that is supposed to hold up to 40,000 songs according to specifications and what I was told by the expert in the Apple Store, but so far the behaviour of the two iPods has indicated that in reality it can't handle that many.
    THis is not the first time I've seen this kind of issue with an iPod. I had exactly the same issue when the first 60 GB iPods came out - software only worked with a smaller number of songs.

    I've been able fill up a 160Gb Classic quite happily, although at some point I recall finding my iPod started to crash as I got it filled up. One problem seemed to be that iTunes & Windows would get confused when trying to add a really large number for which this workaround helps during the rebuild.
    *Break up large transfers*
    In iTunes select the menu item *File... New Smart Playlist*. Change the first drop-down box to Playlist, the next to is and the next to Music or whatever playlist holds the bulk of the content you want on your device. Tick against *Limit to*, type in say 10, then change the drop-down to GB, and set the last drop-down to artist. When you click OK you can enter a name for the playlist, e.g. Transfer. Now sync this playlist to your iPod rather than your entire library. When the sync is complete modify the rule ( *File... Edit playlist* ) to increase the size by your chosen amount, then sync and repeat. You can experiment with different size increments, if it doesn't work just choose something a bit smaller until it works each time. Before long you should have all your music on your iPod. Once that's done you can move on to other media such as podcasts, videos, photos, playlists etc.
    The other problem I found is that sometimes the iPod would crash on exiting or even on entry to an iPod game. After a number of restores I determined that the number and complexity of the playlists I was putting on was the cause of the problem. I believe these are loaded into working RAM, so use too much memory for these and the iPod struggles on any other memory hungry task.
    tt2

  • In OSB , xquery issue with large volume data

    Hi ,
    I am facing one problem in xquery transformation in OSB.
    There is one xquery transformation where I am comparing all the records and if there are similar records i am clubbing them under same first node.
    Here i am reading the input file from the ftp process. This is perfectly working for the small size input data. When there is large input data then also its working , but its taking huge amount of time and the file is moving to error directory and i see the duplicate records created for the same input data. I am not seeing anything in the error log or normal log related to this file.
    How to check what is exactly causing the issue here,  why it is moving to error directory and why i am getting duplicate data for large input( approx 1GB).
    My Xquery is something like below.
    <InputParameters>
                    for $choice in $inputParameters1/choice              
                     let $withSamePrimaryID := ($inputParameters1/choice[PRIMARYID eq $choice/PRIMARYID])                
                     let $withSamePrimaryID8 := ($inputParameters1/choice[FIRSTNAME eq $choice/FIRSTNAME])
                     return
                      <choice>
                     if(data($withSamePrimaryID[1]/ClaimID) = data($withSamePrimaryID8[1]/ClaimID)) then
                     let $claimID:= $withSamePrimaryID[1]/ClaimID
                     return
                     <ClaimID>{$claimID}</ClaimID>                
                     else
                     <ClaimID>{ data($choice/ClaimID) }</ClaimID>

    HI ,
    I understand your use case is
    a) read the file ( from ftp location.. txt file hopefully)
    b) process the file ( your x query .. although will not get into details)
    c) what to do with the file ( send it backend system via Business Service?)
    Also noted the files with large size take long time to be processed . This depends on the memory/heap assigned to your JVM.
    Can say that is expected behaviour.
    the other point of file being moved to error dir etc - this could be the error handler doing the job ( if you one)
    if no error handlers - look at the timeout and error condition scenarios on your service.
    HTH

  • Oracle Discoverer 4i (portal db - oracle 8i) connectivity issue with 11g database

    Hi All
    We have oracle discoverer 4i with portal db (oracle 8i).
    We connect to the external databases using db links in the portal db and the reports will use the db link to retrieve the data from views in the external databases.
    External databases we were connecting is oracle 10g version and now we have upgraded these databases to 11g version.
    Now i have a created a new db link to this 11g database and i have created a new EUL in portal to connect to this 11g database.
    But when i try to create a report using the discoverer from this new EUL after login to the discoverer we get a "cannot connect to database" error.
    We have all the necesscary privilege to the user and the new database link works perfectly fine. (when we try to query directly using SQL plus from portal database using this db link the query works perfectly fine).
    Im not sure if this is a compatibility issue in connecting from oracle disc 4i to a 11g database.
    Can any one advise if this is the case and if there is any workaround for this?
    Regards,
    Raj

    Are you saying you are having issues with a database link between 8i and 11g (pl post exact versions to 4 digits) ? If so, it should be expected as database links between these two versions are not supported. Is there a reason you cannot upgrade the portal database to at least 10gR2 ?
    See MOS Doc 207303.1
    HTH
    Srini

  • Oracle 6i forms issue with Oracle 9i Database

    Hi Friends,
    I am having Oracle Forms Developer installed with patchset18.The Version is 6.0.8.27.0
    When i connect the forms builder to 9i Database (9.2.0.1) the form builder is getting crashed but i am able to connect the forms builder to e-business suite database(9.2.0.6)
    I tried installing 9i Database(9.2.0.1) on windows 2003 server,windows xp,windows 2000.
    When i connect my forms builder to any of these databases the forms builder is crashing with don't send message error on (ifbld60.exe).
    Is there any compatibility issue between forms builder(6i) and oracle 9i(9.2.0.1).Please suggest me.
    Regards,
    Arun .N

    Forms 6i connects to Oracle 9 databases just fine, even though it is no longer certified by Oracle.
    First of all, can you connect to the database with SQL Plus? Make sure that works first.
    The other thing that comes to mind is the AL32UTF8 character set. Forms 6i and other older Oracle software cannot connect to databases using it. But I have only seen that problem with Oracle 10g databases, so I am not sure about the Oracle 9 db.
    Here is a thread discussing the problem: Re: connecting form 6i  to oracle database 10G express edition

  • Oracle 10.2 issues with services and listener

    Hi,
    I have successfully installed ORACLE 10.2(SID= ANK) and uninstalled 10.1(SID= ANB) on same machine(Hostname INLD50057853A port 1521) .
    but I am not able see listener services in windows service box for ANK I only see previous one, though I have uninstalled 10.1 with proper steps.
    Below are only services I can see in my windows box
    1) OracleANB101TNSListener (not able to start this service...it gives some error)
    2) OracleANK102iSQL*Plus (not able to start this service also)
    3) OracleOraDb10g_home1TNSListener (not able to start this also)
    Could you please let me know what can I do in such case now.
    If I do command lsnrctl it gives me successfull message
    C:>lsnrctl
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 01-JUN-2009 11:53
    :10
    Copyright © 1991, 2005, Oracle. All rights reserved.
    Welcome to LSNRCTL, type "help" for information.
    If I do command tnsping ANK.WORLD it give me error message
    C:>tnsping ANK.WORLD
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 01-JUN-2
    009 11:52:03
    Copyright © 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    c:oracleANK102
    etworkadminsqlnet.ora
    TNS-03505: Failed to resolve name
    If I do commant sqlplus /nolog it says
    C:>sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 1 11:55:06 2009
    Copyright © 1982, 2005, Oracle. All rights reserved.
    SQL> conn sys/your_pass @ ank.world as sysdba
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    my lsnrctl.log says
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 01-JUN-2009 11:59:44
    Copyright © 1991, 2005, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    TNS-12560: TNS:protocol adapter error
    sending you listener.ora , namespace.ora and sqlnet.ora
    C:oracleNetworkadmin
    listener.ora
    1. Filename......: listener.ora
    2. Created.......: created by SAP AG, R/3 Rel. >= 6.10
    3. Name..........:
    4. Date..........:
    5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#3 $
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = ANK.WORLD)
    (ADDRESS=
    (PROTOCOL = IPC)
    (KEY = ANK)
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = INLD50057853A)
    (PORT = 1521)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SDU = 32768)
    (SID_NAME = ANK)
    (ORACLE_HOME = C:oracle)
    tnsnames.ora
    1. Filename......: tnsnames.ora
    2. Created.......: created by SAP AG, R/3 Rel. >= 6.10
    3. Name..........:
    4. Date..........:
    5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#3 $
    ANK.WORLD=
    (DESCRIPTION =
    (SDU = 32768)
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = INLD50057853A)
    (PORT = 1521)
    (CONNECT_DATA =
    (SID = ANK)
    (GLOBAL_NAME = ANK.WORLD)
    sqlnet.ora
    1. Filename......: sqlnet.ora
    2. Created.......: created by SAP AG, R/3 Rel. >= 6.10
    3. Name..........:
    4. Date..........:
    5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/SQLNET.ORA#3 $
    AUTOMATIC_IPC = ON
    TRACE_LEVEL_CLIENT = OFF
    NAMES.DEFAULT_DOMAIN = WORLD
    NAME.DEFAULT_ZONE = WORLD
    SQLNET.EXPIRE_TIME = 0
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    TCP.NODELAY=YES
    I hope this information is enough for you to know what issue I am facing now. but if you need some more logs do let me know. Its very tricky situation and I am sure solution is very small which I dont know currently and need experts point of view
    Kindly suggest.
    Regards,
    Ankit Baphna

    will close this and open new as I am having some issue with editor

  • Flex file upload issue with large image files

         Hello, I have created a sample flex application to upload an image and also created java servlet to upload and save image and deployed in local tomcat server. I am testing the application in LAN. I am able to upload small as well as large image file(1Mb) from some PCs but in some other PCs I am getting IOError while uploading large image files however it is working fine for small images. Image uploading is hanging after 10%-20% and throwing IOError. *Surprizgly it is working Ok with XP systems and causeing issues with Windows7 systems*.
    Plz give me any idea to get a solution.
    In Tomcat server side it is giving following error:
    request: org.apache.catalina.connector.RequestFacade@c19694
    org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:371)
            at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.ja va:126)
            at flex.servlets.UploadImage.doPost(UploadImage.java:47)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProto col.java:594)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStre am.java:982)
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:8 86)
            at java.io.InputStream.read(InputStream.java:101)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:96)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:66)
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:366)
    UploadImage.java:
    package flex.servlets;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    import java.util.regex.*;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UploadImage extends HttpServlet{
             * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
             *      response)
            protected void doGet(HttpServletRequest request,
                            HttpServletResponse response) throws ServletException, IOException {
                    // TODO Auto-generated method stub
                    doPost(request, response);
            public void doPost(HttpServletRequest request,
                            HttpServletResponse response)
            throws ServletException, IOException {
                    PrintWriter out = response.getWriter();
                    boolean isMultipart = ServletFileUpload.isMultipartContent(
                                    request);
                    System.out.println("request: "+request);
                    if (!isMultipart) {
                            System.out.println("File Not Uploaded");
                    } else {
                            FileItemFactory factory = new DiskFileItemFactory();
                            ServletFileUpload upload = new ServletFileUpload(factory);
                            List items = null;
                            try {
                                    items = upload.parseRequest(request);
                                    System.out.println("items: "+items);
                            } catch (FileUploadException e) {
                                    e.printStackTrace();
                            Iterator itr = items.iterator();
                            while (itr.hasNext()) {
                                    FileItem item = (FileItem) itr.next();
                                    if (item.isFormField()){
                                            String name = item.getFieldName();
                                            System.out.println("name: "+name);
                                            String value = item.getString();
                                            System.out.println("value: "+value);
                                    } else {
                                            try {
                                                    String itemName = item.getName();
                                                    Random generator = new Random();
                                                    int r = Math.abs(generator.nextInt());
                                                    String reg = "[.*]";
                                                    String replacingtext = "";
                                                    System.out.println("Text before replacing is:-" +
                                                                    itemName);
                                                    Pattern pattern = Pattern.compile(reg);
                                                    Matcher matcher = pattern.matcher(itemName);
                                                    StringBuffer buffer = new StringBuffer();
                                                    while (matcher.find()) {
                                                            matcher.appendReplacement(buffer, replacingtext);
                                                    int IndexOf = itemName.indexOf(".");
                                                    String domainName = itemName.substring(IndexOf);
                                                    System.out.println("domainName: "+domainName);
                                                    String finalimage = buffer.toString()+"_"+r+domainName;
                                                    System.out.println("Final Image==="+finalimage);
                                                    File savedFile = new File(getServletContext().getRealPath("assets/images/")+"/LowesFloorPlan.png");
                                                    //File savedFile = new File("D:/apache-tomcat-6.0.35/webapps/ROOT/example/"+"\\test.jpeg");
                                                    item.write(savedFile);
                                                    out.println("<html>");
                                                    out.println("<body>");
                                                    out.println("<table><tr><td>");
                                                    out.println("");
                                                    out.println("</td></tr></table>");
                                                    try {
                                                            out.println("image inserted successfully");
                                                            out.println("</body>");
                                                            out.println("</html>");  
                                                    } catch (Exception e) {
                                                            System.out.println(e.getMessage());
                                                    } finally {
                                            } catch (Exception e) {
                                                    e.printStackTrace();

    It is only coming in Windows 7 systems and the root of this problem is SSL certificate.
    Workaround for this:
    Open application in IE and click on certificate error link at address bar . Click install certificate and you are done..
    happy programming.
    Thanks
    DevSachin

  • Oracle singleton instance issue with OCIStmtFetch()

    Hi,
    i am folowing a singletom pattern in my VC++ application were only one Oracle instance is created and it is being used through out the application. The OCIStmtFetch() is used twice in the application and when the OCIStmtFetch() is invoked for the second time it returns a OCI_NO_DATA condition. But when i created a new instance of Database use it to  invoked the OCIStmtFetch() for the second time it gives a proper result. please can some one help me on why the singleton DBinstance is causing issue with the OCIStmtFetch() for the second time.

    This forum is about general programming in C, C++, and Fortran, and specifically about using the Oracle Solaris Studio suite of programming tools. Since your question is about using VC++ with Oracle database, you are not likely to get a helpful answer here. (Oracle Solaris Studio is not available on Windows.)
    I suggest you try an Oracle database programming forum. Start here:
    Database

  • Performance Issues with large XML (1-1.5MB) files

    Hi,
    I'm using an XML Schema based Object relational storage for my XML documents which are typically 1-1.5 MB in size and having serious performance issues with XPath Query.
    When I do XPath query against an element of SQLType varchar2, I get a good performance. But when I do a similar XPath query against an element of SQLType Collection (Varray of varchar2), I get a very ordinary performance.
    I have also created indexes on extract() and analyzed my XMLType table and indexes, but I have no performance gain. Also, I have tried all sorts of storage options available for Collections ie. Varray's, Nested Tables, IOT's, LOB's, Inline, etc... and all these gave me same bad performance.
    I even tried creating XMLType views based on XPath queries but the performance didn't improve much.
    I guess I'm running out of options and patience as well.;)
    I would appreciate any ideas/suggestions, please help.....
    Thanks;
    Ramakrishna Chinta

    Are you having similar symptoms as I am? http://discussions.apple.com/thread.jspa?threadID=2234792&tstart=0

  • SQLServer to oracle migration. Issue with table having image data.

    Hi,
    I am using the SQL Developer version 1.5.0.53 Build MAIN-53.38. I am trying to migrate from sql server database to oracle. Sql server database version is 2005 and oracle database version is 10g (10.1.0.2 and 10.2.0.3). Both Oracle and Sql server databases are on windows-xp.
    Everything (including data) migrated well except for the one table having blob (oracle) and image(sqlserver). I am getting the following error in sql developer while migrating data for the blob from sql server to oracle.
    Data Move information:Rows : 497 Errors: 10278
    Commit failed: Closed Connection
    Must be logged on to server
    [POCRepository].[td].[REPOSITORY] Closed Connection
    Io exception: Software caused connection abort: socket write error
    [POCRepository].[td].[REPOSITORY] OALL8 is in an inconsistent state
    No more data to read from socket
    [POCRepository].[td].[REPOSITORY] No more data to read from socket
    Inserting ' ' into column td_POCRepository.REPOSITORY.RP_DATA (Row number 498)
    I have created sqldeveloper.cmd file as suggested in other threads and I am using the same java provided with SQL Developer 1.5.0.53.
    The database alertsid.log shows the following error messages for this activity.
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x34EF9E5] [] [] [] []
    ORA-00600: internal error code, arguments: [kghasp1], [0x5F3B718], [], [], [], [], [], []
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x34EF9E5] [] [] [] []
    The error ORA-00600[kghasp1] refers to the problem with heap memory. I also restarted the database and tried the data migration for only this table but with the same error.
    I tried it on both 10g release1 and 10g release 2.
    Can someone please help me in resolving this issue.
    Thanks
    Raghavendra

    Hi Raghavendra,
    Are you saying the Microsoft SQL Server bcp dump of image data failed? It has been tested, it results in a hex dump rather than a binary dump, hence the clob to blob, and hextoraw workaround.
    What are the version numbers and what is the reproducible test case?
    -Turloch
    Note that the clob to blob process is automated:
    Tools->preferences->Migration->Generation Options->General Options->Generate Stored Procedure for Migrate Blobs Offline
    From Help:
    Generate Stored Procedure for Migrate Blobs Offline: Causes a stored procedure named CLOBtoBLOB_sqldeveloper (with execute access granted to public) to be created if the schema contains a BLOB (binary large object); this procedure is automatically called if you perform an offline capture. If this option is not checked, you will need to use the manual workaround described in Populating the Destination Database Using the Data Files. (After the offline capture, you can delete the CLOBtoBLOB_sqldeveloper procedure or remove execute access from public.)

  • Oracle Report Server Issue with Japanese Characters

    We are trying to setup a Oracle Report Server to print the Japanese characters in the PDF format.
    We have separate Oracle Report servers for printing English, Chinese and Vietnamese characters in PDF formats using Oracle Reports in the production which are running properly with Unix AIX version 5.3. Now we have a requirement to print the Japanese characters. Hence we tried to setup the new server for the same and the configurations are done as same as Chinese/Vietnamese report servers. But we are not able to print the Japanese characters.
    I am providing the details which we followed to configure this new server.
    1.     We have modified the reports.sh to map the proper NLS_LANG (JAPANESE_AMERICA.UTF8) and other Admin folder settings.
    2.     We have configured the new report server via OPMN admin.
    3.     We have copied the arialuni.ttf to Printers folder and we have converted this same .ttf file in AFM format. This AFM file has been copied to $ORACLE_HOME/guicommon/gk/JP_Admin/AFM folder.
    4.     We have modified the uifont.ali (JP_admin folder) file for font subsetting.
    5.     We have put an entry in JP_admin/PPD/datap462.ppd as *Font ArialUnicodeMS: Standard "(Version 1.01)" Standard ROM
    6.     We have modified the Tk2Motif.rgb (JP_admin folder) file for character set mapping (Tk2Motif*fontMapCs: iso8859-1=UTF8) as we have enabled this one for other report servers as well.
    Environment Details:-
    Unix AIX version : 5300-07-05-0831
    Oracle Version : 10.1.0.4.2
    NLS_LANG : JAPANESE_AMERICA.UTF8
    Font Mapping : Font Sub Setting in uifont.ali
    Font Used for Printing : arialuni.ttf (Font Name : Arial Unicode MS)
    The error thrown in the rwEng trace (rwEng-0.trc) file is as below
    [2011/9/7 8:11:4:488] Error 50103 (C Engine): 20:11:04 ERR REP-3000: Internal error starting Oracle Toolkit.
    The error thrown when trying to execute the reports is…
    REP-0177: Error while running in remote server
    Engine rwEng-0 crashed, job Id: 67
    Our investigations and findings…
    1.     We disabled the entry Tk2Motif*fontMapCs: iso8859-1=UTF8 in Tk2Motif.rgb then started the server. We found that no error is thrown in the rwEng trace file and we are able to print the report also in PDF format… (Please see the attached japarial.pdf for your verification) but we are able to see only junk characters. We verified the document settings in the PDF file for ensuring the font sub set. We are able to see the font sub setting is used.
    2.     If we enable the above entry then the rwEng trace throwing the above error (oracle toolkit error) and reports engine is crashed.
    It will be a great help from you if you can assist us to resolve this issue…

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Oracle HRMS Setup Issue with Business Group

    Hi Gurys.
    need your ugrent help.
    i am implementing Oracle HRMS on 12.1.1
    Steps
    --- Responsbility Creation
    1- Responsbility Creation XX_HRMS (Responsbility created through Sysadmin)
    2- Menu Option GLB SHRMS Navigator
    -- USER Creation
    1- Create user XX_USER (User Creation done through Sysadmin)
    2- Below Responsiblities are granted to new User HRMS)
    -Application Developer
    -System Administrator
    -XX HRMS
    -System Administrator
    --KFF Creation through XX_USER with System Administrator
    --Location Creation through XX_USER with XX_HRMS Responsbility
    --Business Group creation through XX_USER with XX_HRMS Responsbility
    Here is issue, Business group created and saved, upon search it's not showing business group.
    i change the responsbility to System Administrator and set the profile at system level
    HR: Business Group to newly created Business Group.
    but when i want to set HR:Security profile , business group is not visible

    Thanks for your reply .
    1- avigate to the oraganization window and search for the business groups? how many do you see ? What are the names ?
    It show all the business grup , names are in query result below
    2- What is the result of the query -
    Select * from per_business_groups
    below is the query result
    NAME |DATE_FROM|LOCATION_ID|SHORT_NAME|LEGISLATION_CODE|CURRENCY_CODE|ENABLED_FLAG
    FAYYAZ GB |1/1/1990 |142 |Setup |US|USD|Y
    FAYYAZ |2/8/2011 |142 |Fayyaz |PK|USD|Y
    XX_TEST |2/8/2010 |142 |XX Test |GB|GBP|Y
    XX Company Final |2/8/2011 |142 |XX Company Final |GB|GBP|Y
    XX Company |2/8/2011 |142 |XX Company |GB|GBP|Y
    XX Comapny |2/8/2011 |142 |XX Company |GB|GBP|Y
    TEST |2/8/2011|142 |TEST |GB|GBP|Y
    3- Naigate to the security profile window. How many security profiles do you see ? What are the business groups they are associated with ?
    there is no business group showing in security profile, nor at site level not at responsbility.

Maybe you are looking for

  • How to print in black and white only?

    Hello, I have HP Color Laserjet cp1515n. I downloaded and installed "HP_CP1510_series_full_solution_EMEA3-v4.0" from HP's website for the driver.  When printing (in the properties for the printer) there is no option whether to print in black and whit

  • When to use which scope

    Hi, I have a CRUD application.. Where in the data is fetched, displayed n edited n stored back to db. Also there is a sequential access between pages & the information entered on the first page is needed on the second page & so forth. What would be t

  • I am having problems playing half my games on facebook because of abod flash player is there any way around this?

    I am having problems playing half my games on facebook because of abod flash player is there any way around this?

  • Several forecast models

    Hi, I need to see the result of several forecast models. how to do it ? Do I need to create n number of forecast profie to see the result of n number of forecast models or in one profile I can see the result of n number of forecast models. Thanks a l

  • Capture data in 1D barcode upon merging XML with XDP?

    Hi, The scenario is: Forms Server 7.2.2 is being used for merging XML data with an XDP file to render a PDF (displaying a pre-filled form to user). On the XDP, there is a 1D Barcode and few fields are mapped to this barcode (the barcode is intended t