Blob version1 to blob version 2

HI,
I am serilizing a value object(v1) and storing it into a database as blob. Afterwards i am adding some more attributes to the value object and removing some attributes, let me call the new value object as v2. I am in a situation to convert the v1 blob to v2 blob (Say both has same serialization UID). i like to copy all common attributes of v1 and v2 from v1 to v2. Is there a easy way to do this instead of writing copy statements for each atributes?

Hi Fred_1king,
Here's a simple solution among others : build a class that will contain the common attributes of both v1 and v2 with getters/setters.
Example :
public class Common implements Serializable {
// common attributes
public class ObjectV1 implements Serializable {
// common attributes
    private Common common;
// specific attributes to v1
// constructor
    public class ObjectV1(Common common) {
        this.common = common;
public class ObjectV2 implements Serializable {
// common attributes
    private Common common;
// specific attributes to v2
    public class ObjectV2(Common common) {
        this.common = common;
}

Similar Messages

  • How to revert to diagnostics.wadcfg configuration from wad-control-container blob.

    Hello all,
    In our project at some point in the past we have enabled Diagnostics module for getting our log entries in Azure Storage. We added <Import moduleName="Diagnostics" /> to ServiceDefinition.csdef file and then enabled logs transfering and performance
    counters gathering in WebRole.OnStart method via DiagnosticMonitor.Start():
    DiagnosticMonitorConfiguration cfg = DiagnosticMonitor.GetDefaultInitialConfiguration();
    cfg.OverallQuotaInMB = 8192;
    cfg.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
    cfg.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(30);
    cfg.Logs.BufferQuotaInMB = 1000;
    // Define performance counter configuration.
    foreach (var counterName in PERFORMANCE_COUNTERS_NAMES)
    PerformanceCounterConfiguration perfCounterConfiguration = new PerformanceCounterConfiguration();
    perfCounterConfiguration.CounterSpecifier = counterName;
    perfCounterConfiguration.SampleRate = TimeSpan.FromSeconds(5);
    cfg.PerformanceCounters.DataSources.Add(perfCounterConfiguration);
    cfg.PerformanceCounters.BufferQuotaInMB = 1024;
    cfg.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", cfg);
    Then using Windows Azure Management Portal we activated Verbose monitoring mode and added several additional performance counters there in order to try the feature. I assume that doing that through the portal we actually modified wad-control-container blob
    so we got new performace counters configuration.
    Later we've realized that it would be better to manage all diagnostic configuration in diagnostics.wadcfg. We removed the code from role start and added diagnostics.wadcfg file to the project that declares the same we did before via code. When we redeployed
    we saw that the configuration remained as it was before - it didn't change at all. It still included new performance counters we added through the portal. It is because the order of precedence, where wad-control-container blob has the highest priority. So
    we deleted all the blobs from wad-control-container in order to revert back to diagnostics.wadcfg and redeployed the service. New blob was created in wad-control-container. It included everything from diagnostics.wadcfg as we expected and
    again we saw these custom performance counters we added via portal time ago. See below the blob content:
    <?xml version="1.0"?>
    <ConfigRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DataSources>
    <OverallQuotaInMB>8192</OverallQuotaInMB>
    <Logs>
    <BufferQuotaInMB>1024</BufferQuotaInMB>
    <ScheduledTransferPeriodInMinutes>1</ScheduledTransferPeriodInMinutes>
    <ScheduledTransferLogLevelFilter>Verbose</ScheduledTransferLogLevelFilter>
    </Logs>
    <DiagnosticInfrastructureLogs>
    <BufferQuotaInMB>1024</BufferQuotaInMB>
    <ScheduledTransferPeriodInMinutes>5</ScheduledTransferPeriodInMinutes>
    <ScheduledTransferLogLevelFilter>Warning</ScheduledTransferLogLevelFilter>
    </DiagnosticInfrastructureLogs>
    <PerformanceCounters>
    <BufferQuotaInMB>4096</BufferQuotaInMB>
    <ScheduledTransferPeriodInMinutes>5</ScheduledTransferPeriodInMinutes>
    <Subscriptions>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\Memory\Available Mbytes</CounterSpecifier>
    <SampleRateInSeconds>10</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\Processor(_Total)\% Processor Time</CounterSpecifier>
    <SampleRateInSeconds>10</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Requests/Sec</CounterSpecifier>
    <SampleRateInSeconds>5</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Requests Executing</CounterSpecifier>
    <SampleRateInSeconds>5</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Requests In Application Queue</CounterSpecifier>
    <SampleRateInSeconds>5</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Requests Failed</CounterSpecifier>
    <SampleRateInSeconds>30</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Requests Timed Out</CounterSpecifier>
    <SampleRateInSeconds>30</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET\Requests Rejected</CounterSpecifier>
    <SampleRateInSeconds>30</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET\Worker Process Restarts</CounterSpecifier>
    <SampleRateInSeconds>600</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <!-- OLD unnecessary counters that were added manually through the portal START-->
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\Memory\Available MBytes</CounterSpecifier>
    <SampleRateInSeconds>180</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\Web Service(_Total)\ISAPI Extension Requests/sec</CounterSpecifier>
    <SampleRateInSeconds>180</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\Web Service(_Total)\Bytes Total/Sec</CounterSpecifier>
    <SampleRateInSeconds>180</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET Applications(__Total__)\Errors Total/Sec</CounterSpecifier>
    <SampleRateInSeconds>180</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <PerformanceCounterConfiguration>
    <CounterSpecifier>\ASP.NET\Requests Queued</CounterSpecifier>
    <SampleRateInSeconds>180</SampleRateInSeconds>
    </PerformanceCounterConfiguration>
    <!-- OLD unnecessary counters that were added manually through the portal END-->
    </Subscriptions>
    </PerformanceCounters>
    <WindowsEventLog>
    <BufferQuotaInMB>0</BufferQuotaInMB>
    <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes>
    <Subscriptions />
    <ScheduledTransferLogLevelFilter>Undefined</ScheduledTransferLogLevelFilter>
    </WindowsEventLog>
    <Directories>
    <BufferQuotaInMB>256</BufferQuotaInMB>
    <ScheduledTransferPeriodInMinutes>5</ScheduledTransferPeriodInMinutes>
    <Subscriptions>
    <DirectoryConfiguration>
    <Path>C:\Resources\directory\ac17d63416cf41c8acfebbbcb3d90052.Mbo.Services.Web.DiagnosticStore\CrashDumps</Path>
    <Container>wad-crash-dumps</Container>
    <DirectoryQuotaInMB>256</DirectoryQuotaInMB>
    </DirectoryConfiguration>
    </Subscriptions>
    </Directories>
    </DataSources>
    <IsDefault>false</IsDefault> <!-- DEFAULT IS SET TO FALSE AGAIN -->
    </ConfigRequest>
    We tried to directly edit this XML. We removed redundant counters and changed IsDefault to "true" value in the XML and updated the blob in the wad-control-container using Azure Management Studio. Next time we redeployed the service - the counters
    again appeared in the configuration and IsDefault reverted to false again.
    Does anyone know how to permanently revert to managing diagnostics configuration only via diagnostics.wadcfg file and force the Azure to forget about manual edits we did via the portal?
    We use Azure SDK 1.4. 
    Thanks in advance for any insights!
    Vitaly

    Hi Vitaly,
    Did you try to change diagnostics configuration in VS? Like this:
    I suggest you could click the "Edit", and select your diagnostics metrics. Also, I want you double check your  re-deployment  project whether is right. Please try it.
    By the way, I suggest you could upgrade your SDK version and refer to this sample:
    http://www.windowsazure.com/en-us/develop/net/common-tasks/performance-profiling/
    http://msdn.microsoft.com/en-us/library/windowsazure/hh411542.aspx
    Any question or result, please let me know.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Remote Blob Storage Install - APPCOMPAT: no matching ProductCode found in database.

