Error while saving file to database using messageFileUpload
Hi,
In my OA Page I have messageFileUpload to save the file to a database. I have a custom stored procedure that I call in the AM that takes the file as BLOB and insert it into the table. My problem is for smaller files it works fine but as soon as I try to save a larger file i.e. over 0.5 MB I am getting the following errors. Sometime I get size error sometimes I get unreasonable conversion requested error. How can I solve this so it takes any size of file and save it.
Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: Data size bigger than max size for this type: 2251264;
Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested ; Here is what I have in my Controller code snippet
BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);
Serializable[] parametersFile = { fileName, contentType, fileSize, uploadedByteStream };
Class[] paramTypesFile = { String.class, String.class, Long.class, BlobDomain.class };
am.invokeMethod("saveFile", parametersFile, paramTypesFile);Here is the AM method that also invokes the Stored Procedure and pass the file as BLOB to save
conn = (OracleConnection)dbTransaction.getJdbcConnection();
cStmt = (OracleCallableStatement)conn.prepareCall(
"{CALL FILE_PKG.saveFile(:1, :2, :3, :4)}");
cStmt.setString(1, fileName);
cStmt.setString(2, fileContentType);
cStmt.setNUMBER(3, new NUMBER(fileSize.intValue()));
cStmt.setBinaryStream(4,uploadedFile.getBinaryStream(),fileSize.intValue());Any help is appreciated.
Thanks
I was able to resolve it and used the below code just in case if anyone else trying to save the BLOB
byte[] barray = uploadedFile.getBytes(0,fileSize.intValue());
oracle.sql.BLOB data = oracle.sql.BLOB.createTemporary(conn, true, BLOB.DURATION_CALL);
data.putBytes(1,barray);
cStmt.setBlob(4,tempBlob);
Similar Messages
-
OutofMemory Error while sending file to database using Web services
I have a file of 30MB to be written to the MySQL database. I am doing this in Axis web services and it gives me the following error:
(I am using Tomcat as the application server and Apache as the web server, Axis 1.3 and MySQL standard 5.0.21 version. I have set the minimum and maximum heap size and it works well without using the web service (just uploading and downloading from the database using a simple java program). Another thing to notice is that I can send a file of almost 10MB size to the database using web service without any problem. But it doesn't work with the 30 MB .)
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:dbr221d.dbr.louisville.edu
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at edu.louisville.bcc_ma.ws.lab.LabServiceSoapBindingStub.storeGZIPFile(LabServiceSoapBindingStub.java:472)
at edu.louisville.bcc_ma.lims.labclient.container.SendGZIPFile.sendFile(SendGZIPFile.java:69)
at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.login(LoginContainer.java:58)
at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.main(LoginContainer.java:44)Sorry for the delayed response here, forget to add it to my watchlist. I didn't catch if you were using Java 1.5 or not. Prior to 1.5 the default maximum heap space was 64MB which with the overhead of the appserver might be your problem.
Take a look at http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html and the java -Xmx <size> command line option to change the default (I believe the size argument is in bytes, but don't hold me to that). I think you can pass that as a command line option to the startup script, but you should check the doco to see if it needs to be wrapped in some other arg etc.,
I seem to recall running into this same problem a few years back when I had a servlet doing some intense graphics processing on the fly and setting this option fixed the problem. -
CAD Integration - Error While Saving file
Hi,
Im having One Document type "DRW" which was working fine with all the functionalities.
After that i created another document type "PDW". Now all the functionalities are working fine for this Document type and not for "DRW".
Im getting an error while saving the drawing file in AutoCAD.
For DRW Type, I can able to create a DIR. After creating DIR if i click save button im getting this error.
RFC_SYS_EXCEPTION
SAP RFC error
Operation: BAPI_DOCUMENT_CHANGE2
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Reading titleblock data for 0000000000000010000000458/DRW/000/00...
RFC_SYS_EXCEPTION
SAP RFC error
Operation: CAD_GET_TITLE_BLOCK_DATA
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Reading titleblock data for 0000000000000010000000458/DRW/000/00...
RFC_SYS_EXCEPTION
SAP RFC error
Operation: CAD_GET_TITLE_BLOCK_DATA
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Reading titleblock data for 0000000000000010000000458/DRW/000/00...
RFC_SYS_EXCEPTION
SAP RFC error
Operation: CAD_GET_TITLE_BLOCK_DATA
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Reading titleblock data for 0000000000000010000000458/DRW/000/00...
RFC_SYS_EXCEPTION
SAP RFC error
Operation: CAD_GET_TITLE_BLOCK_DATA
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Updating document info record 0000000000000010000000458/DRW/000/00 ...
RFC_SYS_EXCEPTION
SAP RFC error
Operation: BAPI_DOCUMENT_CHANGE2
Group : 104
Key : RFC_ERROR_SYSTEM_FAILURE
Message : Wrong status
Command:
Command: Conversion to JPG done.
Checkin file into the existing storage category ZMRK ...
E26 253 Error while checking in and storing:
C:\SapWorkDir\AcadM\ConvertTempPath\10000000458_DR
But there is no error in "PDW" document type.
Anybody have any idea on this?
Regards,
MRK.Hi MRK,
Check the Status in DC10.
Also make sure you have configured in dc30
If possible send me the config file (.cfg)* to [email protected]
I ll check n revert back...
Have you done any settings based on document type in CFG file?
Niranjan
Award points if useful...
Edited by: Niranjan Dandekar on Mar 7, 2008 1:42 PM -
Error While Restoring the Oracle Database using Cloud Backup
Hello,
I have been facing a serious error while oracle restoration. I have Backed up Complete Database. For Testing restoration, the DBA removed all the DBF, logs and Control File from there orignal Position.
He restarted the Database in "Startup nomount" mode. No i am not able to connect to target database from my Backup Server remotely.
Whenever i try to restore, it shows following error:-
***RMAN-04005: error from target database:***
***ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
***ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
***"ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
I am using Oracle 11g R2 x64-bit database and on Windows Platform with Windows Server 2008 R2.
Can Anyone help me by connecting, rman to the remote target database when it is in nomount mode.
I am not able to connect the sqlplus remotely.\
Thanks in Advance...
Regards
Pravesh UpadhyayDevika,
You have to stop all your adapters, your repository, close all IStudio client and stop all sessions connected to this schema before running the oaiimport.
If you don't do this the oaiimport will not work properly as the script will not be able to drop the user and will try to re-create existing objects.
Tip : use the following select to list the session using oaihub902 user (and get rid off them)
select username, count(*)
from V$session
where username in ('OAIHUB902')
group by username
order by count(*) desc, username
JL -
Error while setting up Standby database using Grid Control
I am getting this on grid control 10.2 on windows env while creating standby database using EM. I have checked this folder and it does exists.
any ideas?
C:\oracle\ora10.1\network\admin\listener.ora: java.io.IOException: The system cannot find the path specifiedThere is no problem tnsnames.ora & listener.ora since I am getting the same error for just standby backup also.
this is error on emoms.trc file
2007-07-18 13:19:37,318 [EMUI_13_19_37_/console/database/instance/sitemap] ERROR perf.sitemap setMaintenancePage.1812 - java.sql.SQLException: ORA-00933: SQL command not properly ended
ORA-06512: at "SYSMAN.ECM_UTIL", line 509
ORA-06512: at line 1
java.sql.SQLException: ORA-00933: SQL command not properly ended
ORA-06512: at "SYSMAN.ECM_UTIL", line 509
ORA-06512: at line 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:869)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2932)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3023)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4132)
at oracle.sysman.util.jdbc.PreparedStatementWrapper.execute(PreparedStatementWrapper.java:173)
at oracle.sysman.util.jdbc.CallableStatementWrapper.execute(CallableStatementWrapper.java:135)
at oracle.sysman.eml.ecm.cloneHome.repaccess.CloneHomeSql.getClonableHomes(CloneHomeSql.java:449)
at oracle.sysman.eml.ecm.cloneHome.repaccess.CloneHomeSql.getClonableHomes(CloneHomeSql.java:561)
at oracle.sysman.eml.ecm.cloneHome.repaccess.CloneHomeSql.isHomeClonable(CloneHomeSql.java:363)
at oracle.sysman.db.adm.inst.SitemapController.setMaintenancePage(SitemapController.java:1807)
at oracle.sysman.db.adm.inst.SitemapController.setRequestAttributes(SitemapController.java:1385)
at oracle.sysman.db.adm.BaseController.handleEvent(BaseController.java:1154)
at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:577)
at oracle.sysman.db.adm.RootController.handleRequest(RootController.java:174)
at oracle.sysman.db.adm.DBControllerResolver.handleRequest(DBControllerResolver.java:114)
at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:781)
at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:337)
at oracle.sysman.eml.app.Console.doGet(Console.java:318)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:88)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at oracle.sysman.eml.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:122)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
at oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:102)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:336)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
2007-07-18 13:19:42,505 [EMUI_13_19_42_/console/database/dataguard/create] ERROR em.dataguard validate.1118 - CreateBean: ClassNotFoundException: null
2007-07-18 13:19:44,224 [EMUI_13_19_44_/console/database/dataguard/create] ERROR em.dataguard validate.1118 - CreateBean: ClassNotFoundException: null
2007-07-18 13:19:46,052 [EMUI_13_19_44_/console/database/dataguard/create] ERROR em.dataguard mapHelpPage.2002 - StandbyUtil.mapHelpPage: dghelp for database/dataguard/createSchedule not mapped to any help ID.. Defaulting to oemdba_consens_data_guard_page
2007-07-18 13:19:47,130 [EMUI_13_19_47_/console/database/dataguard/create] ERROR em.dataguard validate.1118 - CreateBean: ClassNotFoundException: null
2007-07-18 13:19:53,052 [Thread-85] ERROR jobs.dbclone createTemplate.379 - TemplateManager.createTemplate(): Exception: java.io.IOException: The system cannot find the path specified
2007-07-18 13:19:53,052 [Thread-85] ERROR jobs.dbclone submitJobPreparation.3013 - DBCloneObject.submitJobPreparation(): Exception: java.io.IOException: The system cannot find the path specified
2007-07-18 13:19:53,052 [Thread-85] ERROR jobs.dbclone submitDBCloneJob.3228 - DBCloneObject.submitDBCloneJob(): Exception: The system cannot find the path specified
2007-07-18 13:19:58,006 [EMUI_13_19_58_/console/database/dataguard/create] ERROR em.dataguard onEvent.1038 - CreateConfigController: Exception: oracle.sysman.db.dg.util.VxxStandbyException: The system cannot find the path specified -
Error while creating physical standby database using Oracle Grid 10.2.0.5
Hi All,
I am setting up data guard using oracle grid.
Primary database version: - 10.2.0.4
Standby database version: - 10.2.0.4
Primary OS Red Hat Enterprise Linux AS release 4 (Nahant Update 8)2.6.9
Standby OS Red Hat Enterprise Linux AS release 4 (Nahant Update 8)2.6.9
I am creating physical standby database using EM. But it is getting failed with error message in sqlnet.ora file
Fatal NI connect error 12533, connecting to:
(DESCRIPTION=(ADDRESS_LIST=)(CONNECT_DATA=(SERVICE_NAME=INPRDSB_XPT)(SERVER=dedicated)(CID=(PROGRAM=oracle)(HOST=indb50.oii.com)(USER=oracle))))
VERSION INFORMATION:
TNS for Linux: Version 10.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.4.0 - Production
Time: 17-AUG-2010 02:40:07
Tracing not turned on.
Tns error struct:
ns main err code: 12533
TNS-12533: TNS:illegal ADDRESS parameters
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0As we can see, address_list is empty.
Can anyone suggest what could be the reason behind this?Dear user13295317,
Here is the error explanation;
Oracle Error :: TNS-12533
TNS:illegal ADDRESS parameters
Cause
An illegal set of protocol adapter parameters was specified.
In some cases, this error is returned when a connection cannot be made to the protocol transport.
Action
Verify that the destination can be reached using the specified protocol.
Check the parameters within the ADDRESS section of TNSNAMES.ORA.
Legal ADDRESS parameter formats may be found in the Oracle operating system specific documentation for your platform.
Protocols that resolve names at the transport layer (such as DECnet object names) are vulnerable to this error if not properly configured or names are misspelled.Hope That Helps.
Ogan -
Error while inserting record into database using BPEL
I am trying to read from an xml file using a File Adapter and insert the values read into a database (by invoking a database adapter).
I formed the BPEL Process in the following manner:
1.Receive activity to receive the values read from the file
2.Assign activiuty to assign the values read to the Database input variable
3.Invoke activity to invoke the Database adapter.
The process deploys fine although with a warning : Trying to assign incompatible types.
But when the process is executed, it is faulting at the invoke stage.
The error i am getting is :
<messages><input><InvokeDBInput><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmployeesCollection"><EmployeesCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
<ns0:Employees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio10133\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
<Name>John Smith</Name>
<Email>[email protected]</Email>
<Department>Finance</Department>
<Designation>Accountant</Designation>
<Grade>5</Grade>
</ns0:Employees>
</EmployeesCollection>
</part></InvokeDBInput></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
</part><part name="summary"><summary>file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FileToDBTest1_3.5_1558cd90a5c3c9708cd747f1b3638054.tmp/SaveToDB.wsdl [ SaveToDB_ptt::insert(EmployeesCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Mapping Not Found Exception.
The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
; nested exception is:
ORABPEL-11627
Mapping Not Found Exception.
The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
Make sure that the input xml is valid relative to the xsd and that the mapping exists in the Mappings.xml. If an old version of the descriptor without this mapping has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this attribute/mapping.
</summary>
</part><part name="detail"><detail>null</detail>
</part></bindingFault></fault></messages>
The xml and xsd files i have used are these:
XML File (Employee.xml ) :
<?xml version="1.0" encoding="UTF-8"?>
<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio1013\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB">
<Name>John Smith</Name>
<Email>[email protected]</Email>
<Department>Finance</Department>
<Designation>Accountant</Designation>
<Grade>5</Grade>
</person>
Schema file : (emp.xsd) :
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xmlns.oracle.com/filetoDB"
xmlns="http://xmlns.oracle.com/filetoDB"
elementFormDefault="qualified">
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Email" type="xs:string"/>
<xs:element name="Department" type="xs:string"/>
<xs:element name="Designation" type="xs:string"/>
<xs:element name="Grade" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element></xs:schema>
can someone help me out?I figured where i was going wrong...added a transform activity after the assign activity to map the file input fieds to the database columns. Now it works fine.
-
Type Mismatch error while saving a BPC Report using eTools
Hi,
Iam getting a 'type mismatch' error when trying to save a BPC Excel workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
Can anyone please help out and let me know why I am getting this error.
Thanks
ArvindHi,
You need to save the file as .xls extension. -
Error while saving for Objective setting using tcode phap_catalog_pa.
while executing tcode phap_catalog_pa, i get the error "Table HRPAD605 is not part of customizing Object PDST T.
However, when I proceeded further to use the catalog, I am not able to make any changes and the error message i get is "Data was not saved Message no. HRHAP00_TEMPLATE003".
I also executed the solution mentioned in previous threads on the same problem i.e. run the program "RHSOBJCH" and executed the adjusting entries but to no avail.
I have SAP_ALL authorization profile assigned to me.
Would be really helpful if someone could share their insights on solutions to rectify this problem.
Regards,
KalpanaHi Kalpana,
Check the configuration whether you have done it correctly or not.
And try to upload one template which is existing on the system. Download it and upload it as a template.
If the problem is still there then it will be some configuration issues.
Thanks & Regards,
Ganesh R K -
Getting error while backing up SQL database using powershell
I am trying to backup SQL database but strange thing is taking lpace, few databases i can backup with powershell but few i am getting error
Exception calling "SqlBackup" with "1" argument(s): "Backup failed for Server
'Server1'. "
At C:\_Scripts\defaultbackup.ps1:40 char:1
+ $smoBackup.SqlBackup($server)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FailedOperationException
$dbToBackup = "test"
#clear screen
cls
#load assemblies
#note need to load SqlServer.SmoExtended to use SMO backup in SQL Server 2008
#otherwise may get this error
#Cannot find type [Microsoft.SqlServer.Management.Smo.Backup]: make sure
#the assembly containing this type is loaded.
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") |
Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")
| Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-
Null
#create a new server object
$server = New-Object ("Microsoft.SqlServer.Management.Smo.Server") "(local)"
$backupDirectory = $server.Settings.BackupDirectory
"Default Backup Directory: " + $backupDirectory
$db = $server.Databases[$dbToBackup]
$dbName = $db.Name
$timestamp = Get-Date -format yyyyMMddHHmmss
$smoBackup = New-Object ("Microsoft.SqlServer.Management.Smo.Backup")
#BackupActionType specifies the type of backup.
#Options are Database, Files, Log
#This belongs in Microsoft.SqlServer.SmoExtended assembly
$smoBackup.Action = "Database"
$smoBackup.BackupSetDescription = "Full Backup of " + $dbName
$smoBackup.BackupSetName = $dbName + " Backup"
$smoBackup.Database = $dbName
$smoBackup.MediaDescription = "Disk"
$smoBackup.Devices.AddDevice($backupDirectory + "\" + $dbName + "_" + $timestamp +
".bak",
"File")
$smoBackup.SqlBackup($server)
#let's confirm, let's list list all backup files
$directory = Get-ChildItem $backupDirectory
$smoBackup.Devices.AddDevice($backupDirectory + "\" + $dbName + "_" + $timestamp + ".bak", "File")
$smoBackup.SqlBackup($server)
#let's confirm, let's list list all backup files
$directory = Get-ChildItem $backupDirectory
#list only files that end in .bak, assuming this is your convention for all backup files
$backupFilesList = $directory | where {$_.extension -eq ".bak"}
$backupFilesList | Format-Table Name, LastWriteTime
$backupFilesList = $directory | where {$_.extension -eq ".bak"}
$backupFilesList | Format-Table Name, LastWriteTime
I read on internet that by using this in the script this problem can be sorted but i am
not sure where exactly to put this line in above script set the ConnectionContext.StatementTimeout to 0
Hi Srk,
I found the similar issue in this article, which had been sovled by adding the script below:
$server = New-Object ("Microsoft.SqlServer.Management.Smo.Server") $dbInstance
$server.ConnectionContext.StatementTimeout = 0
Refer to:
Exception calling "SqlBackup" with "1" argument(s)
Please feel free to let me know if this method can not work.
Best Regards,
Anna Wang -
Error while loading the Repository database using OAIIMPORT
We are building a test oai environment I am trying to load the repository with the export dump from our production oai using the OAIIMPORT script.
I get the following error message:
Deleting all tables, indexes, and logs ...
Executing: sqlplus system/[email protected] @sql/deinstall_schema
SQL*Plus: Release 9.0.1.4.0 - Production on Wed Aug 18 15:04:50 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
DROP USER oaihub902 CASCADE
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
Recreating user ...
Executing: sqlplus system/[email protected] @sql/hub1 oaihub902
SQL*Plus: Release 9.0.1.4.0 - Production on Wed Aug 18 15:04:50 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
DOC>** hub1.sql
DOC>** Modified 11/14/2001 Arvind : Commented Out excessive priviledge from oaihub user
DOC>** Modified 01/03/2002 Arvind : Added Parameter for oaihub user password
DOC>** CREATE user oaihub902 and assign table space.
DOC>*/
old 1: CREATE USER oaihub902 IDENTIFIED BY &1 DEFAULT TABLESPACE USERS PROFILE DEFAULT ACCOUNT UNLOCK
new 1: CREATE USER oaihub902 IDENTIFIED BY oaihub902 DEFAULT TABLESPACE USERS PROFILE DEFAULT ACCOUNT UNLOCK
CREATE USER oaihub902 IDENTIFIED BY oaihub902 DEFAULT TABLESPACE USERS PROFILE DEFAULT ACCOUNT UNLOCK
ERROR at line 1:
ORA-01920: user name 'OAIHUB902' conflicts with another user or role name
User altered.
User altered.
Grant succeeded.
Grant succeeded.
DOC>** Grant privileges TO user oaihub902.
DOC>*/
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
Importing metadata ...
Executing: imp system/[email protected] fromuser=oai touser=oaihub902 commit=y file=uranus_aug04_exp.dmp
Executing: sqlplus oaihub902/[email protected] @sql/post_import
SQL*Plus: Release 9.0.1.4.0 - Production on Wed Aug 18 15:04:52 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
DOC> ** Create Tables
DOC> */
DOC> ** Workflow Tables and Sequences
DOC> */
CREATE TABLE lookupid (id NUMBER(10) NOT NULL
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE TABLE lookup (tableid NUMBER(10) NOT NULL
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Component Info Tables and Sequences
DOC> */
CREATE TABLE ComponentInfo (name VARCHAR2(256) NOT NULL,
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE TABLE ComponentInfoValue (seqnum NUMBER
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE TABLE AppIDTable (appid NUMBER
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE TABLE RepoIDTable (repoid NUMBER
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE TABLE MessageInfoIDTable (messageinfoid NUMBER
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Correlation
DOC> */
CREATE TABLE msg_correlation ( messageinfoid NUMBER,
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Tracking and Status Tables
DOC> */
CREATE TABLE MessageStatusTable ( SenderApp NUMBER,
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Error Table and resubmission AQ
DOC> */
CREATE TABLE oai_agent_error ( errorID NUMBER
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Create Views
DOC> */
CREATE VIEW lcoview as
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE VIEW eventview as
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE VIEW eventlcoview as
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE VIEW emdview as
ERROR at line 1:
ORA-00955: name is already used by an existing object
CREATE VIEW dsoview as
ERROR at line 1:
ORA-00955: name is already used by an existing object
DOC> ** Create Queues
DOC> */
DOC> ** Hub Queue
DOC> */
Procedure created.
PL/SQL procedure successfully completed.
DOC> ** Error Queue
DOC> */
CREATE type oai_agent_error_type as object ( errorID NUMBER,
ERROR at line 1:
ORA-00955: name is already used by an existing object
DECLARE
ERROR at line 1:
ORA-24001: cannot create QUEUE_TABLE, OAIHUB902.OAI_AGENT_ERROR_OBJQTAB already
exists
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2284
ORA-06512: at "SYS.DBMS_AQADM", line 56
ORA-06512: at line 3
PL/SQL procedure successfully completed.
DOC> ** Create Sequences
DOC> */
SELECT * FROM SEQUENCE_VALUES;
ERROR at line 3:
ORA-06550: line 3, column 18:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 3, column 4:
PL/SQL: SQL Statement ignored
ORA-06550: line 6, column 44:
PLS-00364: loop index variable 'SEQ_REC' use is invalid
ORA-06550: line 6, column 4:
PL/SQL: Statement ignored
DROP TABLE SEQUENCE_VALUES
ERROR at line 1:
ORA-00942: table or view does not exist
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.4.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
Any idea why these errors and how to fix this ?
Thanks in advance
Devika.Devika,
You have to stop all your adapters, your repository, close all IStudio client and stop all sessions connected to this schema before running the oaiimport.
If you don't do this the oaiimport will not work properly as the script will not be able to drop the user and will try to re-create existing objects.
Tip : use the following select to list the session using oaihub902 user (and get rid off them)
select username, count(*)
from V$session
where username in ('OAIHUB902')
group by username
order by count(*) desc, username
JL -
UseCompExpr Error while saving file in older format
All,
I have a sequence that:
1. Was Developed in TestStand 2.0.1
2. I am opened in TestStand 4.0.1
3. I want to save it back in version 2.0.1
WHY: Ease of use in newer TestStand GUI.
But I get a UseCompExpr error >>> unknown variable
Any ideas would be appreciated.
thanksThe only place I know that UseCompExpr is used is in the test step properties. It looks like the step types have changed since versions. When you tried to back save it doesn't know what to do with that property or how to use it.
It's used in the String Value Test, Multiple Numeric Limit Test and the Numeric Limit Test.
Hope this points you in the right direction.
Honestly though I'm not sure what you are doing is supported or recommended by NI. I can't speak for them though. TS 3.0 was a major overhaul to TestStand and any version previous I consider ancient and wouldn't personally consider crossing that line. My 2 cents.
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~ -
Getting error while saving image to database
hi, i am getting error when i click commit button when i try to save image the message is as
Cannot create an object of type:java.sql.Blob from type:oracle.jbo.domain.BlobDomain with value:ÿØÿàJFIF``ÿáExifMM*2VGFGI2œ�êô‡ijÔ2009:03
please help me soonhey thanks , but my jdbc pool and driver is fine. what may be the problem and I am not able to change the type to BlobDomain in eo. The type i Blob only may be this is the problem how can I change it to Blob Domain
-
Error while reading file entries from the database
Hi there,
We are running a instance of xmii 12 in a VM (VMware) and after somebody shutdown the host machine without shutting down the VM (great idea isn't it?) we keep getting this message when trying to access xMII:
"Application cannot be started.
Details: com.sap.engine.services.deploy.container.ExceptionInfo: Error while reading file entries from the database."
Any clue? Any suggestion on how we can recover from that?
Thanks a whole lot,
Dom
Server log:
#1.5 #000C29A3B1F20002000000C400000F2800044829A35270F8#1205243578005#/System/Server##com.sap.engine.services.dbpool.deploy.ContainerImpl####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.dbpool.deploy.ContainerImpl#Plain###DataSources or DataSource aliases of 'sap.com/tcmonitoringsysteminfo' application started successfully.#
#1.5 #000C29A3B1F20002000000C500000F2800044829A3527A6C#1205243578005#/System/Server##com.sap.engine.services.servlets_jsp.server.container.WebContainer####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.servlets_jsp.server.container.WebContainer#Plain###application [] Start of application [sap.com/tcmonitoringsysteminfo] finished successfully on Web Container.#
#1.5 #000C29A3B1F20002000000C600000F2800044829A3527DB5#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###
Operation startApp over application sap.com/tcmonitoringsysteminfo finished successfully on server 305221750#
#1.5 #000C29A3B1F20002000000C700000F2800044829A3527E03#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###
Operation startApp on application sap.com/tcmonitoringsysteminfo finished on current cluster node for 221 ms.#
#1.5 #000C29A3B1F20002000000C800000F2800044829A3528B49#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Error#1#com.sap.engine.services.deploy#Plain###Error occurred while initially starting application sap.com/xappsxmiiear:Error while reading file entries from the database.#
#1.5 #000C29A3B1F20002000000CA00000F2800044829A352922B#1205243578015#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###The synchronization of applications with DB completed for 39304 ms.#
#1.5 #000C29A3B1F200040000000200000F2800044829B290A4F8#1205243834341#/System/Server/SLDService##com.sap.sldserv.DataCollector####n/a##0da42150ef7311dcb908000c29a3b1f2#SAPEngine_System_Thread[impl:5]_7##0#0#Warning#1#com.sap.sldserv.DataCollector#Plain###Communication configuration is incomplete. No data transfer possible until corrected.#Well thanks for the hint. Actually, the DB was up but corrupted. I managed to solve the bug by re-deploying xMII (using the SDM tool) which kept all my data but redeployed both the config db of (x)mii and the class files.
-
Error while saving the records in the database
Hi,
I am running into a wierd error.
I have built a new page which contains the information about the employees. Some of the fields are updatable fields. The page shows the details of the person who logs into the page.
I am not using EO in this page. The data is queried from the database from VO and displayed in the page and when the records are updated, they are saved in the databased using pl/sql procedure which is
being called from AM. So i am basically not using VO to save the records in the database.
The error which i am getting is,
If 2 users are trying to update the page at the same time, user A's details are updated in user B's page.
This is really causing the issue. Any help is greatly appreciated.
Thanks in advance.
PKI have posted the code used along with the dialog page. Please review.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Pavan, Start1",OAFwkConstants.STATEMENT);
if (pageContext.getParameter("XYZBack")!=null)
pageContext.setForwardURL("OA.jsp?OAFunc=OAHOMEPAGE"// OAWebBeanConstants.RETURN_TO_MENU_URL also tryed this , same error
,null
,OAWebBeanConstants.KEEP_MENU_CONTEXT
,null //not needed as we are retaining menu context
,null // no parameters are needed,true //retain AM,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
,true
,null
,OAWebBeanConstants.IGNORE_MESSAGES);
if(pageContext.getParameter("XYZUpdate") !=null)//The fields and their values are loaded as soon as the update button is clicked. We do this before calling the oadialog page so that the values are not lost
OAViewObject EmpDetailsVO3 = (OAViewObject)OAAppl.findViewObject("XYZPersInfoVO");
OARow EmpDetailsRow3 = (OARow)EmpDetailsVO3.first(); //Bringing the control over to the first row which is nothing but the displayed row.
if(EmpDetailsRow3 !=null)
s_workphone = EmpDetailsRow3.getAttribute("WorkPhone").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"workphone is: "+s_workphone,OAFwkConstants.STATEMENT);
s_fax = EmpDetailsRow3.getAttribute("WorkFax").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Fax is: "+s_fax,OAFwkConstants.STATEMENT);
s_building = EmpDetailsRow3.getAttribute("Building").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Building is: "+s_building,OAFwkConstants.STATEMENT);
s_room = EmpDetailsRow3.getAttribute("Room").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Room is: "+s_room,OAFwkConstants.STATEMENT);
s_box = EmpDetailsRow3.getAttribute("Box").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Box is: "+s_box,OAFwkConstants.STATEMENT);
s_preferedname = EmpDetailsRow3.getAttribute("KnownAs").toString();
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"Preferred name is: "+s_preferedname,OAFwkConstants.STATEMENT);
OAException OAExcep1 = new OAException("PER","XYZ_UPDATE_DETAILS");
OAException OAExcep2 = new OAException("PER","XYZ_UPDATE_MESSAGE");
OADialogPage OADialogPG1 = new OADialogPage(OAException.WARNING,OAExcep1,OAExcep2,
OADialogPG1.setOkButtonToPost(true);
OADialogPG1.setNoButtonToPost(true);
OADialogPG1.setOkButtonLabel("Yes");
OADialogPG1.setNoButtonLabel("No");
OADialogPG1.setOkButtonItemName("DoOk");
OADialogPG1.setNoButtonItemName("DoNo");
OADialogPG1.setPostToCallingPage(true);
pageContext.releaseRootApplicationModule();
pageContext.redirectToDialogPage(OADialogPG1);
else if(pageContext.getParameter("DoOk") != null)
OAApplicationModule EmpDetailsAM = pageContext.getApplicationModule(webBean);
Class[] paramtypes = {String.class, String.class, String.class, String.class,String.class,String.class,String.class};
Serializable[] params = {s_personid,s_workphone,s_fax,s_building,s_room,s_box,s_preferedname};
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"personid is :"+s_personid,OAFwkConstants.STATEMENT);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"workphone is :"+s_workphone,OAFwkConstants.STATEMENT);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"workfax is :"+s_fax,OAFwkConstants.STATEMENT);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"building is :"+s_building,OAFwkConstants.STATEMENT);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"room is :"+s_room,OAFwkConstants.STATEMENT);
if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this,"preferredname is :"+s_preferedname,OAFwkConstants.STATEMENT);
pageContext.releaseRootApplicationModule();
OAAppl.invokeMethod("TransactionCommit",params,paramtypes);
OAAppl.invokeMethod("initDetails");
throw new OAException("The Building and Phone Information have been saved successfully"
,OAException.INFORMATION);
thank you
Maybe you are looking for
-
hi, does anyone knows how i can connect my macbook pro to my daewoo LCD tv (19'' model DLT-19W4T). Thanks!
-
Hi there how are you guys out there of this forum? I got a question for y'a
Hi there how are you guys out there of this forum? I got a question for y'all I wanted to know how I could record different folders using iTunes Cause when recorded 2000 thongs on the DVD There were 2000 songs to go through So I really wanted to have
-
Hi guys, We have been using F110 for a very long time. From the past few weeks, the speed performance of the program has become very slow. No enhancements were made or no changes were made. Can anyone help to me to fix this and make it work at a fast
-
Ungrouping layers in Photoshop Elements 8
So I'm going through my external HD looking for some old work in progress, and come across a couple of files that had been started on my old room mate's copy of Photoshop CS2. The layers are grouped into folders. On my current computer, I have Elemen
-
Infobox Data Form Wizard blocked - JDv3
I installed JDeveloper 3.0 and tried to get the first connection using Infobox Data Form Wizard. The tested DBs are : NT and Linux, both Oracle 8.0.5. At the step 4 of 7 at the Infobox Data Form Wizard (Select Database Objects), where I can see the t