Differences on Windows and Linux JVM about java.util.zip package

Hello, there!
I need some help if someone else has already face this problem.
I have a Java server that process the bytes of a SWF File stored in the server and ouptut it to the user through a Servlet. The file was decompressed and re-compressed using the java.util.zip package (Deflater/Inflater).
Everything works fine on Windows Server 2008 server. But now we need to migrate the server to Linux. The problem is that when I test the website now, the file seens to be corrupted.
What really intrigues me is that everything runs normal on Windows Server configuration, when changed to Linux, the final file seens to be corrupeted... what could possible be the cause? Is there any difference between java.util.zip package on Window and Linux JVM?
My Windows Server is:
. Windows Server 2008 (6.0 - x86)
. Apache 2.2.11
. Tomcat 6.0.16.0
. Java JDK 1.6.0_12-b04
My CentOS Server is
. CentOS 5.4 (2.6.18-164.15.1.el5 - i386)
. Apache 2.2.3
. Tomcat 6.0.16.0
. Java JDK 1.6.0_12-b04
Please, if someone could give me a lead, I would appreciate very much!
Thank you all in advance,
CaioToOn!

ejp wrote:
Thank you for the answer, but no. The path is correct.That's not what he meant. Zip file/directory entries are supposed to use / as the path separator. It is possible to use \ but such Zip files will only work under Windows. You may have erred here.Ohhh, I had really missunderstood what Ray said. But, I still think that this is not the problem, since the ZIP is a single SWF file generated by Flex SDK 3.4 and compressed in the ZLIB open standard (as in page 13, at [http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf|http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf] ). This is how Flash Compiler compress the files.
jschell wrote:
If the above suggestions do not solve the problem...Specify in detail with the exact steps used how you determined that it was corrupted.The reason why I believe the SWF is getting corrupted is that when it is loaded by Flash Player (in the client-side) the Player throws a VerifyError: Error # 1033. The [documentation says (see error 1033)|http://help.adobe.com/en_US/AS3LCR/Flash_10.0/runtimeErrors.html] that this error means that the SWF file is corrupted.
As I said, what intrigues me is that this work perfectly in a Windows Server 2008 server. I just had setup a CentOS server and deployed the application. The client-remains unchanged, so why could the result change?
raychen wrote:
I would remove the side effect you are doing and send the file straight through, with decompress and compress, the servlet. It is more likely that you have a bug in your swf processor than the zip library.
I had already tried it when first coding, in Windows Server 2008, it had not worked.
Thank you all for the help.
CaioToOn!