    I am trying to install Remote Blob Storage in Sharepoint Server 2013 with SQL Server 2008 R2 Express, but it is not creating the table in the database.
    Here is my script
    msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content_Blob_001" DBINSTANCE="SHAREPOINT" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
    Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    APPCOMPAT: looking for appcompat database entry with ProductCode '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}
    My SQL server version is 10.50.6000.34
    In the log file I found the following lines in the bottom of the file, but the table is not in the content database.
    Product: SQL Server 2008 R2 Remote Blob Store -- Configuration completed successfully.
    I am struggling with this issue for long.  It would be great if someone could help.
    === Verbose logging started: 3/4/2015 15:27:16 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Windows\system32\msiexec.exe ===
    MSI (c) (E4:A4) [15:27:16:166]: Resetting cached policy values
    MSI (c) (E4:A4) [15:27:16:166]: Machine policy value 'Debug' is 0
    MSI (c) (E4:A4) [15:27:16:166]: ******* RunEngine:
    ******* Product: RBS.msi
    ******* Action:
    ******* CommandLine: **********
    MSI (c) (E4:A4) [15:27:16:166]: Client-side and UI is none or basic: Running entire install on the server.
    MSI (c) (E4:A4) [15:27:16:166]: Grabbed execution mutex.
    MSI (c) (E4:A4) [15:27:16:182]: Cloaking enabled.
    MSI (c) (E4:A4) [15:27:16:182]: Attempting to enable all disabled privileges before calling Install on Server
    MSI (c) (E4:A4) [15:27:16:182]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (00:94) [15:27:16:182]: Running installation inside multi-package transaction D:\RBS.msi
    MSI (s) (00:94) [15:27:16:182]: Grabbed execution mutex.
    MSI (s) (00:54) [15:27:16:182]: Resetting cached policy values
    MSI (s) (00:54) [15:27:16:182]: Machine policy value 'Debug' is 0
    MSI (s) (00:54) [15:27:16:182]: ******* RunEngine:
    ******* Product: D:\RBS.msi
    ******* Action:
    ******* CommandLine: **********
    MSI (s) (00:54) [15:27:16:197]: Machine policy value 'DisableUserInstalls' is 0
    MSI (s) (00:54) [15:27:16:197]: Setting cached product context: User non-assigned for product: FB42F99F09B0E3646985F32DFE3C9C29
    MSI (s) (00:54) [15:27:16:197]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:197]: SRSetRestorePoint skipped for this transaction.
    MSI (s) (00:54) [15:27:16:197]: End dialog not enabled
    MSI (s) (00:54) [15:27:16:197]: Original package ==> D:\RBS.msi
    MSI (s) (00:54) [15:27:16:197]: Package we're running from ==> C:\Windows\Installer\6847f.msi
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: Uninstall Flags override found.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: Uninstall VersionNT override found.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: Uninstall ServicePackLevel override found.
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: looking for appcompat database entry with ProductCode '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}'.
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: no matching ProductCode found in database.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: MSCOREE not loaded loading copy from system32
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisablePatch' is 0
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'AllowLockdownPatch' is 0
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisableLUAPatching' is 0
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisableFlyWeightPatching' is 0
    MSI (s) (00:54) [15:27:16:213]: Enabling baseline caching for this transaction since all active patches are MSI 3.0 style MSPs or at least one MSI 3.0 minor update patch is active
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: looking for appcompat database entry with ProductCode '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}'.
    MSI (s) (00:54) [15:27:16:213]: APPCOMPAT: no matching ProductCode found in database.
    MSI (s) (00:54) [15:27:16:213]: Transforms are not secure.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'D:\rbs_install_log.txt'.
    MSI (s) (00:54) [15:27:16:213]: Command Line: TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=WSS_Content_Blob_001 DBINSTANCE=SHAREPOINT FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1 CURRENTDIRECTORY=D:\ CLIENTUILEVEL=3 CLIENTPROCESSID=10980
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{1AC68E73-94F1-4A01-B229-82B2F73C3326}'.
    MSI (s) (00:54) [15:27:16:213]: Product Code passed to Engine.Initialize: '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}'
    MSI (s) (00:54) [15:27:16:213]: Product Code from property table before transforms: '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}'
    MSI (s) (00:54) [15:27:16:213]: Product Code from property table after transforms: '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}'
    MSI (s) (00:54) [15:27:16:213]: Product registered: entering maintenance mode
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Determined that existing product (either this product or the product being upgraded with a patch) is installed per-machine.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Product {56D21E05-679B-40F2-94C1-DB0D7EB2E461} is admin assigned: LocalSystem owns the publish key.
    MSI (s) (00:54) [15:27:16:213]: Product {56D21E05-679B-40F2-94C1-DB0D7EB2E461} is managed.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: MSI_LUA: Credential prompt not required, user is an admin
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2
    MSI (s) (00:54) [15:27:16:213]: Entering CMsiConfigurationManager::SetLastUsedSource.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Specifed source is already in a list.
    MSI (s) (00:54) [15:27:16:213]: User policy value 'SearchOrder' is 'nmu'
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisableBrowse' is 0
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'AllowLockdownBrowse' is 0
    MSI (s) (00:54) [15:27:16:213]: Adding new sources is allowed.
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Package name retrieved from configuration data: 'RBS.msi'
    MSI (s) (00:54) [15:27:16:213]: Note: 1: 2262 2: AdminProperties 3: -2147287038
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisableMsi' is 1
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'AlwaysInstallElevated' is 0
    MSI (s) (00:54) [15:27:16:213]: User policy value 'AlwaysInstallElevated' is 0
    MSI (s) (00:54) [15:27:16:213]: Using cached product context: machine assigned for product: 50E12D65B9762F04491CBDD0E72B4E16
    MSI (s) (00:54) [15:27:16:213]: Product {56D21E05-679B-40F2-94C1-DB0D7EB2E461} is admin assigned: LocalSystem owns the publish key.
    MSI (s) (00:54) [15:27:16:213]: Product {56D21E05-679B-40F2-94C1-DB0D7EB2E461} is managed.
    MSI (s) (00:54) [15:27:16:213]: Running product '{56D21E05-679B-40F2-94C1-DB0D7EB2E461}' with elevated privileges: Product is assigned.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding TRUSTSERVERCERTIFICATE property. Its value is 'true'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Modifying FILEGROUP property. Its current value is 'default'. Its new value: 'PRIMARY'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding DBNAME property. Its value is 'WSS_Content_Blob_001'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding DBINSTANCE property. Its value is 'SHAREPOINT'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Modifying FILESTREAMFILEGROUP property. Its current value is 'default'. Its new value: 'RBSFilestreamProvider'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding FILESTREAMSTORENAME property. Its value is 'FilestreamProvider_1'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding CURRENTDIRECTORY property. Its value is 'D:\'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding CLIENTUILEVEL property. Its value is '3'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding CLIENTPROCESSID property. Its value is '10980'.
    MSI (s) (00:54) [15:27:16:213]: Machine policy value 'DisableAutomaticApplicationShutdown' is 0
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding MsiRestartManagerSessionKey property. Its value is 'f13e91ecbfc5d34cae7163e948e320cc'.
    MSI (s) (00:54) [15:27:16:213]: RESTART MANAGER: Session opened.
    MSI (s) (00:54) [15:27:16:213]: TRANSFORMS property is now:
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding PRODUCTLANGUAGE property. Its value is '1033'.
    MSI (s) (00:54) [15:27:16:213]: PROPERTY CHANGE: Adding VersionDatabase property. Its value is '300'.
    MSI (s) (00:54) [15:27:16:213]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming
    MSI (s) (00:54) [15:27:16:213]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\Favorites
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Network Shortcuts
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\Documents
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Recent
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\SendTo
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Templates
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\ProgramData
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Local
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\Pictures
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu
    MSI (s) (00:54) [15:27:16:229]: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\AppData\Roaming\Microsoft\Windows\Start Menu
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Users\medsvradmin\Desktop
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Templates
    MSI (s) (00:54) [15:27:16:244]: SHELL32::SHGetFolderPath returned: C:\Windows\Fonts
    Property(S): PhysicalMemory = 8192
    Property(S): VirtualMemory = 7158
    Property(S): AdminUser = 1
    Property(S): MsiTrueAdminUser = 1
    Property(S): LogonUser = medsvradmin
    Property(S): UserSID = S-1-5-21-300911508-3398273753-3262312657-1000
    Property(S): UserLanguageID = 1033
    Property(S): ComputerName = JPNTKYINT01
    Property(S): SystemLanguageID = 1033
    Property(S): ScreenX = 1024
    Property(S): ScreenY = 768
    Property(S): CaptionHeight = 19
    Property(S): BorderTop = 1
    Property(S): BorderSide = 1
    Property(S): TextHeight = 16
    Property(S): TextInternalLeading = 3
    Property(S): ColorBits = 32
    Property(S): TTCSupport = 1
    Property(S): Time = 15:27:21
    Property(S): Date = 3/4/2015
    Property(S): MsiNetAssemblySupport = 4.0.30319.34209
    Property(S): MsiWin32AssemblySupport = 6.1.7601.17514
    Property(S): RedirectedDllSupport = 2
    Property(S): MsiRunningElevated = 1
    Property(S): DATABASE = C:\Windows\Installer\6847f.msi
    Property(S): OriginalDatabase = D:\RBS.msi
    Property(S): UILevel = 2
    Property(S): ACTION = INSTALL
    Property(S): ROOTDRIVE = D:\
    Property(S): CostingComplete = 1
    Property(S): OutOfDiskSpace = 0
    Property(S): OutOfNoRbDiskSpace = 0
    Property(S): PrimaryVolumeSpaceAvailable = 0
    Property(S): PrimaryVolumeSpaceRequired = 0
    Property(S): PrimaryVolumeSpaceRemaining = 0
    Property(S): DOTNETCOREPATH = 1
    Property(S): SourcedirProduct = {56D21E05-679B-40F2-94C1-DB0D7EB2E461}
    Property(S): SOURCEDIR = D:\
    MSI (s) (00:54) [15:27:21:049]: Note: 1: 1728
    MSI (s) (00:54) [15:27:21:049]: Product: SQL Server 2008 R2 Remote Blob Store -- Configuration completed successfully.
    MSI (s) (00:54) [15:27:21:049]: Windows Installer reconfigured the product. Product Name: SQL Server 2008 R2 Remote Blob Store. Product Version: 10.50.1600.1. Product Language: 1033. Manufacturer: Microsoft Corporation. Reconfiguration success or error status: 0.
    MSI (s) (00:54) [15:27:21:049]: Deferring clean up of packages/files, if any exist
    MSI (s) (00:54) [15:27:21:049]: MainEngineThread is returning 0
    MSI (s) (00:94) [15:27:21:049]: RESTART MANAGER: Session closed.
    MSI (s) (00:94) [15:27:21:049]: No System Restore sequence number for this installation.
    === Logging stopped: 3/4/2015 15:27:21 ===
    MSI (s) (00:94) [15:27:21:049]: User policy value 'DisableRollback' is 0
    MSI (s) (00:94) [15:27:21:049]: Machine policy value 'DisableRollback' is 0
    MSI (s) (00:94) [15:27:21:049]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (00:94) [15:27:21:049]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
    MSI (s) (00:94) [15:27:21:049]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
    MSI (s) (00:94) [15:27:21:049]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
    MSI (s) (00:94) [15:27:21:049]: Restoring environment variables
    MSI (s) (00:94) [15:27:21:049]: Destroying RemoteAPI object.
    MSI (s) (00:A8) [15:27:21:049]: Custom Action Manager thread ending.
    MSI (c) (E4:A4) [15:27:21:049]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
    MSI (c) (E4:A4) [15:27:21:049]: MainEngineThread is returning 0
    === Verbose logging stopped: 3/4/2015 15:27:21 ===

    Hi stecorp75,
    To troubleshoot above error, please make sure the following things.
    1. Use the RBS.msi file on this link http://www.microsoft.com/download/en/details.aspx?id=16978.
    Do not download the rbs_x64 link given in TechNet article
    https://technet.microsoft.com/en-us/library/ee748631.aspx .
    2. Ensure that you run command prompt as administrator and then run your commands for RBS installation.
    3. Follow the steps in this similar
    blog to install RBS on SharePoint 2013.
    However, if you still fail to install Remote Blob Storage, I would like to recommend you post the question in the SharePoint 2013 forum at
    https://social.technet.microsoft.com/Forums/en-US/home?forum=sharepointadmin . It is appropriate and more experts will assist you.
    There is a similar thread for your reference.
    https://social.technet.microsoft.com/Forums/en-US/23a410bd-9afe-438d-abcb-44363847802a/product-sql-remote-blob-storage-installation-failed
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • How to create and write a BLOB using ImmediateAccess

