Gmail could not scan zip file for viruses

I received a zip file.  MacBook Pro tries to scan for virus and I received a msg that "Gmail could not scan this file for viruses".  Does the problem lies with the zip file OR there is some software that I need to download & install before I could download the zip file?

You are wasting your time scanning for viruses.
I have been using Macs since 1984.
I've worked at companies with 50+ Macs.
I've used every Mac OS From 1.1 to 10.6.7
I have never seen a Mac virus or known anyone that has.

Similar Messages

  • Can't upload Web Job: Could not upload zip file for job:

    A few days ago, out of the blue my Web Jobs I had associated with one of my Azure Websites disappeared. Actually at the root of the dashboard in the Portal there were still listed as a Job collection BUT not associated with the website. There were also errors
    in the Job logs but I foolishly deleted the Jobs and tried to upload them again. However I keep getting an error when attempting to upload the zip file [as I had previously done] against this same website. I've tried against another website and it worked ok.
    But I need to upload against this ONE particular site as the webjobs get files from that website. I did discovered lots of nasty trace in the kudu log file. Here is some:
    I've searched and search forums and discussions but can't proceed. Can anyone assist me?
    <Events><Event><System><Provider Name="ASP.NET 4.0.30319.0"/><EventID>1309</EventID><Level>2</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2015-03-14T16:17:48Z"/><EventRecordID>-1680563781</EventRecordID><Channel>Application</Channel><Computer>RD000D3AD0013E</Computer><Security/></System><EventData><Data>3005</Data><Data>An
    unhandled exception has occurred.</Data><Data>3/14/2015 4:17:47 PM</Data><Data>3/14/2015 4:17:47 PM</Data><Data>63d127c928c44f0084bdb2a93fc5ab81</Data><Data>1</Data><Data>1</Data><Data>0</Data><Data>/LM/W3SVC/1897069090/ROOT-4705-130708234647101317</Data><Data>Full</Data><Data>/</Data><Data>D:\Program
    Files (x86)\SiteExtensions\Kudu\43.40212.1385\</Data><Data>RD000D3AD0013E</Data><Data></Data><Data>6368</Data><Data>w3wp.exe</Data><Data>IIS APPPOOL\payskool-schooladmin</Data><Data>InvalidOperationException</Data><Data>The
    pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..
       at System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
       at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
       at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean&amp; isRefAssemblyLoaded)
       at System.Web.Compilation.BuildManager.ExecutePreAppStart()
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
    Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
       at WebActivator.BaseActivationMethodAttribute.InvokeMethod()
       at WebActivator.ActivationManager.RunActivationMethods[T]()
       at WebActivator.ActivationManager.RunPreStartMethods()
       at WebActivator.ActivationManager.Run()
    Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
       at Microsoft.AspNet.SignalR.DefaultDependencyResolver.RegisterDefaultServices()
       at Microsoft.AspNet.SignalR.DefaultDependencyResolver..ctor()
       at Kudu.Services.Web.App_Start.NinjectServices.SignalRNinjectDependencyResolver..ctor(IKernel kernel)
       at Kudu.Services.Web.App_Start.NinjectServices.RegisterServices(IKernel kernel)
       at Kudu.Services.Web.App_Start.NinjectServices.CreateKernel()
       at Ninject.Web.Common.Bootstrapper.Initialize(Func`1 createKernelCallback)
       at Kudu.Services.Web.App_Start.NinjectServices.Start()

    Thanks very much for your prompt reply. This has indeed fixed the issue.
    Can I ask what might have caused the issue in the first place to necessitate the restart? Is it possibly there were too many logs files and that perhaps disk space became an issue for the Website?
    Kind regards,

  • BEA-141230 Could Not locate descriptor file for System Resource: DS name

    Guys,
    When I start the Admin and Managed server ..I get below warning message.
    *<Warning> <Management> <BEA-141230> <Could Not locate descriptor file for System Resource : datasource1.>*
    I know that weblogic server is unable to locatie datasource1.xml file at <SOA_HOME>/user_projects/domains/base_domain/config/jdbc
    Is there any way to to get rid off from this error? I tried to delete datasource from weblogic Admin console, but get below error:
    java.lang.NullPointerException
    All changes have been activated. No restarts are necessary.
    Errors were encountered while performing this delete operation.
    Thanks,
    Ab

    Are you starting servers with the root user? make sure that using whichever user you are starting server, it has full access on MW_Home and it's sub-directories. You may consider raising a support SR.
    Regards,
    Anuj

  • Could not open Transport File for creation

    I Changed the path and copied the repository from old path to new path. While executing se38 à RSCMST TCode, we get the errors in RED(HTTP interface using fuction group).
    1.The error log check_subrc: subrc     1  instead          0
    check_subrc: Component : data error text : No such file or directory
    docGet: DOC_0                                    error
    docGet: DOC_S                          
    check_subrc: subrc     1  instead          0
    check_subrc: Component : sdata1.txt error text : No such file or directory
    docGet: DOC_S                                    error
    docGet: DOC_M                          
    check_subrc: subrc     1  instead          0
    check_subrc: Component : mabc error text : No such file or directory
    docGet: DOC_M                                    error
    docGet: DOC_L                          
    check_subrc: subrc     1  instead          0
    check_subrc: Component : ldata error text : No such file or directory
    docGet: DOC_L                                    error
    docGet: DOC_N                          
    check_subrc: subrc     1  instead          0
    check_subrc: Component : Data6 error text : No such file or directory
    docGet: DOC_N                                    error
    HTTP error: 404 (Not Found)  "G:CS_REPZHR_MASTEK046cDF6258C5DF68EAF183C4001F295A507C directory not found"
    info: mCreate DOC_0                              error
    2.Message 704: (SAPKPROTP Error: Could not open Transport File for creation.
    Thanks & Regards
    Jituda

    Hi,
    Could you plz let me know how did you fix this issue?
    BR,
    Shyam

  • Scan a file for virus before upload

    In many CRM functions, eg - Activities, Mkt Planner, etc., there is a tab for uploading/attaching files.  How can we scan the file for virus before saving?  We have a Basis 620, so we can't use the Virus Scan Interface because it is available from Basis 640 onwards.
    I am looking for two things - 1. A method to scan for virus and 2. A user exit where this can be implemented before saving.
    Thanks.

    http://forum.java.sun.com/thread.jspa?threadID=499566&tstart=200

  • Receiving Mac Zip File for virus removal

    Receiving Mac Zip File for virus removal. Randomly comes up through firefox.  I don't open it but I cant remove it from applications.  Any help appreciated.  Also Mac doesn't have a built in defense like that does it?

    When you created this post, there was, at the top of the discussion, and all Apple Community, this:
    Announcement:  Apple recently published -  How to avoid or remove Mac Defender malware
    How to avoid or remove Mac Defender malware

  • How to SCAN uploaded files for VIRUS in APEX

    part 1:
    Goal:
    Do a virus scan of the uploaded file from APEX application prior to storing the file in custom tables.
    The process:
    Followed the document from www.developer.com:
    Implementing an Anti-Virus File Scan in JEE Applications
    By Vlad Kofman
    Go to page: 1 2 3 Next
    This article will discuss one of the ways to implement antivirus file scanning in Java, particular in the JEE applications. Viruses, Trojan Horses, and different malware and spyware are a real problem for current computer environments, and especially for the Windows operating system. If you are designing any application in Java that has a requirement to be able to upload external files, you have a potential security risk. By uploading, I mean any way to get the external file inside of the corporate firewall be it via HTTP protocol or any other means. It is quite common to have this type of requirement in an enterprise application and with Java being one of the most popular web development platforms, it is unfortunate that this type of gaping security risk is quite often overlooked.
    Java's Development Kit (JDK) does not have any means to do the antivirus scan right out of the box. This is primarily because Java is a programming language, and does not have any virus scanning packages. Furthermore, anti-virus software is not Sun's area of expertise or business model. Developing this type of software (or Java package), and more importantly maintaining it, would be a huge task for Sun. Mainly because viruses are constantly evolving and keeping virus definitions up-to-date is a daunting task. Large companies such as McAffee, Symantec, or Zone Labs develop virus detecting and combating products and spend a lot of resources to maintain them.
    Application Environment
    To implement a virus file scan in Java, a third-party package needs to be used. For the purposes of this article, I will use Symantec Scan Engine (SSE) package, which comes with Java APIs. This package is an application that serves as a TCP/IP server and has a programming interface and enables Java applications to incorporate support for content scanning technologies. For this article, I used Symantec Scan Engine 5.1, which is available as a Unix or Windows install.
    If you are using an anti-virus package from the different vendor, you will need to investigate what kind of APIs are available; however, the general approach should be similar. Also, note that my implementation can be used with JEE technology and any modern MVC framework such as Struts or Spring.
    The architecture is as follows: A server machine needs to have SSE running at all times. This can be the same machine that hosts your Application Server, but in an enterprise environment this should be a different machine. The Default Port needs to be open through the firewall to allow communication with the scan engine. All JEE applications that need to do file scanning can talk to the SSE server machine through a default port. Also, multiple applications running on different application servers can re-use the same scanning server. For more information, you should refer to the Symantec Scan Engine (SSE) Installation Guide, available on the Symantec web site.
    When an external file that needs to be scanned is sent to the SSE via its programming interface (Java APIs using the default port), before any other operation on the file is performed, the SSE returns a result code. For instance, a file is uploaded by an external user into the web email type application as an attachment; then, the SSE API is invoked by the application and the return code of pass or fail determines the outcome of the upload and whether that email can actually be sent. If you have an account on Yahoo mail, you probably have seen that Yahoo is using Norton Antivirus to scan all attachments, although no Java.
    Click here for a larger image.
    Figure 1: Screen shot from Yahoo
    For details on the Scan Engine Server Installationm please see the Symantec Scan Engine (SSE) Implementation Guide from Symantec.
    Here are some key things to remember about SSE:
    •     Java 2 SE Runtime (JRE) 5.0 Update 6.0 or later must be installed on the server before the SSE installation is done.
    •     After installation, verify that the Symantec Scan Engine daemon is running. At the Unix command prompt (if it's a Unix install), type the following command:
    ps –ea | grep sym.
    A list of processes similar to the following should appear:
    o     5358 ? 0:00 symscan
    o     5359 ? 0:00 symscan
    If nothing is displayed the SSE process did not start.
    If the SSE process did not start, type the following command to restart SSE:
    /etc/init.d/symscan restart
    •     Keeping the virus definition up to date is the most important task and if new updates are not installed, the whole scan becomes ineffective. Symantec automatically downloads the most current file definitions through LiveUpdate. Please make sure that firewall rules are in place to allow the host server to connect to the Symantec update service.
    Project Setup
    For the purposes of this article, I included a wrapper for the Symantec SSE APIs, av.jar, which has Symantec Java APIs and serves as a client to the SSE server and takes care of all communications with the server. Please refer to the download source section. The av.jar should be included in the Java CLASSPATH to work with the SSE. This jar contains a class called AVClient that takes care of actually sending the files to SSE as byte arrays and returning the result.
    In my project setting, I added three variables to be accessed via the System.getProperty mechanism. For example:
    AV_SERVER_HOST=192.168.1.150
    AV_SERVER_PORT=1344
    AV_SERVER_MODE=SCAN
    The AV_SERVER_HOST is the host name or IP of the machine where Scan Engine is installed.
    The AV_SERVER_PORT is the port where Scan Engine listens for incoming files.
    The AV_SERVER_MODE is the scan mode which can be:
    •     NOSCAN: No scanning will be done (any keyword that does not start with "SCAN" will result in ignoring the call to the Scan Engine and no files will be transferred for scanning).
    •     SCAN: Files or the byte stream will be scanned, but the scan engine will not try to repair infections.
    •     SCANREPAIR: Files will be scanned, the scan engine will try to repair infections, but nothing else will be done.
    •     SCANREPAIRDELETE: Files will be scanned, the scan engine will try to repair infections, and irreparable files will be deleted.
    Note: For the file stream (byte array) scanning, the only meaning full values are "SCAN" and "NOSCAN".
    Using the SSE Scanning Java APIs
    In any class where scan is required, call the scanning API provided in the AVClient object located in the av.jar. The AVClient object will establish connection to the Scan Engine server and has the following APIs:
    Figure 2: The significant APIs for the communication with to the Scan Engine Server.
    If scanning a file on the file system, in SCAN only mode, use the call that accepts filename only.
    If scanning a file on the file system, with SCANREPAIR or SCANREPAIRDELETE, use the call that accepts input and output file names.
    If scanning an in-memory file (byte array), use the call accepting byte array.
    For example:
    import com.av.*;
    Initialize setup parameters:
    static String avMode =
    (System.getProperty("AV_SERVER_MODE") != null)
    ? (String) System.getProperty("AV_SERVER_MODE") : "NOSCAN";
    static boolean scan = avMode.startsWith("SCAN");
    static String avServer =
    (String) System.getProperty("AV_SERVER_HOST");
    static int avPort =
    Integer.parseInt( (String) System.getProperty("AV_SERVER_PORT"));
    Scan check example for an in-memory file byte array:
    public void scanFile(byte[] fileBytes, String fileName)
    throws IOException, Exception {
    if (scan) {
    AVClient avc = new AVClient(avServer, avPort, avMode);
    if (avc.scanfile(fileName, fileBytes) == -1) {
    throw new VirusException("WARNING: A virus was detected in
    your attachment: " + fileName + "<br>Please scan
    your system with the latest antivirus software with
    updated virus definitions and try again.");
    Note that if you are using this code inside of the MVC handler, you can throw a custom VirusException and check for it in the calling method and perform any necessary cleanup. I have included the class in the AV Jar as well.
    For example:
    catch (Exception ex) {
    logger.error(ex);
    if (ex instanceof VirusException) {
    // do something here
    else {
    // there was some other error – handle it
    For more details on the Scan Engine Client API, please see Symantec Scan Engine Software Developers Guide.
    Continuation in part2

    part 4:
    c)     Clienttester.java – This is the gui app set to test if the configuration is working or not. This gui uses the method scanfile(inputfile, outputfile) as you can see the result in the outputpane of the jframe.
    * clienttester.java
    * Created on April 12, 2005, 2:37 PM
    * @author george_maculley
    package com.av;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class clienttester
    implements ActionListener {
    // private String ipaddress = "127.0.0.1";
    private String ipaddress = "199.209.150.58";
    //private String ipaddress = "192.168.0.55";
    static JFrame frame;
    JFileChooser chooser = new JFileChooser();
    TextField pathtofile = new TextField(System.getProperty("user.home"), 30);
    // TextField pathtooutfile= new TextField(System.getProperty("user.home"),30);
    private int port = 1344;
    JButton filechooser = new JButton("Browse to file"); ;
    private String originalfilename;
    private String outputfilename;
    JButton scanbutton = new JButton("Scan");
    TextArea outputarea = new TextArea(20, 40);
    TextField iptext = new TextField("127.0.0.1", 16);
    TextField porttext = new TextField("1344", 5);
    AVClient mine;
    JRadioButton choosescan = new JRadioButton("SCAN");
    // JRadioButton choosedelete= new JRadioButton("SCANREPAIRDELETE");
    /** Creates a new instance of gui */
    public clienttester() {
    public clienttester(java.lang.String ip, java.lang.String infile, java.lang.String outfile, int port) {
    this.ipaddress = ip;
    this.port = port;
    this.originalfilename = infile;
    this.outputfilename = outfile;
    boolean setValues(java.lang.String ip, java.lang.String infile, java.lang.String outfile, int port) {
    this.ipaddress = ip;
    this.port = port;
    this.originalfilename = infile;
    this.outputfilename = outfile;
    return (true);
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    JComponent c = (JComponent) actionEvent.getSource();
    if (c == filechooser) {
    int retval = chooser.showDialog(frame, null);
    if (retval == JFileChooser.APPROVE_OPTION) {
    File theFile = chooser.getSelectedFile();
    if (theFile != null) {
    pathtofile.setText(theFile.getPath());
    // pathtooutfile.setText(theFile.getPath());
    JOptionPane.showMessageDialog(frame, "You chose this file: " + theFile.getPath());
    if (c == scanbutton) {
    //return object that can be passed to AVClient
    String policy;
    int thisport;
    int scanresult;
    String thisip;
    String inputfile;
    String outputfile;
    outputarea.append("Server: " + iptext.getText() + "\r\n");
    if (choosescan.isSelected()) {
    policy = "SCAN";
    else {
    policy = "SCANREPAIRDELETE";
    thisport = new Integer(porttext.getText()).intValue();
    thisip = iptext.getText();
    //mine= new AVClient(iptext.getText(),porttext.getText(),policy);
    mine = new AVClient(iptext.getText(), thisport, policy);
    if (mine.test() == 1) {
    outputarea.append("Sorry. Incorrect parameters specified.\r\n");
    System.exit(1);
    else {
    outputarea.append("Connection to SAVSE initialized.\r\n");
    inputfile = pathtofile.getText();
    // outputfile=pathtooutfile.getText();
    outputfile = "/tmp";
    outputarea.append("Scanning file " + inputfile + " \r\n");
    if (policy == "SCAN") {
    scanresult = mine.scanfile(inputfile);
    else {
    scanresult = mine.scanfile(inputfile, outputfile);
    if (scanresult == 0) {
    outputarea.append("File is clean.\r\n");
    else if (scanresult == -1) {
    outputarea.append("File is infected. \r\n");
    else {
    outputarea.append("Scan error.\r\n");
    void display() {
    Frame f = new Frame("SAVSE JAVA ICAP Client");
    f.setLayout(new GridLayout(1, 2));
    JPanel lpanel = new JPanel(new GridLayout(7, 1));
    JPanel ippanel = new JPanel();
    JPanel portpanel = new JPanel();
    JPanel rpanel = new JPanel();
    JPanel outputpanel = new JPanel();
    JPanel buttonpanel = new JPanel();
    JPanel pathpanel = new JPanel();
    // JPanel outpathpanel= new JPanel();
    JPanel policypanel = new JPanel();
    ButtonGroup policygroup = new ButtonGroup();
    filechooser.addActionListener(this);
    scanbutton.addActionListener(this);
    choosescan.setSelected(true);
    policygroup.add(choosescan);
    // policygroup.add(choosedelete);
    buttonpanel.setBorder(BorderFactory.createTitledBorder("Scan Policy"));
    buttonpanel.add(choosescan);
    // buttonpanel.add(choosedelete);
    pathpanel.setBorder(BorderFactory.createTitledBorder("Path to File"));
    pathpanel.add(pathtofile);
    f.setSize(new Dimension(650, 400));
    f.setBackground(Color.white);
    f.setResizable(true);
    ippanel.setBorder(BorderFactory.createTitledBorder("SAVSE IP Address"));
    ippanel.add(iptext);
    outputpanel.setBorder(BorderFactory.createTitledBorder("OUTPUT"));
    outputpanel.add(outputarea);
    portpanel.setBorder(BorderFactory.createTitledBorder("ICAP Port"));
    portpanel.add(porttext);
    // outpathpanel.setBorder(BorderFactory.createTitledBorder("Path to Repair File"));
    // outpathpanel.add(pathtooutfile);
    lpanel.add(ippanel);
    rpanel.add(outputpanel);
    lpanel.add(portpanel);
    lpanel.add(buttonpanel);
    lpanel.add(pathpanel);
    // lpanel.add(outpathpanel);
    lpanel.add(filechooser);
    lpanel.add(scanbutton);
    f.add(lpanel);
    f.add(rpanel);
    f.setVisible(true);
    public static void main(String[] args) {
    clienttester g = new clienttester();
    g.display();
    d)     my2.java – This is the class file I wrote to test that I am able to send a file and scan it and see the output in the JDEVELOPER. In this case the file is stored on the filesystem of the client machine. JDEVELOPER should be able to see the file.
    NOTE:
    “EICAR.com” is the test file downloaded from Symantec site to test a non malicious virus file. I n order to be able to test it like this, the Antivirus program running on your machine should be disabled, or else Antivirus will kick in and delete the file. In the first place you will not be able to download the test virus file either with anti virus running on the machine you are downloading to.
    package com.av;
    import java.io.*;
    public class my2 {
    static int my_return = 0;
    * @param fileBytes
    * @param fileName
    * @return
    public static int scanfile(String fileName){
    String avMode = "SCAN";
    boolean scan = avMode.startsWith("SCAN");
    String avServer = "xx";--avserver ip address
    int avPort = 1344;
    int the_return = 0;
    if (scan) {
    AVClient avc = new AVClient(avServer,avPort,avMode);
    the_return = avc.scanfile(fileName);
    if (the_return == -1) {
    return (the_return);
    } else
    return (the_return);
    //my_return = the_return;
    return (the_return);
    public static void main(String[] args) throws Exception {
    System.out.println("Hi there in Main");
    byte[] b1 = new byte[4];
    b1[1] = 68;
    my_return = scanfile("c:\\eicar.com");
    System.out.println(my_return);
    e)     Then finally we have my1.JAVA, which takes the filename, and it’s contents in the bytes form and scans the file. The reason for this method is we are not storing the file on the filesystem, it is read into the memory and only if it is clean, it is put into the database or else notify the user.
    package com.av;
    import java.io.*;
    public class my1 {
    static int my_return = 0;
    static int a_length = 0;
    * @param fileBytes
    * @param fileName
    * @return
    public static int scanfile(String fileName,byte[] fileBytes) throws IOException {
    String avMode = "SCAN";
    boolean scan = avMode.startsWith("SCAN");
    String avServer = "xxx";--avserver’s ip address
    int avPort = 1344;
    int the_return = 0;
    if (scan) {
    AVClient avc = new AVClient(avServer,avPort,avMode);
    // File file = new File(fileName) ;
    //byte[] fBytes = getBytesFromFile(file);
    the_return = avc.scanfile(fileName, fileBytes);
    if (the_return == -1) {
    return (the_return);
    } else
    {return (the_return);}
    my_return = the_return;
    return (the_return);
    // Returns the contents of the file in a byte array.
    * @param file
    * @return
    * @throws IOException
    public static byte[] getBytesFromFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);
    // Get the size of the file
    long length = file.length();
    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
    // File is too large
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    // Read in the bytes
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length
    && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
    offset += numRead;
    // Ensure all the bytes have been read in
    if (offset < bytes.length) {
    throw new IOException("Could not completely read file "+file.getName());
    // Close the input stream and return bytes
    is.close();
    return bytes;
    // public static void main(String[] args) throws Exception {
    //System.out.println("Hi there in Main");
    // File file = new File() ;
    // byte[] b1 = getBytesFromFile(file);
    //System.out.println(b1);
    // my_return = scanfile(,b1);
    //System.out.println(my_return); }
    Finally , you have the exceptions file,
    e) package com.av;
    public class VirusException
    extends Exception {
    public VirusException() {
    super();
    public VirusException(String text) {
    super(text);
    Once you have all these classes, you can use JDEVELOPER , to load these classes into the database: This is as follows:
    Right click on the project, which has all these classes.
    NEW -> deployment profiles -> load java and stored procedures.
    When you are created deployment profile, you have to specify,
    Loadjava options.
    -f, -v (check the check boxes)
    Under privileges:
    -s – specify database schema these classes are loaded into
    -s – create sysnonym check box
    -g – grant to public or any specific users per your policy.
    Under Resolver,
    -r and –o (check the check boxes)
    I accepted the default name storedproc1. Then you right click on the storedproc1.deploy, deploy to whichever database connection you created.
    And then, In order to access this java class we need a pl/sql wrapper as follows:
    create or replace package my1 is
    function mycheck (pfilename in varchar2, psize in number)
    return number;
    end my1;
    create or replace package body my1 is
         function mycheck (pfilename in varchar2, psize in number)
    return number is
    language java
         name 'com.av.my1.scanfile(java.lang.String, byte[]) return int';
         end my1;
    And the code is invoked from sql plus as follows:
    Select my1.mycheck(“filename”, “filebytes”) from dual;
    One important catch in the above method is to send the filename and filecontents in bytes form. In order to send the file contents as filebytes, you will need another java class and load into the data base as described above.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    * This program demonstrates how to read a file into a byte array. This method
    * reads the entire contents of the file into a byte array.
    * @version 1.0
    * @author Jeffrey M. Hunter ([email protected])
    * @author http://www.idevelopment.info
    public class ReadFileIntoByteArray {
    * method to convert a byte to a hex string.
    * @param data the byte to convert
    * @return String the converted byte
    public static String byteToHex(byte data) {
    StringBuffer buf = new StringBuffer();
    buf.append(toHexChar((data >>> 4) & 0x0F));
    buf.append(toHexChar(data & 0x0F));
    return buf.toString();
    * Convenience method to convert an int to a hex char.
    * @param i the int to convert
    * @return char the converted char
    public static char toHexChar(int i) {
    if ((0 <= i) && (i <= 9)) {
    return (char) ('0' + i);
    } else {
    return (char) ('a' + (i - 10));
    * Returns the contents of the file in a byte array
    * @param file File this method should read
    * @return byte[] Returns a byte[] array of the contents of the file
    private static byte[] getBytesFromFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);
    System.out.println("\nDEBUG: FileInputStream is " + file);
    // Get the size of the file
    long length = file.length();
    System.out.println("DEBUG: Length of " + file + " is " + length + "\n");
    * You cannot create an array using a long type. It needs to be an int
    * type. Before converting to an int type, check to ensure that file is
    * not loarger than Integer.MAX_VALUE;
    if (length > Integer.MAX_VALUE) {
    System.out.println("File is too large to process");
    return null;
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    // Read in the bytes
    int offset = 0;
    int numRead = 0;
    while ( (offset < bytes.length)
    ( (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) ) {
    offset += numRead;
    // Ensure all the bytes have been read in
    if (offset < bytes.length) {
    throw new IOException("Could not completely read file " + file.getName());
    is.close();
    return bytes;
    * @param filename
    public static byte[] chk_file(String filename) {
    byte[] fileArray = null;
    try {
    fileArray = getBytesFromFile(new File( filename));
    } catch (IOException e) {
    e.printStackTrace();
    if (fileArray != null) {
    for (int i=0; i<fileArray.length; i++) {
    System.out.println(
    "fileArray[" + i + "] = " +
    ((int)fileArray[i] < 9 ? " " : "") +
    ( ((int)fileArray[i] > 9 && (int)fileArray[i] <= 99) ? " " : "") +
    fileArray[i] + " : " +
    " HEX=(0x" + byteToHex(fileArray) + ") : " +
    " charValue=(" + (char)fileArray[i] + ")");
    return fileArray;
    * Sole entry point to the class and application.
    * @param args Array of String arguments.
    public static void main(String[] args) {
    byte[] fileArray = null;
    try {
    fileArray = getBytesFromFile(new File("c:\\eicar.com"));
    } catch (IOException e) {
    e.printStackTrace();
    if (fileArray != null) {
    for (int i=0; i<fileArray.length; i++) {
    System.out.println(
    "fileArray[" + i + "] = " +
    ((int)fileArray[i] < 9 ? " " : "") +
    ( ((int)fileArray[i] > 9 && (int)fileArray[i] <= 99) ? " " : "") +
    fileArray[i] + " : " +
    " HEX=(0x" + byteToHex(fileArray[i]) + ") : " +
    " charValue=(" + (char)fileArray[i] + ")");
    Having main method helps you to run the file in JDEVELOPER or using JAVA.
    DO not forget to load this class into the database.
    And you create the pl/sql wrapper again as follows:
    create or replace FUNCTION TOBY (pfilename in varchar2) RETURN VARCHAR2 iS
    language java name
    'ReadFileIntoByteArray.chk_file(java.lang.String) return byte[]';
    And you call the function from sqlplus as follows:
    Sql>Set serveroutput on size 20000;
    Sql> call dbms_java.set_output(20000);
    Sql> Select toby(“filename”) from dual; --
    this file should be accessible, I mean you will not be able to send a file on your pc, from sql plus as sql/plus is running on your db server.
    You will be able to see the output in sql plus:
    If you are running it from the APEX:
    When we use file browser widget from APEX, the file is stored in APEX_APPLICATION_FILES table. And we retrieve that into a variable and pass this variable to the function as follows:
    DECLARE
    scan_failed EXCEPTION;
    x varchar2(400);
    z number;
    BEGIN
    select filename into x from wwv_flow_files where name = :P1_FILE_NAME;
    select my1.mycheck(x,toby(x)) into z from dual;
    if z = 0 then
    :P1_SUBJECT:= 'PASSED';
    else
    :P1_SUBJECT:= 'FAILED';
    end if;
    :P1_SCAN_RESULT := '** Scanning File **';
    IF UPPER(:P1_SUBJECT) = 'PASSED' THEN
    BEGIN
    :P1_SCAN_FLAG := 'PASSED';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** File passed scan **';
    END;
    ELSIF UPPER(:P1_SUBJECT) = 'FAILED' THEN
    BEGIN
    :P1_SCAN_FLAG := 'FAILED';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** File failed scan **';
    END;
    ELSE
    BEGIN
    :P1_SCAN_FLAG := 'UNKNOWN';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** Scan Is Not Conclussive **';
    END;
    END IF;
    --IF :P1_SCAN_FLAG = 'FAILED'
    -- THEN RAISE scan_failed;
    --END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DELETE from APEX_APPLICATION_FILES WHERE name = :P1_FILE_NAME;
    RAISE_APPLICATION_ERROR (-20000, 'seb OTHERS error encountered - file upload not allowed. Possible virus detected !');
    raise;
    END;
    ACKNOWLEDMENTS:
    1) JOHN SCOTT – who suggested this ICAP API in one of the threads which is my initial starting point in this direction.
    2) VLAD KOFMAN who wrote the article on WWW.DEVELOPER.com
    3) Mr. KIRAN –One of the engineers from Metalink, who helped me at every step of getting this java programs and pl/sql wrappers working. But for him, I would have not completed my project.

  • Javah error: could not find class file for 'com.ntv.ndkjni'

    Hi,
    My project directory  : C:\ndkJNI
    My java file directory : C:\ndkJNI\src\com\ntv\ndkjni
    My package name    : com.ntv.ndkjni
    1 ) I entry command prompt at C:\ndkJNI\src\com\ntv\ndkjni
    2 ) Javac test.java and create test.class succesfully. test.class is in  C:\ndkJNI\src\com\ntv\ndkjni folder.
    3 ) Later I used Javah, try below javah variously
         a)  javah -classpath C:\ndkJNI\src\com\ntv\ndkjni test
         b)  javah -classpath C:\ndkJNI\src\com\ntv\ndkjni.test
         x) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni.test
         y) javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni test
         c)  javah -classpath C:\ndkJNI\src\com\ntv\ndkjni com.ntv.ndkjni.test
         d)  javah  com.ntv.ndkjni.test
         e) javah  com.ntv.ndkjni test
         f) javah  com.ntv.ndkjni test.class-> (error: exception in a thread illegal argument exception)
    I am searching  for 5 day. I couldnt find solution. I try different computer. I tried ubuntu and win8, the error still with me.
    Thats interesting when I delete the package com.ntv.ndkjni; from java file,  then create class file again with javac then javah can create header file succesfully.
    Please help me.
    *****************************test.java**************************
    package com.ntv.ndkjni;
    public class test {
      static
      System.loadLibrary("hello");
        public static native int toplama(int sayi1,int sayi2);

    javah takes a fully qualified class name so in your case that would be
    com.ntv.ndkjni.test
    As with all things related to java the class path is used to resolve the class based on the fully qualified name.  The name resolves STARTING at the path and then attempts to find the class BELOW the classpath by resolving the name.
    Because of that your class path should be the following
    C:\ndkJNI\src

  • Bursting Control file, Error!! Could not deliver the output for Delivery

    Hi,
    I am using bursting control file to send report output to email in R12.1.3.
    If the report output is having data, it is working fine. if there is no data it is getting errored out with the below message.
    "Error!! Could not deliver the output for Delivery channel:null "
    In the report output i put "No data found", when i click on view output the output in application is showing as "NO DATA FOUND" in PDF .
    "Bursting VMC Approved Purchase Orders for a period (XML Publisher Report Bursting Program)" got above error.
    my requirement is if there is no data, still i require the output to email.
    Thanks in Advance
    Adina.

    Hi,
    I am facing the same situation and want the bursting program to finish in normal even when there is no data.
    Can you please let me know how you resolved this?
    Thanks
    RG

  • "Installer could not install some files in "/". Contact the software manufacturer for assistance."

    What does THAT mean!!! Appears when trying to download the new Itunes!!!
    Any ideas??
    "Installer could not install some files in "/". Contact the software manufacturer for assistance." ?????????????????????

    can someone please help!!! I can't install anything on my mac!!! And my iphone isnt even showing up in itunes when i plug it in!

  • Jdeveloper 11.1.1.4 Could not create MAR entry for file

    Hi
    i am using jdev 11.1.1.4.i checkout code from svn to jdeveloper .
    i tried to create EAR file for the application,but while creating EAR jdeveloper throwing some error message as shown below
    find similar thread
    JDeveloper Debugger Hangs
    Could not create MAR entry for file [D:\JDeveloper\mywork\myAPortalApp\Portal\adfmsrc\oracle\webcenter\portalapp\pagetemplates\.svn\text-base\pageTemplate_swooshyPageDef.xml.svn-base], due to: MDS-01161: Reference "/oracle/webcenter/portalapp/pagetemplates/.svn/text-base/pageTemplate_swooshyPageDef.xml.svn-base" has an invalid character ".".
    from the above message ,due to svn in the output folder ,jdeveloper is not able create MAR file entry .
    i checked application properties for filter options ,jdeveloper has already has the filter "Exclude /.svn/"
    can any one help me on this?
    appreciate your help

    Hi Aaron thanx for the reply.
    i did not understand exporting from the subversion,but i did search in file for the svn there are two entires for .svn in portal.jpr file.
    if i delete subversion connection from the jdeveloper and if i compile then it will create EAR file.

  • Scanning an uploaded file for viruses

    Hi All,
    I want scan an uploaded file for viruses.i there is any JAVA API where i can connect to Scan engine.
    i have gone through the Symantic scan engine. where it provides the ICAP protocol to communicate with ScanEngine but i dont know how to communicate with that using java.
    Please help me out with this.....
    Thanks In Advance

    Raghavendra_LR wrote:
    Hi All,
    I want scan an uploaded file for viruses.i there is any JAVA API where i can connect to Scan engine.
    i have gone through the Symantic scan engine. where it provides the ICAP protocol to communicate with ScanEngine but i dont know how to communicate with that using java.
    Well buddy i'm afraid there are no good open source solutions available for this however,we have commercial solutions provided by respective vendors.
    [http://www.ciao.co.uk/McAfee_E_Business_Server_Java_API_Complete_package__5529793]
    or the below provided a Java client / Local SDK libraries for which supports number of anti-virus softwares
    [http://www.opswat.com/oesislocal.shtml ]
    Hope that helps :)
    REGARDS,
    RaHuL

  • Whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    Did you reinstall CS3 after CC?
    For that matter, doing an in-place upgrade on the OS is always a gamble with Adobe programs. Reinstalling all the versions you need, in order, would probably solve your problem.
    And you shouldn't need to save as IDML after opening the .inx in CC.

  • Safari Crash / Could not open cookie file Cookies.plist for reading

    Hi everyone
    I dont know why my Safari is Crashing, I review the console and I find this line:
    Help... I dont how to solve the problem...
    *ntlmRand failed to open /dev/random
    2007-01-26 23:48:55.004 Safari[8953] Could not open cookie file "/Users/scanner9/Library/Cookies/Cookies.plist" for reading.
    2007-01-27 00:00:53.553 Safari[8953] Could not open cookie file "/Users/scanner9/Library/Cookies/Cookies.plist" for reading.
    2007-01-27 00:01:16.915 Safari[8953] -[BrowserWindowController loadWindow]: failed to load window nib file '/Applications/Safari.app/Contents/Resources/English.lproj/Browser.nib'.
    2007-01-27 00:01:16.923 Safari[8953] Cannot load Interface Builder file 'NSAlertPanel'
    Thanks.

    jhpereze,
    Quit Safari, find the Cookies.plist file in your Macintosh HD/Users/yourusername/Library/Cookies folder, drag it to your Desktop, log out/in or restart and let us know what happens.
    If that is unsuccessful post your Safari crash log for further analysis.
    ;~)

  • Since Adobe 11why Norton scanning incoming attach for virus NOT on my system

    Confused:
    Since Adobe 11why Norton scanning incoming attach for virus NOT on my system use VIPRE?  Is it preinstalled with Adobe 11 or something?  Thanks!

    I completely do not understand what you are asking; can you rephrase your question?

Maybe you are looking for

  • Gamma or contrast changes

    Hi, I am trying to change gamma correction (or brightness, or contrast) ON-THE-FLY as I encounter different pictures in IE9 .. I guess this would be a plugin, something that would not change the gamma or contrast for the monitor. I think I have encou

  • Airdrop - not working from iMac to MacBook Pro

    Airdrop won't work from iMac to MacBook Pro, but will work from MacBook Pro to iMac. Is there something I need to set on either computer? Thanks.

  • Bridge CS4

    When using Bridge CS4, it used to be that when I double clicked on a jpg image, the image opened in Photoshop CS4 but this feature has stopped working. How can I restore it please?

  • Essbase Outline Member

    Hello, I have an issue with moving outline members from unplaced members and restructuring. All new members from daily loads come under unplaced member area, its Unplaced Account, Unplaced Cost Centers or Unplaced Channels. Unplaced member is stored

  • Referenced symbol not found error

    Hello, I am using Solaris 5.6 and CC(Sun native) compiler 5.0. I build Xalan1.0 (C++ version) in Solaris and created necessary '.so' files. If I use this '.so' in my development environment, while runing my program it is showing the following error.