Similar Messages

  • URGENT HELP about java.util.zip.ZipException: invalid entry CRC

    I have a program (JAVA of course) packet on JAR with fat-jar eclipse plugin. This program work well in all my computers except two. On these two computers I receive a java.util.zip.ZipException: invalid entry CRC.
    Both computers have the last version of java, but one is Windows and the other is Linux.
    Any help to find the source of this problem??
    Thanks in advance.

    Sorry, I give poor information about this problem.
    This is the full error showed when I execute this command: java -jar app.jar
    Unable to load resource: java.util.zip.ZipException: invalid entry CRC (expected 0x358054d7 but got 0x7dc370ba)
    java.util.zip.ZipException: invalid entry CRC (expected 0x358054d7 but got 0x7dc370ba)
    at java.util.zip.ZipInputStream.read(Unknown Source)
    at java.util.jar.JarInputStream.read(Unknown Source)
    at java.io.FilterInputStream.read(Unknown Source)
    at com.simontuffs.onejar.JarClassLoader.copy(JarClassLoader.java:818)
    at com.simontuffs.onejar.JarClassLoader.loadBytes(JarClassLoader.java:383)
    at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:371)
    at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:362)
    at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:305)
    at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:224)
    at com.simontuffs.onejar.Boot.run(Boot.java:224)
    at com.simontuffs.onejar.Boot.main(Boot.java:89)
    Exception in thread "main" java.lang.ClassNotFoundException: com.intarex.wizard.IWizard
    at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.simontuffs.onejar.Boot.run(Boot.java:240)
    at com.simontuffs.onejar.Boot.main(Boot.java:89)
    app.jar is a JAR file created with fat-jar eclipse plugin, to make easier to generate a JAR file with all dependencies.
    I think that is not a code related problem, because this program is executed in several computers without errors.
    I trasport this JAR to the client computer via HTTP.
    I'm trying to find clues to find the origin of this problem.
    Thanks.

  • DBLoad utility: (huge) difference between Windows and Linux

    Hello
    I have a backfile of 55M entries to load. I have prepared it under Linux (Dual Core machine + 4GB - Mandriva distribution - java 1.6). When I run DbLoad, here is the (partial) log:
    java -Xmx2048m -jar /home/pd51444/jNplMatchBackfile_Main_0.2/lib/je-3.3.69.jar DbLoad -h . -s group.db -f group.db.txt -v
    loaded 2817812 records 63275 ms - % completed: 5
    loaded 5624893 records 141023 ms - % completed: 10
    loaded 8462602 records 962019 ms - % completed: 15
    loaded 11285385 records 2401566 ms - % completed: 20
    loaded 14094928 records 786746 ms - % completed: 25
    loaded 16914275 records 8965457 ms - % completed: 30
    loaded 19741557 records 15766560 ms - % completed: 35
    loaded 22567310 records 2226015 ms - % completed: 40
    loaded 25376363 records 19662455 ms - % completed: 45
    Then I copied the exact same file on my Windows laptop (dual core + 2GB - XP - java 1.6), and DbLoad goes much faster:
    C:\nplmatch\db>java -Xmx1024m -jar ..\jar\je-3.3.69.jar DbLoad -h . -s group.db -f group.db.txt -v
    Load start: Thu Oct 02 10:33:23 CEST 2008
    loaded 2817812 records 59876 ms - % completed: 5
    loaded 5624893 records 69283 ms - % completed: 10
    loaded 8462602 records 77470 ms - % completed: 15
    loaded 11285385 records 69688 ms - % completed: 20
    loaded 14094928 records 62716 ms - % completed: 25
    loaded 16914275 records 59122 ms - % completed: 30
    loaded 19741557 records 63200 ms - % completed: 35
    loaded 22567310 records 58654 ms - % completed: 40
    loaded 25376363 records 61482 ms - % completed: 45
    loaded 28197663 records 58889 ms - % completed: 50
    loaded 31019453 records 55937 ms - % completed: 55
    loaded 33839878 records 62045 ms - % completed: 60
    loaded 36664839 records 65749 ms - % completed: 65
    loaded 39498035 records 100718 ms - % completed: 70
    loaded 42302599 records 99733 ms - % completed: 75
    loaded 45125268 records 96000 ms - % completed: 80
    loaded 47947180 records 92749 ms - % completed: 85
    loaded 50755655 records 85485 ms - % completed: 90
    loaded 53578015 records 96240 ms - % completed: 95
    Load end: Thu Oct 02 10:57:36 CEST 2008
    Also I use the same je.properties file on both platforms.
    Any idea where this performance problem comes from?
    Thanks in advance
    Best regards
    Philippe

    Hello Phillipe,
    Nothing jumps out at me, but you might try the following:
    . Check the status of disk write caches. On linux, the cache may be disabled and it may be enabled on windows.
    . Does the windows machine have an SSD?
    . Run with -verbose:gc to see if the Linux is being held up by full GC's.
    . Use top or some other utility to see if something else is running on the linux box.
    . Take some random c-\'s to get some stack traces to see what is going on when things get slow.
    . Check on the JVM ergonomics. You may be getting a server or client JVM without knowing. Force it one way or the other with -server or -client.
    Here is a (future) FAQ entry regarding disk write caches (poorly formatted at the moment):
    During my system testing I pulled the power cord on my server to make the ultimate test of JE's durability claims. I am using commitSync() for my transactions, but some of the data that JE said it had committeed was not on disk when the system came back up. What gives?
    Quoting the Berkeley DB Reference Guide:
    Many disk drives contain onboard caches. Some of these
    drives include battery-backup or other functionality that guarantees that all
    cached data will be completely written if the power fails. These drives can
    offer substantial performance improvements over drives without caching support.
    However, some caching drives rely on capacitors or other mechanisms that
    guarantee only that the write of the current sector will complete. These
    drives can endanger your database and potentially cause corruption of your
    data.
    To avoid losing your data, make sure the caching on your disk
    drives is properly configured so the drive will never report that data has
    been written unless the data is guaranteed to be written in the face of a
    power failure. Many times, this means that write-caching on the disk drive
    must be disabled.
    Some operating systems enable the disk write cache by default.
    If you need true durability in the face of a power failure, then you should
    verify that the disk write cache is disabled or that you have some alternative
    means of ensuring durability (e.g. nvram, battery backup, an Uninterruptible
    Power Supply (UPS), Solid State Disk (SSD), etc.) Some disk drives may
    actually require changing hardware jumpers to enable/disable the write cache.
    You can check the status of the write cache using the
    hdparm utility on Linux and the format utility on Solaris.
    On Windows, use the Windows Explorer. Right click on
    the disk drive that you want to check, select Properties,
    click on the Hardware tab, select the desired disk, click
    on the Properties button, click on
    Policies and verify the cache setting with the check box.
    On Windows Server 2003 you generally disable the write caching
    from within the RAID controller software (OEM specific).

  • Bug on native code of OJVM java.util.zip.CRC32.updateBytes(CRC32.java)

    I want to unzip OpenOffice 1.0 files inside the OJVM but it fails into the native method java.util.zip.CRC32.updateBytes(CRC32.java).
    The first execution of the code runs OK, but the second not.
    After a long wait it shutdown the connection and the oracle trace file shows an stack trace like this:
    *** 2003-04-18 11:31:31.926
    *** SESSION ID:(17.97) 2003-04-18 11:31:31.926
    java.lang.IllegalArgumentException
    at java.util.zip.CRC32.updateBytes(CRC32.java)
    at java.util.zip.CRC32.update(CRC32.java)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java)
    at oracle.xml.parser.v2.XMLByteReader.fillByteBuffer(XMLByteReader.java:354)
    at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:142)
    at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:448)
    at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2012)
    at oracle.xml.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:1800)
    at oracle.xml.parser.v2.NonValidatingParser.parseMisc(NonValidatingParser.java:305)
    at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:274)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:254)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
    at com.prism.cms.frontend.EditPropertiesActions.processUpload(EditPropertiesActions.java:1901)
    Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x6d3a74a0, PC: [0x40263600, eomake_reference_to_eobjec
    t()+80]
    Registers:
    %eax: 0x54a54000 %ebx: 0x40429c20 %ecx: 0x54a546bf
    %edx: 0x6d3a7478 %edi: 0x402b27d0 %esi: 0x45c718ac
    %esp: 0xbfffbf20 %ebp: 0xbfffbf48 %eip: 0x40263600
    %efl: 0x00010206
    The code of the java method is:
    public static void processUpload(String id_page, String longname,
    String filename, String filetype,
    String s00)
    throws SQLException {
    Integer p_id = new Integer(id_page);
    String toSource;
    XMLDocument doc = null;
    DOMParser theParser = null;
    InputStream XSLStream = null;
    BufferedWriter out = null;
    #sql { select path||name||'.html' into :toSource from pages where id_page=:p_id };
    if ("Cancel".equalsIgnoreCase(s00)) {
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    return;
    if ("no-file".equals(filename) && "no-contenttpye".equals(filetype)) {
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    return;
    if ("xml".equalsIgnoreCase(filetype))
    #sql { call CMSj.moveFromUpload(:filename,:p_id) };
    else if ("sxw".equalsIgnoreCase(filetype)) {
    XSLProcessor processor = new XSLProcessor();
    XSLStylesheet theXSLStylesheet = null;
    BLOB locator = null;
    // open sxw file, it will be in zip format with a file named content.xml
    // then convert content.xml to document-v10.dtd with an stylesheet
    #sql { select blob_content into :locator from wpg_document where name = :filename for update };
    ZipInputStream zin = new ZipInputStream(locator.binaryStreamValue());
    ZipEntry entry;
    try {
    while((entry=zin.getNextEntry())!=null)
    if ("content.xml".equalsIgnoreCase(entry.getName())) {
    Integer newVersion;
    CLOB dstDoc;
    CMSDocURLStreamHandlerFactory.enableCMSDocURLs();
    try {
    URL inUrl = new URL("cms:/stylesheets/sxw2document-v10.xsl");
    XSLStream = inUrl.openStream();
    // Create the Stylesheet from the stream
    theXSLStylesheet = processor.newXSLStylesheet(XSLStream);
    // Stores the document processing it with the given stylesheet
    theParser = new DOMParser();
    theParser.setValidationMode(theParser.NONVALIDATING);
    theParser.setBaseURL(new URL("cms:/dtd/"));
    theParser.parse(zin);
    doc = theParser.getDocument();
    #sql { SELECT NVL(MAX(version),0)+1 INTO :newVersion FROM content
    WHERE cn_id_page = :p_id };
    #sql { INSERT INTO content( cn_id_page, version, owner, status, source_file,
    file_size, content, created, modified, created_by,
    modified_by)
    VALUES ( :p_id, :newVersion, sys_context('cms_context','user_id'),
    'Uploaded', :filename, 0 , EMPTY_CLOB(), SYSDATE, SYSDATE,
    sys_context('cms_context','user_id'),
    sys_context('cms_context','user_id')) };
    #sql { SELECT content INTO :dstDoc FROM content
    WHERE cn_id_page = :p_id AND version = :newVersion for update };
    #sql { call DBMS_LOB.trim(:inout dstDoc,0) };
    out = new BufferedWriter(dstDoc.getCharacterOutputStream(),dstDoc.getChunkSize());
    processor.processXSL(theXSLStylesheet, doc, new PrintWriter(out));
    #sql { delete from wpg_document where name=:filename };
    } catch (SAXParseException spe) {
    throw new SQLException("processUpload SAXParseException: "+xmlError(spe));
    } catch (SAXException se) {
    throw new SQLException("processUpload SAXException: "+se.getLocalizedMessage());
    } catch (XSLException xsle) {
    throw new SQLException("processUpload XSLException: "+xsle.getLocalizedMessage());
    } finally {
    if (XSLStream!=null)
    XSLStream.close();
    if (theParser!=null)
    theParser = null;
    if (out!=null) {
    out.flush();
    out.close();
    zin.close();
    } catch (IOException ioe) {
    throw new SQLException("processUpload IOException: "+ioe.getLocalizedMessage());
    } finally {
    if (XSLStream!=null)
    XSLStream = null;
    if (out!=null)
    out = null;
    if (zin!=null)
    zin = null;
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    Basically it takes the content from a BLOB column of the wpg_document table, unzip it using java.util.zip package, look for the file content.xml and parse it using Oracle XML toolkit.
    Using an open source utility which replace java.util.package (http://jazzlib.sourceforge.net/) it works perfect because is a pure java application.
    Best regards, Marcelo.
    PD: I am using Oracle 9.2.0.2 on Linux.

    The cause of errors was a dying Westen Digital drive, specially the 48G partition reserved only for $ORACLE_BASE (/dev/sdb3 mounted on /opt/oracle).
    A simple quick scan of unmounted partition (badblocks -v /dev/sdb3) reported more than thousand new bad blocks (compared to the last scan six months ago). Although I strongly believe, specially in the case of WDC drives, that the best utility to "repair" bad blocks is the one that opens a window and prints the message: "Go to the nearest shop and buy a new drive", I was very curious to prove my suspicion just on this drive. After zero-filling the partition with dd, then formatting it (mke2fs -cc) and mounting again, the 11g installation and database creation (on the same partition) successfully completed, performing fast and smoothly. To make sure it was not a casual event, I repeated the installation once again with full success. The database itself is working fine (by now). Well, the whole procedure took me more than four hours, but I'm pretty satisfied. I learned once again - stay away from Western Digital. As Oracle cannot rely on dying drive, my friend is going tomorrow to spend a 150+ euro on two 250G Seagate Barracudas and replace both WDC drives, even though the first drive seems to be healthy.
    In general there is no difference between loading correct data from good disk into bad memory and loading the incorrect data from dying disk into good memory. In both cases the pattern is damaged. For everyone who runs into the problem similar to this, and the cause cannot be easily determined, the rule of thumb must be:
    1. test memory and, if it shows any error, check sockets and test memory modules individually
    2. check disks for bad blocks regardless of the result of memory testing
    Therefore I consider your answer being generally correct.
    Regards
    NJ

  • WHY? java.util.zip.ZipException: error in opening zip file

    i'm trying to restart tomcat 4.1 (bin/startup.bat) and getting the following error (windows xp profession machine)
    code:
    java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:112)
    at java.util.jar.JarFile.<init>(JarFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:65)
    at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1082)
    at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
    at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
    Bootstrap: Class loader creation threw exception
    java.lang.IllegalArgumentException: addRepositoryInternal: java.util.zip.ZipException: error in opening zip file
         at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1110)
         at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
         at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
    thanks!

    These exceptions occur when opening JAR files (since they are renamed ZIPs). Most likely the file cannot be ffound because you have classpaths setup incorrectly

  • Zip (java.util.zip) implementation for Java ME

    As part of the UrbanWeb project at the Aarhus University in Denmark, the Java util.zip package has been ported to the Java Microedition (Java JME) platform. The porting was based on the GNU Classpath implementation. To avoid future conflicts and name clashes, the package was moved to gnu.classpath.
    The package is released under the original license and is freely available for all mobile Java developers.
    Please visit the project page for more information about the zip utilities (util.zip) for the Java JME platform:
    [http://www.interactivespaces.net/projects/project.php?projectId=49&mode=prototypes|http://www.interactivespaces.net/projects/project.php?projectId=49&mode=prototypes]
    Best regards, Allan Hansen

    We have simple applied the original license. See http://www.gnu.org/software/classpath/license.html
    Classpath is distributed under the terms of the GNU General Public License with the following clarification and special exception.
    Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
    As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
    As such, it can be used to run, create and distribute a large class of applications and applets. When GNU Classpath is used unmodified as the core class library for a virtual machine, compiler for the java languge, or for a program written in the java programming language it does not affect the licensing for distributing those programs directly.
    Best regards, Allan Hansen

  • Java.util.zip

    Hi,
    I'm using java.util.zip package and I want to remove the directory
    structure from the zipped files. How to make a ZipEntry without having the directory path of the original file in the zipped file.
    Thanks in Advance
    Carlos

    Carlos
    What you need to do is create a ZipEntry for that file without the directory structure on it.
    The sample snippet below will archive a directory and all it's subdirectories, creating a zip file with the base name, inside a specified storage location. All the files in the zip are created relative to the base dir.
    Hope it helps,
    Neil
    :o)
      static final int BUFFER = 2048;
      public void zip() throws Exception
            File dirToArchive = new File("C:\Test\ZipMe");
            File storagePlace = new File("C:\Zips");
         ArrayList allFilesToZip = new ArrayList();
         this.getFiles(allFilesToZip, dirToArchive);
         String storeName = this.storagePlace.getAbsolutePath()+File.separator+dirToArchive.getName()+".zip";
         FileOutputStream dest = new FileOutputStream(storeName);
         ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));
         byte data[] = new byte[BUFFER];
         BufferedInputStream origin = null;
         for (Iterator itr = allFilesToZip.iterator(); itr.hasNext();)
           File current = (File)itr.next();
           System.out.println("Adding : "+current.getName());
           if (current.isFile()) // skip dirs, don't need them
             FileInputStream fi = new FileInputStream(current);
             origin = new BufferedInputStream(fi, BUFFER);
             String newEntryName = current.getAbsolutePath();
                // cut off the front of the file's absolute path the same
                // number of characters as our parent archive directory has
                // plus one for the file seperator
                // This leaves us with a 'relative' path name for the entry
                // I've left the code here for a little clarity on what's going on
                // but you'll want to put the calculation in a local variable
                // outside the loop as it doesn't change
                newEntryName = newEntryName.substring(this.dirToArchive.getAbsolutePath().length()+1);
             ZipEntry entry = new ZipEntry(newEntryName);
             out.putNextEntry(entry);
             int count;
             while((count = origin.read(data, 0, BUFFER)) != -1)
                out.write(data, 0, count);
             origin.close();
         out.close();
       private void getFiles(ArrayList inHere, File dir)
          File[] files = dir.listFiles();
          for (int i=0; i<files.length; i++)
            File current = files;
         inHere.add(current);
         if (current.isDirectory())
              getFiles(inHere, current); // recurse

  • Executing WINWORD from both Windows and linux using Java

    Dear All,
    I have a problem when trying to use Runtime class to execute a winword document. My code is as follows.
    Runtime r= Runtime.getRuntime();
    try{
    r.exec("rundll32"+" "+"url.dll,FileProtocolHandler"+" "+"WINWORD"+ " "+"file://C://welkom.doc");
    catch(Exception ex){
    System.out.println("Unable to open the doc file:"+ex);
    When I execute this swing application with the above, the program is unable to open the specific file. And it says "Problem with the short cut, unable to open the file". When I run the program without the file name, it opens a new doc file.
    Attn: what I want to do here is I need to open the winword file from both windows and linux. So I cannot use the relative path of the WINWORD.exe file.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Bala

    If you take a look at the api, there's an exec(String[]) method. This is the one you should use when calling a command with multiple parameters.
    so something like...
    String[] cmd = new String[] {"rundll32", "url.dll,FileProtocolHandler", "WINWORD", "file://C://welkom.doc"}
    r.exec(cmd);

  • RMI-server works on Windows and Linux but not on Solaris

    I wrote an application which uses RMI. The server is successfully tested on Windows and Linux. However it doesn't work on Solaris.
    Naming.lookup works, I can find the server. But calling a method on my remote interface causes a ConnectionException:
    java.rmi.ConnectException: Connection refused to host: 192.168.1.123; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at at.triton.javaengine.server.ServerImpl_Stub.connectToWindow(Unknown Source)
         at at.triton.javaengine.client.JavaEngineClient.connectToWindow(JavaEngineClient.java:288)
         at at.triton.javaengine.client.JavaEngineClient.main(JavaEngineClient.java:787)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         ... 7 moreNote that I have almost no experience with Solaris.
    Additional information about the common pitfalls which I have already checked:
    * rmiregistry finds the server classes (the exception was different without them)
    * the server is in the LAN and the desktop firewall of the client is double-checked to let the required ports through to any destination.

    java.rmi.ConnectException: Connection refused tohost: >192.168.1.123; nested exception is:
    java.net.ConnectException: Connection refused:
    : connect
    Clearly indicates what is happening inside there.Clearly indicates that you don't know what you are talking about.
    Any applications invoked with a security manager must
    be granted explicit permission to access local system
    resources apart from read access to the directory and
    its subdirectories where the program is invoked.Any application that gets a java.net.ConnectionException: Connection
    refused is getting it more or less directly from the TCP/IP stack. If the problem had anything to do with policies and permissions and SecurityManagers, it would have been an AccessControlException .
    if your client RMI doesnt include these lines then If your 'client RMI' does include these lines then I would like a definition of what exactly a 'client RMI' really is, because I've been using RMI for ten years and wrote a book about it and I certainly don't know.
    1)just include these lines
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new
    SecurityManager());In other words, if the application doesn't already have a security manager, in which case the contents of the policy file or the 'client RMI', or whatever you want to call it, are completely irrelevant, such that they couldn't possibly be having the problem you desrcribe, add a security manager so that we get into the land where you might possibly know what you're talking about?
    e a policy file
    grant {
    permission java.net.SocketPermission
    "192.168.1.123:1099", "accept,connect,resolve";
    };And this is completely unnecessary if there isn't a security manager, and completely unrelated to the OP's problem.

  • Problem with JOGL applet on Windows and Linux

    I made a simple test applet using JOGL involving a simple animation and a KeyListener. It put it on a web site, and it loads and runs correctly on my Mac, but it gives a blank box with a red x in it on Windows and Linux. Here is the code that I used to deploy the applet. I based it off the sample from https://jogl-demos.dev.java.net/applettest.html
    <applet code="TestApplet"
    width=300
    height=300
    archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
    http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
    http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
    http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl-demos.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="TestApplet">
    <param name="subapplet.displayname" value="JOGL Applet">
    <param name="noddraw.check" value="true">
    <param name="progressbar" value="true">
    <param name="jnlpNumExtensions" value="1">
    <param name="jnlpExtension1"
    value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
    </applet>
    Does anyone know what I'm doing wrong? Thanks for your help.

    never mind. i figured it out.

  • Different behaviour on windows and linux

    On a text field , I have attached a number converter, just to make sure that user enters the number else gets an error message.
    Things looks fine but it behaves differently on windows and linux os.
    When I am running this application on windows if user enters
    123456.46, it is stored as it is i.e 123456.46 in MySQL db.
    However, if run this on linux and if user enters 123456.46 then it is stored in MySQL db as 123456.460000000006402842700481414794921875
    I am not sure where the problem is. Can somebody guide me about it.
    Thanks.

    Not sure why the behaviour is different, but coded to remove the extra fractions.

  • Media Foundation Source or H264 / AC3 differences between Windows and Phone 8?

    I've got a working Matroska (MKV) Media Foundation Source for a Windows Store app (PC x86). It will play several different matroska files that contain H264 encoded video and AC3-encoded audio.  It even has seek support.  I've written the app
    as a HTML/typescript Universal app with the MF Source as a C++ dll. 
    The problem is that the same code will not work on Windows Phone 8.  I can play videos that don't require the external MF Source (i.e. MP4 files and AVI files) just fine on both platforms through my app, but the same MKV videos that played on an x86
    PC will not play on Windows Phone 8 (Lumia 920).
    I looked at the specs for the Snapdragon processor and it should be able to support both H264 at 720p resolution and AC3 (2-channel only).  So I don't know what else I need to do to get this to work on WP8.  The audio I'm trying to play is actually
    6-channel, so that made me wonder if it was failing because WP8 supports 2-channel max, but I would have thought the audio just wouldn't work and the video would play normally.
    Does anyone have any suggestions?
    *edit* - just to be more specific, I can parse the file and create the presentation descriptor without errors.  But when I finish opening the file and call the event for that, nothing else happens.  What is weird is that the javascript video player
    never throws the "canplay" event, nor does it throw the "error" event.
    Lee McPherson

    Thanks, not a bad suggestion to try. 
    On my Windows machine, I tried to get the MediaEncodingProfile via the createFromFileAsyc method.  With a known file type, it outputs all properties of the video and audio streams (bitrate, etc).  With an MKV file (container file with H264 video
    and AC3 audio), I only get the type and subtype properties. Everything else is zero or null.  This is because in my MFSource, I only set the type and subtype.  This still allows the video to play on my windows machine.  I assume the
    built-in MFTransform for H264 video-to-uncompressed video parses the stream to get the relevant information.  Likewise for audio.
    On Windows Phone, when querying the file's MediaEncodingProfile, I get the same result. This is telling me that my MFSource will parse the file properly and set the subtypes for video and audio correctly.  Everything else is still null or zero. 
    However, the file does not play.  There is no returned event to the video element that it even *can* play.
    Perhaps, I need to fill in the video and audio stream properties on the Windows Phone version.  I really don't want to because that would mean having to parse some of the underlying video and audio streams themselves, not just parsing the container
    information.  (More work!)  But this is what I mean when I ask about the differences between Windows and Windows Phone... perhaps the WP8.1 & Windows MFTransforms are different? 
    *EDIT* - I do get a JavaScript Console error that I didn't notice before: AUDIO/VIDEO: unknown MIME type.  (VS error code: MEDIA12899)
    Lee McPherson

  • File Path for Windows and Linux

    hi can any one give solution how to implement code for odi file copy .
    i am using Same Code for Windows and Linux
    OdiFileCopy "-FILE=#Var_Lookup_File_Path \ Employee.csv" "-TOFILE=#Var_Lookup_File_Path_Backup\Employee.csv" "-RECURSE=NO" "-OVERWRITE=YES" "-CASESENS=NO"
    the problem of above code is
    it is working in windows but my Prod is Linux environment.
    in linux \ not works.. / will work
    please suggest how to concatnate variable and file without' \' '/'

    Thanks Phani
    i think in OS command also we may give path like #variable\File Name.
    So how it will replace \ with / in Linux.
    Could you give code for my Scenario..
    Thanks for helping

  • Oracle10G and oracle11gr1 for windows and Linux

    Hi
    Can you help me in getting these Softwares
    Oracle10G and oracle11gr1 for windows and Linux ,I am unable to get them .
    Thanks in advance
    Sanjeev Sen

    Oracle10G NOT SUPPORTED ANYMORE,NO SOFTWARE AVAILABLE TO DOWNLOAD TOO
    oracle11gr1 for windows and Linux > http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  • Dual booting in Windows and Linux, but only Linux has calendar, TB 31.0

    I'm dual booting using Linux Mint and Windows 7. I have TB 31.0 installed in each OS. TB in Linux has calendar capability; in Windows, there's nothing (by nothing, I mean no calendars - I can't see their properties, for instance, nor access them in any way).
    I should add that both Windows and Linux TB programs are sharing the same profile folder (located on a separate partition), hence, all the same add-ons, passwords, etc.
    The error console logs the following:
    Timestamp: 14/08/2014 6:41:33 PM
    Error: Components.classes[cid] is undefined
    Source File: resource://calendar/modules/calUtils.jsm -> file:///P:/PortableApps/ThunderbirdPortable/Data/profile/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calUtils.js
    Line: 17
    There are a variety of flow on errors, related to this.
    My apologies for posting this in this way; I had intended to submit this via the crashreporter, but I'm having trouble getting the program to crash with this error just now.

    A reply to my own question: it turns out that while sharing a profile works pretty well for most purposes, with Lightning it does not, as the extension has different Linux and Windows versions. The problem is solved quite simply: by not using the same profile for each version.
    Glad to see that no one wasted time on this one (except me, of course).

Maybe you are looking for

  • Line In Question

    Okay, so I was looking around on the forums for a bit just to make sure there wasn't a thread on this before, so I apologize if there is one and I missed it... My question is this: I have one set of speakers on my desktop, what I want to do is send t

  • Logitech Wireless Headset and Mac Book Pro

    I recently purchased a Logitech H600 wireless headset. However I cant get my MBP to recognise the nano receiver. I have managed to get a connection between the MBP and the headset using standard bluetooth however the mic on the headset is not working

  • I removed an app from my iPad2 and attempted to redownload from app store but message says it is already installed

    I deleted an app from iPad 2 and attempted to reinstall from app store but the icon says "Installed".  I don't see the icon on screen so how can I get the app deleted to reinstall?

  • Preserving SOA Logical Ports and Trust Relationships during DB Refresh

    Hi, I have been searching for this for a while and have not had any luck so far. I thought maybe the vast experience in this community might be able to help me. I am trying to preserve the SOA Logical Ports and the SMT1 Trust relationships of the tar

  • GR slip - Number of copies to vary based on Country key

    Hi, We are a multinational company and we have a requirement related to GR slips. The number of copies of GR slip printed should vary based on the country key, where the user is printing the GR slip....for e.g. if it is US then it should be 3 copies,