    Hi there,
    I'd like to write a BLOB using ScrollableRowSetAccess an ImmediateAccess and thereby want to avoid the use of any SQL-statements.
    The problem is that I can't write to an empty BLOB, so that I have to create a dummy-Blob using BLOBDomain and overwrite it afterwards (see code below).
    It should be possible to avoid the creation of a dummy-BLOB but I don't know how. Could you please send me a corrected version of my code?
    Thanks in advance
    write File with filename to the column with index col /(or the column with name colname, if specified) of the table that is specified by ResultSetInfo rsi
    public static void writeFileToBlob(int col, String colname, ResultSetInfo rsi, String filename, SessionInfo _sessionInfo)
    FileInputStream fin;
    Object obj;
    ScrollableRowsetAccess srsa= _rsi.getRowsetAccess();
    ImmediateAccess ia;
    byte []mybytes;
    BlobDomain
    BLOB blob;
    OutputStream out;
    byte []myBuffer;
    int bytesRead=0;
    try{
    //open file
    fin = new FileInputStream(_filename);
    //lock Row
    srsa.lockRow();
    if (_colname==null)
    ia = (ImmediateAccess)srsa.getColumnItem(_col);
    else
    ia = (ImmediateAccess)srsa.getColumnItem(_colname);
    obj= ia.getValueAsObject();
    //insert a dummy-BLOB of size 1-byte
    mybytes= new byte[1];
    blobDom= new BlobDomain();
    blobDom.setBytes(mybytes); //ein Byte in den BLOB schreiben
    ia.setValue(blobDom); //Wert in Zeile einf|gen
    //commit Data
    _sessionInfo.getApplicationModule().getTransaction().commit();
    //access previously created dummy-Blob
    srsa.lockRow();
    if (_colname==null)
    ia = (ImmediateAccess)srsa.getColumnItem(_col);
    else
    ia = (ImmediateAccess)srsa.getColumnItem(_colname);
    obj= ia.getValueAsObject();
    //assign the BLOB
    blob= (BLOB) obj;
    //open BLOB for writing
    out= blob.getBinaryOutputStream();
    myBuffer= new byte[10*1024];
    //read file and write the BLOB
    while ((bytesRead= fin.read(myBuffer)) !=-1)
    out.write(myBuffer, 0, bytesRead);
    out.flush();
    out.close();
    fin.close();
    ia.setValue(blob);
    //commmit data
    _sessionInfo.getApplicationModule().getTransaction().commit();
    }catch(Exception e){System.out.println("writeblob:"+e);}
    null

    Here are the issues with your usage of BlobDomain:
    1. Streaming support is not implemented in 3.2 version of BlobDomain. It'll be implemented in our next release.
    2. Your casting of object returned from getColumnItem is illegal as the objects will be of type BlobDomain and not BLOB.
    3. When you create an empty BlobDomain you're in-effect meaning to call the empty_blob() method on the sql-row to create a empty blob locator.
    4. You need to use getBytes(), setBytes() to read data out/set data into a blob/clob domain object in JDev 3.2
    5. Casting/using oracle.sql.BLOB may lead to non-portable code (you're binding to the jdbc objects which may not be available in all tiers of deployment).
    Here's the pseudocode you could use for new blobs.
    1. create a new instance of BlobDomain()
    2. setBytes() with actual data read from a stream. (Yes this may not work with real large blobs but we've tested blobs ~2MB in size and for larger needs, we're implementing the streaming support scheduled for our next release).
    3. set the domain object into an attribute.
    4. post/commit your data.
    null

  • Azure Rest API PUT Block Blob Returns "The specified resource does not exist" CORS

    I am trying to upload a file to Azure Blob storage. For some reason when I try to put a new block blob on in the storage it tells me the resource does not exist. I am sure it is something silly I am missing.
    According to the documentation:
    The Put Blob operation creates a new block blob or page blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
    existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List (REST API) operation.
    CORS is setup and that seems okay.
    When I do a preflight and get this:
    Request URL:https://<account>.blob.core.windows.net/test/image.png
    Request Method:OPTIONS
    Status Code:200 OK
    Request Headers
    OPTIONS /test/image.png HTTP/1.1
    Host: <account>.blob.core.windows.net
    Connection: keep-alive
    Cache-Control: no-cache
    Pragma: no-cache
    Access-Control-Request-Method: PUT
    Origin: http://www.<site>.com
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
    Access-Control-Request-Headers: accept, content-type
    Accept: */*
    Referer: http://www.<site>.com/azure/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
    Response Headers
    HTTP/1.1 200 OK
    Transfer-Encoding: chunked
    Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: 0d372e95-1524-460a-ab9c-7973d42a7070
    Access-Control-Allow-Origin: http://www.<site>.com
    Access-Control-Allow-Methods: PUT
    Access-Control-Allow-Headers: accept, content-type
    Access-Control-Max-Age: 36000
    Access-Control-Allow-Credentials: true
    Date: Thu, 27 Feb 2014 22:43:52 GMT
    But when I make the PUT request these are the results.
    Request URL:https://<account>.blob.core.windows.net/test/image.png
    Request Method:PUT
    Status Code:404 The specified resource does not exist.
    Request Headers
    PUT /test/image.png HTTP/1.1
    Host: <account>.blob.core.windows.net
    Connection: keep-alive
    Content-Length: 22787
    Cache-Control: no-cache
    Pragma: no-cache
    x-ms-blob-content-dis; filename = "image.png"
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
    Content-Type: image/png
    x-ms-blob-type: BlockBlob
    Accept: application/json, text/plain, */*
    x-ms-version: 2013-08-15
    Origin: http://www.<site>.com
    x-ms-date: Thu, 27 Feb 2014 23:19:19 GMT
    Referer: http://www.<site>.com/azure/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
    Response Headers
    HTTP/1.1 404 The specified resource does not exist.
    Content-Length: 223
    Content-Type: application/xml
    Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: d5a60c8b-356a-44ff-93af-0ea720b5591f
    x-ms-version: 2013-08-15
    Access-Control-Expose-Headers: x-ms-request-id,Server
    Access-Control-Allow-Origin: http://www.<site>.com
    Access-Control-Allow-Credentials: true
    Date: Thu, 27 Feb 2014 23:22:42 GMT

    Your request must be authenticated to be able to upload a blob. Please see our
    Windows Azure Storage: Introducing CORS blog post for more information on using Shared Access Signatures with CORS.

  • Blobs and refreshing the schema

    Hi all,
    I have two questions about Kodo 3.3.3.
    1) About blobs. A blob is the serialization fof an object. Does Kodo store
    the hashCode of the class (ir the serialVersionUID of the class) that was
    used to serialize the object ? Will I have a problem if I want to get back
    that blob with a recompiled version of that class, with a different
    serialVersionUID ?
    2) About the XML descriptors of the schema. I configured my mappingtool to
    write the XML descriptor of the my schema in the base, it works very fine.
    I can get these descriptor, class by class, with the command mappingtool
    -a export -f dump.xml package.jdo, it's very handy. From the
    documentation, I red that one can export this XML, edit it, import it back
    in the base, and refresh the schema
    (http://www.solarmetric.com/jdo/Documentation/3.3.3/docs/ref_guide_mapping_factory.html).
    My problem is : I cant find the command to perform this refresh, the
    schema is just not "synchronized" with the XML. Any hint ? :)
    Btw, I came across a bug using SQL Server : a field named "index"
    generated a column named "index", SQL Server was quite angry at that.
    Sorry if this one is know already.
    Thanks for your answers,
    Jos__

