Private synonym unknown obj type

Hi,
I'm making a script, that makes private synonyms for the new database schema "ABC", for our existing schemas.
part of the script is:
SELECT * FROM (
     SELECT owner, object_name FROM all_objects WHERE owner IN ('ETL') AND object_type IN ('TABLE', 'VIEW') AND object_name NOT LIKE '%$%' MINUS(
SELECT table_owner, table_name FROM all_synonyms WHERE UPPER(owner) IN ('PUBLIC', 'ABC')
AND UPPER(table_owner) IN ('ETL'))
r_synonym     sys.all_objects%ROWTYPE;
     FOR r_synonym IN table_synonyms
     LOOP
     EXECUTE IMMEDIATE 'CREATE OR REPLACE SYNONYM ABC.'||r_synonym.object_name ||' FOR '||r_synonym.owner||'.'||r_synonym.object_name;
     END LOOP;
Now, the synonym gets created, but the info shows me "<unknown obj type>" and as you can expect, the synonym doesn't work (even though it's created).
Any ideas?
Thx

Does ABC have any privileges on the objects?
E.g. a sysnonym on a table will not work if you don't have a privilege like SELECT or UPDATE.
Regards
Marcus

Similar Messages

  • Expdp / impdp - Private synonyms using DB link not imported

    Hi
    I'd appreciate any help with this.
    We are taking an export (expdp) of a database on Oracle EE 10.2.0.3 in Prod and then importing it into an identical DB on 10.2.0.5 in Dev.
    I doubt the minor version difference is an issues, but I mention it for completeness.
    Our expdp in prod used to look like this:
    expdp agdba/x directory=DATA_PUMP_DIR dumpfile=X.DMP logfile=X.LOG schemas=A,B,C,D
    We have changed it to:
    expdp agdba/x directory=DATA_PUMP_DIR dumpfile=X.DMP logfile=X.LOG full=y EXCLUDE=SCHEMA:"IN ('E', 'F')"
    ( so basically do a full export, but exclude schemas E & F )
    The impdp in dev has not changed (we import one schema at a time):
    impdp agdba/x DUMPFILE=X.DMP LOGFILE=imp_X.LOG SCHEMAS=A DIRECTORY=DATA_PUMP_DIR TABLE_EXISTS_ACTION=SKIP
    DB user AGDBA has been granted the DBA role...
    The Issue:_
    Private synonyms that use a DB link are NOT imported, but private synonyms that do NOT use a DB link ARE imported.
    I can fix the issue by simply recreating the private synonyms using the DB link - e.g.:
    CREATE SYNONYM EVENTLOGTBL FOR EVENTLOGTBL@FCISTOSMS;
    Things were working fine until we change the expdp to use FULL. I see a few posts about synonyms and FULL=Y issues, but nothing quite like our problem.
    Any ideas?
    Thanks,
    Andreas

    Andreas Hess wrote:
    So the problem is expdp FULL=Y for some reason does not export synonyms that refer to objects via DB links. I doubt that ... More than few times a week I refresh non-prod databases from a prod db, (it is schema level export not FULL=Y), and two of the schema own db links, and others have synonyms pointing to them. I have never encountered synonym problem (except that if db_links are invalid then impdp takes extremely long time to timeout while compiling pl/sql code.). We normally change db_links after the impdp is done, or (while it is importing table via another session).
    I just re-ran sqlfile option with include=db_link,synonym option and i can see statements that create synonyms and create db links.
    However i think the order in which impdp runs might be the source of your problem ... see this
    Starting "ME"."SYS_SQL_FILE_SCHEMA_01":  ME/******** dumpfile=xxxx.%u.dmp directory=xxxx_exp schemas=schema1,schema2,schema3 sqlfile=schema.sql include=db_link,synonym
    Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM       <<<< Synonyms are created first
    Processing object type SCHEMA_EXPORT/DB_LINK               <<<< db_links come later
    Job "ME"."SYS_SQL_FILE_SCHEMA_01" successfully completed at 08:32:02So, it is conceivable that if you drop synonyms/db_links from your schemas before impdp, some synonyms will fail to create properly. This could be a version specific issue, mine is 11.2 and I don't see failures for synonym creation, i.e. no error messages while impdp. Next time you could try to drop objects except db_links and see if you still have the same issue.
    Raj

  • Unknown User Type Error using Add-AzureAccount

    Using the following code in an Azure automation runbook from the Portal (attempting to start a VM):
    workflow VMStart
    $Cred = Get-AutomationPSCredential –Name automationuser
    Add-AzureAccount -Credential $Cred
    Select-AzureSubscription -SubscriptionName "MySubscription"
    Start-AzureVM -ServiceName "MyServiceName" -Name "MyVirtualMachine" -force
    I get the following errors in the Output Pane:
    1/15/2015 4:53:09 PM, Error: Add-AzureAccount : unknown_user_type: Unknown User Type
    At VMStart:7 char:7
    +
    + CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount
    1/15/2015 4:53:10 PM, Error: Select-AzureSubscription : The subscription named 'MySubscription' cannot be found. Use Set-AzureSubscription to
    initialize the subscription data.
    Parameter name: name
    At VMStart:9 char:9
    +
    + CategoryInfo : CloseError: (:) [Select-AzureSubscription], ArgumentException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCommand
    1/15/2015 4:53:10 PM, Error: Start-AzureVM : A parameter cannot be found that matches parameter name 'force'.
    At VMStart:11 char:11
    +
    + CategoryInfo : InvalidArgument: (:) [Start-AzureVM], ParameterBindingException
    + FullyQualifiedErrorId :
    NamedParameterNotFound,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.StartAzureVMCommand
    I can't find any information on the "Unknown User Type" error.
    Any ideas?
    Thanks,
    Scott

    Hi Joe -
    I attempted to install the Azure Powershell using the instructions here:
    http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/
    Upon completion I was unable to find Azure Powershell from Start/Programs:
    I then attempted to re-install Azure Powershell.  Initially, it came up with the error: "There was an error loading custom feed: 'http://www.microsoft.com/web/webpi/2.0/ToolsProductList.xml'. Error: 'ProductId PHP not found.'."
    I clicked OK and WPI indicated that the Azure Powershell would be installed.  I clicked INSTALL and WPI showed Azure Powershell in the list, but the Total File Download size was 0MB.  I clicked I ACCEPT and it immediately blinked back that Azure
    Powershell was installed.
    When I clicked FINISH, however, the following was displayed:
    Here is the the log file from the latest attempt:
    DownloadManager Information: 0 : Loading product xml from: https://go.microsoft.com/?linkid=9842185
    DownloadManager Information: 0 : https://go.microsoft.com/?linkid=9842185 responded with 302
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 302 Found
    Cache-Control: private
    Content-Length: 175
    Content-Type: text/html; charset=utf-8
    Expires: Fri, 16 Jan 2015 17:18:12 GMT
    Location: https://www.microsoft.com/web/webpi/5.0/webproductlist.xml
    Server: Microsoft-IIS/8.5
    X-AspNet-Version: 2.0.50727
    X-Powered-By: ASP.NET
    Date: Fri, 16 Jan 2015 17:19:11 GMT
    DownloadManager Information: 0 : https://www.microsoft.com/web/webpi/5.0/webproductlist.xml responded with 304
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 304 Not Modified
    Content-Type: text/xml
    Last-Modified: Thu, 15 Jan 2015 19:17:09 GMT
    ETag: "246ac1dbf730d01:0"
    Cache-Control: max-age=280
    Date: Fri, 16 Jan 2015 17:19:12 GMT
    Connection: keep-alive
    X-CCC: US
    X-CID: 2
    DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\1343597488.xml.temp
    DownloadManager Information: 0 : Filtering by current OS
    DownloadManager Information: 0 : Loading product xml from: https://www.microsoft.com/web/webpi/5.0/webapplicationlist.xml
    DownloadManager Information: 0 : https://www.microsoft.com/web/webpi/5.0/webapplicationlist.xml responded with 304
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 304 Not Modified
    Content-Type: text/xml
    Last-Modified: Fri, 17 Oct 2014 12:44:38 GMT
    ETag: "97c9cd1c8eacf1:0"
    Cache-Control: max-age=296
    Date: Fri, 16 Jan 2015 17:19:14 GMT
    Connection: keep-alive
    X-CCC: US
    X-CID: 2
    DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\-97141593.xml.temp
    DownloadManager Information: 0 : Filtering by current OS
    DownloadManager Information: 0 : Sucessfully loaded the feed 'https://www.microsoft.com/web/webpi/5.0/webapplicationlist.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-97141593.xml'
    DownloadManager Information: 0 : Loading product xml from: https://www.microsoft.com/web/webpi/5.0/mediaproductlist.xml
    DownloadManager Information: 0 : https://www.microsoft.com/web/webpi/5.0/mediaproductlist.xml responded with 304
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 304 Not Modified
    Content-Type: text/xml
    Last-Modified: Thu, 08 May 2014 18:42:31 GMT
    ETag: "26a51545ed6acf1:0"
    Cache-Control: max-age=372
    Date: Fri, 16 Jan 2015 17:19:15 GMT
    Connection: keep-alive
    X-CCC: US
    X-CID: 2
    DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\-230948881.xml.temp
    DownloadManager Information: 0 : Filtering by current OS
    DownloadManager Information: 0 : Sucessfully loaded the feed 'https://www.microsoft.com/web/webpi/5.0/mediaproductlist.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-230948881.xml'
    DownloadManager Information: 0 : Loading product xml from: https://www.microsoft.com/web/webpi/5.0/ToolsProductList.xml
    DownloadManager Information: 0 : https://www.microsoft.com/web/webpi/5.0/ToolsProductList.xml responded with 304
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 304 Not Modified
    Content-Type: text/xml
    Last-Modified: Tue, 21 Oct 2014 20:26:36 GMT
    ETag: "247eed4f6dedcf1:0"
    Cache-Control: max-age=278
    Date: Fri, 16 Jan 2015 17:19:15 GMT
    Connection: keep-alive
    X-CCC: US
    X-CID: 2
    DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\-1135381691.xml.temp
    DownloadManager Information: 0 : Filtering by current OS
    DownloadManager Information: 0 : Sucessfully loaded the feed 'https://www.microsoft.com/web/webpi/5.0/ToolsProductList.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-1135381691.xml'
    DownloadManager Information: 0 : Loading product xml from: https://www.microsoft.com/web/webpi/5.0/enterpriseproductlist.xml
    DownloadManager Information: 0 : https://www.microsoft.com/web/webpi/5.0/enterpriseproductlist.xml responded with 304
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 304 Not Modified
    Content-Type: text/xml
    Last-Modified: Thu, 08 May 2014 18:42:32 GMT
    ETag: "8285645ed6acf1:0"
    Cache-Control: max-age=60
    Date: Fri, 16 Jan 2015 17:19:15 GMT
    Connection: keep-alive
    X-CCC: US
    X-CID: 2
    DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\-1877981721.xml.temp
    DownloadManager Information: 0 : Filtering by current OS
    DownloadManager Information: 0 : Sucessfully loaded the feed 'https://www.microsoft.com/web/webpi/5.0/enterpriseproductlist.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-1877981721.xml'
    DownloadManager Information: 0 : Sucessfully loaded the feed 'https://go.microsoft.com/?linkid=9842185' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\1343597488.xml'
    DownloadManager Information: 0 : Loading product xml from: http://www.microsoft.com/web/webpi/2.0/ToolsProductList.xml
    DownloadManager Information: 0 : Content-Encoding header: 'gzip'
    DownloadManager Information: 0 : Number of bytes downloaded over the internet: '14692'
    DownloadManager Information: 0 : Number of bytes after possible decompression: '104283'
    DownloadManager Information: 0 : Failed to load the feed 'http://www.microsoft.com/web/webpi/2.0/ToolsProductList.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\883561549.xml.err'
    DownloadManager Error: 0 : Error loading downloaded product file: 'System.InvalidOperationException: ProductId PHP not found.
    at Microsoft.Web.PlatformInstaller.DependencyProduct.ResolveProductIds(ProductManager pm)
    at Microsoft.Web.PlatformInstaller.DependencyLogicalAnd.ResolveProductIds(ProductManager pm)
    at Microsoft.Web.PlatformInstaller.Product.ResolveIDs()
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXmlInternal(LineInfoDocument xmlDoc, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(LineInfoDocument document, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(String xmlFile, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 osType)'
    DownloadManager Information: 0 : Content-Encoding header: 'gzip'
    DownloadManager Information: 0 : Number of bytes downloaded over the internet: '14692'
    DownloadManager Information: 0 : Number of bytes after possible decompression: '104283'
    DownloadManager Information: 0 : Failed to load the feed 'http://www.microsoft.com/web/webpi/2.0/ToolsProductList.xml' after preprocessing, location on disk: 'C:\Users\Scott\AppData\Local\Microsoft\Web Platform Installer\preprocessor\883561549.xml.err'
    DownloadManager Error: 0 : Error loading feed http://www.microsoft.com/web/webpi/2.0/ToolsProductList.xml: System.InvalidOperationException: ProductId PHP not found.
    at Microsoft.Web.PlatformInstaller.DependencyProduct.ResolveProductIds(ProductManager pm)
    at Microsoft.Web.PlatformInstaller.DependencyLogicalAnd.ResolveProductIds(ProductManager pm)
    at Microsoft.Web.PlatformInstaller.Product.ResolveIDs()
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXmlInternal(LineInfoDocument xmlDoc, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(LineInfoDocument document, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(String xmlFile, Boolean loadEnclosures)
    at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 osType)
    at Microsoft.Web.PlatformInstaller.ProductManager.LoadExternalFile(Uri uri)
    at Microsoft.Web.PlatformInstaller.ProductServiceImpl.LoadProducts(String primaryFeed, String[] feeds)
    DownloadManager Information: 0 : Getting ratings file from http://go.microsoft.com/?linkid=9752395
    DownloadManager Information: 0 : Contextual entry products: WindowsAzurePowerShell
    DownloadManager Information: 0 : Adding product Microsoft Azure PowerShell with Microsoft Azure SDK (WindowsAzurePowershell) to cart
    DownloadManager Information: 0 : Contextual navigation to product 'WindowsAzurePowershell'
    DownloadManager Information: 0 : http://go.microsoft.com/?linkid=9752395 responded with 302
    DownloadManager Information: 0 : Response headers:
    HTTP/1.1 302 Found
    Cache-Control: private
    Content-Length: 203
    Content-Type: text/html; charset=utf-8
    Expires: Fri, 16 Jan 2015 17:18:17 GMT
    Location: http://www.microsoft.com/web/handlers/WebPI.ashx?command=getatomfeedwithavgratingquery
    Server: Microsoft-IIS/8.5
    X-AspNet-Version: 2.0.50727
    X-Powered-By: ASP.NET
    Date: Fri, 16 Jan 2015 17:19:16 GMT
    DownloadManager Information: 0 : Content-Encoding header: 'gzip'
    DownloadManager Information: 0 : Number of bytes downloaded over the internet: '22570'
    DownloadManager Information: 0 : Number of bytes after possible decompression: '75392'
    DownloadManager Warning: 0 : Error getting last-modified header, error code: 12150
    DownloadManager Warning: 0 : HttpQueryInfoWithRetry for HTTP_QUERY_LAST_MODIFIED failed.
    DownloadManager Information: 0 : Ratings file loaded successfully
    DownloadManager Information: 0 : Dependent product WindowsAzurePowershellOnly does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Dependent product WindowsManagementFramework_86_64 does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Dependent product WindowsAzurePowershellOnly does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Dependent product WindowsManagementFramework_86_64 does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Dependent product WindowsAzurePowershellOnly does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Dependent product WindowsManagementFramework_86_64 does not apply for current OS / configuration. Not adding
    DownloadManager Information: 0 : Adding product 'WindowsAzurePowershell'
    DownloadManager Information: 0 : Setting current install to 1
    DownloadManager Information: 0 : Starting install sequence
    DownloadManager Information: 0 : Starting EXE command for product 'Microsoft Azure PowerShell with Microsoft Azure SDK'. Commandline is: 'C:\Windows\system32\cmd.exe /C echo noop'. Process Id: 5308
    DownloadManager Information: 0 : Install exit code for product 'Microsoft Azure PowerShell with Microsoft Azure SDK' is '0'
    DownloadManager Information: 0 : Install return code for product 'Microsoft Azure PowerShell with Microsoft Azure SDK' is Success
    DownloadManager Information: 0 : Product Microsoft Azure PowerShell with Microsoft Azure SDK done install completed
    DownloadManager Information: 0 : Increasing current install to 2
    DownloadManager Information: 0 : Product: WindowsAzurePowershell, Install Status: InstallCompleted-Success, Install Time: 00:00:00.0560000
    DownloadManager Information: 0 : Clearing cart
    I did attempt to open the regular Powershell and use the command Get-AzureVM, but the following error was returned:
    The term 'Get-AzureVM' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:12
    + Get-AzureVM <<<<
    + CategoryInfo : ObjectNotFound: (Get-AzureVM:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    Any advice appreciated...
    Thanks,
    Scott

  • Javax.crypto.BadPaddingException: unknown block type

    Hello,
    I`m trying to decode some data but it keeps getting me: javax.crypto.BadPaddingException: unknown block type
    Here is my code:
    import java.io.*;
    import java.security.*;
    import java.security.spec.*;
    import java.security.interfaces.*;
    import javax.crypto.*;
    public class Main{
      public static void main(String args[]){
        try{
          byte[] pubKeyBytes  = getBytesFromFile("RSAPublicKey.der");
          byte[] privKeyBytes = getBytesFromFile("RSAPrivateKey.der");
          Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
          KeyFactory keyFactory = KeyFactory.getInstance("RSA", "BC");
          // decode public key
          X509EncodedKeySpec pubSpec = new X509EncodedKeySpec(pubKeyBytes);
          RSAPublicKey pubKey = (RSAPublicKey) keyFactory.generatePublic(pubSpec);
          System.out.println("Public Ket Spec: " + pubSpec.toString());
          System.out.println("Public Key: " + pubKey.toString());
          // decode private key
          PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(privKeyBytes);
          RSAPrivateKey privKey = (RSAPrivateKey) keyFactory.generatePrivate(privSpec);
          System.out.println("Private Ket Spec: " + privSpec.toString());
          System.out.println("Private Key: " + privKey.toString());
          Cipher enc = Cipher.getInstance("RSA/None/PKCS1Padding", "BC");
          enc.init(Cipher.ENCRYPT_MODE, pubKey);
          Cipher dec = Cipher.getInstance("RSA/None/PKCS1Padding", "BC");
          dec.init(Cipher.DECRYPT_MODE, privKey);
          byte[] cyphered = new byte[] {
                  (byte) 0xA7, (byte) 0x08, (byte) 0x9A, (byte) 0xC0, (byte) 0x0A, (byte) 0x2F, (byte) 0x8D,
                  (byte) 0xA2, (byte) 0x3C, (byte) 0xC1, (byte) 0x49, (byte) 0x5B, (byte) 0x6A, (byte) 0xFF,
                  (byte) 0xF4, (byte) 0xC1, (byte) 0x9B, (byte) 0x87, (byte) 0x7C, (byte) 0xA2, (byte) 0xC5,
                  (byte) 0x6D, (byte) 0xB7, (byte) 0x84, (byte) 0xA5, (byte) 0x1A, (byte) 0xA5, (byte) 0x99,
                  (byte) 0xFF, (byte) 0x02, (byte) 0x16, (byte) 0xC4, (byte) 0x2D, (byte) 0x2E, (byte) 0x35,
                  (byte) 0xAC, (byte) 0x5B, (byte) 0x72, (byte) 0x51, (byte) 0xC1, (byte) 0xC7, (byte) 0x84,
                  (byte) 0xB5, (byte) 0x73, (byte) 0xAA, (byte) 0xB2, (byte) 0x85, (byte) 0x42, (byte) 0x7F,
                  (byte) 0xD2, (byte) 0xED, (byte) 0x0B, (byte) 0x0F, (byte) 0xD3, (byte) 0x8D, (byte) 0xFA,
                  (byte) 0xC4, (byte) 0x75, (byte) 0x16, (byte) 0x18, (byte) 0x62, (byte) 0xDC, (byte) 0xF9,
                  (byte) 0x84, (byte) 0xEF, (byte) 0x41, (byte) 0x76, (byte) 0x97, (byte) 0x63, (byte) 0x55,
                  (byte) 0x65, (byte) 0x4E, (byte) 0x7A, (byte) 0x0E, (byte) 0xC5, (byte) 0x2F, (byte) 0xC7,
                  (byte) 0xBC, (byte) 0x17, (byte) 0x83, (byte) 0x67, (byte) 0x3F, (byte) 0xD9, (byte) 0xC8,
                  (byte) 0x62, (byte) 0x3D, (byte) 0x74, (byte) 0xC6, (byte) 0x15, (byte) 0xBE, (byte) 0xA2,
                  (byte) 0xD8, (byte) 0x7C, (byte) 0x9F, (byte) 0x2A, (byte) 0x5A, (byte) 0xE5, (byte) 0xE9,
                  (byte) 0x02, (byte) 0x12, (byte) 0x6B, (byte) 0x78, (byte) 0x07, (byte) 0xB6, (byte) 0xF7,
                  (byte) 0xE3, (byte) 0x80, (byte) 0xCB, (byte) 0x20, (byte) 0xF5, (byte) 0x6D, (byte) 0xA8,
                  (byte) 0x56, (byte) 0xC6, (byte) 0xF7, (byte) 0xEB, (byte) 0xA4, (byte) 0xA4, (byte) 0xA6,
                  (byte) 0x28, (byte) 0xC2, (byte) 0x2D, (byte) 0x70, (byte) 0xAE, (byte) 0x99, (byte) 0xC8,
                  (byte) 0x6E, (byte) 0x22, (byte) 0xA0, (byte) 0x4F, (byte) 0xE8, (byte) 0x69, (byte) 0x05,
                  (byte) 0x6B, (byte) 0x63, (byte) 0xF0, (byte) 0x83, (byte) 0xD8, (byte) 0x2D, (byte) 0xA4,
                  (byte) 0xE2, (byte) 0x6A, (byte) 0x45, (byte) 0x88, (byte) 0xF6, (byte) 0xF2, (byte) 0x3B,
                  (byte) 0xF9, (byte) 0x40, (byte) 0x27, (byte) 0x53, (byte) 0x4D, (byte) 0xDB, (byte) 0x22,
                  (byte) 0x50, (byte) 0x5E, (byte) 0x30, (byte) 0xAC, (byte) 0x70, (byte) 0x53, (byte) 0x32,
                  (byte) 0x93, (byte) 0xC0, (byte) 0xF4, (byte) 0x5D, (byte) 0xDE, (byte) 0xC7, (byte) 0xCF,
                  (byte) 0xCC, (byte) 0x79, (byte) 0x1E, (byte) 0xE3, (byte) 0xBA, (byte) 0x2A, (byte) 0xB5,
                  (byte) 0xB3, (byte) 0xBB, (byte) 0x2D, (byte) 0x0A, (byte) 0x2E, (byte) 0x13, (byte) 0x56,
                  (byte) 0xDA, (byte) 0x29, (byte) 0x28, (byte) 0x9D, (byte) 0xA3, (byte) 0xB6, (byte) 0x95,
                  (byte) 0xA0, (byte) 0xFF, (byte) 0xAC, (byte) 0x19, (byte) 0x35, (byte) 0xD9, (byte) 0x5A,
                  (byte) 0xA4, (byte) 0xF6, (byte) 0x38, (byte) 0xF0, (byte) 0xBB, (byte) 0x8A, (byte) 0xC8,
                  (byte) 0x01, (byte) 0xBA, (byte) 0xDE, (byte) 0x4D, (byte) 0x4C, (byte) 0xB0, (byte) 0xBA,
                  (byte) 0x44, (byte) 0xB1, (byte) 0x60, (byte) 0xA8, (byte) 0x81, (byte) 0x94, (byte) 0x15,
                  (byte) 0x88, (byte) 0x5D, (byte) 0x92, (byte) 0x88, (byte) 0x50, (byte) 0xC7, (byte) 0x25,
                  (byte) 0xEC, (byte) 0xAB, (byte) 0x03, (byte) 0x82, (byte) 0x30, (byte) 0x13, (byte) 0xB6,
                  (byte) 0xC0, (byte) 0xC8, (byte) 0xA6, (byte) 0x8F, (byte) 0xD5, (byte) 0xB7, (byte) 0x78,
                  (byte) 0x10, (byte) 0x81, (byte) 0x5D, (byte) 0xF3, (byte) 0x7C, (byte) 0xAB, (byte) 0x5B,
                  (byte) 0xC3, (byte) 0x38, (byte) 0xA5, (byte) 0xE3, (byte) 0x8B, (byte) 0x85, (byte) 0x0B,
                  (byte) 0xC9, (byte) 0x54, (byte) 0x29, (byte) 0x79};
          System.out.println("Testing encoding: ");
          byte[] uncyph = cyphered;
          System.out.println(dec.doFinal(uncyph));
        }catch(Exception e){
          System.out.println(e.toString());
      public static byte[] getBytesFromFile(String filePath) throws IOException {
        File file = new File(filePath);
        InputStream is = new FileInputStream(file);
        long length = file.length();
        byte[] bytes = new byte[(int)length];
        int offset = 0;
        int numRead = 0;
        while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0)
            offset += numRead;
        if (offset < bytes.length)
            throw new IOException("Could not completely read file "+file.getName());
        is.close();
        return bytes;
    }

    jverd wrote:
    sabre150 wrote:
    Your ciphertext is 256 bytes so your RSA modulus needs to be 2048 bytes (256 bytes). ???
    2048 bits perhaps?:-)))) Aint this new site wonderful. I can edit my post even after someone has responded to it!

  • Javax.crypto.BadPaddingException: unknown block type - URGENT

    I am trying to encryp-decrypt a file (serialized xml file ) using BC provider with RSA algorithm and PKCS1Padding padding..
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC")
    Sequence of action is encrypt - base64encode -
    base64decode - decrypt.
    Encryption seems to be working fine but while decrypting it gives the error mentioned below:
    javax.crypto.BadPaddingException: unknown block type
    I tried using OAEPPadding - In that scenario I get this error
    javax.crypto.BadPaddingException: data hash wrong
    I tried searching the cause and resolution of the problems on various resources on net but in vain. Need it urgently. PLS HELP. THANKS
    I am pasting my code below :
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.security.Key;
    import java.security.KeyFactory;
    import java.security.KeyPair;
    import java.security.KeyPairGenerator;
    import java.security.NoSuchAlgorithmException;
    import java.security.NoSuchProviderException;
    import java.security.PrivateKey;
    import java.security.PublicKey;
    import java.security.Security;
    import java.security.spec.EncodedKeySpec;
    import java.security.spec.PKCS8EncodedKeySpec;
    import java.security.spec.X509EncodedKeySpec;
    import javax.crypto.Cipher;
    import org.apache.log4j.Logger;
    import org.bouncycastle.jce.provider.*;
    import sun.misc.BASE64Decoder;
    import sun.misc.BASE64Encoder;
    public class EncryptBase64File
    protected static final String ALGORITHM = "RSA";
         private static Logger logger = Logger.getLogger(EncryptFiles.class.getClass());
    private EncryptBase64File()
    * Init java security to add BouncyCastle as an RSA provider
    public static void init()
    Security.addProvider(new BouncyCastleProvider());
    * Generate key which contains a pair of privae and public key using 1024 bytes
    * @return key pair
    * @throws NoSuchAlgorithmException
    public static KeyPair generateKey() throws NoSuchProviderException,NoSuchAlgorithmException
    //KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);
              KeyPairGenerator keyGen =
                                  KeyPairGenerator.getInstance("RSA", "BC");
    keyGen.initialize(1024);
    KeyPair key = keyGen.generateKeyPair();
    return key;
    * Encrypt a text using public key.
    * @param text The original unencrypted text
    * @param key The public key
    * @return Encrypted text
    * @throws java.lang.Exception
    public static byte[] encrypt(byte[] text, PublicKey key) throws Exception
    byte[] cipherText = null;
    try
    // get an RSA cipher object and print the provider
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
                   //Cipher cipher = Cipher.getInstance("RSA");
                   System.out.println("\nProvider is: " + cipher.getProvider().getInfo());
                   System.out.println("\nStart encryption with public key");
    if (logger.isDebugEnabled())
                        logger.debug("\nProvider is: " + cipher.getProvider().getInfo());
                        logger.debug("\nStart encryption with public key");
    // encrypt the plaintext using the public key
    cipher.init(Cipher.ENCRYPT_MODE, key);
    cipherText = cipher.doFinal(text);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return cipherText;
    * Encrypt a text using public key. The result is enctypted BASE64 encoded text
    * @param text The original unencrypted text
    * @param key The public key
    * @return Encrypted text encoded as BASE64
    * @throws java.lang.Exception
    public static String encrypt(String text, PublicKey key) throws Exception
    String encryptedText;
    try
    byte[] cipherText = encrypt(text.getBytes("UTF8"),key);
    encryptedText = encodeBASE64(cipherText);
                   System.out.println("Enctypted text is: " + encryptedText);
                   logger.debug("Enctypted text is: " + encryptedText);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return encryptedText;
    * Decrypt text using private key
    * @param text The encrypted text
    * @param key The private key
    * @return The unencrypted text
    * @throws java.lang.Exception
    public static byte[] decrypt(byte[] text, PrivateKey key) throws Exception
    byte[] dectyptedText = null;
    try
    // decrypt the text using the private key
    //Cipher cipher = Cipher.getInstance("RSA/CBC/PKCS1Padding","BC");
                   Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
                   //Cipher cipher = Cipher.getInstance("RSA");
                   logger.debug("Start decryption");
                   System.out.println("Start decryption");
    cipher.init(Cipher.DECRYPT_MODE, key);
    dectyptedText = cipher.doFinal(text);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return dectyptedText;
    * Decrypt BASE64 encoded text using private key
    * @param text The encrypted text, encoded as BASE64
    * @param key The private key
    * @return The unencrypted text encoded as UTF8
    * @throws java.lang.Exception
    public static String decrypt(String text, PrivateKey key) throws Exception
    String result;
    try
    // decrypt the text using the private key
    byte[] dectyptedText = decrypt(decodeBASE64(text),key);
    result = new String(dectyptedText, "UTF8");
                   logger.debug("Decrypted text is: " + result);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return result;
    * Encode bytes array to BASE64 string
    * @param bytes
    * @return Encoded string
    private static String encodeBASE64(byte[] bytes)
    BASE64Encoder b64 = new BASE64Encoder();
    return b64.encode(bytes);
    * Decode BASE64 encoded string to bytes array
    * @param text The string
    * @return Bytes array
    * @throws IOException
    private static byte[] decodeBASE64(String text) throws IOException
    BASE64Decoder b64 = new BASE64Decoder();
    return b64.decodeBuffer(text);
    * Encrypt file using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void encryptFile(String srcFileName, String destFileName, PublicKey key) throws Exception
    encryptDecryptFile(srcFileName,destFileName, key, Cipher.ENCRYPT_MODE);
    * Decrypt file using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void decryptFile(String srcFileName, String destFileName, PrivateKey key) throws Exception
    encryptDecryptFile(srcFileName,destFileName, key, Cipher.DECRYPT_MODE);
    * Encrypt and Decrypt files using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void encryptDecryptFile(String srcFileName, String destFileName, Key key, int cipherMode) throws Exception
    OutputStream outputWriter = null;
    InputStream inputReader = null;
    try
              Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
    String textLine = null;
    byte[] buf = cipherMode == Cipher.ENCRYPT_MODE? new byte[100] : new byte[128];
    int newBuffer;
    // init the Cipher object for Encryption...
    cipher.init(cipherMode, key);
    // start FileIO
    outputWriter = new FileOutputStream(destFileName);
    inputReader = new FileInputStream(srcFileName);
    while ( (bufl = inputReader.read(buf)) != -1)
    String encText = null;
    String base64EncText = null ;
    if (cipherMode == Cipher.ENCRYPT_MODE)
    encText = encrypt(getBytes(buf,newBuffer).toString(),(PublicKey)key);
    else
    encText = decrypt(getBytes(buf,newBuffer).toString(),(PrivateKey)key);
                   outputWriter.write(encText.getBytes());
    outputWriter.flush();
    catch (Exception e)
                   logger.error(e,e);
    throw e;
    finally
    try
    if (outputWriter != null)
    outputWriter.close();
    if (inputReader != null)
    inputReader.close();
    catch (Exception e)
    public static byte[] getBytes(byte[] arr, int length)
    byte[] newArr = null;
    if (arr.length == length)
    newArr = arr;
    else
    newArr = new byte[length];
    for (int i = 0; i < length; i++)
    newArr[i] = (byte) arr;
    return newArr;
         public static void main(String args[])
              throws Exception
              init();
              KeyPair keyPair = generateKey();
              PublicKey pubKey = keyPair.getPublic();
              PrivateKey privKey = keyPair.getPrivate();
              encryptFile("C:\\Temp\\TestFile.xml","C:\\Temp\\RSAEncryptedText.xml",pubKey);
              decryptFile("C:\\Temp\\RSAEncryptedText.xml","C:\\Temp\\RSADecryptedText.xml",privKey);

    I think you are the same poster as 'contebral'. Why the multiple identities?
    First off, the code you posted doesn't even compile. The getBytes() method has an error. Also, in method encryptDecryptFile() the variable bufl is not declared.
    The rest of the code is a mess. The toString() method does not do what you think it does; you're just going to get the object reference id. There is no reason to keep converting to/from byte arrays and Strings. Most of the time your data should be kept as a byte array, only possibly converting for I/O operations.
    The size of the base64 encoded output is not 128 bytes, it is 172 bytes. At this point I ran out of patience and stopped looking.
    There is no shame in being a beginner in Java, but you must walk before you can run. Stop running.

  • Can't boot after system update: unknown filesystem type

    After running a system update, including updating the kernel, I can't boot to the new kernel.
    On booting, grub loads the kernel image, runs/loads udev, but then fails to mount the root partition with error:
    mount: unknown filesystem type 'ext4'
    I have tried reinstalling the 'linux' package via packman several times, also trying the --recursive argument to make sure all my dependencies were there, and after days of googling and tweaking my system, I'm at a loss.
    Thank goodness I happened to keep a spare kernel laying around in /boot.
    Thanks in advance.
    Last edited by jackrabbit (2012-03-22 23:25:28)

    The OP can read their partition initially though, it's only after udev that they can't.
    Also, try adding "rootfstype=ext4" to your grub kernel line. Is your /boot on a separate partition or part of your / partition?

  • Issue with "unknown user type 6" on Coherence 3.5.2

    Having an issue with a cluster which is running using an internally developed cluster starter tool. This tool, and the associated cluster, all use POF, and upon attempting to connect a non-storing member to the cluster from java, the following exception is raised...
    2011-07-11 15:54:58.338/2.469 Oracle Coherence GE 3.5.2/463p2 <Error> (thread=Cluster, member=n/a): This cluster node is
    configured to use serializer com.tangosol.io.pof.ConfigurablePofContext {location=application-pof-config.xml}, which ap
    pears to be different from the serializer used by Member(Id=1, Timestamp=2011-07-11 15:34:30.779, Address=10.74.82.193:8
    088, MachineId=11188, Location=site:INTRANET.BARCAPINT.COM,machine:ldnpsm020006423,process:80976,member:ldnpsm020006423:
    cacheserver:1).
    java.io.StreamCorruptedException: unknown user type: 6
    at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3289)
    at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
    at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.readObject(Grid.CDB
    :1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$MemberConfigResponse.read(Grid.CDB:1
    3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:123)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onNotify(ClusterServi
    ce.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    There is no serialiser configured in the cache config, instead we just set tangosol.pof.enabled=true, and set the pof config file to what is seen above. The thing which is very confusing about this error is that unlike other clients which we connect, and in fact the servers they connect to, this client never attempts to load the cache configuration file. The point at which this should happen, prior to pof loading, shows:
    2011-07-11 15:54:57.260/1.391 Oracle Coherence GE 3.5.2/463p2 <Info> (thread=Main Thread, member=n/a): Loaded cache conf
    iguration from "jar:file:/C:/Program%20Files/Oracle/coherence/3.5.2b463P2/lib/coherence.jar!/reports/report-group.xml"
    I have tried every combination of classpath entries I can think of, and no matter what, it never shows an attempt to load the application-cache-config.xml supplied in the startup. Does anyone have any experience with something like this?

    I guess your non-storing JAVA code does not specify -Dtangosol.pof.enabled=true and the -Dtangosol.pof.config =<POF file location> on joining the cluster. Post the startup java command and the complete logs.
    If application-cache-config is not loaded then coherence-cache-config.xml should be loaded by default and set -Dtangosol.coherence.cacheconfig=<application-cache-config>
    Cheers,
    NJ

  • Unknown File Type for Adobe Classroom in a Book Fireworks

    I am trying to open sand_river1.jpg cited on p. 74 of Adobe Fireworks Classroom in a Book and am getting a "Could not open file" and "unknown file type" despite the fact that the image is displaying as a thumbnail in the file browser.  I get the message on both Windows and Mac Fireworks CS6.  Is it possible these publication assets were not part of Adobe's QA regression?  Anyway:
    - I'd rather not try to fix this myself since it's an Adobe product and I can wait.
    - has this problem been corrected?
    - is there an errata site for the book?  When I search on Google I am just sent to Amazon and bittorrent.
    thanks

    A quick Google search for that file name confirmed the issue here, and a fixed version for chapter 4 can be downloaded at http://www.jimbabbage.ca/_files/ch4files.zip
    Source: http://blogs.adobe.com/edtechatadobe/2012/06/652.html

  • Error: unknown entity type 'Archive' when building external library

    Hi,
    This is what I get when trying to build a external library in SP14. If I look at the Libraries.pp files there are entries like this:
    <entity>
         <name>CLASSES12.JAR</name>
         <package></package>
         <caption>CLASSES12.JAR</caption>
         <description></description>
         <entity-type>Archive</entity-type>
         <entity-sub-type>Java Library</entity-sub-type>
    </entity>
    CLASSES12.JAR is a jar file I've added to the libraries folder and then added to the Public part (used <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro blog</a> as an example)
    Build log:
    Development Component Build (2006-02-23 10:27:16)
    Component name: lib
    Component vendor: XXXXXXXXX.com
    SC compartment: MyComponents
    Configuration: LocalDevelopment
    Location: local
    Source code location: jarpak@XXXXXXXXX
    DC root folder: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\XXXXXXXXX\lib\_comp\
    DC type: External Library
    Host: XXXXXXXXX
    DC Model check:
    [dcmake] All used DCs are available locally
    [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/externalarchive"
    [dcmake] DC model check OK
    Start build plugin:
    [dcmake] using build plugin: sap.com/tc/bi/bp/externalarchive
    [dcmake] starting build plugin from : C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\externalarchive\_comp\gen\default\public\lib\
    Build Plugins Version 6.40.0.111 (ExternalArchivePlugin, 630_VAL_REL ) from 2005-09-09 23:37:14 CEST
    Building development component 'lib', vendor 'XXXXXXXXX', type 'External Library'
    software component 'MyComponents', vendor 'sap.com'.
    location 'local'.
    source code location 'jarpak@XXXXXXXXX'.
    General options:
    convert *.xlf to *.properties: yes
    include sources for debugging: yes
    Reading BuildInfrastructure extension from DC tc/bi/util (vendor sap.com)
    Added technology 'sap.com/tc/bi/core'
    Error: unknown entity type 'Archive'.
    Cleaning up.
    Regards,
    Jari

    Hi,
    Solved it on my own with
    Re: Activation Error: "unknown entity type 'Archive'" thread.
    Jari

  • Error during invokation of webservices: "error: unknown java type:"

    hi,
    I'm having issues with invoking a webservice from the "WebLogic Test Client". The webservice exposes the methods from a stateless session EJB and Weblogic Workshop was used to create the webservice controls
    Weblogic version: 10.0 mp1
    Pls. advise.
    Error message ...
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header />
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>error: unknown java type: com.margin.engine.entity.ClientSet</faultstring>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">com.bea.xml.XmlRuntimeException: error: unknown java type: com.margin.engine.entity.ClientSet
    at com.bea.staxb.runtime.internal.FailFastErrorHandler.add(FailFastErrorHandler.java:45)
    at com.bea.staxb.runtime.internal.MarshalResult.addError(MarshalResult.java:265)
    at com.bea.staxb.runtime.internal.AnyTypeRuntimeBindingType.determineActualRuntimeType(AnyTypeRuntimeBindingType.java:84)
    at com.bea.staxb.runtime.internal.RuntimeBindingProperty.getActualRuntimeType(RuntimeBindingProperty.java:110)
    at com.bea.staxb.runtime.internal.PushMarshalResult.walkRankOneSoapArray(PushMarshalResult.java:570)
    at com.bea.staxb.runtime.internal.PushMarshalResult.walkSoapArray(PushMarshalResult.java:534)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:437)
    at com.bea.staxb.runtime.internal.SoapArrayRuntimeBindingType.accept(SoapArrayRuntimeBindingType.java:59)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:192)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalTopType(PushMarshalResult.java:93)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalBindingType(MarshallerImpl.java:302)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalType(MarshallerImpl.java:435)
    at weblogic.wsee.bind.runtime.internal.LiteralSerializerContext.marshalType(LiteralSerializerContext.java:70)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.internalSerializeType(BaseSerializerContext.java:175)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.serializeType(BaseSerializerContext.java:95)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodePart(SoapEncoder.java:284)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeReturn(SoapEncoder.java:205)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeParts(SoapEncoder.java:192)
    at weblogic.wsee.codec.soap11.SoapEncoder.encode(SoapEncoder.java:119)
    at weblogic.wsee.codec.soap11.SoapCodec.encode(SoapCodec.java:128)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.encode(CodecHandler.java:103)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleResponse(CodecHandler.java:50)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:236)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:220)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.callHandleResponse(ServerDispatcher.java:135)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:108)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:257)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    </bea_fault:stacktrace>
    </detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>

    Olivier, thank you so much
    SOAMANAGER does not exist in my system (sp level 8), so node "/sap/bc/soap/rfc" should be active. Actually, it is active.
    I think the problem is related to user rights/profiles.
    I have tried to create another WS after assigning role SAP_BC_WEBSERVICE_ADMIN. The same error when trying to activate it, but now, I can see this WS in SE80 (under "Enterprise Services->Service Definition"). It is not active there and if I try to activate it, a success message appears indicating that user "is not authorized to use function netzwerkadministration". I cannot see any new services in SICF...
    Probably the new entry in SICF will be created after activating WS in SE80...
    Do u know what user profile should I add in order to properly activate the WS in SE80?
    Thank you very much!
    Vicente

  • "unknown user type" exception when the object don't exist for i/p key.

    Hi
    I'm using Coherence REST service(comes with the Coherence bundle) to validate my cache data.
    When I hit the cache for a valid key, I get data returned back. But for the object that don't exist in the cache I get "Internal Server" error.
    I'm fine with "Internal Server" response show in the browser, but I don't want it to be printed as part of my coherence logs.
    For example, when I hit the REST url for key that don't exist in the cache, I get below exception in coherence logs.
    How can I get rid off it (or) suppress the exception logs.
    Thanks for your time.
    (Wrapped) java.io.IOException: unknown user type: com.tangosol.coherence.rest.internal.Get
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.packetizeMessage(PacketPublisher.CDB:23)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher$InQueue.add(PacketPublisher.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.dispatchMessage(Grid.CDB:62)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:31)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.send(Grid.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:13)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.invoke(PartitionedCache.CDB:30)
         at com.tangosol.util.ConverterCollections$ConverterInvocableMap.invoke(ConverterCollections.java:2282)
         at com.tangosol.util.ConverterCollections$ConverterNamedCache.invoke(ConverterCollections.java:2748)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.invoke(PartitionedCache.CDB:11)
         at com.tangosol.coherence.component.util.SafeNamedCache.invoke(SafeNamedCache.CDB:1)
         at com.tangosol.coherence.rest.EntryResource.getValue(EntryResource.java:241)
         at com.tangosol.coherence.rest.EntryResource.get(EntryResource.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:616)
         at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
         at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
         at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
         at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
         at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
         at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
         at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
         at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
         at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
         at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
         at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
         at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
         at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
         at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
         at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
         at com.sun.jersey.server.impl.container.httpserver.HttpHandlerContainer.handle(HttpHandlerContainer.java:191)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:83)
         at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:86)
         at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:589)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:83)
         at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:561)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:679)
    Caused by: java.io.IOException: unknown user type: com.tangosol.coherence.rest.internal.Get
         at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:351)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.writeObject(Service.CDB:1)
         at com.tangosol.coherence.component.net.Message.writeObject(Message.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.write(PartitionedCache.CDB:7)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.serializeMessage(Grid.CDB:14)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.packetizeMessage(PacketPublisher.CDB:17)
         ... 42 more
    Caused by: java.lang.IllegalArgumentException: unknown user type: com.tangosol.coherence.rest.internal.Get
         at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:430)
         at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:419)
         at com.tangosol.io.pof.PofBufferWriter.writeUserType(PofBufferWriter.java:1671)
         at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1623)
         at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:345)
         ... 47 more

    Hi,
    I included coherence-rest-pof-config.xml as part of my pof-config as shown below.
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config coherence-pof-config.xsd">
    <user-type-list>
    <include>coherence-pof-config.xml</include>
    <include>coherence-rest-pof-config.xml</include>
    <user-type>
    <type-id>1001</type-id>
    I also checked my coherence-rest.jar files for the configuration and the clasess, and all of them exist.
    I started my coherence by passing the classpath as below:
    $JAVAEXEC -server -Xms6g -Xmx6g -XX:+UseParNewGC -XX:MaxGCPauseMillis=50 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=25 -XX:MinHeapFreeRatio=40 -XX:MaxHeapFreeRatio=70 -Duser.timezone=GMT -Djava.rmi.server.hostname=xx.xx.xx.xx -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=13366 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dtangosol.coherence.log.level=3 -Dtangosol.coherence.log=log4j -showversion $JAVA_OPTS -cp $COHERENCE_HOME/config/:$COHERENCE_HOME/lib/coherence.jar:$COHERENCE_HOME/lib/guidecacheclient.jar:$COHERENCE_HOME/lib/jersey-server-1.8.jar:$COHERENCE_HOME/lib/jersey-core-1.8.jar:$COHERENCE_HOME/lib/jersey-json-1.8.jar:$COHERENCE_HOME/lib/jackson-all-1.8.1.jar:$COHERENCE_HOME/lib/coherence-rest.jar:$COHERENCE_HOME/lib/log4j-1.2.16.jar -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.localhost=xx.xx.xx.xx -Dtangosol.coherence.mode=eval com.tangosol.net.DefaultCacheServer $1
    While starting, I'm getting configuration missing exception as shown below. What am I still missing.
    Exception in thread "main" (Wrapped) (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Missing PofSerializer configuration (Config=pgs-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
         at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
         at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39)
         at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
         at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
         at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
         at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1105)
         at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:937)
         at com.tangosol.net.DefaultCacheServer.startServices(DefaultCacheServer.java:81)
         at com.tangosol.net.DefaultCacheServer.intialStartServices(DefaultCacheServer.java:250)
         at com.tangosol.net.DefaultCacheServer.startAndMonitor(DefaultCacheServer.java:55)
         at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
    Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Missing PofSerializer configuration (Config=pgs-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
         at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:46)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:32)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onEnter(Grid.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onEnter(PartitionedService.CDB:19)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
         at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.IllegalStateException: Missing PofSerializer configuration (Config=pgs-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
         at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1283)
         at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:1013)
         at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:797)
         at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:322)
         at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:42)
         ... 7 more
    Thanks for your help.

  • Java.lang.UnsatisfiedLinkError - Unknown file type.

    Hi
    I am trying load a library file A.so using System.load function and I get the below error
    java.lang.UnsatisfiedLinkError: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: ld.so.1: java: fatal: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: unknown file type (Possible cause: endianness mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    Can some one please help.
    Also when I am using the libraries of next version,I get the below error
    java.lang.UnsatisfiedLinkError: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: ld.so.1: java: fatal: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: wrong ELFCLASS:ELFCLASS32(Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    Thanks
    Phani

    phani_sridhar wrote:
    Hi
    I am trying load a library file A.so using System.load function and I get the below error
    java.lang.UnsatisfiedLinkError: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: ld.so.1: java: fatal: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: unknown file type (Possible cause: endianness mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    Can some one please help.
    Also when I am using the libraries of next version,I get the below error
    java.lang.UnsatisfiedLinkError: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: ld.so.1: java: fatal: /u1/weblogic/weblogic92/weblogic92/server/native
    /solaris/sparc/A.so: wrong ELFCLASS:ELFCLASS32(Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    I see several possibilities.
    1. What you are trying to load is not a shared library.
    2. The shared library is compiled incorrectly to match the process space of the VM. There can be any number of causes for this.
    Note that the word width mismatch strongly suggests the second.
    You should start by forgetting weblogic entirely. Write a simple java app and using an explicit path in the load() method, not loadLibrary(), get it to load. Until it works there it you have no chance in weblogic.

  • When I start up FCPX 10.0.1, I get the following message "Failed to save. Unknown store type, format, or version."

    When I start up FCPX 10.0.1, I get the following message "Failed to save. Unknown store type, format, or version."

    Thanks, Andy. I checked, and it is formatted "Mac OS Extended (Journaled)".
    Michael

  • Deployment Tool Error - unknown document type - Add to Application EJB jar

    I am creating a new application in the J2EE deployment tool and adding an EJB JAR to it. The jar contains the ejb-jar.xml file. This file has the standard doctype:
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, INC.//DTD Enterprise JavaBeans 1.1//EN'
    'file:/C:/j2sdkee1.3/lib/dtds/ejb-jar_2_0.dtd'>
    I get the Unknown Document Type error when I try to add this jar to the application:
    Error: Adding EJB JAR - java.lang.RuntimeException: Invalid XML : Unknown document type : org.apache.crimson.tree.Doctype@e8647
    The xml file validates fine in NetBeans 3.4. I use NetBeans to generate the jar file.
    Any ideas as to what is happening would be appreciated.

    Try replacing the DTD definition as specified below.
    http://java.sun.com/dtd/ejb-jar_2_0.dtd
    regards,
    Siddique

  • Private synonym created on  table not working in function

    hi,
    I have created a private synonym on a table.
    now i am trying to create a function below is the code of the same.
    FUNCTION party_name(p_cntr_id NUMBER)
    RETURN VARCHAR2 AS
    v_cust_name VARCHAR2(100);
    v_cust_no varchar2(100);
    BEGIN
    select occ.cust_no
    into v_cust_no
    from ops_cust_cntr occ
    where occ.ID = p_cntr_id;
    SELECT party_name
    INTO v_cust_name
    FROM hz_parties -- this is the table on which synonym is created .
    WHERE party_id = v_cust_no;
    RETURN (v_cust_name);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END party_name;
    it is giving the message
    SQL> sho errors;
    Errors for FUNCTION PARTY_TEST:
    LINE/COL ERROR
    12/1 PL/SQL: SQL Statement ignored
    14/6 PL/SQL: ORA-00942: table or view does not exist
    but when i run
    SELECT party_name
    FROM hz_parties;
    it is giving me the data.
    Please advice.
    Regards
    Sudhir.

    This has nothing to do with the synonym.
    Look at this:
    SQL> create table t1 (c1 number);
    Table created.
    SQL> create synonym test_tab for t1;
    Synonym created.
    SQL> create or replace procedure p1 as
      2    l_count pls_integer;
      3  begin
      4    select count(*)
      5    into   l_count
      6    from   test_tab;
      7    dbms_output.put_line(l_count || ' records found.');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1
    0 records found.
    PL/SQL procedure successfully completed.
    SQL> I guess, you don't have the select privilege on this table.
    Remember: The privileg must be granted directly to the user who is the owner of the procedure/function/package. Privilege through a role are not valid inside the procedure/function/package.

Maybe you are looking for

  • Can't log in with newly created user on new install of Arch [solved]

    Hi all, Yesterday I installed Arch anew (because I had a hardware failure that took out my hard drive), but now I'm encountering an issue with logging in. After following the installation guide, and creating a new user, I find that I'm unable to log

  • Withholding tax

    Hai all,    While adding a document in  A/R invoice there is an error occurring in SAP: it is asking for withholding tax is it necessary to add?.. what change will occur if i add. ?.. can any one give the solution for this...

  • Adobe Reader - Need to find a 3D PDF Tools Quick Reference Guide - HELP!!!!

    Where can I find a QRG or even detailed instructions on how to use the 3D PDF tools.  Showing hotkeys, mouse usage such as "to rotate an object hold down the left mouse button and move cursor". I have not been able to find anything useful on the web

  • .Mac syncing not working very well

    It worked for mail, but safari no luck what so ever no keychain access or bookmarks will copy over. I have deleted my mac then re-instated it with no luck. Am I alone?

  • Computer Crashed. iTunes Library Lost. How can I get it back from my iPhone

    I have 522 Purchased songs on my iPhone. My computer recently crashed and we got a new hard drive, so all settings were refreshed on my computer. I plugged in my iPhone to transfer my Purchases back to my iTunes library. Again, 522 Purchased songs, a