    1) About blobs. A blob is the serialization fof an object. Does Kodo store
    the hashCode of the class (ir the serialVersionUID of the class) that was
    used to serialize the object ? Will I have a problem if I want to get back
    that blob with a recompiled version of that class, with a different
    serialVersionUID ?Kodo just serializes the field value to a byte array using standard Java
    serialization. So yes, you will have problems if the serialVersionUID of the
    class changes. If you want more control over this process, you can create a
    custom DBDictionary that overrides the serialize() method. Or you can use a
    field of type byte[] and a byte-array mapping rather than a blob mapping, so
    that Kodo doesn't do any serialization.
    My problem is : I cant find the command to perform this refresh, the
    schema is just not "synchronized" with the XML. Any hint ? :)Use the schema tool to synchronize the schema with the XML. See:
    http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_schema_schematool.html
    Btw, I came across a bug using SQL Server : a field named "index"
    generated a column named "index", SQL Server was quite angry at that.
    Sorry if this one is know already.Thanks. We'll make sure this is fixed in Kodo 3.3.4.

  • Internal error 00600 when using Blobs

    Cross posted from
    [Java forums|http://forums.sun.com/thread.jspa?messageID=10706861]
    We are having problems writing rows to tables that include a Blob column. Oracle version is 10g. Table schema looks like this:
    CREATE TABLE xyResetRewind ( ResetRewind  NUMBER(38)  NOT NULL, RowDate      DATE        NOT NULL, ForRowDate  DATE        NOT NULL, DataClass    VARCHAR2(3)  NOT NULL, DataType    VARCHAR2(2)  NOT NULL, DataKeyVal  BLOB        NOT NULL, RRStatus    VARCHAR2(3)  NOT NULL, CreationDate TIMESTAMP    NOT NULL, LastUpdated  TIMESTAMP    NOT NULL, User_        VARCHAR2(16) NOT NULL )
    and the SQL used to write it looks like this:
    MERGE INTO xyResetRewind USING DUAL ON (ResetRewind = ?) WHEN MATCHED THEN UPDATE SET RowDate      = ?, ForRowDate  = ?, DataClass    = ?, DataType    = ?, DataKeyVal  = ?, RRStatus    = ?, CreationDate = ?, LastUpdated  = ?, User_        = ? WHEN NOT MATCHED THEN INSERT ( ResetRewind, RowDate, ForRowDate, DataClass, DataType, DataKeyVal, RRStatus, CreationDate, LastUpdated, User_ ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    The driver recommended by Oracle for 10g is version 10.2.0.4.0 Feb 2 2008. We have also tried 11.2.0.7.0 28 Aug 2008 (the 11g drivers) with no luck. We use either PreparedStatement.setBytes() or setObject passing the byte array for the BLOB content.
    We then get this error:
    ORA-00600: internal error code, arguments: [koklismem1: r_length is 0] , [], [], [], [], [], [], []       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)       at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)       at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)       at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)       at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)       at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)       at com.inqwell.any.io.sql.AnySql.executePrepared(AnySql.java:372)   .   .
    Our jdbc code uses only interface methods defined in Java, so no oracle-specific stuff is used or allowed.
    There seems to be very little on the internet about this problem, the only things I could find being these:
    http://e-docs.bea.com/wls/docs81/faq/jdbc.html#501544
    http://www.gcqh.com/oracle/241
    We haven't interfaced with Oracle for a number of years (we don't get this problem with mysql) so just for fun we tried an old version of the jdbc driver: version 9.0.2.0.0 from 6 April 2004, hmmm. Anyway, that works, but obviously this is not something we want to rely on.
    Does anyone have an idea what this is and perhaps a better workaround than using ancient software?

    Thanks for your reply. Oracle support is managed elsewhere in my company so I passed on your information. Apparently it's actually a different bug that applies in this case:
    *Bug No. 8224110  ORA-00600[KOKLISMEM1: R_LENGTH IS 0] OCCURS WHEN EXECUTING MERGE STATEMENT*
    Filed 03-FEB-2009 Updated 29-MAY-2009 Product Oracle Server - Enterprise Edition Product Version 10.2.0.4
    Fixed in Product Version < no data>
    *ORA-00600[koklismem1: r_length is 0] or ORA-600[12333] occurs when executing MERGE statement which has BLOB*
    columns from JDBC application.  Executing MERGE statement which has BLOB columns, the following error   occurs on
    the client side and ORA-600 occurs in server side.
    I'm told there is no resolution as yet....

  • Oracle internal error 00600 when using Blobs

    We are having problems writing rows to tables that include a Blob column. Oracle version is 10g. Table schema looks like this:
    CREATE TABLE xyResetRewind ( ResetRewind  NUMBER(38)  NOT NULL, RowDate      DATE        NOT NULL, ForRowDate  DATE        NOT NULL, DataClass    VARCHAR2(3)  NOT NULL, DataType    VARCHAR2(2)  NOT NULL, DataKeyVal  BLOB        NOT NULL, RRStatus    VARCHAR2(3)  NOT NULL, CreationDate TIMESTAMP    NOT NULL, LastUpdated  TIMESTAMP    NOT NULL, User_        VARCHAR2(16) NOT NULL )
    and the SQL used to write it looks like this:
    MERGE INTO xyResetRewind USING DUAL ON (ResetRewind = ?) WHEN MATCHED THEN UPDATE SET RowDate      = ?, ForRowDate  = ?, DataClass    = ?, DataType    = ?, DataKeyVal  = ?, RRStatus    = ?, CreationDate = ?, LastUpdated  = ?, User_        = ? WHEN NOT MATCHED THEN INSERT ( ResetRewind, RowDate, ForRowDate, DataClass, DataType, DataKeyVal, RRStatus, CreationDate, LastUpdated, User_ ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    The driver recommended by Oracle for 10g is version 10.2.0.4.0 Feb 2 2008. We have also tried 11.2.0.7.0 28 Aug 2008 (the 11g drivers) with no luck. We use either PreparedStatement.setBytes() or setObject passing the byte array for the BLOB content.
    We then get this error:
    ORA-00600: internal error code, arguments: [koklismem1: r_length is 0] , [], [], [], [], [], [], []       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)       at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)       at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)       at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)       at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)       at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)       at com.inqwell.any.io.sql.AnySql.executePrepared(AnySql.java:372)  .   .
    Our jdbc code uses only interface methods defined in Java, so no oracle-specific stuff is used or allowed.
    There seems to be very little on the internet about this problem, the only things I could find being these:
    [t-5349591]
    [http://e-docs.bea.com/wls/docs81/faq/jdbc.html#501544|http://e-docs.bea.com/wls/docs81/faq/jdbc.html#501544]
    [http://www.gcqh.com/oracle/241|http://www.gcqh.com/oracle/241]
    We haven't interfaced with Oracle for a number of years (we don't get this problem with mysql) so just for fun we tried an old version of the jdbc driver: version 9.0.2.0.0 from 6 April 2004, hmmm. Anyway, that works, but obviously this is not something we want to rely on.
    Does anyone have an idea what this is and perhaps a better workaround than using ancient software?

    ORA-600 is a support error. That means, you should get in touch with Oracle about it. There's not a great deal anyone here can do about it.

  • Creating Packages from BLOB field contents, line wrap problems

    Good afternoon,
    we use an in-house developed database-driven update system to update both our databases and filesystems, the system itself performs really well but there is still one problem I can't fix without some expert help:
    the code of to-be-updated Oracle packages is stored inside of a BLOB field, the BLOB field will contain both the package specification and package body and needs to be split into two parts to first execute the spec and then to execute the package body (I tried to execute both in a single step but this didn't work). This works for packages with less than 32767 characters and also works in some other cases but I found one case where the executed code contains an extra line wrap right in the middle of a word.
    To make it more clear (I hope it's comprehensible), imagine the following database content:
    CREATE OR REPLACE Package
    MyPack
    AS
    [... a lot procedure headers ...]
    END MyPack;
    CREATE OR REPLACE
    Package Body MyPack AS
    [... a lot more procedures ...]
    PROCEDURE myTest (intID OUT integer)
    AS
    BEGIN
      SELECT count (*) into intID FROM MyTa[--this is where the dbms_lob.substr() ends --]ble;
    END;
    END MyPack;My code searches for the second occurrence of the "Create or replace package", splits the code into spec and body, executes the specification and keeps on adding the rest of the code to a VARCHAR2A variable called "storedCode" from the BLOB. Now in the above example, after the specification has been removed from the string, the remaining characters (ending with the "MyTa" string) are added to the varchar2a variable, the next line is fetched from the BLOB via "dbms_lob.substr()" and added as long as dbms_lob.substr() does not return a NULL value (end of BLOB). When the code is executed after all has been fetched, the generated Package Body will contain an extra line wrap right in the middle of the "MyTable" word compiling the package invalid.
    This is the procedure code I use (definitely improvable, I'm better in MSSQL and MySQL dialects ...) to load, parse and execute the BLOB content:
       -- to run package code
      procedure runPackageCode (stepRef integer)
      AS
        numLines integer default 1;
        pos     integer default 1;
        storedCode    LOG_CHANGEDOBJECT.STOREDOBJECT%type;
        objectCursor  integer;
        lSqlOut     integer;
        sqlCommand  dbms_sql.varchar2a;
        emptyCommand dbms_sql.varchar2a;
        pIsError integer := 0;
        pErrorMsg varchar2(200) := '';
        updateRef integer := 0;
        currentUpdate integer := 0;
        schemaReference varchar2(20);
        -- required to do string cutting
        strLine varchar2(32767);
        strLeftFromSlash varchar2(32767);
        strRemaining varchar2(32767);
        intDelimiterPos integer := 0;
      begin
        -- retrieve update ID
        SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;
         begin
            select storedobject, change_area
            into storedCode, schemaReference
            from vw_storedobjects
            where step_id = stepRef;
         exception
          when no_data_found then
            pIsError := 1;
            pErrorMsg := 'Invalid SQL ID ' || stepRef;
            pkg_generic.LogError(updateRef, 'LocalUpdater', stepRef, 'Run package code failed: ' || pErrorMsg);
         end;
          if pIsError = 0 then     
            begin
              -- change schema
              execute immediate 'alter session set current_schema = ' || schemaReference;         
              objectCursor := dbms_sql.open_cursor;   
              loop
                strLine := UTL_RAW.CAST_TO_VARCHAR2(dbms_lob.substr(storedCode, 32767, pos));
                intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                while intDelimiterPos > 0
                loop
                  -- '/' found, execute currently stored statement
                  strLeftFromSlash := substr(strLine, 1, intDelimiterPos-1);
                  strLine := substr(strLine, intDelimiterPos);
                  -- execute the extracted part without any '/' in it
                  sqlCommand(numLines) := regexp_replace(strLeftFromSlash, '(^|\s+)/(\s+|$)', '', 1, 0, 'm');
                  if (sqlCommand(numLines) is not null) then
                    objectCursor := dbms_sql.open_cursor;   
                    dbms_sql.parse(objectCursor, sqlCommand, 1, numLines, true, dbms_sql.native);
                    lSqlOut := dbms_sql.execute(objectCursor);
                    dbms_sql.close_cursor(objectCursor);
                  end if;
                  -- reset sqlCommand
                  sqlCommand := emptyCommand;
                  -- reset line counter and store remaining string
                  numLines := 1;
                  -- check for further '/'s           
                  intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                end loop;
                -- add the remaining strLine to the sqlCommand
                strLine := regexp_replace(strLine, '(^|\s+)/(\s+|$)', '', 1, 0, 'm');
       --> I assume this line breaks the code, lpad()'ing the content to move it to the end of a varchar2a line didn't help
                sqlCommand(numLines) := strLine;
                exit when sqlCommand(numLines) is null;
                pos := pos+32767;
                numLines := numLines+1;
              end loop;
              objectCursor := dbms_sql.open_cursor;   
              dbms_sql.parse(objectCursor, sqlCommand, 1, numLines, true, dbms_sql.native);   
              lSqlOut := dbms_sql.execute(objectCursor);
              dbms_sql.close_cursor(objectCursor);
              commit;
              -- reset schema
              execute immediate 'alter session set current_schema = UPDATE_DB';
              -- set state to installed
              pkg_update.setstepstate(stepRef, 'Installed');
        exception
        when others then
              -- reset schema
              execute immediate 'alter session set current_schema = UPDATE_DB';
              -- set state to installFailed
              pkg_update.setstepstate(stepRef, 'InstallFailed');
              pkg_generic.LogError(updateRef, 'Database', stepRef, 'Run package code failed: ' || sqlerrm);
        end;
        end if;
      END;    Thanks if you kept on reading so far, I would really appreciate any feedback!
    Regards, Sascha

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Thanks for providing an easy-to-understand problem statement and for using code tags.
    >
    the code of to-be-updated Oracle packages is stored inside of a BLOB field
    >
    This should be stored in a CLOB since it is character data. Why are you using BLOB?
    >
    the BLOB field will contain both the package specification and package body and needs to be split into two parts to first execute the spec and then to execute the package body
    >
    Good, clear problem statement. So why doesn't your code do just what you said it should do: 1) split the code into two parts, 2) execute the spec and 3) execute the body.
    Instead of writing code that does these three relatively simple steps your code tries to combine splitting and executing and mushes/mashes it all together. The result, as you found, is code that is hard to understand, hard to debug, doesn't work and doesn't report on what it is doing.
    Code like this doesn't have a performance issue so the code should implement the simple step-by-step process that you so elegantly stated in your problem description:
    1. split the code into two parts
    2. execute the spec
    3. execute the body
    My advice is to refactor your code to perform the above steps in the proper order and to add proper exception handling and reporting for each step. Then when a step isn't working you will know exactly where and what the problem is.
    Here are my recommendations.
    1. Add two CLOB variables - one will hold the spec, the second will hold the body
    2. Add a comment (you have some good ones in the code now) for every step no matter how trivial it may be
    3. Add exception/error handling to EVERY STEP
    Your code for the first step has a comment but no exception handling. What should happen if you don't get any data? Why aren't you validating the data you get? Dynamic SQL using table-driven data is great, I love it, but you MUST validate that the data you get is what you expect to get.
        -- retrieve update ID
        SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;Recommended
        -- step 1 - retrieve update ID - This is the id that determines BLAH, BLAH, BLAH - add appropriate to tell a new developer what this ID is and what it means.
        BEGIN
            SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;
        EXCEPTION
            WHEN ??? THEN -- what should happen if step 1 fails? Do it here - don't default to an exception handler that is several pages away.
        END;Your code
         begin
            select storedobject, change_area
            into storedCode, schemaReference
            from vw_storedobjects
            where step_id = stepRef;
         exception
          when no_data_found then
            pIsError := 1;
            pErrorMsg := 'Invalid SQL ID ' || stepRef;
            pkg_generic.LogError(updateRef, 'LocalUpdater', stepRef, 'Run package code failed: ' || pErrorMsg);
         end;
    Good - except there is no comment that says what this does - I assume that the query above and this block are the 'retrieve update ID ' step?
    You log an error message and set the error flag to '1'. But since you don't want to continue why aren't you exiting the procedure and returning right here?
          if pIsError = 0 then     
            beginSo now you check the error flag and do several pages of code if there were no errors.
    I don't like that 'inverted' logic.
    If you don't want to continue then STOP right now! Don't make a developer scan through pages and pages of code to find out you really aren't doing anything else if there was an error.
    Either put a RETURN statement in the exception handler above or change your code to
          if pIsError = 1 then     
            RETURN;
          end if;Now the rest of the code doesn' t have to be indented; you will never get there if there is an error. Check for errors after every step and exit right then as appropriate.
              -- change schema
              execute immediate 'alter session set current_schema = ' || schemaReference;         
              objectCursor := dbms_sql.open_cursor;   
              loop
                strLine := UTL_RAW.CAST_TO_VARCHAR2(dbms_lob.substr(storedCode, 32767, pos));
                intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                while intDelimiterPos > 0
                loopThis code mixes all of the steps together into one giant mess. You open a cursor, try to split the BLOB into spec and body and try to parse and execute both all within a double nested loop.
    Even if that works correctly another developer will have a hard time understanding what the code is doing and fixing it if it goes wrong. And it will go wrong if you let me test if for you because I will put garbage into the BLOB for the spec, body or both to make sure it breaks and to see how your code handles it.
    I suggest you rewrite this double nested loop to perform the three steps separately.
    1. split the code into two parts
    a. put the spec into one new CLOB variable and the body into the other.
    b. use DBMS_OUTPUT (or a work table) to output the spec and body so you can see what the code is and make sure the 'split' process worked properly. You probably created that BLOB by manually concatenating the SPEC and BODY to begin with so now create a SPLIT process to split them again and give them back to you. This is such a fundamental component that I suggest creating a new SPLIT_MY_BLOB procedure. This procedure would take a BLOB and return two CLOBS as OUT parameters: one CLOB is the spec and one is the body. Then you can reuse this 'split' procedure in other code or more complex versions of code. Modular programming is the key.
    2. execute the spec - Now have a step that executes the spec and does something appropriate if the step succeeds or if it fails. I mean, do you really want to do execute the body if the spec execution fails? What do you want to do? Should you delete the body and spec? If you don't you might wind up with an INVALID body based on old code and an INVALID spec based on the new code you were trying to use. How will anyone, including you, know that the spec and body in the ALL_SOURCE view is really two different versions of things?
    This suggests that for your use case you may want to consider DROPPING the entire package, spec and body, before trying to recreate them both. At least if the package is totally missing anyone will know that the entire thing needs to be put back. Ahhhh - but to do that you need to know the package name so you can drop it. Than may require adding another step to get the package name from your data-driven table and adding a DROP PACKAGE step.
    3. execute the body - This step executes the body. Hmmmm - we have two nearly identical steps. So why don't you create a new function/procedure that takes a CLOB as input, uses dynamic sql to execute it and returns a result code. That would be useful. Then you could execute ANY sql stored in a CLOB and have a generic function that you can use for other things.
    Right now you are using the VARCHAR2 table version of DBMS_SQL.PARSE but you would change this to use the CLOB version.
    The end result of this refactoring is a main function/procedure that acts as the CONTROL - it decides what to do and what data (BLOB) to do it with. But it doesn't actually do ANY of the work. It just controls what is done.
    And you have a couple of generic, reuseable functions that actually do the work. One knows how to split a CLOB into spec and body. The other knows how to use dynamic SQL to execute a CLOB.
    Now you have a modular architecture that is easy to understand, easy to code and easy to test.

  • NullPointerException at oracle.sql.BLOB.createTemporary(BLOB.java:590)

    Hi,
    I seldom use the BLOB. Here is the coding that creates a BLOB.
    private  BLOB getBlob(byte[] str, Connection con) throws SQLException, IOException {
      BLOB blob = BLOB.createTemporary(con, true, BLOB.DURATION_SESSION);
      blob.open(BLOB.MODE_READWRITE);
      OutputStream writer = blob.getBinaryOutputStream();
      writer.write(str);
      writer.flush();
      writer.close();
      blob.close();
      return blob;
    After inserting this BLOB into database table via ojdbc, BLOB.freeTemporary() is called.
         BLOB blob = getBlob(compressedClaim,connStore);
         rsImagePstmt.setObject(4,blob);
         rsImagePstmt.executeUpdate();
         BLOB.freeTemporary( blob );
    Sometimes it's running ok and finished properly. Sometimes I got the following exception after running 2.5 hours.
    Thanks a lot for any suggestion and help.  We use oracle 10.2 and java1.4 library here.
                                      > Exception: java.lang.NullPointerException
                                      >                           at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:669)
                                      >                           at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
                                      >                           at oracle.jdbc.driver.T2CConnection.createTemporaryBlob(T2CConnection.java:2039)
                                      >                           at oracle.sql.BLOB.createTemporary(BLOB.java:590)
    If I ran in the debug mode, I got the following errors after 2.5 hours:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x62F0BCF4
    Function=Java_oracle_jdbc_driver_T2CStatement_t2cFetchDmlReturnParams+0x594
    Library=C:\oracle\product\10.2.0\client\BIN\ocijdbc10.dll
    Current Java thread:
      at oracle.jdbc.driver.T2CConnection.lobCreateTemporary(Native Method)
      at oracle.jdbc.driver.T2CConnection.createTemporaryBlob(T2CConnection.java:2039)
      at oracle.sql.BLOB.createTemporary(BLOB.java:590)
      at com.viant.consumer.impl.RateSheetConsumer.getBlob(RateSheetConsumer.java:386)
      at com.viant.consumer.impl.RateSheetConsumer.finishRateSheet(RateSheetConsumer.java:293)
      at com.viant.consumer.impl.RateSheetConsumer.run(RateSheetConsumer.java:156)
      at java.lang.Thread.run(Thread.java:534)
    Dynamic libraries:
    0x00400000 - 0x0040B000  C:\jdk1.4\bin\javaw.exe
    0x77220000 - 0x7735C000  C:\Windows\SYSTEM32\ntdll.dll
    0x76CE0000 - 0x76DB4000  C:\Windows\system32\kernel32.dll
    0x75620000 - 0x7566B000  C:\Windows\system32\KERNELBASE.dll
    0x758D0000 - 0x75970000  C:\Windows\system32\ADVAPI32.dll
    0x75C10000 - 0x75CBC000  C:\Windows\system32\msvcrt.dll
    0x75B20000 - 0x75B39000  C:\Windows\SYSTEM32\sechost.dll
    0x77170000 - 0x77211000  C:\Windows\system32\RPCRT4.dll
    0x75B40000 - 0x75C09000  C:\Windows\system32\USER32.dll
    0x75D50000 - 0x75D9E000  C:\Windows\system32\GDI32.dll
    0x77440000 - 0x7744A000  C:\Windows\system32\LPK.dll
    0x76F90000 - 0x7702D000  C:\Windows\system32\USP10.dll
    0x77360000 - 0x7737F000  C:\Windows\system32\IMM32.DLL
    0x75A00000 - 0x75ACC000  C:\Windows\system32\MSCTF.dll
    0x62A20000 - 0x62A2C000  C:\PROGRA~1\NETINST\NIAMH.DLL
    0x75330000 - 0x75368000  C:\PROGRA~1\SOPHOS\SOPHOS~1\SOPHOS~1.DLL
    0x77420000 - 0x77425000  C:\Windows\system32\PSAPI.DLL
    0x752B0000 - 0x752C5000  C:\Windows\system32\AMINIT32.DLL
    0x08000000 - 0x08139000  C:\jdk1.4\jre\bin\client\jvm.dll
    0x73510000 - 0x73542000  C:\Windows\system32\WINMM.dll
    0x75210000 - 0x7525C000  C:\Windows\system32\apphelp.dll
    0x10000000 - 0x10007000  C:\jdk1.4\jre\bin\hpi.dll
    0x00270000 - 0x0027E000  C:\jdk1.4\jre\bin\verify.dll
    0x00280000 - 0x00299000  C:\jdk1.4\jre\bin\java.dll
    0x002A0000 - 0x002AD000  C:\jdk1.4\jre\bin\zip.dll
    0x003D0000 - 0x003EC000  C:\jdk1.4\jre\bin\jdwp.dll
    0x002B0000 - 0x002B5000  C:\jdk1.4\jre\bin\dt_socket.dll
    0x773E0000 - 0x77415000  C:\Windows\system32\ws2_32.dll
    0x75970000 - 0x75976000  C:\Windows\system32\NSI.dll
    0x736D0000 - 0x736E0000  C:\Windows\system32\NLAapi.dll
    0x71BE0000 - 0x71BF0000  C:\Windows\system32\napinsp.dll
    0x71BA0000 - 0x71BB2000  C:\Windows\system32\pnrpnsp.dll
    0x74D50000 - 0x74D8C000  C:\Windows\System32\mswsock.dll
    0x74C10000 - 0x74C54000  C:\Windows\system32\DNSAPI.dll
    0x71BF0000 - 0x71BF8000  C:\Windows\System32\winrnr.dll
    0x71C30000 - 0x71C57000  C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL
    0x75DA0000 - 0x75DF7000  C:\Windows\system32\SHLWAPI.dll
    0x74370000 - 0x7438C000  C:\Windows\system32\IPHLPAPI.DLL
    0x74820000 - 0x74827000  C:\Windows\system32\WINNSI.DLL
    0x721E0000 - 0x72218000  C:\Windows\System32\fwpuclnt.dll
    0x71C20000 - 0x71C26000  C:\Windows\system32\rasadhlp.dll
    0x74840000 - 0x74857000  C:\ProgramData\Sophos\Web Intelligence\swi_ifslsp.dll
    0x74830000 - 0x74839000  C:\Windows\system32\VERSION.dll
    0x76090000 - 0x76CDB000  C:\Windows\system32\SHELL32.dll
    0x74810000 - 0x74815000  C:\Windows\System32\wshtcpip.dll
    0x01240000 - 0x0124F000  C:\jdk1.4\jre\bin\net.dll
    0x62F00000 - 0x62F13000  C:\oracle\product\10.2.0\client\BIN\ocijdbc10.dll
    0x08450000 - 0x084A9000  C:\oracle\product\10.2.0\client\bin\OCI.dll
    0x7C340000 - 0x7C396000  C:\Windows\system32\MSVCR71.dll
    0x61C20000 - 0x61E77000  C:\oracle\product\10.2.0\client\bin\OraClient10.Dll
    0x60870000 - 0x60956000  C:\oracle\product\10.2.0\client\bin\oracore10.dll
    0x60A80000 - 0x60B47000  C:\oracle\product\10.2.0\client\bin\oranls10.dll
    0x63690000 - 0x636A8000  C:\oracle\product\10.2.0\client\bin\oraunls10.dll
    0x60EB0000 - 0x60EB7000  C:\oracle\product\10.2.0\client\bin\orauts.dll
    0x75770000 - 0x758CC000  C:\Windows\system32\ole32.dll
    0x636B0000 - 0x636B6000  C:\oracle\product\10.2.0\client\bin\oravsn10.dll
    0x60FA0000 - 0x61098000  C:\oracle\product\10.2.0\client\bin\oracommon10.dll
    0x63430000 - 0x63457000  C:\oracle\product\10.2.0\client\bin\orasnls10.dll
    0x08C40000 - 0x091B8000  C:\oracle\product\10.2.0\client\bin\orageneric10.dll
    0x091C0000 - 0x09337000  C:\oracle\product\10.2.0\client\bin\oraxml10.dll
    0x014F0000 - 0x01501000  C:\Windows\system32\MSVCIRT.dll
    0x60960000 - 0x60A77000  C:\oracle\product\10.2.0\client\bin\oran10.dll
    0x62740000 - 0x62780000  C:\oracle\product\10.2.0\client\bin\oranl10.dll
    0x62790000 - 0x627A8000  C:\oracle\product\10.2.0\client\bin\oranldap10.dll
    0x627F0000 - 0x628FD000  C:\oracle\product\10.2.0\client\bin\orannzsbb10.dll
    0x62530000 - 0x62583000  C:\oracle\product\10.2.0\client\bin\oraldapclnt10.dll
    0x62670000 - 0x6268B000  C:\oracle\product\10.2.0\client\bin\orancrypt10.dll
    0x71230000 - 0x71237000  C:\Windows\system32\WSOCK32.dll
    0x75CC0000 - 0x75D4F000  C:\Windows\system32\OLEAUT32.dll
    0x62920000 - 0x6296D000  C:\oracle\product\10.2.0\client\bin\oranro10.dll
    0x626B0000 - 0x626B7000  C:\oracle\product\10.2.0\client\bin\oranhost10.dll
    0x62660000 - 0x62666000  C:\oracle\product\10.2.0\client\bin\orancds10.dll
    0x629C0000 - 0x629C8000  C:\oracle\product\10.2.0\client\bin\orantns10.dll
    0x09340000 - 0x096B5000  C:\oracle\product\10.2.0\client\bin\orapls10.dll
    0x07B80000 - 0x07B89000  C:\oracle\product\10.2.0\client\bin\oraslax10.dll
    0x63080000 - 0x63285000  C:\oracle\product\10.2.0\client\bin\oraplp10.dll
    0x61ED0000 - 0x61F68000  C:\oracle\product\10.2.0\client\bin\orahasgen10.dll
    0x62AB0000 - 0x62B24000  C:\oracle\product\10.2.0\client\bin\oraocr10.dll
    0x084B0000 - 0x084F9000  C:\oracle\product\10.2.0\client\bin\oraocrb10.dll
    0x73860000 - 0x73871000  C:\Windows\system32\NETAPI32.dll
    0x74B00000 - 0x74B09000  C:\Windows\system32\netutils.dll
    0x74F80000 - 0x74F99000  C:\Windows\system32\srvcli.dll
    0x73850000 - 0x7385F000  C:\Windows\system32\wkscli.dll
    0x73840000 - 0x7384F000  C:\Windows\system32\SAMCLI.DLL
    0x74BE0000 - 0x74C02000  C:\Windows\system32\LOGONCLI.DLL
    0x62980000 - 0x62991000  C:\oracle\product\10.2.0\client\bin\orantcp10.dll
    0x63520000 - 0x635BB000  C:\oracle\product\10.2.0\client\bin\orasql10.dll
    0x751E0000 - 0x751FB000  C:\Windows\system32\SspiCli.dll
    0x70890000 - 0x7089B000  C:\Windows\system32\cscapi.dll
    0x75290000 - 0x7529C000  C:\Windows\system32\CRYPTBASE.dll
    0x740B0000 - 0x740F0000  C:\Windows\system32\uxtheme.dll
    0x09B80000 - 0x09C92000  C:\jdk1.4\jre\bin\awt.dll
    0x72870000 - 0x728C1000  C:\Windows\system32\WINSPOOL.DRV
    0x09810000 - 0x09861000  C:\jdk1.4\jre\bin\fontmanager.dll
    0x0ACF0000 - 0x0ADD7000  C:\Windows\system32\ddraw.dll
    0x73AA0000 - 0x73AA6000  C:\Windows\system32\DCIMAN32.dll
    0x76DF0000 - 0x76F8D000  C:\Windows\system32\SETUPAPI.dll
    0x753F0000 - 0x75417000  C:\Windows\system32\CFGMGR32.dll
    0x75450000 - 0x75462000  C:\Windows\system32\DEVOBJ.dll
    0x73C80000 - 0x73C93000  C:\Windows\system32\dwmapi.dll
    0x0ADE0000 - 0x0AE71000  C:\Windows\system32\igdumdx32.dll
    0x0AF10000 - 0x0B3E1000  C:\Windows\system32\igdumd32.dll
    0x742C0000 - 0x742E5000  C:\Windows\system32\PowrProf.dll
    0x66150000 - 0x6621C000  C:\Windows\system32\D3DIM700.DLL
    0x76DC0000 - 0x76DEA000  C:\Windows\system32\imagehlp.dll
    0x70BF0000 - 0x70CDB000  C:\Windows\system32\dbghelp.dll
    Heap at VM Abort:
    Heap
      def new generation   total 4608K, used 291K [0x10010000, 0x10510000, 0x12770000)
       eden space 4096K,   5% used [0x10010000, 0x10046aa0, 0x10410000)
       from space 512K,  14% used [0x10490000, 0x104a2208, 0x10510000)
       to   space 512K,   0% used [0x10410000, 0x10410000, 0x10490000)
      tenured generation   total 60544K, used 56437K [0x12770000, 0x16290000, 0x30010000)
        the space 60544K,  93% used [0x12770000, 0x15e8d4b8, 0x15e8d600, 0x16290000)
      compacting perm gen  total 12800K, used 12682K [0x30010000, 0x30c90000, 0x34010000)
        the space 12800K,  99% used [0x30010000, 0x30c72900, 0x30c72a00, 0x30c90000)
    Local Time = Thu Oct 17 11:29:35 2013
    Elapsed Time = 9003
    # The exception above was detected in native code outside the VM

    Hi!
    It seems you can do this:
              try {
                   conn = new OracleDriver().defaultConnection();                graphblob = oracle.sql.BLOB.createTemporary(conn, false,oracle.sql.BLOB.DURATION_CALL); // must init
                   System.out.println("Blob is init");
              } catch ( java.sql.SQLException sEx ) {
                   throw new RuntimeException ("No connection", sEx);
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1285601748584
    http://www.unix.org.ua/orelly/oracle/guide8i/ch09_08.htm
    /Bjoern

  • ClassCastException in oracle.sql.BLOB.createTemporary

    Hi,
    I'm having a ClassCastException problem using the method oracle.sql.BLOB.createTemporary while trying to store a BLOB value (JDBC classes12.jar). The problem is quite clear - if I use the method with a dedicated database connection that specifies the driver as oracle.jdbc.driver.OracleDriver there is no problem - if I use it with an Orion datasource shipped with Oracle IAS10g it gives me a ClassCastException. I imagine that somewhere in the code of this method there is a cast of the underlying connection leading to the ClassCastException when used in conjunction with the Orion datasource. The code to save the BLOB is as follows:
    oracle.sql.BLOB blob = oracle.sql.BLOB.createTemporary(st.getConnection(), false,
    oracle.sql.BLOB.DURATION_SESSION);
    blob.open(BLOB.MODE_READWRITE);
    OutputStream out = blob.getBinaryOutputStream();
    try {
    out.write((byte[])value);
    out.flush();
    out.close();
    } catch (IOException e) {
    throw new SQLException("failed write to blob" + e.getMessage());
    blob.close();
    ((oracle.jdbc.OraclePreparedStatement)(st)).setBLOB(index, blob);
    My questions are:
    (1) is it possibile to save a BLOB type with a different version of Oracle JDBC without having to rely on the Oracle specific implementation of the JDBC interface (the cast of the PreparedStatement to oracle.jdbc.OraclePreparedStatement is quite ugly and not very portable!).
    (2) if not, then how can I get this code to work with the datasource implementation for Oracle IAS.
    thanks in advance for any help.
    Dara.

    If you are using OCI driver, you may check whether using thin driver would avoid ClassCastException.

  • Memory Leak in Oracle BLOB writing

    Hi,
    We have strange performance problem. Our profiler shows that Oracle connection object holds the inserted BLOB (byte[]) data. This is not getting released at all.
    The details are below.
    BLOB writing method:
    ==============
    We are using Hibernate ORM along with Spring framework's OracleLobHandler for handling the LOB data. Spring uses xLOb.createTemporary.. method to insert the LOB data and finally it clears that by calling xLOB.freetemporary method. But still the data is left in the connection object.
    I have tried passing 'cache=false' to the createTemporary method. But of no use.
    Versions:
    ======
    Oracle DB = Oracle 10G
    Oracle jdbc driver = 10.2.0.2.0
    Spring framework = 2.5
    Hibernate ORM = 3.2.3 ga
    Here is our profiler output (Your kit):
    =================
    byte[30123012]   outBuffer of oracle.jdbc.driver.T4C8TTIBlob       blobMsg of oracle.jdbc.driver.T4CConnection         _conn of org.apache.tomcat.dbcp.dbcp.PoolableConnection               value of org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$ObjectTimestampPair                   _val of org.apache.tomcat.dbcp.collections.CursorableLinkedList$Listable                           _next of org.apache.tomcat.dbcp.collections.CursorableLinkedList$Listable
    Please help me to solve the issue.

    Simulating the same environment in standalone java program is a big work i guess. That is like developing a new application. :) I hope you understand the problem.
    If you can please try to answer my question below. I may not need the exact answer, but may need a direction to debug the problem. Since i dont have access to Oracle driver source, i dont know what is happening inside. That is not the case with others (Hibernate, Spring - are open source projects).
    Here i have attached the oracle jdbc log file for the write & freetemporary operation. I can able see that the BLOB.freememory & connection.freememory is happening. But still objects are available in the buffer of the Connection object. I guess if you could see that something might strike for you..we may be missed something...
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setAutoCommit
    INFO: PhysicalConnection.setAutoCommit(autoCommit=trMay 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setAutoCommit
    INFO: PhysicalConnection.setAutoCommit(autoCommit=true)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setAutoCommit
    INFO: PhysicalConnection.setAutoCommit(autoCommit): return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection getAutoCommit
    INFO: PhysicalConnection.getAutoCommit() returned true
    May 27, 2009 4:04:47 PM oracle.sql.BLOB freeTemporary
    FINE: BLOB.freeTemporary() -- no return trace --
    May 27, 2009 4:04:47 PM oracle.sql.BLOB getDBAccess
    FINE: BLOB.getDBAccess()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.sql.BLOB getDBAccess
    FINE: BLOB.getDBAccess: return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection freeTemporary
    FINE: oracle.jdbc.driver.T4CConnection.freeTemporary(oracle.sql.BLOB@572554)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection freeTemporary
    FINE: oracle.jdbc.driver.T4CConnection.freeTemporary: return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setTransactionIsolation
    INFO: PhysicalConnection.setTransactionIsolation(level=2)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection createStatement
    FINE: PhysicalConnection.createStatement(resultSetType=-1, resultSetConcurrency=-1)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement <init>
    FINE: OracleStatement.OracleStatement(conn, batchValue=1, rowPrefetchValue=10, UserResultSetType=-1)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
    FINE: PhysicalConnection.registerHeartbeat()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement <init>
    FINE: OracleStatement.OracleStatement(c, batch_value, UserResultSetType):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection createStatement
    FINE: PhysicalConnection.createStatement(resultSetType, resultSetConcurrency):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement execute
    FINE: OracleStatement.execute(sql)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement execute
    FINE: OracleStatement.execute(sql):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement sendBatch
    FINE: OracleStatement.sendBatch()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql initialize
    FINE: OracleSql.initialize(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql initialize
    FINE: OracleSql.initialize:return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql computeBasicInfo
    FINE: OracleSql.computeBasicInfo(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql computeBasicInfo
    FINE: OracleSql.computeBasicInfo:return: sqlKind = 3 parameterCount = 0
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    FINE: OracleStatement.doExecuteWithTimeout() needToPrepareDefineBuffer = true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    CONFIG: SQL: "ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED"
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
    FINE: PhysicalConnection.registerHeartbeat()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection open
    FINE: T4CConnection.open(oracle.jdbc.driver.T4CStatement@18bd34e)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection open
    FINE: T4CConnection.open: return oracle.jdbc.driver.T4CStatement@18bd34e
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement executeForRows
    FINE: oracle.jdbc.driver.T4CStatement.execute_for_rows(false)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion StringToCharBytes
    FINE: DBConversion.StringToCharBytes(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion getServerCharSetId
    FINE: DBConversion.getDbCharSet(): returned 178
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion getNCharSetId
    FINE: DBConversion.getNCharSetId(): returned 2000
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement executeForRows
    FINE: oracle.jdbc.driver.T4CStatement.execute_for_rows:return: validRows = 0
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    FINE: OracleStatement.doExecuteWithTimeout():return validRows = 0, needToPrepareDefineBuffer = true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement closeOrCache
    FINE: OracleStatement.closeOrCache(null)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement hardClose
    FINE: OracleStatement.hardClose(closeCursor)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement alwaysOnClose
    FINE: OracleStatement.alwaysOnClose()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement alwaysOnClose
    FINE: OracleStatement.alwaysOnClose : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement doClose
    FINE: oracle.jdbc.driver.T4CStatement.do_close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement doClose
    FINE: oracle.jdbc.driver.T4CStatement.do_close:return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement hardClose
    FINE: OracleStatement.hardClose : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement closeOrCache
    FINE: OracleStatement.closeOrCache : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isReadOnly
    INFO: PhysicalConnection.isReadOnly()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    ue)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setAutoCommit
    INFO: PhysicalConnection.setAutoCommit(autoCommit): return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection getAutoCommit
    INFO: PhysicalConnection.getAutoCommit() returned true
    May 27, 2009 4:04:47 PM oracle.sql.BLOB freeTemporary
    FINE: BLOB.freeTemporary() -- no return trace --
    May 27, 2009 4:04:47 PM oracle.sql.BLOB getDBAccess
    FINE: BLOB.getDBAccess()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.sql.BLOB getDBAccess
    FINE: BLOB.getDBAccess: return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection freeTemporary
    FINE: oracle.jdbc.driver.T4CConnection.freeTemporary(oracle.sql.BLOB@572554)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection freeTemporary
    FINE: oracle.jdbc.driver.T4CConnection.freeTemporary: return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection setTransactionIsolation
    INFO: PhysicalConnection.setTransactionIsolation(level=2)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection createStatement
    FINE: PhysicalConnection.createStatement(resultSetType=-1, resultSetConcurrency=-1)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement <init>
    FINE: OracleStatement.OracleStatement(conn, batchValue=1, rowPrefetchValue=10, UserResultSetType=-1)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
    FINE: PhysicalConnection.registerHeartbeat()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement <init>
    FINE: OracleStatement.OracleStatement(c, batch_value, UserResultSetType):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection createStatement
    FINE: PhysicalConnection.createStatement(resultSetType, resultSetConcurrency):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement execute
    FINE: OracleStatement.execute(sql)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement execute
    FINE: OracleStatement.execute(sql):return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement sendBatch
    FINE: OracleStatement.sendBatch()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql initialize
    FINE: OracleSql.initialize(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql initialize
    FINE: OracleSql.initialize:return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql computeBasicInfo
    FINE: OracleSql.computeBasicInfo(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleSql computeBasicInfo
    FINE: OracleSql.computeBasicInfo:return: sqlKind = 3 parameterCount = 0
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    FINE: OracleStatement.doExecuteWithTimeout() needToPrepareDefineBuffer = true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    CONFIG: SQL: "ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED"
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
    FINE: PhysicalConnection.registerHeartbeat()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection open
    FINE: T4CConnection.open(oracle.jdbc.driver.T4CStatement@18bd34e)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CConnection open
    FINE: T4CConnection.open: return oracle.jdbc.driver.T4CStatement@18bd34e
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement executeForRows
    FINE: oracle.jdbc.driver.T4CStatement.execute_for_rows(false)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion StringToCharBytes
    FINE: DBConversion.StringToCharBytes(ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion getServerCharSetId
    FINE: DBConversion.getDbCharSet(): returned 178
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.DBConversion getNCharSetId
    FINE: DBConversion.getNCharSetId(): returned 2000
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement executeForRows
    FINE: oracle.jdbc.driver.T4CStatement.execute_for_rows:return: validRows = 0
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
    FINE: OracleStatement.doExecuteWithTimeout():return validRows = 0, needToPrepareDefineBuffer = true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement closeOrCache
    FINE: OracleStatement.closeOrCache(null)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement hardClose
    FINE: OracleStatement.hardClose(closeCursor)
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement alwaysOnClose
    FINE: OracleStatement.alwaysOnClose()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement alwaysOnClose
    FINE: OracleStatement.alwaysOnClose : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection needLine
    FINE: PhysicalConnection.needLine()--no return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement doClose
    FINE: oracle.jdbc.driver.T4CStatement.do_close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.T4CStatement doClose
    FINE: oracle.jdbc.driver.T4CStatement.do_close:return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement hardClose
    FINE: OracleStatement.hardClose : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleStatement closeOrCache
    FINE: OracleStatement.closeOrCache : return
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isReadOnly
    INFO: PhysicalConnection.isReadOnly()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    May 27, 2009 4:04:47 PM oracle.jdbc.May 27, 2009 4:04:47 PM oracle.jdbc.driver.PhysicalConnection isClosed
    FINE: PhysicalConnection.isClosed() returned true

  • How to convert blob data into clob using plsql

    hi all,
    I have requirement to convert blob column into clob .
    version details
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE     11.1.0.7.0     Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    DECLARE
       v_blob      temp.blob_column%TYPE;------this is blob data type column contains  (CSV file which is  inserted  from screens)
       v_clob      CLOB; --i want to copy blob column data into this clob
       v_warning   NUMBER;
    BEGIN
       SELECT blob_column
         INTO v_blob
         FROM temp
        WHERE pk = 75000676;
       DBMS_LOB.converttoclob (dest_lob          => v_clob,
                               src_blob          => v_blob,
                               amount            => DBMS_LOB.lobmaxsize,
                               dest_offset       => 1,
                               src_offset        => 1,
                               blob_csid         => 1, -- what  is the use of this parameter
                               lang_context      => 1,
                               warning           => v_warning
       DBMS_OUTPUT.put_line (v_warning);
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line (SQLCODE);
          DBMS_OUTPUT.put_line (SQLERRM);
    END;I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .
    Any help in this regard would be highly appreciated .......
    Thanks
    Edited by: prakash on Feb 5, 2012 11:41 PM

    Post the 4 digit Oracle version.
    Did you read the Doc for DBMS_LOB.CONVERTTOCLOB? - http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_lob.htm
    The function can convert data from one character set to another. If the source data uses a different character set than the target you need to provide the character set id of the source data.
    The blob_csid parameter is where you would provide the value for the source character set.
    If the source and target use the same character set then just pass zero. Your code is passing a one.
    >
    General Notes
    You must specify the character set of the source data in the blob_csid parameter. You can pass a zero value for blob_csid. When you do so, the database assumes that the BLOB contains character data in the same character set as the destination CLOB.
    >
    Same for 'lang_context' - your code is using 1; just use 0. It is an IN OUT
    >
    lang_context
    (IN) Language context, such as shift status, for the current conversion.
    (OUT) The language context at the time when the current conversion is done.
    This information is returned so you can use it for subsequent conversions without losing or misinterpreting any source data. For the very first conversion, or if do not care, use the default value of zero.

  • Blob interface problem

    hi all,
    im facing an stylist problem when inserting blob into oracle dbms. im trying in a very simple way like this :
    stmt.executeUpdate("insert into picture values('sample1.gif',empty_blob())");
    ResultSet rs= stmt.executeQuery("select * from picture where name='sample1.gif' for update");
              rs.next();
              oracle.sql.BLOB blob=(oracle.sql.BLOB)rs.getBlob(2);
              FileInputStream in= new FileInputStream(filename);
              OutputStream os=blob.getBinaryOutputStream();
              int data;
              while((data=in.read())!=-1){
                             os.write(data);
         in.close();
         os.close();
    this code is ok but i have an allergy about standerizing my coding so im trying to use the following code :
    stmt.executeUpdate("insert into picture values('sample1.gif',empty_blob())");
    ResultSet rs= stmt.executeQuery("select * from picture where name='sample1.gif' for update");
              rs.next();
              java.sql.Blob blob=rs.getBlob(2);
              FileInputStream in= new FileInputStream(filename);
              OutputStream os=blob.setBinaryStream(1);
              int data;
              while((data=in.read())!=-1){
                             os.write(data);
         in.close();
         os.close();
    but the problem is setBinaryStream(int pos) is not implemented by oracle.sql.BLOB class. my oracle version is 9.0.1.0.1. when i run it,it shows an exception like abtract method error. is there any way not to use the oracle.sql.BLOB for inserting blob into oracle database ?

    I can't give a definitive answer but I've observed the same problem.
    The ability to get an outputstream to a Clob was only introduced in JDBC 3.0.
    Chapter 5 of Oracle's JDBC Developer's Guide and Reference http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/jdbc30ov.htm#1004903 mentions that only some JDBC 3.0 features are implemented; none of the mentioned features include the API calls for streaming to a Clob.
    T

  • BLOB Extraction Taking time

    Hi,
    I was asked to extract atatchments stored in BLOB.Attachments are compressed in ZL format and of type excel,tif,gif,bmp.pdf.doc etc.I'm uncompressing atatchments with
    utl_compress.lz_uncompress_extract
    and then extracting using
    UTL_FILE.put_raw(l_file, DBMS_LOB.SUBSTR (l_blob, l_amount, l_pos), TRUE);
    It works fine but taking 3mins per attachment is there any alternate way to make it faster
    Oracle Version :10G
    Thanks,
    Mahender.

    Hi Here're the code
    Decompress blob function:
    CREATE OR REPLACE FUNCTION "zlib_decompress" (p_key IN number,p_seq IN number, p_quest IN blob )
    RETURN blob
    IS
    t_out blob;
    t_tmp blob;
    t_buffer raw(1);
    t_hdl binary_integer;
    t_s1 pls_integer;
    t_last_chr pls_integer;
    BEGIN
         dbms_lob.createtemporary( t_out, false );
         dbms_lob.createtemporary( t_tmp, false );
         t_tmp := hextoraw( '1F8B0800000000000003' ); -- gzip header
         dbms_lob.copy( t_tmp, p_quest, dbms_lob.getlength( p_quest ) - 2 - 4, 11, 3 );
         dbms_lob.append( t_tmp, hextoraw( '0000000000000000' ) ); -- add a fake trailer
         t_hdl := utl_compress.lz_uncompress_open( t_tmp );
         t_s1 := 1;
    LOOP
    BEGIN
         utl_compress.lz_uncompress_extract( t_hdl, t_buffer );
    EXCEPTION
    WHEN OTHERS THEN
         EXIT;
    END;
         dbms_lob.append( t_out, t_buffer );
         t_s1 := mod( t_s1 + to_number( rawtohex( t_buffer ), 'xx' ), 65521 );
    END LOOP;
    t_last_chr := to_number( dbms_lob.substr( p_quest, 2, dbms_lob.getlength( p_quest ) - 1 ), '0XXX') - t_s1;
    IF t_last_chr < 0 THEN
         t_last_chr := t_last_chr + 65521;
    END IF;
    dbms_lob.append( t_out, hextoraw( to_char( t_last_chr, 'fm0X' ) ) );
    --Checks to see if the LOB was already opened
    IF utl_compress.isopen( t_hdl ) THEN
    --Close and finish the piecewise uncompress
         utl_compress.lz_uncompress_close( t_hdl );
    END IF;
    --Free temporary BLOB
         dbms_lob.freetemporary( t_tmp );
         RETURN t_out;
    EXCEPTION WHEN OTHERS THEN
         dbms_output.put_line('exiting function:'||p_key||'-'||p_seq||'-'||sqlerrm);
         RETURN NULL;
    END;
    Calling above fn from the following procedure to extract blobs :
    CREATE OR REPLACE PROCEDURE "BLOB_EXTRACT" as
    l_file UTL_FILE.FILE_TYPE;
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob BLOB;
    l_blob_len INTEGER;
    g_dir varchar2(100);
    CURSOR C1 IS select a.p_key,a.p_seq,rtrim(ltrim(substr(a.document,1,length(a.document)-4))) file_name,rtrim(ltrim(LOWER(substr(a.document,length(a.document)-2, 4)))) extn,
    a.document,b.blobtext,b.blob_compression_type
    from table a,table b
         where a.blob_key     = b.blob_key
         AND substr(a.document,length(a.document)-3, 1)='.'
    and a.p_key in (12345);
    BEGIN
         g_dir := 'XXXX';
         for c1_rec in c1 LOOP
    -- Calling Zlib Decompress Function
              l_blob:=zlib_decompress(c1_rec.p_key,c1_rec.p_seq,c1_rec.blobtext.);
    -- Determine the BLOB size
    l_blob_len := DBMS_LOB.getlength(l_blob);
    -- Open the destination file.
    l_file := UTL_FILE.fopen(g_dir,'S'||'-'||c1_rec.p_key||' _'||c1_rec.p_seq||'_'||substr(c1_rec.document,1,10)||'.'||c1_rec.extn,'wb', 32767);
    -- Read chunks of the BLOB and write them to the file until complete.
    WHILE l_pos < l_blob_len LOOP
    -- DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
    --put_raw function accepts a RAW data value and writes the value to the output buffer  here autoflush is true
    UTL_FILE.put_raw(l_file, DBMS_LOB.SUBSTR (l_blob, l_amount, l_pos), TRUE);
    l_pos := l_pos + l_amount;
    END LOOP;
         l_blob:=EMPTY_BLOB;
         l_blob_len:=NULL;
         l_pos:=1;
         -- Close the file.
    UTL_FILE.fclose(l_file);
    END LOOP;
    EXCEPTION
    when UTL_COMPRESS.INVALID_ARGUMENT then
    dbms_output.put_line('An argument was an invalid type or value.');
    when UTL_COMPRESS.BUFFER_TOO_SMALL then
    dbms_output.put_line('Compressed representation is too big.');
    when UTL_COMPRESS.DATA_ERROR then
    dbms_output.put_line('Input or output data stream has invalid format.');
    when UTL_COMPRESS.STREAM_ERROR then
    dbms_output.put_line('Error during compression/uncompression of the data stream');
    when others then
    dbms_output.put_line('An exception occurred'||sqlerrm);
    END ;

Maybe you are looking for

  • WE20 - post processing: permitted agent tab

    Hi , I need to create a inbound TXTRAW message type for a comapny code which I have done. Then in the screen where you give the process code , the next tab is post processing: permitted agent tab ... here my requirement is that this mail should go to

  • Set Action path in ValueChangeListener in SelectOneChoice

    Hi, I would like to see how to set the action path programatically in my java bean. What I meant is for example, in jspx page: <af:commandLink text="#{row.RequestUid}" id="cl1" action="gotoRequestOverview"> </af:commandLink> I can define "action" in

  • HT4759 apple tv photo stream

    please help with iphone, tried to download os 6 and froze up iphone while trying to fix photo stream on apple tv. iphone showing usb plug qnd itunes symble. 

  • Get info about the system

    Hi, id like to know if theres any way i can determine what os the user is running and what version of dw they have running... i've been looking through the api docs but cant find anything anyone know how to do this? thanks Byron

  • Desktop Widgets or something of the type....

    Hi I'm looking for some desktop widgets. There use to be adesklets, gdesklets, etc.... but what is there today? I'm really just looking for a simple weather desklet thingy and rss feeder, both just very simple Any suggestions would be great! I run op